react-native-maplibre-gl-js 1.0.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 (137) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +146 -0
  3. package/lib/module/communication/messages.types.js +4 -0
  4. package/lib/module/communication/messages.types.js.map +1 -0
  5. package/lib/module/communication/messages.utils.js +27 -0
  6. package/lib/module/communication/messages.utils.js.map +1 -0
  7. package/lib/module/index.js +14 -0
  8. package/lib/module/index.js.map +1 -0
  9. package/lib/module/package.json +1 -0
  10. package/lib/module/react-native/components/Map/Map.js +11 -0
  11. package/lib/module/react-native/components/Map/Map.js.map +1 -0
  12. package/lib/module/react-native/components/Map/Map.types.js +4 -0
  13. package/lib/module/react-native/components/Map/Map.types.js.map +1 -0
  14. package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js +18 -0
  15. package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js.map +1 -0
  16. package/lib/module/react-native/components/MapProvider/MapProvider.js +118 -0
  17. package/lib/module/react-native/components/MapProvider/MapProvider.js.map +1 -0
  18. package/lib/module/react-native/components/MapProvider/MapProvider.types.js +4 -0
  19. package/lib/module/react-native/components/MapProvider/MapProvider.types.js.map +1 -0
  20. package/lib/module/react-native/components/Marker/Marker.js +11 -0
  21. package/lib/module/react-native/components/Marker/Marker.js.map +1 -0
  22. package/lib/module/react-native/components/Marker/Marker.types.js +4 -0
  23. package/lib/module/react-native/components/Marker/Marker.types.js.map +1 -0
  24. package/lib/module/react-native/components/Popup/Popup.js +12 -0
  25. package/lib/module/react-native/components/Popup/Popup.js.map +1 -0
  26. package/lib/module/react-native/components/Popup/Popup.types.js +4 -0
  27. package/lib/module/react-native/components/Popup/Popup.types.js.map +1 -0
  28. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js +23 -0
  29. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js.map +1 -0
  30. package/lib/module/react-native/components-factory/createWebObjectAsComponent.types.js +4 -0
  31. package/lib/module/react-native/components-factory/createWebObjectAsComponent.types.js.map +1 -0
  32. package/lib/module/react-native/components-factory/hooks/useWebObjectMethodsProxy.js +54 -0
  33. package/lib/module/react-native/components-factory/hooks/useWebObjectMethodsProxy.js.map +1 -0
  34. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.js +68 -0
  35. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.js.map +1 -0
  36. package/lib/module/react-native/components-factory/hooks/useWebObjectOptionsUpdater.js +20 -0
  37. package/lib/module/react-native/components-factory/hooks/useWebObjectOptionsUpdater.js.map +1 -0
  38. package/lib/module/react-native/hooks/atoms/useMapAtoms.js +198 -0
  39. package/lib/module/react-native/hooks/atoms/useMapAtoms.js.map +1 -0
  40. package/lib/module/react-native/hooks/atoms/useMapAtoms.utils.js +18 -0
  41. package/lib/module/react-native/hooks/atoms/useMapAtoms.utils.js.map +1 -0
  42. package/lib/module/react-native/logger/rn-logger.js +42 -0
  43. package/lib/module/react-native/logger/rn-logger.js.map +1 -0
  44. package/lib/module/typedoc.js +4 -0
  45. package/lib/module/typedoc.js.map +1 -0
  46. package/lib/module/web/bridge/ReactNativeBridge.js +38 -0
  47. package/lib/module/web/bridge/ReactNativeBridge.js.map +1 -0
  48. package/lib/module/web/generated/index.html +18 -0
  49. package/lib/module/web/generated/index.js +21 -0
  50. package/lib/module/web/generated/index.js.map +1 -0
  51. package/lib/module/web/generated/webview_static_html.js +23529 -0
  52. package/lib/module/web/generated/webview_static_html.js.map +1 -0
  53. package/lib/module/web/logger/web-logger.js +35 -0
  54. package/lib/module/web/logger/web-logger.js.map +1 -0
  55. package/lib/module/web/maplibre-gl-js/MapController.js +264 -0
  56. package/lib/module/web/maplibre-gl-js/MapController.js.map +1 -0
  57. package/lib/typescript/package.json +1 -0
  58. package/lib/typescript/src/communication/messages.types.d.ts +105 -0
  59. package/lib/typescript/src/communication/messages.types.d.ts.map +1 -0
  60. package/lib/typescript/src/communication/messages.utils.d.ts +6 -0
  61. package/lib/typescript/src/communication/messages.utils.d.ts.map +1 -0
  62. package/lib/typescript/src/index.d.ts +19 -0
  63. package/lib/typescript/src/index.d.ts.map +1 -0
  64. package/lib/typescript/src/react-native/components/Map/Map.d.ts +9 -0
  65. package/lib/typescript/src/react-native/components/Map/Map.d.ts.map +1 -0
  66. package/lib/typescript/src/react-native/components/Map/Map.types.d.ts +70 -0
  67. package/lib/typescript/src/react-native/components/Map/Map.types.d.ts.map +1 -0
  68. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts +9 -0
  69. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts.map +1 -0
  70. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.hooks.d.ts +12 -0
  71. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.hooks.d.ts.map +1 -0
  72. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts +12 -0
  73. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts.map +1 -0
  74. package/lib/typescript/src/react-native/components/Marker/Marker.d.ts +9 -0
  75. package/lib/typescript/src/react-native/components/Marker/Marker.d.ts.map +1 -0
  76. package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts +31 -0
  77. package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts.map +1 -0
  78. package/lib/typescript/src/react-native/components/Popup/Popup.d.ts +9 -0
  79. package/lib/typescript/src/react-native/components/Popup/Popup.d.ts.map +1 -0
  80. package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts +25 -0
  81. package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts.map +1 -0
  82. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.d.ts +5 -0
  83. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.d.ts.map +1 -0
  84. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts +129 -0
  85. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts.map +1 -0
  86. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMethodsProxy.d.ts +12 -0
  87. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMethodsProxy.d.ts.map +1 -0
  88. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.d.ts +12 -0
  89. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.d.ts.map +1 -0
  90. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectOptionsUpdater.d.ts +5 -0
  91. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectOptionsUpdater.d.ts.map +1 -0
  92. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.d.ts +40 -0
  93. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.d.ts.map +1 -0
  94. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.utils.d.ts +9 -0
  95. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.utils.d.ts.map +1 -0
  96. package/lib/typescript/src/react-native/logger/rn-logger.d.ts +12 -0
  97. package/lib/typescript/src/react-native/logger/rn-logger.d.ts.map +1 -0
  98. package/lib/typescript/src/typedoc.d.ts +8 -0
  99. package/lib/typescript/src/typedoc.d.ts.map +1 -0
  100. package/lib/typescript/src/web/bridge/ReactNativeBridge.d.ts +14 -0
  101. package/lib/typescript/src/web/bridge/ReactNativeBridge.d.ts.map +1 -0
  102. package/lib/typescript/src/web/generated/index.d.ts +2 -0
  103. package/lib/typescript/src/web/generated/index.d.ts.map +1 -0
  104. package/lib/typescript/src/web/generated/webview_static_html.d.ts +2 -0
  105. package/lib/typescript/src/web/generated/webview_static_html.d.ts.map +1 -0
  106. package/lib/typescript/src/web/logger/web-logger.d.ts +11 -0
  107. package/lib/typescript/src/web/logger/web-logger.d.ts.map +1 -0
  108. package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts +15 -0
  109. package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts.map +1 -0
  110. package/package.json +196 -0
  111. package/src/communication/messages.types.ts +121 -0
  112. package/src/communication/messages.utils.ts +58 -0
  113. package/src/index.ts +31 -0
  114. package/src/react-native/components/Map/Map.tsx +14 -0
  115. package/src/react-native/components/Map/Map.types.ts +149 -0
  116. package/src/react-native/components/MapProvider/MapProvider.hooks.ts +13 -0
  117. package/src/react-native/components/MapProvider/MapProvider.tsx +139 -0
  118. package/src/react-native/components/MapProvider/MapProvider.types.ts +12 -0
  119. package/src/react-native/components/Marker/Marker.tsx +14 -0
  120. package/src/react-native/components/Marker/Marker.types.ts +56 -0
  121. package/src/react-native/components/Popup/Popup.tsx +14 -0
  122. package/src/react-native/components/Popup/Popup.types.ts +43 -0
  123. package/src/react-native/components-factory/createWebObjectAsComponent.ts +33 -0
  124. package/src/react-native/components-factory/createWebObjectAsComponent.types.ts +176 -0
  125. package/src/react-native/components-factory/hooks/useWebObjectMethodsProxy.ts +61 -0
  126. package/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.ts +79 -0
  127. package/src/react-native/components-factory/hooks/useWebObjectOptionsUpdater.ts +29 -0
  128. package/src/react-native/hooks/atoms/useMapAtoms.ts +261 -0
  129. package/src/react-native/hooks/atoms/useMapAtoms.utils.ts +15 -0
  130. package/src/react-native/logger/rn-logger.ts +51 -0
  131. package/src/typedoc.ts +35 -0
  132. package/src/web/bridge/ReactNativeBridge.ts +44 -0
  133. package/src/web/generated/index.html +18 -0
  134. package/src/web/generated/index.ts +17 -0
  135. package/src/web/generated/webview_static_html.ts +23528 -0
  136. package/src/web/logger/web-logger.ts +36 -0
  137. package/src/web/maplibre-gl-js/MapController.ts +322 -0
@@ -0,0 +1,2 @@
1
+ export declare const WEBVIEW_STATIC_HTML = "<!doctype html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover\"\n />\n <style>\n html, body, #app { margin:0; padding:0; width:100%; height:100%; }\n </style>\n <!-- maplibre-gl.css will be inlined by the build step -->\n<style>.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0,0,0,0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}</style></head>\n<body>\n<div id=\"app\"></div>\n<!-- index.js will be inlined by the build step -->\n<script>\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n ));\n\n // node_modules/maplibre-gl/dist/maplibre-gl.js\n var require_maplibre_gl = __commonJS({\n \"node_modules/maplibre-gl/dist/maplibre-gl.js\"(exports, module) {\n (function(global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? module.exports = factory() : typeof define === \"function\" && define.amd ? define(factory) : (global = typeof globalThis !== \"undefined\" ? globalThis : global || self, global.maplibregl = factory());\n })(exports, (function() {\n \"use strict\";\n var maplibregl2 = {};\n var modules = {};\n function define2(moduleName, _dependencies, moduleFactory) {\n modules[moduleName] = moduleFactory;\n if (moduleName !== \"index\") {\n return;\n }\n var workerBundleString = \"var sharedModule = {}; (\" + modules.shared + \")(sharedModule); (\" + modules.worker + \")(sharedModule);\";\n var sharedModule = {};\n modules.shared(sharedModule);\n modules.index(maplibregl2, sharedModule);\n if (typeof window !== \"undefined\") {\n maplibregl2.setWorkerUrl(window.URL.createObjectURL(new Blob([workerBundleString], { type: \"text/javascript\" })));\n }\n return maplibregl2;\n }\n ;\n define2(\"shared\", [\"exports\"], (function(t) {\n \"use strict\";\n function e(t2, e2, r2, n2) {\n return new (r2 || (r2 = Promise))((function(i2, s2) {\n function o2(t3) {\n try {\n l2(n2.next(t3));\n } catch (t4) {\n s2(t4);\n }\n }\n function a2(t3) {\n try {\n l2(n2.throw(t3));\n } catch (t4) {\n s2(t4);\n }\n }\n function l2(t3) {\n var e3;\n t3.done ? i2(t3.value) : (e3 = t3.value, e3 instanceof r2 ? e3 : new r2((function(t4) {\n t4(e3);\n }))).then(o2, a2);\n }\n l2((n2 = n2.apply(t2, e2 || [])).next());\n }));\n }\n function r(t2, e2) {\n this.x = t2, this.y = e2;\n }\n function n(t2) {\n return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, \"default\") ? t2.default : t2;\n }\n var i, s;\n \"function\" == typeof SuppressedError && SuppressedError, r.prototype = { clone() {\n return new r(this.x, this.y);\n }, add(t2) {\n return this.clone()._add(t2);\n }, sub(t2) {\n return this.clone()._sub(t2);\n }, multByPoint(t2) {\n return this.clone()._multByPoint(t2);\n }, divByPoint(t2) {\n return this.clone()._divByPoint(t2);\n }, mult(t2) {\n return this.clone()._mult(t2);\n }, div(t2) {\n return this.clone()._div(t2);\n }, rotate(t2) {\n return this.clone()._rotate(t2);\n }, rotateAround(t2, e2) {\n return this.clone()._rotateAround(t2, e2);\n }, matMult(t2) {\n return this.clone()._matMult(t2);\n }, unit() {\n return this.clone()._unit();\n }, perp() {\n return this.clone()._perp();\n }, round() {\n return this.clone()._round();\n }, mag() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }, equals(t2) {\n return this.x === t2.x && this.y === t2.y;\n }, dist(t2) {\n return Math.sqrt(this.distSqr(t2));\n }, distSqr(t2) {\n const e2 = t2.x - this.x, r2 = t2.y - this.y;\n return e2 * e2 + r2 * r2;\n }, angle() {\n return Math.atan2(this.y, this.x);\n }, angleTo(t2) {\n return Math.atan2(this.y - t2.y, this.x - t2.x);\n }, angleWith(t2) {\n return this.angleWithSep(t2.x, t2.y);\n }, angleWithSep(t2, e2) {\n return Math.atan2(this.x * e2 - this.y * t2, this.x * t2 + this.y * e2);\n }, _matMult(t2) {\n const e2 = t2[2] * this.x + t2[3] * this.y;\n return this.x = t2[0] * this.x + t2[1] * this.y, this.y = e2, this;\n }, _add(t2) {\n return this.x += t2.x, this.y += t2.y, this;\n }, _sub(t2) {\n return this.x -= t2.x, this.y -= t2.y, this;\n }, _mult(t2) {\n return this.x *= t2, this.y *= t2, this;\n }, _div(t2) {\n return this.x /= t2, this.y /= t2, this;\n }, _multByPoint(t2) {\n return this.x *= t2.x, this.y *= t2.y, this;\n }, _divByPoint(t2) {\n return this.x /= t2.x, this.y /= t2.y, this;\n }, _unit() {\n return this._div(this.mag()), this;\n }, _perp() {\n const t2 = this.y;\n return this.y = this.x, this.x = -t2, this;\n }, _rotate(t2) {\n const e2 = Math.cos(t2), r2 = Math.sin(t2), n2 = r2 * this.x + e2 * this.y;\n return this.x = e2 * this.x - r2 * this.y, this.y = n2, this;\n }, _rotateAround(t2, e2) {\n const r2 = Math.cos(t2), n2 = Math.sin(t2), i2 = e2.y + n2 * (this.x - e2.x) + r2 * (this.y - e2.y);\n return this.x = e2.x + r2 * (this.x - e2.x) - n2 * (this.y - e2.y), this.y = i2, this;\n }, _round() {\n return this.x = Math.round(this.x), this.y = Math.round(this.y), this;\n }, constructor: r }, r.convert = function(t2) {\n if (t2 instanceof r) return t2;\n if (Array.isArray(t2)) return new r(+t2[0], +t2[1]);\n if (void 0 !== t2.x && void 0 !== t2.y) return new r(+t2.x, +t2.y);\n throw new Error(\"Expected [x, y] or {x, y} point format\");\n };\n var o = (function() {\n if (s) return i;\n function t2(t3, e2, r2, n2) {\n this.cx = 3 * t3, this.bx = 3 * (r2 - t3) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * e2, this.by = 3 * (n2 - e2) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t3, this.p1y = e2, this.p2x = r2, this.p2y = n2;\n }\n return s = 1, i = t2, t2.prototype = { sampleCurveX: function(t3) {\n return ((this.ax * t3 + this.bx) * t3 + this.cx) * t3;\n }, sampleCurveY: function(t3) {\n return ((this.ay * t3 + this.by) * t3 + this.cy) * t3;\n }, sampleCurveDerivativeX: function(t3) {\n return (3 * this.ax * t3 + 2 * this.bx) * t3 + this.cx;\n }, solveCurveX: function(t3, e2) {\n if (void 0 === e2 && (e2 = 1e-6), t3 < 0) return 0;\n if (t3 > 1) return 1;\n for (var r2 = t3, n2 = 0; n2 < 8; n2++) {\n var i2 = this.sampleCurveX(r2) - t3;\n if (Math.abs(i2) < e2) return r2;\n var s2 = this.sampleCurveDerivativeX(r2);\n if (Math.abs(s2) < 1e-6) break;\n r2 -= i2 / s2;\n }\n var o2 = 0, a2 = 1;\n for (r2 = t3, n2 = 0; n2 < 20 && (i2 = this.sampleCurveX(r2), !(Math.abs(i2 - t3) < e2)); n2++) t3 > i2 ? o2 = r2 : a2 = r2, r2 = 0.5 * (a2 - o2) + o2;\n return r2;\n }, solve: function(t3, e2) {\n return this.sampleCurveY(this.solveCurveX(t3, e2));\n } }, i;\n })(), a = n(o);\n let l, u;\n function c() {\n return null == l && (l = \"undefined\" != typeof OffscreenCanvas && new OffscreenCanvas(1, 1).getContext(\"2d\") && \"function\" == typeof createImageBitmap), l;\n }\n function h() {\n if (null == u && (u = false, c())) {\n const t2 = 5, e2 = new OffscreenCanvas(t2, t2).getContext(\"2d\", { willReadFrequently: true });\n if (e2) {\n for (let r3 = 0; r3 < t2 * t2; r3++) {\n const n2 = 4 * r3;\n e2.fillStyle = `rgb(${n2},${n2 + 1},${n2 + 2})`, e2.fillRect(r3 % t2, Math.floor(r3 / t2), 1, 1);\n }\n const r2 = e2.getImageData(0, 0, t2, t2).data;\n for (let e3 = 0; e3 < t2 * t2 * 4; e3++) if (e3 % 4 != 3 && r2[e3] !== e3) {\n u = true;\n break;\n }\n }\n }\n return u || false;\n }\n var p = 1e-6, f = \"undefined\" != typeof Float32Array ? Float32Array : Array;\n function d() {\n var t2 = new f(9);\n return f != Float32Array && (t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[5] = 0, t2[6] = 0, t2[7] = 0), t2[0] = 1, t2[4] = 1, t2[8] = 1, t2;\n }\n function y(t2) {\n return t2[0] = 1, t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[4] = 0, t2[5] = 1, t2[6] = 0, t2[7] = 0, t2[8] = 0, t2[9] = 0, t2[10] = 1, t2[11] = 0, t2[12] = 0, t2[13] = 0, t2[14] = 0, t2[15] = 1, t2;\n }\n function m() {\n var t2 = new f(3);\n return f != Float32Array && (t2[0] = 0, t2[1] = 0, t2[2] = 0), t2;\n }\n function g(t2) {\n var e2 = t2[0], r2 = t2[1], n2 = t2[2];\n return Math.sqrt(e2 * e2 + r2 * r2 + n2 * n2);\n }\n function x(t2, e2, r2) {\n var n2 = new f(3);\n return n2[0] = t2, n2[1] = e2, n2[2] = r2, n2;\n }\n function v(t2, e2, r2) {\n return t2[0] = e2[0] + r2[0], t2[1] = e2[1] + r2[1], t2[2] = e2[2] + r2[2], t2;\n }\n function b(t2, e2, r2) {\n return t2[0] = e2[0] * r2, t2[1] = e2[1] * r2, t2[2] = e2[2] * r2, t2;\n }\n function w(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1], s2 = e2[2], o2 = r2[0], a2 = r2[1], l2 = r2[2];\n return t2[0] = i2 * l2 - s2 * a2, t2[1] = s2 * o2 - n2 * l2, t2[2] = n2 * a2 - i2 * o2, t2;\n }\n var _, A = g;\n function S(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1], s2 = e2[2], o2 = e2[3];\n return t2[0] = r2[0] * n2 + r2[4] * i2 + r2[8] * s2 + r2[12] * o2, t2[1] = r2[1] * n2 + r2[5] * i2 + r2[9] * s2 + r2[13] * o2, t2[2] = r2[2] * n2 + r2[6] * i2 + r2[10] * s2 + r2[14] * o2, t2[3] = r2[3] * n2 + r2[7] * i2 + r2[11] * s2 + r2[15] * o2, t2;\n }\n function k() {\n var t2 = new f(4);\n return f != Float32Array && (t2[0] = 0, t2[1] = 0, t2[2] = 0), t2[3] = 1, t2;\n }\n function E(t2, e2, r2, n2) {\n var i2 = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : \"zyx\", s2 = Math.PI / 360;\n e2 *= s2, n2 *= s2, r2 *= s2;\n var o2 = Math.sin(e2), a2 = Math.cos(e2), l2 = Math.sin(r2), u2 = Math.cos(r2), c2 = Math.sin(n2), h2 = Math.cos(n2);\n switch (i2) {\n case \"xyz\":\n t2[0] = o2 * u2 * h2 + a2 * l2 * c2, t2[1] = a2 * l2 * h2 - o2 * u2 * c2, t2[2] = a2 * u2 * c2 + o2 * l2 * h2, t2[3] = a2 * u2 * h2 - o2 * l2 * c2;\n break;\n case \"xzy\":\n t2[0] = o2 * u2 * h2 - a2 * l2 * c2, t2[1] = a2 * l2 * h2 - o2 * u2 * c2, t2[2] = a2 * u2 * c2 + o2 * l2 * h2, t2[3] = a2 * u2 * h2 + o2 * l2 * c2;\n break;\n case \"yxz\":\n t2[0] = o2 * u2 * h2 + a2 * l2 * c2, t2[1] = a2 * l2 * h2 - o2 * u2 * c2, t2[2] = a2 * u2 * c2 - o2 * l2 * h2, t2[3] = a2 * u2 * h2 + o2 * l2 * c2;\n break;\n case \"yzx\":\n t2[0] = o2 * u2 * h2 + a2 * l2 * c2, t2[1] = a2 * l2 * h2 + o2 * u2 * c2, t2[2] = a2 * u2 * c2 - o2 * l2 * h2, t2[3] = a2 * u2 * h2 - o2 * l2 * c2;\n break;\n case \"zxy\":\n t2[0] = o2 * u2 * h2 - a2 * l2 * c2, t2[1] = a2 * l2 * h2 + o2 * u2 * c2, t2[2] = a2 * u2 * c2 + o2 * l2 * h2, t2[3] = a2 * u2 * h2 - o2 * l2 * c2;\n break;\n case \"zyx\":\n t2[0] = o2 * u2 * h2 - a2 * l2 * c2, t2[1] = a2 * l2 * h2 + o2 * u2 * c2, t2[2] = a2 * u2 * c2 - o2 * l2 * h2, t2[3] = a2 * u2 * h2 + o2 * l2 * c2;\n break;\n default:\n throw new Error(\"Unknown angle order \" + i2);\n }\n return t2;\n }\n function T() {\n var t2 = new f(2);\n return f != Float32Array && (t2[0] = 0, t2[1] = 0), t2;\n }\n function I(t2, e2) {\n var r2 = new f(2);\n return r2[0] = t2, r2[1] = e2, r2;\n }\n m(), _ = new f(4), f != Float32Array && (_[0] = 0, _[1] = 0, _[2] = 0, _[3] = 0), m(), x(1, 0, 0), x(0, 1, 0), k(), k(), d(), T();\n const M = 8192;\n function F(t2, e2, r2) {\n return e2 * (M / (t2.tileSize * Math.pow(2, r2 - t2.tileID.overscaledZ)));\n }\n function D(t2, e2) {\n return (t2 % e2 + e2) % e2;\n }\n function P(t2, e2, r2) {\n return t2 * (1 - r2) + e2 * r2;\n }\n function z(t2) {\n if (t2 <= 0) return 0;\n if (t2 >= 1) return 1;\n const e2 = t2 * t2, r2 = e2 * t2;\n return 4 * (t2 < 0.5 ? r2 : 3 * (t2 - e2) + r2 - 0.75);\n }\n function B(t2, e2, r2, n2) {\n const i2 = new a(t2, e2, r2, n2);\n return (t3) => i2.solve(t3);\n }\n const V = B(0.25, 0.1, 0.25, 1);\n function C(t2, e2, r2) {\n return Math.min(r2, Math.max(e2, t2));\n }\n function L(t2, e2, r2) {\n const n2 = r2 - e2, i2 = ((t2 - e2) % n2 + n2) % n2 + e2;\n return i2 === e2 ? r2 : i2;\n }\n function O(t2, ...e2) {\n for (const r2 of e2) for (const e3 in r2) t2[e3] = r2[e3];\n return t2;\n }\n let R = 1;\n function N(t2, e2, r2) {\n const n2 = {};\n for (const r3 in t2) n2[r3] = e2.call(this, t2[r3], r3, t2);\n return n2;\n }\n function $(t2, e2, r2) {\n const n2 = {};\n for (const r3 in t2) e2.call(this, t2[r3], r3, t2) && (n2[r3] = t2[r3]);\n return n2;\n }\n function U(t2) {\n return Array.isArray(t2) ? t2.map(U) : \"object\" == typeof t2 && t2 ? N(t2, U) : t2;\n }\n const q = {};\n function j(t2) {\n q[t2] || (\"undefined\" != typeof console && console.warn(t2), q[t2] = true);\n }\n function G(t2, e2, r2) {\n return (r2.y - t2.y) * (e2.x - t2.x) > (e2.y - t2.y) * (r2.x - t2.x);\n }\n function X(t2) {\n return \"undefined\" != typeof WorkerGlobalScope && void 0 !== t2 && t2 instanceof WorkerGlobalScope;\n }\n let Y = null;\n function Z(t2) {\n return \"undefined\" != typeof ImageBitmap && t2 instanceof ImageBitmap;\n }\n const H = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";\n function K(t2, r2, n2, i2, s2) {\n return e(this, void 0, void 0, (function* () {\n if (\"undefined\" == typeof VideoFrame) throw new Error(\"VideoFrame not supported\");\n const e2 = new VideoFrame(t2, { timestamp: 0 });\n try {\n const o2 = null == e2 ? void 0 : e2.format;\n if (!o2 || !o2.startsWith(\"BGR\") && !o2.startsWith(\"RGB\")) throw new Error(`Unrecognized format ${o2}`);\n const a2 = o2.startsWith(\"BGR\"), l2 = new Uint8ClampedArray(i2 * s2 * 4);\n if (yield e2.copyTo(l2, (function(t3, e3, r3, n3, i3) {\n const s3 = 4 * Math.max(-e3, 0), o3 = (Math.max(0, r3) - r3) * n3 * 4 + s3, a3 = 4 * n3, l3 = Math.max(0, e3), u2 = Math.max(0, r3);\n return { rect: { x: l3, y: u2, width: Math.min(t3.width, e3 + n3) - l3, height: Math.min(t3.height, r3 + i3) - u2 }, layout: [{ offset: o3, stride: a3 }] };\n })(t2, r2, n2, i2, s2)), a2) for (let t3 = 0; t3 < l2.length; t3 += 4) {\n const e3 = l2[t3];\n l2[t3] = l2[t3 + 2], l2[t3 + 2] = e3;\n }\n return l2;\n } finally {\n e2.close();\n }\n }));\n }\n let W, J;\n function Q(t2, e2, r2, n2) {\n return t2.addEventListener(e2, r2, n2), { unsubscribe: () => {\n t2.removeEventListener(e2, r2, n2);\n } };\n }\n function tt(t2) {\n return t2 * Math.PI / 180;\n }\n function et(t2) {\n return t2 / Math.PI * 180;\n }\n const rt = { touchstart: true, touchmove: true, touchmoveWindow: true, touchend: true, touchcancel: true }, nt = { dblclick: true, click: true, mouseover: true, mouseout: true, mousedown: true, mousemove: true, mousemoveWindow: true, mouseup: true, mouseupWindow: true, contextmenu: true, wheel: true }, it = \"AbortError\";\n class st extends Error {\n constructor(t2 = it) {\n super(t2 instanceof Error ? t2.message : t2), this.name = it, t2 instanceof Error && t2.stack && (this.stack = t2.stack);\n }\n }\n function ot(t2) {\n return t2.name === it;\n }\n const at = { MAX_PARALLEL_IMAGE_REQUESTS: 16, MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, MAX_TILE_CACHE_ZOOM_LEVELS: 5, REGISTERED_PROTOCOLS: {}, WORKER_URL: \"\" };\n function lt(t2) {\n return at.REGISTERED_PROTOCOLS[t2.substring(0, t2.indexOf(\"://\"))];\n }\n const ut = \"global-dispatcher\";\n class ct extends Error {\n constructor(t2, e2, r2, n2) {\n super(`AJAXError: ${e2} (${t2}): ${r2}`), this.status = t2, this.statusText = e2, this.url = r2, this.body = n2;\n }\n }\n const ht = () => X(self) ? self.worker && self.worker.referrer : (\"blob:\" === window.location.protocol ? window.parent : window).location.href, pt = function(t2, r2) {\n if (/:\\/\\//.test(t2.url) && !/^https?:|^file:/.test(t2.url)) {\n const e2 = lt(t2.url);\n if (e2) return e2(t2, r2);\n if (X(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: \"GR\", data: t2, targetMapId: ut }, r2);\n }\n if (!(/^file:/.test(n2 = t2.url) || /^file:/.test(ht()) && !/^\\w+:/.test(n2))) {\n if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, \"signal\")) return (function(t3, r3) {\n return e(this, void 0, void 0, (function* () {\n const e2 = new Request(t3.url, { method: t3.method || \"GET\", body: t3.body, credentials: t3.credentials, headers: t3.headers, cache: t3.cache, referrer: ht(), signal: r3.signal });\n let n3, i2;\n \"json\" !== t3.type || e2.headers.has(\"Accept\") || e2.headers.set(\"Accept\", \"application/json\");\n try {\n n3 = yield fetch(e2);\n } catch (e3) {\n if (ot(e3)) throw e3;\n throw new ct(0, e3.message, t3.url, new Blob());\n }\n if (!n3.ok) {\n const e3 = yield n3.blob();\n throw new ct(n3.status, n3.statusText, t3.url, e3);\n }\n i2 = \"arrayBuffer\" === t3.type || \"image\" === t3.type ? n3.arrayBuffer() : \"json\" === t3.type ? n3.json() : n3.text();\n const s2 = yield i2;\n return r3.signal.throwIfAborted(), { data: s2, cacheControl: n3.headers.get(\"Cache-Control\"), expires: n3.headers.get(\"Expires\") };\n }));\n })(t2, r2);\n if (X(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: \"GR\", data: t2, mustQueue: true, targetMapId: ut }, r2);\n }\n var n2;\n return (function(t3, e2) {\n return new Promise(((r3, n3) => {\n var i2;\n const s2 = new XMLHttpRequest();\n s2.open(t3.method || \"GET\", t3.url, true), \"arrayBuffer\" !== t3.type && \"image\" !== t3.type || (s2.responseType = \"arraybuffer\");\n for (const e3 in t3.headers) s2.setRequestHeader(e3, t3.headers[e3]);\n \"json\" === t3.type && (s2.responseType = \"text\", (null === (i2 = t3.headers) || void 0 === i2 ? void 0 : i2.Accept) || s2.setRequestHeader(\"Accept\", \"application/json\")), s2.withCredentials = \"include\" === t3.credentials, s2.onerror = () => {\n n3(new Error(s2.statusText));\n }, s2.onload = () => {\n if (!e2.signal.aborted) if ((s2.status >= 200 && s2.status < 300 || 0 === s2.status) && null !== s2.response) {\n let e3 = s2.response;\n if (\"json\" === t3.type) try {\n e3 = JSON.parse(s2.response);\n } catch (t4) {\n return void n3(t4);\n }\n r3({ data: e3, cacheControl: s2.getResponseHeader(\"Cache-Control\"), expires: s2.getResponseHeader(\"Expires\") });\n } else {\n const e3 = new Blob([s2.response], { type: s2.getResponseHeader(\"Content-Type\") });\n n3(new ct(s2.status, s2.statusText, t3.url, e3));\n }\n }, e2.signal.addEventListener(\"abort\", (() => {\n s2.abort(), n3(new st(e2.signal.reason));\n })), s2.send(t3.body);\n }));\n })(t2, r2);\n };\n function ft(t2) {\n if (!t2 || t2.indexOf(\"://\") <= 0 || 0 === t2.indexOf(\"data:image/\") || 0 === t2.indexOf(\"blob:\")) return true;\n const e2 = new URL(t2), r2 = window.location;\n return e2.protocol === r2.protocol && e2.host === r2.host;\n }\n function dt(t2, e2, r2) {\n r2[t2] && -1 !== r2[t2].indexOf(e2) || (r2[t2] = r2[t2] || [], r2[t2].push(e2));\n }\n function yt(t2, e2, r2) {\n if (r2 && r2[t2]) {\n const n2 = r2[t2].indexOf(e2);\n -1 !== n2 && r2[t2].splice(n2, 1);\n }\n }\n class mt {\n constructor(t2, e2 = {}) {\n O(this, e2), this.type = t2;\n }\n }\n class gt extends mt {\n constructor(t2, e2 = {}) {\n super(\"error\", O({ error: t2 }, e2));\n }\n }\n class xt {\n on(t2, e2) {\n return this._listeners = this._listeners || {}, dt(t2, e2, this._listeners), { unsubscribe: () => {\n this.off(t2, e2);\n } };\n }\n off(t2, e2) {\n return yt(t2, e2, this._listeners), yt(t2, e2, this._oneTimeListeners), this;\n }\n once(t2, e2) {\n return e2 ? (this._oneTimeListeners = this._oneTimeListeners || {}, dt(t2, e2, this._oneTimeListeners), this) : new Promise(((e3) => this.once(t2, e3)));\n }\n fire(t2, e2) {\n \"string\" == typeof t2 && (t2 = new mt(t2, e2 || {}));\n const r2 = t2.type;\n if (this.listens(r2)) {\n t2.target = this;\n const e3 = this._listeners && this._listeners[r2] ? this._listeners[r2].slice() : [];\n for (const r3 of e3) r3.call(this, t2);\n const n2 = this._oneTimeListeners && this._oneTimeListeners[r2] ? this._oneTimeListeners[r2].slice() : [];\n for (const e4 of n2) yt(r2, e4, this._oneTimeListeners), e4.call(this, t2);\n const i2 = this._eventedParent;\n i2 && (O(t2, \"function\" == typeof this._eventedParentData ? this._eventedParentData() : this._eventedParentData), i2.fire(t2));\n } else t2 instanceof gt && console.error(t2.error);\n return this;\n }\n listens(t2) {\n return this._listeners && this._listeners[t2] && this._listeners[t2].length > 0 || this._oneTimeListeners && this._oneTimeListeners[t2] && this._oneTimeListeners[t2].length > 0 || this._eventedParent && this._eventedParent.listens(t2);\n }\n setEventedParent(t2, e2) {\n return this._eventedParent = t2, this._eventedParentData = e2, this;\n }\n }\n var vt = { $version: 8, $root: { version: { required: true, type: \"enum\", values: [8] }, name: { type: \"string\" }, metadata: { type: \"*\" }, center: { type: \"array\", value: \"number\" }, centerAltitude: { type: \"number\" }, zoom: { type: \"number\" }, bearing: { type: \"number\", default: 0, period: 360, units: \"degrees\" }, pitch: { type: \"number\", default: 0, units: \"degrees\" }, roll: { type: \"number\", default: 0, units: \"degrees\" }, state: { type: \"state\", default: {} }, light: { type: \"light\" }, sky: { type: \"sky\" }, projection: { type: \"projection\" }, terrain: { type: \"terrain\" }, sources: { required: true, type: \"sources\" }, sprite: { type: \"sprite\" }, glyphs: { type: \"string\" }, \"font-faces\": { type: \"array\", value: \"fontFaces\" }, transition: { type: \"transition\" }, layers: { required: true, type: \"array\", value: \"layer\" } }, sources: { \"*\": { type: \"source\" } }, source: [\"source_vector\", \"source_raster\", \"source_raster_dem\", \"source_geojson\", \"source_video\", \"source_image\"], source_vector: { type: { required: true, type: \"enum\", values: { vector: {} } }, url: { type: \"string\" }, tiles: { type: \"array\", value: \"string\" }, bounds: { type: \"array\", value: \"number\", length: 4, default: [-180, -85.051129, 180, 85.051129] }, scheme: { type: \"enum\", values: { xyz: {}, tms: {} }, default: \"xyz\" }, minzoom: { type: \"number\", default: 0 }, maxzoom: { type: \"number\", default: 22 }, attribution: { type: \"string\" }, promoteId: { type: \"promoteId\" }, volatile: { type: \"boolean\", default: false }, encoding: { type: \"enum\", values: { mvt: {}, mlt: {} }, default: \"mvt\" }, \"*\": { type: \"*\" } }, source_raster: { type: { required: true, type: \"enum\", values: { raster: {} } }, url: { type: \"string\" }, tiles: { type: \"array\", value: \"string\" }, bounds: { type: \"array\", value: \"number\", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: \"number\", default: 0 }, maxzoom: { type: \"number\", default: 22 }, tileSize: { type: \"number\", default: 512, units: \"pixels\" }, scheme: { type: \"enum\", values: { xyz: {}, tms: {} }, default: \"xyz\" }, attribution: { type: \"string\" }, volatile: { type: \"boolean\", default: false }, \"*\": { type: \"*\" } }, source_raster_dem: { type: { required: true, type: \"enum\", values: { \"raster-dem\": {} } }, url: { type: \"string\" }, tiles: { type: \"array\", value: \"string\" }, bounds: { type: \"array\", value: \"number\", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: \"number\", default: 0 }, maxzoom: { type: \"number\", default: 22 }, tileSize: { type: \"number\", default: 512, units: \"pixels\" }, attribution: { type: \"string\" }, encoding: { type: \"enum\", values: { terrarium: {}, mapbox: {}, custom: {} }, default: \"mapbox\" }, redFactor: { type: \"number\", default: 1 }, blueFactor: { type: \"number\", default: 1 }, greenFactor: { type: \"number\", default: 1 }, baseShift: { type: \"number\", default: 0 }, volatile: { type: \"boolean\", default: false }, \"*\": { type: \"*\" } }, source_geojson: { type: { required: true, type: \"enum\", values: { geojson: {} } }, data: { required: true, type: \"*\" }, maxzoom: { type: \"number\", default: 18 }, attribution: { type: \"string\" }, buffer: { type: \"number\", default: 128, maximum: 512, minimum: 0 }, filter: { type: \"*\" }, tolerance: { type: \"number\", default: 0.375 }, cluster: { type: \"boolean\", default: false }, clusterRadius: { type: \"number\", default: 50, minimum: 0 }, clusterMaxZoom: { type: \"number\" }, clusterMinPoints: { type: \"number\" }, clusterProperties: { type: \"*\" }, lineMetrics: { type: \"boolean\", default: false }, generateId: { type: \"boolean\", default: false }, promoteId: { type: \"promoteId\" } }, source_video: { type: { required: true, type: \"enum\", values: { video: {} } }, urls: { required: true, type: \"array\", value: \"string\" }, coordinates: { required: true, type: \"array\", length: 4, value: { type: \"array\", length: 2, value: \"number\" } } }, source_image: { type: { required: true, type: \"enum\", values: { image: {} } }, url: { required: true, type: \"string\" }, coordinates: { required: true, type: \"array\", length: 4, value: { type: \"array\", length: 2, value: \"number\" } } }, layer: { id: { type: \"string\", required: true }, type: { type: \"enum\", values: { fill: {}, line: {}, symbol: {}, circle: {}, heatmap: {}, \"fill-extrusion\": {}, raster: {}, hillshade: {}, \"color-relief\": {}, background: {} }, required: true }, metadata: { type: \"*\" }, source: { type: \"string\" }, \"source-layer\": { type: \"string\" }, minzoom: { type: \"number\", minimum: 0, maximum: 24 }, maxzoom: { type: \"number\", minimum: 0, maximum: 24 }, filter: { type: \"filter\" }, layout: { type: \"layout\" }, paint: { type: \"paint\" } }, layout: [\"layout_fill\", \"layout_line\", \"layout_circle\", \"layout_heatmap\", \"layout_fill-extrusion\", \"layout_symbol\", \"layout_raster\", \"layout_hillshade\", \"layout_color-relief\", \"layout_background\"], layout_background: { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_fill: { \"fill-sort-key\": { type: \"number\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_circle: { \"circle-sort-key\": { type: \"number\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_heatmap: { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, \"layout_fill-extrusion\": { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_line: { \"line-cap\": { type: \"enum\", values: { butt: {}, round: {}, square: {} }, default: \"butt\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"line-join\": { type: \"enum\", values: { bevel: {}, round: {}, miter: {} }, default: \"miter\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"line-miter-limit\": { type: \"number\", default: 2, requires: [{ \"line-join\": \"miter\" }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"line-round-limit\": { type: \"number\", default: 1.05, requires: [{ \"line-join\": \"round\" }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"line-sort-key\": { type: \"number\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_symbol: { \"symbol-placement\": { type: \"enum\", values: { point: {}, line: {}, \"line-center\": {} }, default: \"point\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"symbol-spacing\": { type: \"number\", default: 250, minimum: 1, units: \"pixels\", requires: [{ \"symbol-placement\": \"line\" }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"symbol-avoid-edges\": { type: \"boolean\", default: false, expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"symbol-sort-key\": { type: \"number\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"symbol-z-order\": { type: \"enum\", values: { auto: {}, \"viewport-y\": {}, source: {} }, default: \"auto\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-allow-overlap\": { type: \"boolean\", default: false, requires: [\"icon-image\", { \"!\": \"icon-overlap\" }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-overlap\": { type: \"enum\", values: { never: {}, always: {}, cooperative: {} }, requires: [\"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-ignore-placement\": { type: \"boolean\", default: false, requires: [\"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-optional\": { type: \"boolean\", default: false, requires: [\"icon-image\", \"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-rotation-alignment\": { type: \"enum\", values: { map: {}, viewport: {}, auto: {} }, default: \"auto\", requires: [\"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-size\": { type: \"number\", default: 1, minimum: 0, units: \"factor of the original icon size\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-text-fit\": { type: \"enum\", values: { none: {}, width: {}, height: {}, both: {} }, default: \"none\", requires: [\"icon-image\", \"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-text-fit-padding\": { type: \"array\", value: \"number\", length: 4, default: [0, 0, 0, 0], units: \"pixels\", requires: [\"icon-image\", \"text-field\", { \"icon-text-fit\": [\"both\", \"width\", \"height\"] }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-image\": { type: \"resolvedImage\", tokens: true, expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-rotate\": { type: \"number\", default: 0, period: 360, units: \"degrees\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-padding\": { type: \"padding\", default: [2], units: \"pixels\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-keep-upright\": { type: \"boolean\", default: false, requires: [\"icon-image\", { \"icon-rotation-alignment\": \"map\" }, { \"symbol-placement\": [\"line\", \"line-center\"] }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-offset\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-anchor\": { type: \"enum\", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, \"top-left\": {}, \"top-right\": {}, \"bottom-left\": {}, \"bottom-right\": {} }, default: \"center\", requires: [\"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"icon-pitch-alignment\": { type: \"enum\", values: { map: {}, viewport: {}, auto: {} }, default: \"auto\", requires: [\"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-pitch-alignment\": { type: \"enum\", values: { map: {}, viewport: {}, auto: {} }, default: \"auto\", requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-rotation-alignment\": { type: \"enum\", values: { map: {}, viewport: {}, \"viewport-glyph\": {}, auto: {} }, default: \"auto\", requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-field\": { type: \"formatted\", default: \"\", tokens: true, expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-font\": { type: \"array\", value: \"string\", default: [\"Open Sans Regular\", \"Arial Unicode MS Regular\"], requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-size\": { type: \"number\", default: 16, minimum: 0, units: \"pixels\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-max-width\": { type: \"number\", default: 10, minimum: 0, units: \"ems\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-line-height\": { type: \"number\", default: 1.2, units: \"ems\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-letter-spacing\": { type: \"number\", default: 0, units: \"ems\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-justify\": { type: \"enum\", values: { auto: {}, left: {}, center: {}, right: {} }, default: \"center\", requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-radial-offset\": { type: \"number\", units: \"ems\", default: 0, requires: [\"text-field\"], \"property-type\": \"data-driven\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] } }, \"text-variable-anchor\": { type: \"array\", value: \"enum\", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, \"top-left\": {}, \"top-right\": {}, \"bottom-left\": {}, \"bottom-right\": {} }, requires: [\"text-field\", { \"symbol-placement\": [\"point\"] }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-variable-anchor-offset\": { type: \"variableAnchorOffsetCollection\", requires: [\"text-field\", { \"symbol-placement\": [\"point\"] }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-anchor\": { type: \"enum\", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, \"top-left\": {}, \"top-right\": {}, \"bottom-left\": {}, \"bottom-right\": {} }, default: \"center\", requires: [\"text-field\", { \"!\": \"text-variable-anchor\" }], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-max-angle\": { type: \"number\", default: 45, units: \"degrees\", requires: [\"text-field\", { \"symbol-placement\": [\"line\", \"line-center\"] }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-writing-mode\": { type: \"array\", value: \"enum\", values: { horizontal: {}, vertical: {} }, requires: [\"text-field\", { \"symbol-placement\": [\"point\"] }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-rotate\": { type: \"number\", default: 0, period: 360, units: \"degrees\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-padding\": { type: \"number\", default: 2, minimum: 0, units: \"pixels\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-keep-upright\": { type: \"boolean\", default: true, requires: [\"text-field\", { \"text-rotation-alignment\": \"map\" }, { \"symbol-placement\": [\"line\", \"line-center\"] }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-transform\": { type: \"enum\", values: { none: {}, uppercase: {}, lowercase: {} }, default: \"none\", requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-offset\": { type: \"array\", value: \"number\", units: \"ems\", length: 2, default: [0, 0], requires: [\"text-field\", { \"!\": \"text-radial-offset\" }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"data-driven\" }, \"text-allow-overlap\": { type: \"boolean\", default: false, requires: [\"text-field\", { \"!\": \"text-overlap\" }], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-overlap\": { type: \"enum\", values: { never: {}, always: {}, cooperative: {} }, requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-ignore-placement\": { type: \"boolean\", default: false, requires: [\"text-field\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-optional\": { type: \"boolean\", default: false, requires: [\"text-field\", \"icon-image\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_raster: { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, layout_hillshade: { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, \"layout_color-relief\": { visibility: { type: \"enum\", values: { visible: {}, none: {} }, default: \"visible\", \"property-type\": \"constant\" } }, filter: { type: \"array\", value: \"*\" }, filter_operator: { type: \"enum\", values: { \"==\": {}, \"!=\": {}, \">\": {}, \">=\": {}, \"<\": {}, \"<=\": {}, in: {}, \"!in\": {}, all: {}, any: {}, none: {}, has: {}, \"!has\": {} } }, geometry_type: { type: \"enum\", values: { Point: {}, LineString: {}, Polygon: {} } }, function: { expression: { type: \"expression\" }, stops: { type: \"array\", value: \"function_stop\" }, base: { type: \"number\", default: 1, minimum: 0 }, property: { type: \"string\", default: \"$zoom\" }, type: { type: \"enum\", values: { identity: {}, exponential: {}, interval: {}, categorical: {} }, default: \"exponential\" }, colorSpace: { type: \"enum\", values: { rgb: {}, lab: {}, hcl: {} }, default: \"rgb\" }, default: { type: \"*\", required: false } }, function_stop: { type: \"array\", minimum: 0, maximum: 24, value: [\"number\", \"color\"], length: 2 }, expression: { type: \"array\", value: \"*\", minimum: 1 }, light: { anchor: { type: \"enum\", default: \"viewport\", values: { map: {}, viewport: {} }, \"property-type\": \"data-constant\", transition: false, expression: { interpolated: false, parameters: [\"zoom\"] } }, position: { type: \"array\", default: [1.15, 210, 30], length: 3, value: \"number\", \"property-type\": \"data-constant\", transition: true, expression: { interpolated: true, parameters: [\"zoom\"] } }, color: { type: \"color\", \"property-type\": \"data-constant\", default: \"#ffffff\", expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, intensity: { type: \"number\", \"property-type\": \"data-constant\", default: 0.5, minimum: 0, maximum: 1, expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true } }, sky: { \"sky-color\": { type: \"color\", \"property-type\": \"data-constant\", default: \"#88C6FC\", expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"horizon-color\": { type: \"color\", \"property-type\": \"data-constant\", default: \"#ffffff\", expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"fog-color\": { type: \"color\", \"property-type\": \"data-constant\", default: \"#ffffff\", expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"fog-ground-blend\": { type: \"number\", \"property-type\": \"data-constant\", default: 0.5, minimum: 0, maximum: 1, expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"horizon-fog-blend\": { type: \"number\", \"property-type\": \"data-constant\", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"sky-horizon-blend\": { type: \"number\", \"property-type\": \"data-constant\", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true }, \"atmosphere-blend\": { type: \"number\", \"property-type\": \"data-constant\", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: true, parameters: [\"zoom\"] }, transition: true } }, terrain: { source: { type: \"string\", required: true }, exaggeration: { type: \"number\", minimum: 0, default: 1 } }, projection: { type: { type: \"projectionDefinition\", default: \"mercator\", \"property-type\": \"data-constant\", transition: false, expression: { interpolated: true, parameters: [\"zoom\"] } } }, paint: [\"paint_fill\", \"paint_line\", \"paint_circle\", \"paint_heatmap\", \"paint_fill-extrusion\", \"paint_symbol\", \"paint_raster\", \"paint_hillshade\", \"paint_color-relief\", \"paint_background\"], paint_fill: { \"fill-antialias\": { type: \"boolean\", default: true, expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-color\": { type: \"color\", default: \"#000000\", transition: true, requires: [{ \"!\": \"fill-pattern\" }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-outline-color\": { type: \"color\", transition: true, requires: [{ \"!\": \"fill-pattern\" }, { \"fill-antialias\": true }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"fill-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-pattern\": { type: \"resolvedImage\", transition: true, expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"cross-faded-data-driven\" } }, \"paint_fill-extrusion\": { \"fill-extrusion-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-extrusion-color\": { type: \"color\", default: \"#000000\", transition: true, requires: [{ \"!\": \"fill-extrusion-pattern\" }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-extrusion-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-extrusion-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"fill-extrusion-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"fill-extrusion-pattern\": { type: \"resolvedImage\", transition: true, expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"cross-faded-data-driven\" }, \"fill-extrusion-height\": { type: \"number\", default: 0, minimum: 0, units: \"meters\", transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-extrusion-base\": { type: \"number\", default: 0, minimum: 0, units: \"meters\", transition: true, requires: [\"fill-extrusion-height\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"fill-extrusion-vertical-gradient\": { type: \"boolean\", default: true, transition: false, expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, paint_line: { \"line-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-color\": { type: \"color\", default: \"#000000\", transition: true, requires: [{ \"!\": \"line-pattern\" }], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"line-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"line-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"line-width\": { type: \"number\", default: 1, minimum: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-gap-width\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-offset\": { type: \"number\", default: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-blur\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"line-dasharray\": { type: \"array\", value: \"number\", minimum: 0, transition: true, units: \"line widths\", requires: [{ \"!\": \"line-pattern\" }], expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"cross-faded-data-driven\" }, \"line-pattern\": { type: \"resolvedImage\", transition: true, expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] }, \"property-type\": \"cross-faded-data-driven\" }, \"line-gradient\": { type: \"color\", transition: false, requires: [{ \"!\": \"line-dasharray\" }, { \"!\": \"line-pattern\" }, { source: \"geojson\", has: { lineMetrics: true } }], expression: { interpolated: true, parameters: [\"line-progress\"] }, \"property-type\": \"color-ramp\" } }, paint_circle: { \"circle-radius\": { type: \"number\", default: 5, minimum: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-color\": { type: \"color\", default: \"#000000\", transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-blur\": { type: \"number\", default: 0, transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"circle-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"circle-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"circle-pitch-scale\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"circle-pitch-alignment\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"viewport\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"circle-stroke-width\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-stroke-color\": { type: \"color\", default: \"#000000\", transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"circle-stroke-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" } }, paint_heatmap: { \"heatmap-radius\": { type: \"number\", default: 30, minimum: 1, transition: true, units: \"pixels\", expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"heatmap-weight\": { type: \"number\", default: 1, minimum: 0, transition: false, expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"heatmap-intensity\": { type: \"number\", default: 1, minimum: 0, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"heatmap-color\": { type: \"color\", default: [\"interpolate\", [\"linear\"], [\"heatmap-density\"], 0, \"rgba(0, 0, 255, 0)\", 0.1, \"royalblue\", 0.3, \"cyan\", 0.5, \"lime\", 0.7, \"yellow\", 1, \"red\"], transition: false, expression: { interpolated: true, parameters: [\"heatmap-density\"] }, \"property-type\": \"color-ramp\" }, \"heatmap-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, paint_symbol: { \"icon-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"icon-color\": { type: \"color\", default: \"#000000\", transition: true, requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"icon-halo-color\": { type: \"color\", default: \"rgba(0, 0, 0, 0)\", transition: true, requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"icon-halo-width\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"icon-halo-blur\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"icon-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", requires: [\"icon-image\"], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"icon-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"icon-image\", \"icon-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"text-color\": { type: \"color\", default: \"#000000\", transition: true, overridable: true, requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"text-halo-color\": { type: \"color\", default: \"rgba(0, 0, 0, 0)\", transition: true, requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"text-halo-width\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"text-halo-blur\": { type: \"number\", default: 0, minimum: 0, transition: true, units: \"pixels\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\", \"feature\", \"feature-state\"] }, \"property-type\": \"data-driven\" }, \"text-translate\": { type: \"array\", value: \"number\", length: 2, default: [0, 0], transition: true, units: \"pixels\", requires: [\"text-field\"], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"text-translate-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"map\", requires: [\"text-field\", \"text-translate\"], expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, paint_raster: { \"raster-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-hue-rotate\": { type: \"number\", default: 0, period: 360, transition: true, units: \"degrees\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-brightness-min\": { type: \"number\", default: 0, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-brightness-max\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-saturation\": { type: \"number\", default: 0, minimum: -1, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-contrast\": { type: \"number\", default: 0, minimum: -1, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-resampling\": { type: \"enum\", values: { linear: {}, nearest: {} }, default: \"linear\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"raster-fade-duration\": { type: \"number\", default: 300, minimum: 0, transition: false, units: \"milliseconds\", expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, paint_hillshade: { \"hillshade-illumination-direction\": { type: \"numberArray\", default: 335, minimum: 0, maximum: 359, transition: false, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-illumination-altitude\": { type: \"numberArray\", default: 45, minimum: 0, maximum: 90, transition: false, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-illumination-anchor\": { type: \"enum\", values: { map: {}, viewport: {} }, default: \"viewport\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-exaggeration\": { type: \"number\", default: 0.5, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-shadow-color\": { type: \"colorArray\", default: \"#000000\", transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-highlight-color\": { type: \"colorArray\", default: \"#FFFFFF\", transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-accent-color\": { type: \"color\", default: \"#000000\", transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"hillshade-method\": { type: \"enum\", values: { standard: {}, basic: {}, combined: {}, igor: {}, multidirectional: {} }, default: \"standard\", expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, \"paint_color-relief\": { \"color-relief-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"color-relief-color\": { type: \"color\", transition: false, expression: { interpolated: true, parameters: [\"elevation\"] }, \"property-type\": \"color-ramp\" } }, paint_background: { \"background-color\": { type: \"color\", default: \"#000000\", transition: true, requires: [{ \"!\": \"background-pattern\" }], expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" }, \"background-pattern\": { type: \"resolvedImage\", transition: true, expression: { interpolated: false, parameters: [\"zoom\"] }, \"property-type\": \"cross-faded\" }, \"background-opacity\": { type: \"number\", default: 1, minimum: 0, maximum: 1, transition: true, expression: { interpolated: true, parameters: [\"zoom\"] }, \"property-type\": \"data-constant\" } }, transition: { duration: { type: \"number\", default: 300, minimum: 0, units: \"milliseconds\" }, delay: { type: \"number\", default: 0, minimum: 0, units: \"milliseconds\" } }, \"property-type\": { \"data-driven\": { type: \"property-type\" }, \"cross-faded\": { type: \"property-type\" }, \"cross-faded-data-driven\": { type: \"property-type\" }, \"color-ramp\": { type: \"property-type\" }, \"data-constant\": { type: \"property-type\" }, constant: { type: \"property-type\" } }, promoteId: { \"*\": { type: \"string\" } } };\n const bt = [\"type\", \"source\", \"source-layer\", \"minzoom\", \"maxzoom\", \"filter\", \"layout\"];\n function wt(t2, e2) {\n const r2 = {};\n for (const e3 in t2) \"ref\" !== e3 && (r2[e3] = t2[e3]);\n return bt.forEach(((t3) => {\n t3 in e2 && (r2[t3] = e2[t3]);\n })), r2;\n }\n function _t(t2, e2) {\n if (Array.isArray(t2)) {\n if (!Array.isArray(e2) || t2.length !== e2.length) return false;\n for (let r2 = 0; r2 < t2.length; r2++) if (!_t(t2[r2], e2[r2])) return false;\n return true;\n }\n if (\"object\" == typeof t2 && null !== t2 && null !== e2) {\n if (\"object\" != typeof e2) return false;\n if (Object.keys(t2).length !== Object.keys(e2).length) return false;\n for (const r2 in t2) if (!_t(t2[r2], e2[r2])) return false;\n return true;\n }\n return t2 === e2;\n }\n function At(t2, e2) {\n t2.push(e2);\n }\n function St(t2, e2, r2) {\n At(r2, { command: \"addSource\", args: [t2, e2[t2]] });\n }\n function kt(t2, e2, r2) {\n At(e2, { command: \"removeSource\", args: [t2] }), r2[t2] = true;\n }\n function Et(t2, e2, r2, n2) {\n kt(t2, r2, n2), St(t2, e2, r2);\n }\n function Tt(t2, e2, r2) {\n let n2;\n for (n2 in t2[r2]) if (Object.prototype.hasOwnProperty.call(t2[r2], n2) && \"data\" !== n2 && !_t(t2[r2][n2], e2[r2][n2])) return false;\n for (n2 in e2[r2]) if (Object.prototype.hasOwnProperty.call(e2[r2], n2) && \"data\" !== n2 && !_t(t2[r2][n2], e2[r2][n2])) return false;\n return true;\n }\n function It(t2, e2, r2, n2, i2, s2) {\n t2 = t2 || {}, e2 = e2 || {};\n for (const o2 in t2) Object.prototype.hasOwnProperty.call(t2, o2) && (_t(t2[o2], e2[o2]) || r2.push({ command: s2, args: [n2, o2, e2[o2], i2] }));\n for (const o2 in e2) Object.prototype.hasOwnProperty.call(e2, o2) && !Object.prototype.hasOwnProperty.call(t2, o2) && (_t(t2[o2], e2[o2]) || r2.push({ command: s2, args: [n2, o2, e2[o2], i2] }));\n }\n function Mt(t2) {\n return t2.id;\n }\n function Ft(t2, e2) {\n return t2[e2.id] = e2, t2;\n }\n class Dt {\n constructor(t2, e2, r2, n2) {\n this.message = (t2 ? `${t2}: ` : \"\") + r2, n2 && (this.identifier = n2), null != e2 && e2.__line__ && (this.line = e2.__line__);\n }\n }\n function Pt(t2, ...e2) {\n for (const r2 of e2) for (const e3 in r2) t2[e3] = r2[e3];\n return t2;\n }\n class zt extends Error {\n constructor(t2, e2) {\n super(e2), this.message = e2, this.key = t2;\n }\n }\n class Bt {\n constructor(t2, e2 = []) {\n this.parent = t2, this.bindings = {};\n for (const [t3, r2] of e2) this.bindings[t3] = r2;\n }\n concat(t2) {\n return new Bt(this, t2);\n }\n get(t2) {\n if (this.bindings[t2]) return this.bindings[t2];\n if (this.parent) return this.parent.get(t2);\n throw new Error(`${t2} not found in scope.`);\n }\n has(t2) {\n return !!this.bindings[t2] || !!this.parent && this.parent.has(t2);\n }\n }\n const Vt = { kind: \"null\" }, Ct = { kind: \"number\" }, Lt = { kind: \"string\" }, Ot = { kind: \"boolean\" }, Rt = { kind: \"color\" }, Nt = { kind: \"projectionDefinition\" }, $t = { kind: \"object\" }, Ut = { kind: \"value\" }, qt = { kind: \"collator\" }, jt = { kind: \"formatted\" }, Gt = { kind: \"padding\" }, Xt = { kind: \"colorArray\" }, Yt = { kind: \"numberArray\" }, Zt = { kind: \"resolvedImage\" }, Ht = { kind: \"variableAnchorOffsetCollection\" };\n function Kt(t2, e2) {\n return { kind: \"array\", itemType: t2, N: e2 };\n }\n function Wt(t2) {\n if (\"array\" === t2.kind) {\n const e2 = Wt(t2.itemType);\n return \"number\" == typeof t2.N ? `array<${e2}, ${t2.N}>` : \"value\" === t2.itemType.kind ? \"array\" : `array<${e2}>`;\n }\n return t2.kind;\n }\n const Jt = [Vt, Ct, Lt, Ot, Rt, Nt, jt, $t, Kt(Ut), Gt, Yt, Xt, Zt, Ht];\n function Qt(t2, e2) {\n if (\"error\" === e2.kind) return null;\n if (\"array\" === t2.kind) {\n if (\"array\" === e2.kind && (0 === e2.N && \"value\" === e2.itemType.kind || !Qt(t2.itemType, e2.itemType)) && (\"number\" != typeof t2.N || t2.N === e2.N)) return null;\n } else {\n if (t2.kind === e2.kind) return null;\n if (\"value\" === t2.kind) {\n for (const t3 of Jt) if (!Qt(t3, e2)) return null;\n }\n }\n return `Expected ${Wt(t2)} but found ${Wt(e2)} instead.`;\n }\n function te(t2, e2) {\n return e2.some(((e3) => e3.kind === t2.kind));\n }\n function ee(t2, e2) {\n return e2.some(((e3) => \"null\" === e3 ? null === t2 : \"array\" === e3 ? Array.isArray(t2) : \"object\" === e3 ? t2 && !Array.isArray(t2) && \"object\" == typeof t2 : e3 === typeof t2));\n }\n function re(t2, e2) {\n return \"array\" === t2.kind && \"array\" === e2.kind ? t2.itemType.kind === e2.itemType.kind && \"number\" == typeof t2.N : t2.kind === e2.kind;\n }\n const ne = 0.96422, ie = 0.82521, se = 4 / 29, oe = 6 / 29, ae = 3 * oe * oe, le = oe * oe * oe, ue = Math.PI / 180, ce = 180 / Math.PI;\n function he(t2) {\n return (t2 %= 360) < 0 && (t2 += 360), t2;\n }\n function pe([t2, e2, r2, n2]) {\n let i2, s2;\n const o2 = de((0.2225045 * (t2 = fe(t2)) + 0.7168786 * (e2 = fe(e2)) + 0.0606169 * (r2 = fe(r2))) / 1);\n t2 === e2 && e2 === r2 ? i2 = s2 = o2 : (i2 = de((0.4360747 * t2 + 0.3850649 * e2 + 0.1430804 * r2) / ne), s2 = de((0.0139322 * t2 + 0.0971045 * e2 + 0.7141733 * r2) / ie));\n const a2 = 116 * o2 - 16;\n return [a2 < 0 ? 0 : a2, 500 * (i2 - o2), 200 * (o2 - s2), n2];\n }\n function fe(t2) {\n return t2 <= 0.04045 ? t2 / 12.92 : Math.pow((t2 + 0.055) / 1.055, 2.4);\n }\n function de(t2) {\n return t2 > le ? Math.pow(t2, 1 / 3) : t2 / ae + se;\n }\n function ye([t2, e2, r2, n2]) {\n let i2 = (t2 + 16) / 116, s2 = isNaN(e2) ? i2 : i2 + e2 / 500, o2 = isNaN(r2) ? i2 : i2 - r2 / 200;\n return i2 = 1 * ge(i2), s2 = ne * ge(s2), o2 = ie * ge(o2), [me(3.1338561 * s2 - 1.6168667 * i2 - 0.4906146 * o2), me(-0.9787684 * s2 + 1.9161415 * i2 + 0.033454 * o2), me(0.0719453 * s2 - 0.2289914 * i2 + 1.4052427 * o2), n2];\n }\n function me(t2) {\n return (t2 = t2 <= 304e-5 ? 12.92 * t2 : 1.055 * Math.pow(t2, 1 / 2.4) - 0.055) < 0 ? 0 : t2 > 1 ? 1 : t2;\n }\n function ge(t2) {\n return t2 > oe ? t2 * t2 * t2 : ae * (t2 - se);\n }\n const xe = Object.hasOwn || function(t2, e2) {\n return Object.prototype.hasOwnProperty.call(t2, e2);\n };\n function ve(t2, e2) {\n return xe(t2, e2) ? t2[e2] : void 0;\n }\n function be(t2) {\n return parseInt(t2.padEnd(2, t2), 16) / 255;\n }\n function we(t2, e2) {\n return _e(e2 ? t2 / 100 : t2, 0, 1);\n }\n function _e(t2, e2, r2) {\n return Math.min(Math.max(e2, t2), r2);\n }\n function Ae(t2) {\n return !t2.some(Number.isNaN);\n }\n const Se = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };\n function ke(t2, e2, r2) {\n return t2 + r2 * (e2 - t2);\n }\n function Ee(t2, e2, r2) {\n return t2.map(((t3, n2) => ke(t3, e2[n2], r2)));\n }\n class Te {\n constructor(t2, e2, r2, n2 = 1, i2 = true) {\n this.r = t2, this.g = e2, this.b = r2, this.a = n2, i2 || (this.r *= n2, this.g *= n2, this.b *= n2, n2 || this.overwriteGetter(\"rgb\", [t2, e2, r2, n2]));\n }\n static parse(t2) {\n if (t2 instanceof Te) return t2;\n if (\"string\" != typeof t2) return;\n const e2 = (function(t3) {\n if (\"transparent\" === (t3 = t3.toLowerCase().trim())) return [0, 0, 0, 0];\n const e3 = ve(Se, t3);\n if (e3) {\n const [t4, r3, n2] = e3;\n return [t4 / 255, r3 / 255, n2 / 255, 1];\n }\n if (t3.startsWith(\"#\") && /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t3)) {\n const e4 = t3.length < 6 ? 1 : 2;\n let r3 = 1;\n return [be(t3.slice(r3, r3 += e4)), be(t3.slice(r3, r3 += e4)), be(t3.slice(r3, r3 += e4)), be(t3.slice(r3, r3 + e4) || \"ff\")];\n }\n if (t3.startsWith(\"rgb\")) {\n const e4 = t3.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);\n if (e4) {\n const [t4, r3, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2] = e4, f2 = [i2 || \" \", a2 || \" \", c2].join(\"\");\n if (\" \" === f2 || \" /\" === f2 || \",,\" === f2 || \",,,\" === f2) {\n const t5 = [n2, o2, u2].join(\"\"), e5 = \"%%%\" === t5 ? 100 : \"\" === t5 ? 255 : 0;\n if (e5) {\n const t6 = [_e(+r3 / e5, 0, 1), _e(+s2 / e5, 0, 1), _e(+l2 / e5, 0, 1), h2 ? we(+h2, p2) : 1];\n if (Ae(t6)) return t6;\n }\n }\n return;\n }\n }\n const r2 = t3.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);\n if (r2) {\n const [t4, e4, n2, i2, s2, o2, a2, l2, u2] = r2, c2 = [n2 || \" \", s2 || \" \", a2].join(\"\");\n if (\" \" === c2 || \" /\" === c2 || \",,\" === c2 || \",,,\" === c2) {\n const t5 = [+e4, _e(+i2, 0, 100), _e(+o2, 0, 100), l2 ? we(+l2, u2) : 1];\n if (Ae(t5)) return (function([t6, e5, r3, n3]) {\n function i3(n4) {\n const i4 = (n4 + t6 / 30) % 12, s3 = e5 * Math.min(r3, 1 - r3);\n return r3 - s3 * Math.max(-1, Math.min(i4 - 3, 9 - i4, 1));\n }\n return t6 = he(t6), e5 /= 100, r3 /= 100, [i3(0), i3(8), i3(4), n3];\n })(t5);\n }\n }\n })(t2);\n return e2 ? new Te(...e2, false) : void 0;\n }\n get rgb() {\n const { r: t2, g: e2, b: r2, a: n2 } = this, i2 = n2 || 1 / 0;\n return this.overwriteGetter(\"rgb\", [t2 / i2, e2 / i2, r2 / i2, n2]);\n }\n get hcl() {\n return this.overwriteGetter(\"hcl\", (function(t2) {\n const [e2, r2, n2, i2] = pe(t2), s2 = Math.sqrt(r2 * r2 + n2 * n2);\n return [Math.round(1e4 * s2) ? he(Math.atan2(n2, r2) * ce) : NaN, s2, e2, i2];\n })(this.rgb));\n }\n get lab() {\n return this.overwriteGetter(\"lab\", pe(this.rgb));\n }\n overwriteGetter(t2, e2) {\n return Object.defineProperty(this, t2, { value: e2 }), e2;\n }\n toString() {\n const [t2, e2, r2, n2] = this.rgb;\n return `rgba(${[t2, e2, r2].map(((t3) => Math.round(255 * t3))).join(\",\")},${n2})`;\n }\n static interpolate(t2, e2, r2, n2 = \"rgb\") {\n switch (n2) {\n case \"rgb\": {\n const [n3, i2, s2, o2] = Ee(t2.rgb, e2.rgb, r2);\n return new Te(n3, i2, s2, o2, false);\n }\n case \"hcl\": {\n const [n3, i2, s2, o2] = t2.hcl, [a2, l2, u2, c2] = e2.hcl;\n let h2, p2;\n if (isNaN(n3) || isNaN(a2)) isNaN(n3) ? isNaN(a2) ? h2 = NaN : (h2 = a2, 1 !== s2 && 0 !== s2 || (p2 = l2)) : (h2 = n3, 1 !== u2 && 0 !== u2 || (p2 = i2));\n else {\n let t3 = a2 - n3;\n a2 > n3 && t3 > 180 ? t3 -= 360 : a2 < n3 && n3 - a2 > 180 && (t3 += 360), h2 = n3 + r2 * t3;\n }\n const [f2, d2, y2, m2] = (function([t3, e3, r3, n4]) {\n return t3 = isNaN(t3) ? 0 : t3 * ue, ye([r3, Math.cos(t3) * e3, Math.sin(t3) * e3, n4]);\n })([h2, null != p2 ? p2 : ke(i2, l2, r2), ke(s2, u2, r2), ke(o2, c2, r2)]);\n return new Te(f2, d2, y2, m2, false);\n }\n case \"lab\": {\n const [n3, i2, s2, o2] = ye(Ee(t2.lab, e2.lab, r2));\n return new Te(n3, i2, s2, o2, false);\n }\n }\n }\n }\n Te.black = new Te(0, 0, 0, 1), Te.white = new Te(1, 1, 1, 1), Te.transparent = new Te(0, 0, 0, 0), Te.red = new Te(1, 0, 0, 1);\n class Ie {\n constructor(t2, e2, r2) {\n this.sensitivity = t2 ? e2 ? \"variant\" : \"case\" : e2 ? \"accent\" : \"base\", this.locale = r2, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: \"search\" });\n }\n compare(t2, e2) {\n return this.collator.compare(t2, e2);\n }\n resolvedLocale() {\n return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n }\n }\n const Me = [\"bottom\", \"center\", \"top\"];\n class Fe {\n constructor(t2, e2, r2, n2, i2, s2) {\n this.text = t2, this.image = e2, this.scale = r2, this.fontStack = n2, this.textColor = i2, this.verticalAlign = s2;\n }\n }\n class De {\n constructor(t2) {\n this.sections = t2;\n }\n static fromString(t2) {\n return new De([new Fe(t2, null, null, null, null, null)]);\n }\n isEmpty() {\n return 0 === this.sections.length || !this.sections.some(((t2) => 0 !== t2.text.length || t2.image && 0 !== t2.image.name.length));\n }\n static factory(t2) {\n return t2 instanceof De ? t2 : De.fromString(t2);\n }\n toString() {\n return 0 === this.sections.length ? \"\" : this.sections.map(((t2) => t2.text)).join(\"\");\n }\n }\n class Pe {\n constructor(t2) {\n this.values = t2.slice();\n }\n static parse(t2) {\n if (t2 instanceof Pe) return t2;\n if (\"number\" == typeof t2) return new Pe([t2, t2, t2, t2]);\n if (Array.isArray(t2) && !(t2.length < 1 || t2.length > 4)) {\n for (const e2 of t2) if (\"number\" != typeof e2) return;\n switch (t2.length) {\n case 1:\n t2 = [t2[0], t2[0], t2[0], t2[0]];\n break;\n case 2:\n t2 = [t2[0], t2[1], t2[0], t2[1]];\n break;\n case 3:\n t2 = [t2[0], t2[1], t2[2], t2[1]];\n }\n return new Pe(t2);\n }\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(t2, e2, r2) {\n return new Pe(Ee(t2.values, e2.values, r2));\n }\n }\n class ze {\n constructor(t2) {\n this.values = t2.slice();\n }\n static parse(t2) {\n if (t2 instanceof ze) return t2;\n if (\"number\" == typeof t2) return new ze([t2]);\n if (Array.isArray(t2)) {\n for (const e2 of t2) if (\"number\" != typeof e2) return;\n return new ze(t2);\n }\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(t2, e2, r2) {\n return new ze(Ee(t2.values, e2.values, r2));\n }\n }\n class Be {\n constructor(t2) {\n this.values = t2.slice();\n }\n static parse(t2) {\n if (t2 instanceof Be) return t2;\n if (\"string\" == typeof t2) {\n const e3 = Te.parse(t2);\n if (!e3) return;\n return new Be([e3]);\n }\n if (!Array.isArray(t2)) return;\n const e2 = [];\n for (const r2 of t2) {\n if (\"string\" != typeof r2) return;\n const t3 = Te.parse(r2);\n if (!t3) return;\n e2.push(t3);\n }\n return new Be(e2);\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(t2, e2, r2, n2 = \"rgb\") {\n const i2 = [];\n if (t2.values.length != e2.values.length) throw new Error(`colorArray: Arrays have mismatched length (${t2.values.length} vs. ${e2.values.length}), cannot interpolate.`);\n for (let s2 = 0; s2 < t2.values.length; s2++) i2.push(Te.interpolate(t2.values[s2], e2.values[s2], r2, n2));\n return new Be(i2);\n }\n }\n class Ve extends Error {\n constructor(t2) {\n super(t2), this.name = \"RuntimeError\";\n }\n toJSON() {\n return this.message;\n }\n }\n const Ce = /* @__PURE__ */ new Set([\"center\", \"left\", \"right\", \"top\", \"bottom\", \"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"]);\n class Le {\n constructor(t2) {\n this.values = t2.slice();\n }\n static parse(t2) {\n if (t2 instanceof Le) return t2;\n if (Array.isArray(t2) && !(t2.length < 1) && t2.length % 2 == 0) {\n for (let e2 = 0; e2 < t2.length; e2 += 2) {\n const r2 = t2[e2], n2 = t2[e2 + 1];\n if (\"string\" != typeof r2 || !Ce.has(r2)) return;\n if (!Array.isArray(n2) || 2 !== n2.length || \"number\" != typeof n2[0] || \"number\" != typeof n2[1]) return;\n }\n return new Le(t2);\n }\n }\n toString() {\n return JSON.stringify(this.values);\n }\n static interpolate(t2, e2, r2) {\n const n2 = t2.values, i2 = e2.values;\n if (n2.length !== i2.length) throw new Ve(`Cannot interpolate values of different length. from: ${t2.toString()}, to: ${e2.toString()}`);\n const s2 = [];\n for (let t3 = 0; t3 < n2.length; t3 += 2) {\n if (n2[t3] !== i2[t3]) throw new Ve(`Cannot interpolate values containing mismatched anchors. from[${t3}]: ${n2[t3]}, to[${t3}]: ${i2[t3]}`);\n s2.push(n2[t3]);\n const [e3, o2] = n2[t3 + 1], [a2, l2] = i2[t3 + 1];\n s2.push([ke(e3, a2, r2), ke(o2, l2, r2)]);\n }\n return new Le(s2);\n }\n }\n class Oe {\n constructor(t2) {\n this.name = t2.name, this.available = t2.available;\n }\n toString() {\n return this.name;\n }\n static fromString(t2) {\n return t2 ? new Oe({ name: t2, available: false }) : null;\n }\n }\n class Re {\n constructor(t2, e2, r2) {\n this.from = t2, this.to = e2, this.transition = r2;\n }\n static interpolate(t2, e2, r2) {\n return new Re(t2, e2, r2);\n }\n static parse(t2) {\n return t2 instanceof Re ? t2 : Array.isArray(t2) && 3 === t2.length && \"string\" == typeof t2[0] && \"string\" == typeof t2[1] && \"number\" == typeof t2[2] ? new Re(t2[0], t2[1], t2[2]) : \"object\" == typeof t2 && \"string\" == typeof t2.from && \"string\" == typeof t2.to && \"number\" == typeof t2.transition ? new Re(t2.from, t2.to, t2.transition) : \"string\" == typeof t2 ? new Re(t2, t2, 1) : void 0;\n }\n }\n function Ne(t2, e2, r2, n2) {\n return \"number\" == typeof t2 && t2 >= 0 && t2 <= 255 && \"number\" == typeof e2 && e2 >= 0 && e2 <= 255 && \"number\" == typeof r2 && r2 >= 0 && r2 <= 255 ? void 0 === n2 || \"number\" == typeof n2 && n2 >= 0 && n2 <= 1 ? null : `Invalid rgba value [${[t2, e2, r2, n2].join(\", \")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(\"number\" == typeof n2 ? [t2, e2, r2, n2] : [t2, e2, r2]).join(\", \")}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n function $e(t2) {\n if (null === t2 || \"string\" == typeof t2 || \"boolean\" == typeof t2 || \"number\" == typeof t2 || t2 instanceof Re || t2 instanceof Te || t2 instanceof Ie || t2 instanceof De || t2 instanceof Pe || t2 instanceof ze || t2 instanceof Be || t2 instanceof Le || t2 instanceof Oe) return true;\n if (Array.isArray(t2)) {\n for (const e2 of t2) if (!$e(e2)) return false;\n return true;\n }\n if (\"object\" == typeof t2) {\n for (const e2 in t2) if (!$e(t2[e2])) return false;\n return true;\n }\n return false;\n }\n function Ue(t2) {\n if (null === t2) return Vt;\n if (\"string\" == typeof t2) return Lt;\n if (\"boolean\" == typeof t2) return Ot;\n if (\"number\" == typeof t2) return Ct;\n if (t2 instanceof Te) return Rt;\n if (t2 instanceof Re) return Nt;\n if (t2 instanceof Ie) return qt;\n if (t2 instanceof De) return jt;\n if (t2 instanceof Pe) return Gt;\n if (t2 instanceof ze) return Yt;\n if (t2 instanceof Be) return Xt;\n if (t2 instanceof Le) return Ht;\n if (t2 instanceof Oe) return Zt;\n if (Array.isArray(t2)) {\n const e2 = t2.length;\n let r2;\n for (const e3 of t2) {\n const t3 = Ue(e3);\n if (r2) {\n if (r2 === t3) continue;\n r2 = Ut;\n break;\n }\n r2 = t3;\n }\n return Kt(r2 || Ut, e2);\n }\n return $t;\n }\n function qe(t2) {\n const e2 = typeof t2;\n return null === t2 ? \"\" : \"string\" === e2 || \"number\" === e2 || \"boolean\" === e2 ? String(t2) : t2 instanceof Te || t2 instanceof Re || t2 instanceof De || t2 instanceof Pe || t2 instanceof ze || t2 instanceof Be || t2 instanceof Le || t2 instanceof Oe ? t2.toString() : JSON.stringify(t2);\n }\n class je {\n constructor(t2, e2) {\n this.type = t2, this.value = e2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(`'literal' expression requires exactly one argument, but found ${t2.length - 1} instead.`);\n if (!$e(t2[1])) return e2.error(\"invalid value\");\n const r2 = t2[1];\n let n2 = Ue(r2);\n const i2 = e2.expectedType;\n return \"array\" !== n2.kind || 0 !== n2.N || !i2 || \"array\" !== i2.kind || \"number\" == typeof i2.N && 0 !== i2.N || (n2 = i2), new je(n2, r2);\n }\n evaluate() {\n return this.value;\n }\n eachChild() {\n }\n outputDefined() {\n return true;\n }\n }\n const Ge = { string: Lt, number: Ct, boolean: Ot, object: $t };\n class Xe {\n constructor(t2, e2) {\n this.type = t2, this.args = e2;\n }\n static parse(t2, e2) {\n if (t2.length < 2) return e2.error(\"Expected at least one argument.\");\n let r2, n2 = 1;\n const i2 = t2[0];\n if (\"array\" === i2) {\n let i3, s3;\n if (t2.length > 2) {\n const r3 = t2[1];\n if (\"string\" != typeof r3 || !(r3 in Ge) || \"object\" === r3) return e2.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n i3 = Ge[r3], n2++;\n } else i3 = Ut;\n if (t2.length > 3) {\n if (null !== t2[2] && (\"number\" != typeof t2[2] || t2[2] < 0 || t2[2] !== Math.floor(t2[2]))) return e2.error('The length argument to \"array\" must be a positive integer literal', 2);\n s3 = t2[2], n2++;\n }\n r2 = Kt(i3, s3);\n } else {\n if (!Ge[i2]) throw new Error(`Types doesn't contain name = ${i2}`);\n r2 = Ge[i2];\n }\n const s2 = [];\n for (; n2 < t2.length; n2++) {\n const r3 = e2.parse(t2[n2], n2, Ut);\n if (!r3) return null;\n s2.push(r3);\n }\n return new Xe(r2, s2);\n }\n evaluate(t2) {\n for (let e2 = 0; e2 < this.args.length; e2++) {\n const r2 = this.args[e2].evaluate(t2);\n if (!Qt(this.type, Ue(r2))) return r2;\n if (e2 === this.args.length - 1) throw new Ve(`Expected value to be of type ${Wt(this.type)}, but found ${Wt(Ue(r2))} instead.`);\n }\n throw new Error();\n }\n eachChild(t2) {\n this.args.forEach(t2);\n }\n outputDefined() {\n return this.args.every(((t2) => t2.outputDefined()));\n }\n }\n const Ye = { \"to-boolean\": Ot, \"to-color\": Rt, \"to-number\": Ct, \"to-string\": Lt };\n class Ze {\n constructor(t2, e2) {\n this.type = t2, this.args = e2;\n }\n static parse(t2, e2) {\n if (t2.length < 2) return e2.error(\"Expected at least one argument.\");\n const r2 = t2[0];\n if (!Ye[r2]) throw new Error(`Can't parse ${r2} as it is not part of the known types`);\n if ((\"to-boolean\" === r2 || \"to-string\" === r2) && 2 !== t2.length) return e2.error(\"Expected one argument.\");\n const n2 = Ye[r2], i2 = [];\n for (let r3 = 1; r3 < t2.length; r3++) {\n const n3 = e2.parse(t2[r3], r3, Ut);\n if (!n3) return null;\n i2.push(n3);\n }\n return new Ze(n2, i2);\n }\n evaluate(t2) {\n switch (this.type.kind) {\n case \"boolean\":\n return Boolean(this.args[0].evaluate(t2));\n case \"color\": {\n let e2, r2;\n for (const n2 of this.args) {\n if (e2 = n2.evaluate(t2), r2 = null, e2 instanceof Te) return e2;\n if (\"string\" == typeof e2) {\n const r3 = t2.parseColor(e2);\n if (r3) return r3;\n } else if (Array.isArray(e2) && (r2 = e2.length < 3 || e2.length > 4 ? `Invalid rgba value ${JSON.stringify(e2)}: expected an array containing either three or four numeric values.` : Ne(e2[0], e2[1], e2[2], e2[3]), !r2)) return new Te(e2[0] / 255, e2[1] / 255, e2[2] / 255, e2[3]);\n }\n throw new Ve(r2 || `Could not parse color from value '${\"string\" == typeof e2 ? e2 : JSON.stringify(e2)}'`);\n }\n case \"padding\": {\n let e2;\n for (const r2 of this.args) {\n e2 = r2.evaluate(t2);\n const n2 = Pe.parse(e2);\n if (n2) return n2;\n }\n throw new Ve(`Could not parse padding from value '${\"string\" == typeof e2 ? e2 : JSON.stringify(e2)}'`);\n }\n case \"numberArray\": {\n let e2;\n for (const r2 of this.args) {\n e2 = r2.evaluate(t2);\n const n2 = ze.parse(e2);\n if (n2) return n2;\n }\n throw new Ve(`Could not parse numberArray from value '${\"string\" == typeof e2 ? e2 : JSON.stringify(e2)}'`);\n }\n case \"colorArray\": {\n let e2;\n for (const r2 of this.args) {\n e2 = r2.evaluate(t2);\n const n2 = Be.parse(e2);\n if (n2) return n2;\n }\n throw new Ve(`Could not parse colorArray from value '${\"string\" == typeof e2 ? e2 : JSON.stringify(e2)}'`);\n }\n case \"variableAnchorOffsetCollection\": {\n let e2;\n for (const r2 of this.args) {\n e2 = r2.evaluate(t2);\n const n2 = Le.parse(e2);\n if (n2) return n2;\n }\n throw new Ve(`Could not parse variableAnchorOffsetCollection from value '${\"string\" == typeof e2 ? e2 : JSON.stringify(e2)}'`);\n }\n case \"number\": {\n let e2 = null;\n for (const r2 of this.args) {\n if (e2 = r2.evaluate(t2), null === e2) return 0;\n const n2 = Number(e2);\n if (!isNaN(n2)) return n2;\n }\n throw new Ve(`Could not convert ${JSON.stringify(e2)} to number.`);\n }\n case \"formatted\":\n return De.fromString(qe(this.args[0].evaluate(t2)));\n case \"resolvedImage\":\n return Oe.fromString(qe(this.args[0].evaluate(t2)));\n case \"projectionDefinition\":\n return this.args[0].evaluate(t2);\n default:\n return qe(this.args[0].evaluate(t2));\n }\n }\n eachChild(t2) {\n this.args.forEach(t2);\n }\n outputDefined() {\n return this.args.every(((t2) => t2.outputDefined()));\n }\n }\n const He = [\"Unknown\", \"Point\", \"LineString\", \"Polygon\"];\n class Ke {\n constructor() {\n this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = /* @__PURE__ */ new Map(), this.availableImages = null, this.canonical = null;\n }\n id() {\n return this.feature && \"id\" in this.feature ? this.feature.id : null;\n }\n geometryType() {\n return this.feature ? \"number\" == typeof this.feature.type ? He[this.feature.type] : this.feature.type : null;\n }\n geometry() {\n return this.feature && \"geometry\" in this.feature ? this.feature.geometry : null;\n }\n canonicalID() {\n return this.canonical;\n }\n properties() {\n return this.feature && this.feature.properties || {};\n }\n parseColor(t2) {\n let e2 = this._parseColorCache.get(t2);\n return e2 || (e2 = Te.parse(t2), this._parseColorCache.set(t2, e2)), e2;\n }\n }\n class We {\n constructor(t2, e2, r2 = [], n2, i2 = new Bt(), s2 = []) {\n this.registry = t2, this.path = r2, this.key = r2.map(((t3) => `[${t3}]`)).join(\"\"), this.scope = i2, this.errors = s2, this.expectedType = n2, this._isConstant = e2;\n }\n parse(t2, e2, r2, n2, i2 = {}) {\n return e2 ? this.concat(e2, r2, n2)._parse(t2, i2) : this._parse(t2, i2);\n }\n _parse(t2, e2) {\n function r2(t3, e3, r3) {\n return \"assert\" === r3 ? new Xe(e3, [t3]) : \"coerce\" === r3 ? new Ze(e3, [t3]) : t3;\n }\n if (null !== t2 && \"string\" != typeof t2 && \"boolean\" != typeof t2 && \"number\" != typeof t2 || (t2 = [\"literal\", t2]), Array.isArray(t2)) {\n if (0 === t2.length) return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');\n const n2 = t2[0];\n if (\"string\" != typeof n2) return this.error(`Expression name must be a string, but found ${typeof n2} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0), null;\n const i2 = this.registry[n2];\n if (i2) {\n let n3 = i2.parse(t2, this);\n if (!n3) return null;\n if (this.expectedType) {\n const t3 = this.expectedType, i3 = n3.type;\n if (\"string\" !== t3.kind && \"number\" !== t3.kind && \"boolean\" !== t3.kind && \"object\" !== t3.kind && \"array\" !== t3.kind || \"value\" !== i3.kind) {\n if (\"projectionDefinition\" === t3.kind && [\"string\", \"array\"].includes(i3.kind) || [\"color\", \"formatted\", \"resolvedImage\"].includes(t3.kind) && [\"value\", \"string\"].includes(i3.kind) || [\"padding\", \"numberArray\"].includes(t3.kind) && [\"value\", \"number\", \"array\"].includes(i3.kind) || \"colorArray\" === t3.kind && [\"value\", \"string\", \"array\"].includes(i3.kind) || \"variableAnchorOffsetCollection\" === t3.kind && [\"value\", \"array\"].includes(i3.kind)) n3 = r2(n3, t3, e2.typeAnnotation || \"coerce\");\n else if (this.checkSubtype(t3, i3)) return null;\n } else n3 = r2(n3, t3, e2.typeAnnotation || \"assert\");\n }\n if (!(n3 instanceof je) && \"resolvedImage\" !== n3.type.kind && this._isConstant(n3)) {\n const t3 = new Ke();\n try {\n n3 = new je(n3.type, n3.evaluate(t3));\n } catch (t4) {\n return this.error(t4.message), null;\n }\n }\n return n3;\n }\n return this.error(`Unknown expression \"${n2}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n return this.error(void 0 === t2 ? \"'undefined' value invalid. Use null instead.\" : \"object\" == typeof t2 ? 'Bare objects invalid. Use [\"literal\", {...}] instead.' : `Expected an array, but found ${typeof t2} instead.`);\n }\n concat(t2, e2, r2) {\n const n2 = \"number\" == typeof t2 ? this.path.concat(t2) : this.path, i2 = r2 ? this.scope.concat(r2) : this.scope;\n return new We(this.registry, this._isConstant, n2, e2 || null, i2, this.errors);\n }\n error(t2, ...e2) {\n const r2 = `${this.key}${e2.map(((t3) => `[${t3}]`)).join(\"\")}`;\n this.errors.push(new zt(r2, t2));\n }\n checkSubtype(t2, e2) {\n const r2 = Qt(t2, e2);\n return r2 && this.error(r2), r2;\n }\n }\n class Je {\n constructor(t2, e2) {\n this.type = e2.type, this.bindings = [].concat(t2), this.result = e2;\n }\n evaluate(t2) {\n return this.result.evaluate(t2);\n }\n eachChild(t2) {\n for (const e2 of this.bindings) t2(e2[1]);\n t2(this.result);\n }\n static parse(t2, e2) {\n if (t2.length < 4) return e2.error(`Expected at least 3 arguments, but found ${t2.length - 1} instead.`);\n const r2 = [];\n for (let n3 = 1; n3 < t2.length - 1; n3 += 2) {\n const i2 = t2[n3];\n if (\"string\" != typeof i2) return e2.error(`Expected string, but found ${typeof i2} instead.`, n3);\n if (/[^a-zA-Z0-9_]/.test(i2)) return e2.error(\"Variable names must contain only alphanumeric characters or '_'.\", n3);\n const s2 = e2.parse(t2[n3 + 1], n3 + 1);\n if (!s2) return null;\n r2.push([i2, s2]);\n }\n const n2 = e2.parse(t2[t2.length - 1], t2.length - 1, e2.expectedType, r2);\n return n2 ? new Je(r2, n2) : null;\n }\n outputDefined() {\n return this.result.outputDefined();\n }\n }\n class Qe {\n constructor(t2, e2) {\n this.type = e2.type, this.name = t2, this.boundExpression = e2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length || \"string\" != typeof t2[1]) return e2.error(\"'var' expression requires exactly one string literal argument.\");\n const r2 = t2[1];\n return e2.scope.has(r2) ? new Qe(r2, e2.scope.get(r2)) : e2.error(`Unknown variable \"${r2}\". Make sure \"${r2}\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n }\n evaluate(t2) {\n return this.boundExpression.evaluate(t2);\n }\n eachChild() {\n }\n outputDefined() {\n return false;\n }\n }\n class tr {\n constructor(t2, e2, r2) {\n this.type = t2, this.index = e2, this.input = r2;\n }\n static parse(t2, e2) {\n if (3 !== t2.length) return e2.error(`Expected 2 arguments, but found ${t2.length - 1} instead.`);\n const r2 = e2.parse(t2[1], 1, Ct), n2 = e2.parse(t2[2], 2, Kt(e2.expectedType || Ut));\n return r2 && n2 ? new tr(n2.type.itemType, r2, n2) : null;\n }\n evaluate(t2) {\n const e2 = this.index.evaluate(t2), r2 = this.input.evaluate(t2);\n if (e2 < 0) throw new Ve(`Array index out of bounds: ${e2} < 0.`);\n if (e2 >= r2.length) throw new Ve(`Array index out of bounds: ${e2} > ${r2.length - 1}.`);\n if (e2 !== Math.floor(e2)) throw new Ve(`Array index must be an integer, but found ${e2} instead.`);\n return r2[e2];\n }\n eachChild(t2) {\n t2(this.index), t2(this.input);\n }\n outputDefined() {\n return false;\n }\n }\n class er {\n constructor(t2, e2) {\n this.type = Ot, this.needle = t2, this.haystack = e2;\n }\n static parse(t2, e2) {\n if (3 !== t2.length) return e2.error(`Expected 2 arguments, but found ${t2.length - 1} instead.`);\n const r2 = e2.parse(t2[1], 1, Ut), n2 = e2.parse(t2[2], 2, Ut);\n return r2 && n2 ? te(r2.type, [Ot, Lt, Ct, Vt, Ut]) ? new er(r2, n2) : e2.error(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(r2.type)} instead`) : null;\n }\n evaluate(t2) {\n const e2 = this.needle.evaluate(t2), r2 = this.haystack.evaluate(t2);\n if (!r2) return false;\n if (!ee(e2, [\"boolean\", \"string\", \"number\", \"null\"])) throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(Ue(e2))} instead.`);\n if (!ee(r2, [\"string\", \"array\"])) throw new Ve(`Expected second argument to be of type array or string, but found ${Wt(Ue(r2))} instead.`);\n return r2.indexOf(e2) >= 0;\n }\n eachChild(t2) {\n t2(this.needle), t2(this.haystack);\n }\n outputDefined() {\n return true;\n }\n }\n class rr {\n constructor(t2, e2, r2) {\n this.type = Ct, this.needle = t2, this.haystack = e2, this.fromIndex = r2;\n }\n static parse(t2, e2) {\n if (t2.length <= 2 || t2.length >= 5) return e2.error(`Expected 2 or 3 arguments, but found ${t2.length - 1} instead.`);\n const r2 = e2.parse(t2[1], 1, Ut), n2 = e2.parse(t2[2], 2, Ut);\n if (!r2 || !n2) return null;\n if (!te(r2.type, [Ot, Lt, Ct, Vt, Ut])) return e2.error(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(r2.type)} instead`);\n if (4 === t2.length) {\n const i2 = e2.parse(t2[3], 3, Ct);\n return i2 ? new rr(r2, n2, i2) : null;\n }\n return new rr(r2, n2);\n }\n evaluate(t2) {\n const e2 = this.needle.evaluate(t2), r2 = this.haystack.evaluate(t2);\n if (!ee(e2, [\"boolean\", \"string\", \"number\", \"null\"])) throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${Wt(Ue(e2))} instead.`);\n let n2;\n if (this.fromIndex && (n2 = this.fromIndex.evaluate(t2)), ee(r2, [\"string\"])) {\n const t3 = r2.indexOf(e2, n2);\n return -1 === t3 ? -1 : [...r2.slice(0, t3)].length;\n }\n if (ee(r2, [\"array\"])) return r2.indexOf(e2, n2);\n throw new Ve(`Expected second argument to be of type array or string, but found ${Wt(Ue(r2))} instead.`);\n }\n eachChild(t2) {\n t2(this.needle), t2(this.haystack), this.fromIndex && t2(this.fromIndex);\n }\n outputDefined() {\n return false;\n }\n }\n class nr {\n constructor(t2, e2, r2, n2, i2, s2) {\n this.inputType = t2, this.type = e2, this.input = r2, this.cases = n2, this.outputs = i2, this.otherwise = s2;\n }\n static parse(t2, e2) {\n if (t2.length < 5) return e2.error(`Expected at least 4 arguments, but found only ${t2.length - 1}.`);\n if (t2.length % 2 != 1) return e2.error(\"Expected an even number of arguments.\");\n let r2, n2;\n e2.expectedType && \"value\" !== e2.expectedType.kind && (n2 = e2.expectedType);\n const i2 = {}, s2 = [];\n for (let o3 = 2; o3 < t2.length - 1; o3 += 2) {\n let a3 = t2[o3];\n const l2 = t2[o3 + 1];\n Array.isArray(a3) || (a3 = [a3]);\n const u2 = e2.concat(o3);\n if (0 === a3.length) return u2.error(\"Expected at least one branch label.\");\n for (const t3 of a3) {\n if (\"number\" != typeof t3 && \"string\" != typeof t3) return u2.error(\"Branch labels must be numbers or strings.\");\n if (\"number\" == typeof t3 && Math.abs(t3) > Number.MAX_SAFE_INTEGER) return u2.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);\n if (\"number\" == typeof t3 && Math.floor(t3) !== t3) return u2.error(\"Numeric branch labels must be integer values.\");\n if (r2) {\n if (u2.checkSubtype(r2, Ue(t3))) return null;\n } else r2 = Ue(t3);\n if (void 0 !== i2[String(t3)]) return u2.error(\"Branch labels must be unique.\");\n i2[String(t3)] = s2.length;\n }\n const c2 = e2.parse(l2, o3, n2);\n if (!c2) return null;\n n2 = n2 || c2.type, s2.push(c2);\n }\n const o2 = e2.parse(t2[1], 1, Ut);\n if (!o2) return null;\n const a2 = e2.parse(t2[t2.length - 1], t2.length - 1, n2);\n return a2 ? \"value\" !== o2.type.kind && e2.concat(1).checkSubtype(r2, o2.type) ? null : new nr(r2, n2, o2, i2, s2, a2) : null;\n }\n evaluate(t2) {\n const e2 = this.input.evaluate(t2);\n return (Ue(e2) === this.inputType && this.outputs[this.cases[e2]] || this.otherwise).evaluate(t2);\n }\n eachChild(t2) {\n t2(this.input), this.outputs.forEach(t2), t2(this.otherwise);\n }\n outputDefined() {\n return this.outputs.every(((t2) => t2.outputDefined())) && this.otherwise.outputDefined();\n }\n }\n class ir {\n constructor(t2, e2, r2) {\n this.type = t2, this.branches = e2, this.otherwise = r2;\n }\n static parse(t2, e2) {\n if (t2.length < 4) return e2.error(`Expected at least 3 arguments, but found only ${t2.length - 1}.`);\n if (t2.length % 2 != 0) return e2.error(\"Expected an odd number of arguments.\");\n let r2;\n e2.expectedType && \"value\" !== e2.expectedType.kind && (r2 = e2.expectedType);\n const n2 = [];\n for (let i3 = 1; i3 < t2.length - 1; i3 += 2) {\n const s2 = e2.parse(t2[i3], i3, Ot);\n if (!s2) return null;\n const o2 = e2.parse(t2[i3 + 1], i3 + 1, r2);\n if (!o2) return null;\n n2.push([s2, o2]), r2 = r2 || o2.type;\n }\n const i2 = e2.parse(t2[t2.length - 1], t2.length - 1, r2);\n if (!i2) return null;\n if (!r2) throw new Error(\"Can't infer output type\");\n return new ir(r2, n2, i2);\n }\n evaluate(t2) {\n for (const [e2, r2] of this.branches) if (e2.evaluate(t2)) return r2.evaluate(t2);\n return this.otherwise.evaluate(t2);\n }\n eachChild(t2) {\n for (const [e2, r2] of this.branches) t2(e2), t2(r2);\n t2(this.otherwise);\n }\n outputDefined() {\n return this.branches.every((([t2, e2]) => e2.outputDefined())) && this.otherwise.outputDefined();\n }\n }\n class sr {\n constructor(t2, e2, r2, n2) {\n this.type = t2, this.input = e2, this.beginIndex = r2, this.endIndex = n2;\n }\n static parse(t2, e2) {\n if (t2.length <= 2 || t2.length >= 5) return e2.error(`Expected 2 or 3 arguments, but found ${t2.length - 1} instead.`);\n const r2 = e2.parse(t2[1], 1, Ut), n2 = e2.parse(t2[2], 2, Ct);\n if (!r2 || !n2) return null;\n if (!te(r2.type, [Kt(Ut), Lt, Ut])) return e2.error(`Expected first argument to be of type array or string, but found ${Wt(r2.type)} instead`);\n if (4 === t2.length) {\n const i2 = e2.parse(t2[3], 3, Ct);\n return i2 ? new sr(r2.type, r2, n2, i2) : null;\n }\n return new sr(r2.type, r2, n2);\n }\n evaluate(t2) {\n const e2 = this.input.evaluate(t2), r2 = this.beginIndex.evaluate(t2);\n let n2;\n if (this.endIndex && (n2 = this.endIndex.evaluate(t2)), ee(e2, [\"string\"])) return [...e2].slice(r2, n2).join(\"\");\n if (ee(e2, [\"array\"])) return e2.slice(r2, n2);\n throw new Ve(`Expected first argument to be of type array or string, but found ${Wt(Ue(e2))} instead.`);\n }\n eachChild(t2) {\n t2(this.input), t2(this.beginIndex), this.endIndex && t2(this.endIndex);\n }\n outputDefined() {\n return false;\n }\n }\n function or(t2, e2) {\n const r2 = t2.length - 1;\n let n2, i2, s2 = 0, o2 = r2, a2 = 0;\n for (; s2 <= o2; ) if (a2 = Math.floor((s2 + o2) / 2), n2 = t2[a2], i2 = t2[a2 + 1], n2 <= e2) {\n if (a2 === r2 || e2 < i2) return a2;\n s2 = a2 + 1;\n } else {\n if (!(n2 > e2)) throw new Ve(\"Input is not a number.\");\n o2 = a2 - 1;\n }\n return 0;\n }\n class ar {\n constructor(t2, e2, r2) {\n this.type = t2, this.input = e2, this.labels = [], this.outputs = [];\n for (const [t3, e3] of r2) this.labels.push(t3), this.outputs.push(e3);\n }\n static parse(t2, e2) {\n if (t2.length - 1 < 4) return e2.error(`Expected at least 4 arguments, but found only ${t2.length - 1}.`);\n if ((t2.length - 1) % 2 != 0) return e2.error(\"Expected an even number of arguments.\");\n const r2 = e2.parse(t2[1], 1, Ct);\n if (!r2) return null;\n const n2 = [];\n let i2 = null;\n e2.expectedType && \"value\" !== e2.expectedType.kind && (i2 = e2.expectedType);\n for (let r3 = 1; r3 < t2.length; r3 += 2) {\n const s2 = 1 === r3 ? -1 / 0 : t2[r3], o2 = t2[r3 + 1], a2 = r3, l2 = r3 + 1;\n if (\"number\" != typeof s2) return e2.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', a2);\n if (n2.length && n2[n2.length - 1][0] >= s2) return e2.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', a2);\n const u2 = e2.parse(o2, l2, i2);\n if (!u2) return null;\n i2 = i2 || u2.type, n2.push([s2, u2]);\n }\n return new ar(i2, r2, n2);\n }\n evaluate(t2) {\n const e2 = this.labels, r2 = this.outputs;\n if (1 === e2.length) return r2[0].evaluate(t2);\n const n2 = this.input.evaluate(t2);\n if (n2 <= e2[0]) return r2[0].evaluate(t2);\n const i2 = e2.length;\n return n2 >= e2[i2 - 1] ? r2[i2 - 1].evaluate(t2) : r2[or(e2, n2)].evaluate(t2);\n }\n eachChild(t2) {\n t2(this.input);\n for (const e2 of this.outputs) t2(e2);\n }\n outputDefined() {\n return this.outputs.every(((t2) => t2.outputDefined()));\n }\n }\n function lr(t2) {\n return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, \"default\") ? t2.default : t2;\n }\n var ur, cr, hr = (function() {\n if (cr) return ur;\n function t2(t3, e2, r2, n2) {\n this.cx = 3 * t3, this.bx = 3 * (r2 - t3) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * e2, this.by = 3 * (n2 - e2) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t3, this.p1y = e2, this.p2x = r2, this.p2y = n2;\n }\n return cr = 1, ur = t2, t2.prototype = { sampleCurveX: function(t3) {\n return ((this.ax * t3 + this.bx) * t3 + this.cx) * t3;\n }, sampleCurveY: function(t3) {\n return ((this.ay * t3 + this.by) * t3 + this.cy) * t3;\n }, sampleCurveDerivativeX: function(t3) {\n return (3 * this.ax * t3 + 2 * this.bx) * t3 + this.cx;\n }, solveCurveX: function(t3, e2) {\n if (void 0 === e2 && (e2 = 1e-6), t3 < 0) return 0;\n if (t3 > 1) return 1;\n for (var r2 = t3, n2 = 0; n2 < 8; n2++) {\n var i2 = this.sampleCurveX(r2) - t3;\n if (Math.abs(i2) < e2) return r2;\n var s2 = this.sampleCurveDerivativeX(r2);\n if (Math.abs(s2) < 1e-6) break;\n r2 -= i2 / s2;\n }\n var o2 = 0, a2 = 1;\n for (r2 = t3, n2 = 0; n2 < 20 && (i2 = this.sampleCurveX(r2), !(Math.abs(i2 - t3) < e2)); n2++) t3 > i2 ? o2 = r2 : a2 = r2, r2 = 0.5 * (a2 - o2) + o2;\n return r2;\n }, solve: function(t3, e2) {\n return this.sampleCurveY(this.solveCurveX(t3, e2));\n } }, ur;\n })(), pr = lr(hr);\n class fr {\n constructor(t2, e2, r2, n2, i2) {\n this.type = t2, this.operator = e2, this.interpolation = r2, this.input = n2, this.labels = [], this.outputs = [];\n for (const [t3, e3] of i2) this.labels.push(t3), this.outputs.push(e3);\n }\n static interpolationFactor(t2, e2, r2, n2) {\n let i2 = 0;\n if (\"exponential\" === t2.name) i2 = dr(e2, t2.base, r2, n2);\n else if (\"linear\" === t2.name) i2 = dr(e2, 1, r2, n2);\n else if (\"cubic-bezier\" === t2.name) {\n const s2 = t2.controlPoints;\n i2 = new pr(s2[0], s2[1], s2[2], s2[3]).solve(dr(e2, 1, r2, n2));\n }\n return i2;\n }\n static parse(t2, e2) {\n let [r2, n2, i2, ...s2] = t2;\n if (!Array.isArray(n2) || 0 === n2.length) return e2.error(\"Expected an interpolation type expression.\", 1);\n if (\"linear\" === n2[0]) n2 = { name: \"linear\" };\n else if (\"exponential\" === n2[0]) {\n const t3 = n2[1];\n if (\"number\" != typeof t3) return e2.error(\"Exponential interpolation requires a numeric base.\", 1, 1);\n n2 = { name: \"exponential\", base: t3 };\n } else {\n if (\"cubic-bezier\" !== n2[0]) return e2.error(`Unknown interpolation type ${String(n2[0])}`, 1, 0);\n {\n const t3 = n2.slice(1);\n if (4 !== t3.length || t3.some(((t4) => \"number\" != typeof t4 || t4 < 0 || t4 > 1))) return e2.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\", 1);\n n2 = { name: \"cubic-bezier\", controlPoints: t3 };\n }\n }\n if (t2.length - 1 < 4) return e2.error(`Expected at least 4 arguments, but found only ${t2.length - 1}.`);\n if ((t2.length - 1) % 2 != 0) return e2.error(\"Expected an even number of arguments.\");\n if (i2 = e2.parse(i2, 2, Ct), !i2) return null;\n const o2 = [];\n let a2 = null;\n \"interpolate-hcl\" !== r2 && \"interpolate-lab\" !== r2 || e2.expectedType == Xt ? e2.expectedType && \"value\" !== e2.expectedType.kind && (a2 = e2.expectedType) : a2 = Rt;\n for (let t3 = 0; t3 < s2.length; t3 += 2) {\n const r3 = s2[t3], n3 = s2[t3 + 1], i3 = t3 + 3, l2 = t3 + 4;\n if (\"number\" != typeof r3) return e2.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', i3);\n if (o2.length && o2[o2.length - 1][0] >= r3) return e2.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', i3);\n const u2 = e2.parse(n3, l2, a2);\n if (!u2) return null;\n a2 = a2 || u2.type, o2.push([r3, u2]);\n }\n return re(a2, Ct) || re(a2, Nt) || re(a2, Rt) || re(a2, Gt) || re(a2, Yt) || re(a2, Xt) || re(a2, Ht) || re(a2, Kt(Ct)) ? new fr(a2, r2, n2, i2, o2) : e2.error(`Type ${Wt(a2)} is not interpolatable.`);\n }\n evaluate(t2) {\n const e2 = this.labels, r2 = this.outputs;\n if (1 === e2.length) return r2[0].evaluate(t2);\n const n2 = this.input.evaluate(t2);\n if (n2 <= e2[0]) return r2[0].evaluate(t2);\n const i2 = e2.length;\n if (n2 >= e2[i2 - 1]) return r2[i2 - 1].evaluate(t2);\n const s2 = or(e2, n2), o2 = fr.interpolationFactor(this.interpolation, n2, e2[s2], e2[s2 + 1]), a2 = r2[s2].evaluate(t2), l2 = r2[s2 + 1].evaluate(t2);\n switch (this.operator) {\n case \"interpolate\":\n switch (this.type.kind) {\n case \"number\":\n return ke(a2, l2, o2);\n case \"color\":\n return Te.interpolate(a2, l2, o2);\n case \"padding\":\n return Pe.interpolate(a2, l2, o2);\n case \"colorArray\":\n return Be.interpolate(a2, l2, o2);\n case \"numberArray\":\n return ze.interpolate(a2, l2, o2);\n case \"variableAnchorOffsetCollection\":\n return Le.interpolate(a2, l2, o2);\n case \"array\":\n return Ee(a2, l2, o2);\n case \"projectionDefinition\":\n return Re.interpolate(a2, l2, o2);\n }\n case \"interpolate-hcl\":\n switch (this.type.kind) {\n case \"color\":\n return Te.interpolate(a2, l2, o2, \"hcl\");\n case \"colorArray\":\n return Be.interpolate(a2, l2, o2, \"hcl\");\n }\n case \"interpolate-lab\":\n switch (this.type.kind) {\n case \"color\":\n return Te.interpolate(a2, l2, o2, \"lab\");\n case \"colorArray\":\n return Be.interpolate(a2, l2, o2, \"lab\");\n }\n }\n }\n eachChild(t2) {\n t2(this.input);\n for (const e2 of this.outputs) t2(e2);\n }\n outputDefined() {\n return this.outputs.every(((t2) => t2.outputDefined()));\n }\n }\n function dr(t2, e2, r2, n2) {\n const i2 = n2 - r2, s2 = t2 - r2;\n return 0 === i2 ? 0 : 1 === e2 ? s2 / i2 : (Math.pow(e2, s2) - 1) / (Math.pow(e2, i2) - 1);\n }\n const yr = { color: Te.interpolate, number: ke, padding: Pe.interpolate, numberArray: ze.interpolate, colorArray: Be.interpolate, variableAnchorOffsetCollection: Le.interpolate, array: Ee };\n class mr {\n constructor(t2, e2) {\n this.type = t2, this.args = e2;\n }\n static parse(t2, e2) {\n if (t2.length < 2) return e2.error(\"Expected at least one argument.\");\n let r2 = null;\n const n2 = e2.expectedType;\n n2 && \"value\" !== n2.kind && (r2 = n2);\n const i2 = [];\n for (const n3 of t2.slice(1)) {\n const t3 = e2.parse(n3, 1 + i2.length, r2, void 0, { typeAnnotation: \"omit\" });\n if (!t3) return null;\n r2 = r2 || t3.type, i2.push(t3);\n }\n if (!r2) throw new Error(\"No output type\");\n const s2 = n2 && i2.some(((t3) => Qt(n2, t3.type)));\n return new mr(s2 ? Ut : r2, i2);\n }\n evaluate(t2) {\n let e2, r2 = null, n2 = 0;\n for (const i2 of this.args) if (n2++, r2 = i2.evaluate(t2), r2 && r2 instanceof Oe && !r2.available && (e2 || (e2 = r2.name), r2 = null, n2 === this.args.length && (r2 = e2)), null !== r2) break;\n return r2;\n }\n eachChild(t2) {\n this.args.forEach(t2);\n }\n outputDefined() {\n return this.args.every(((t2) => t2.outputDefined()));\n }\n }\n function gr(t2, e2) {\n return \"==\" === t2 || \"!=\" === t2 ? \"boolean\" === e2.kind || \"string\" === e2.kind || \"number\" === e2.kind || \"null\" === e2.kind || \"value\" === e2.kind : \"string\" === e2.kind || \"number\" === e2.kind || \"value\" === e2.kind;\n }\n function xr(t2, e2, r2, n2) {\n return 0 === n2.compare(e2, r2);\n }\n function vr(t2, e2, r2) {\n const n2 = \"==\" !== t2 && \"!=\" !== t2;\n return class i2 {\n constructor(t3, e3, r3) {\n this.type = Ot, this.lhs = t3, this.rhs = e3, this.collator = r3, this.hasUntypedArgument = \"value\" === t3.type.kind || \"value\" === e3.type.kind;\n }\n static parse(t3, e3) {\n if (3 !== t3.length && 4 !== t3.length) return e3.error(\"Expected two or three arguments.\");\n const r3 = t3[0];\n let s2 = e3.parse(t3[1], 1, Ut);\n if (!s2) return null;\n if (!gr(r3, s2.type)) return e3.concat(1).error(`\"${r3}\" comparisons are not supported for type '${Wt(s2.type)}'.`);\n let o2 = e3.parse(t3[2], 2, Ut);\n if (!o2) return null;\n if (!gr(r3, o2.type)) return e3.concat(2).error(`\"${r3}\" comparisons are not supported for type '${Wt(o2.type)}'.`);\n if (s2.type.kind !== o2.type.kind && \"value\" !== s2.type.kind && \"value\" !== o2.type.kind) return e3.error(`Cannot compare types '${Wt(s2.type)}' and '${Wt(o2.type)}'.`);\n n2 && (\"value\" === s2.type.kind && \"value\" !== o2.type.kind ? s2 = new Xe(o2.type, [s2]) : \"value\" !== s2.type.kind && \"value\" === o2.type.kind && (o2 = new Xe(s2.type, [o2])));\n let a2 = null;\n if (4 === t3.length) {\n if (\"string\" !== s2.type.kind && \"string\" !== o2.type.kind && \"value\" !== s2.type.kind && \"value\" !== o2.type.kind) return e3.error(\"Cannot use collator to compare non-string types.\");\n if (a2 = e3.parse(t3[3], 3, qt), !a2) return null;\n }\n return new i2(s2, o2, a2);\n }\n evaluate(i3) {\n const s2 = this.lhs.evaluate(i3), o2 = this.rhs.evaluate(i3);\n if (n2 && this.hasUntypedArgument) {\n const e3 = Ue(s2), r3 = Ue(o2);\n if (e3.kind !== r3.kind || \"string\" !== e3.kind && \"number\" !== e3.kind) throw new Ve(`Expected arguments for \"${t2}\" to be (string, string) or (number, number), but found (${e3.kind}, ${r3.kind}) instead.`);\n }\n if (this.collator && !n2 && this.hasUntypedArgument) {\n const t3 = Ue(s2), r3 = Ue(o2);\n if (\"string\" !== t3.kind || \"string\" !== r3.kind) return e2(i3, s2, o2);\n }\n return this.collator ? r2(i3, s2, o2, this.collator.evaluate(i3)) : e2(i3, s2, o2);\n }\n eachChild(t3) {\n t3(this.lhs), t3(this.rhs), this.collator && t3(this.collator);\n }\n outputDefined() {\n return true;\n }\n };\n }\n const br = vr(\"==\", (function(t2, e2, r2) {\n return e2 === r2;\n }), xr), wr = vr(\"!=\", (function(t2, e2, r2) {\n return e2 !== r2;\n }), (function(t2, e2, r2, n2) {\n return !xr(0, e2, r2, n2);\n })), _r = vr(\"<\", (function(t2, e2, r2) {\n return e2 < r2;\n }), (function(t2, e2, r2, n2) {\n return n2.compare(e2, r2) < 0;\n })), Ar = vr(\">\", (function(t2, e2, r2) {\n return e2 > r2;\n }), (function(t2, e2, r2, n2) {\n return n2.compare(e2, r2) > 0;\n })), Sr = vr(\"<=\", (function(t2, e2, r2) {\n return e2 <= r2;\n }), (function(t2, e2, r2, n2) {\n return n2.compare(e2, r2) <= 0;\n })), kr = vr(\">=\", (function(t2, e2, r2) {\n return e2 >= r2;\n }), (function(t2, e2, r2, n2) {\n return n2.compare(e2, r2) >= 0;\n }));\n class Er {\n constructor(t2, e2, r2) {\n this.type = qt, this.locale = r2, this.caseSensitive = t2, this.diacriticSensitive = e2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(\"Expected one argument.\");\n const r2 = t2[1];\n if (\"object\" != typeof r2 || Array.isArray(r2)) return e2.error(\"Collator options argument must be an object.\");\n const n2 = e2.parse(void 0 !== r2[\"case-sensitive\"] && r2[\"case-sensitive\"], 1, Ot);\n if (!n2) return null;\n const i2 = e2.parse(void 0 !== r2[\"diacritic-sensitive\"] && r2[\"diacritic-sensitive\"], 1, Ot);\n if (!i2) return null;\n let s2 = null;\n return r2.locale && (s2 = e2.parse(r2.locale, 1, Lt), !s2) ? null : new Er(n2, i2, s2);\n }\n evaluate(t2) {\n return new Ie(this.caseSensitive.evaluate(t2), this.diacriticSensitive.evaluate(t2), this.locale ? this.locale.evaluate(t2) : null);\n }\n eachChild(t2) {\n t2(this.caseSensitive), t2(this.diacriticSensitive), this.locale && t2(this.locale);\n }\n outputDefined() {\n return false;\n }\n }\n class Tr {\n constructor(t2, e2, r2, n2, i2) {\n this.type = Lt, this.number = t2, this.locale = e2, this.currency = r2, this.minFractionDigits = n2, this.maxFractionDigits = i2;\n }\n static parse(t2, e2) {\n if (3 !== t2.length) return e2.error(\"Expected two arguments.\");\n const r2 = e2.parse(t2[1], 1, Ct);\n if (!r2) return null;\n const n2 = t2[2];\n if (\"object\" != typeof n2 || Array.isArray(n2)) return e2.error(\"NumberFormat options argument must be an object.\");\n let i2 = null;\n if (n2.locale && (i2 = e2.parse(n2.locale, 1, Lt), !i2)) return null;\n let s2 = null;\n if (n2.currency && (s2 = e2.parse(n2.currency, 1, Lt), !s2)) return null;\n let o2 = null;\n if (n2[\"min-fraction-digits\"] && (o2 = e2.parse(n2[\"min-fraction-digits\"], 1, Ct), !o2)) return null;\n let a2 = null;\n return n2[\"max-fraction-digits\"] && (a2 = e2.parse(n2[\"max-fraction-digits\"], 1, Ct), !a2) ? null : new Tr(r2, i2, s2, o2, a2);\n }\n evaluate(t2) {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(t2) : [], { style: this.currency ? \"currency\" : \"decimal\", currency: this.currency ? this.currency.evaluate(t2) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(t2) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(t2) : void 0 }).format(this.number.evaluate(t2));\n }\n eachChild(t2) {\n t2(this.number), this.locale && t2(this.locale), this.currency && t2(this.currency), this.minFractionDigits && t2(this.minFractionDigits), this.maxFractionDigits && t2(this.maxFractionDigits);\n }\n outputDefined() {\n return false;\n }\n }\n class Ir {\n constructor(t2) {\n this.type = jt, this.sections = t2;\n }\n static parse(t2, e2) {\n if (t2.length < 2) return e2.error(\"Expected at least one argument.\");\n const r2 = t2[1];\n if (!Array.isArray(r2) && \"object\" == typeof r2) return e2.error(\"First argument must be an image or text section.\");\n const n2 = [];\n let i2 = false;\n for (let r3 = 1; r3 <= t2.length - 1; ++r3) {\n const s2 = t2[r3];\n if (i2 && \"object\" == typeof s2 && !Array.isArray(s2)) {\n i2 = false;\n let t3 = null;\n if (s2[\"font-scale\"] && (t3 = e2.parse(s2[\"font-scale\"], 1, Ct), !t3)) return null;\n let r4 = null;\n if (s2[\"text-font\"] && (r4 = e2.parse(s2[\"text-font\"], 1, Kt(Lt)), !r4)) return null;\n let o2 = null;\n if (s2[\"text-color\"] && (o2 = e2.parse(s2[\"text-color\"], 1, Rt), !o2)) return null;\n let a2 = null;\n if (s2[\"vertical-align\"]) {\n if (\"string\" == typeof s2[\"vertical-align\"] && !Me.includes(s2[\"vertical-align\"])) return e2.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s2[\"vertical-align\"]}' instead.`);\n if (a2 = e2.parse(s2[\"vertical-align\"], 1, Lt), !a2) return null;\n }\n const l2 = n2[n2.length - 1];\n l2.scale = t3, l2.font = r4, l2.textColor = o2, l2.verticalAlign = a2;\n } else {\n const s3 = e2.parse(t2[r3], 1, Ut);\n if (!s3) return null;\n const o2 = s3.type.kind;\n if (\"string\" !== o2 && \"value\" !== o2 && \"null\" !== o2 && \"resolvedImage\" !== o2) return e2.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");\n i2 = true, n2.push({ content: s3, scale: null, font: null, textColor: null, verticalAlign: null });\n }\n }\n return new Ir(n2);\n }\n evaluate(t2) {\n return new De(this.sections.map(((e2) => {\n const r2 = e2.content.evaluate(t2);\n return Ue(r2) === Zt ? new Fe(\"\", r2, null, null, null, e2.verticalAlign ? e2.verticalAlign.evaluate(t2) : null) : new Fe(qe(r2), null, e2.scale ? e2.scale.evaluate(t2) : null, e2.font ? e2.font.evaluate(t2).join(\",\") : null, e2.textColor ? e2.textColor.evaluate(t2) : null, e2.verticalAlign ? e2.verticalAlign.evaluate(t2) : null);\n })));\n }\n eachChild(t2) {\n for (const e2 of this.sections) t2(e2.content), e2.scale && t2(e2.scale), e2.font && t2(e2.font), e2.textColor && t2(e2.textColor), e2.verticalAlign && t2(e2.verticalAlign);\n }\n outputDefined() {\n return false;\n }\n }\n class Mr {\n constructor(t2) {\n this.type = Zt, this.input = t2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(\"Expected two arguments.\");\n const r2 = e2.parse(t2[1], 1, Lt);\n return r2 ? new Mr(r2) : e2.error(\"No image name provided.\");\n }\n evaluate(t2) {\n const e2 = this.input.evaluate(t2), r2 = Oe.fromString(e2);\n return r2 && t2.availableImages && (r2.available = t2.availableImages.indexOf(e2) > -1), r2;\n }\n eachChild(t2) {\n t2(this.input);\n }\n outputDefined() {\n return false;\n }\n }\n class Fr {\n constructor(t2) {\n this.type = Ct, this.input = t2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(`Expected 1 argument, but found ${t2.length - 1} instead.`);\n const r2 = e2.parse(t2[1], 1);\n return r2 ? \"array\" !== r2.type.kind && \"string\" !== r2.type.kind && \"value\" !== r2.type.kind ? e2.error(`Expected argument of type string or array, but found ${Wt(r2.type)} instead.`) : new Fr(r2) : null;\n }\n evaluate(t2) {\n const e2 = this.input.evaluate(t2);\n if (\"string\" == typeof e2) return [...e2].length;\n if (Array.isArray(e2)) return e2.length;\n throw new Ve(`Expected value to be of type string or array, but found ${Wt(Ue(e2))} instead.`);\n }\n eachChild(t2) {\n t2(this.input);\n }\n outputDefined() {\n return false;\n }\n }\n const Dr = 8192;\n function Pr(t2, e2) {\n const r2 = (180 + t2[0]) / 360, n2 = (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t2[1] * Math.PI / 360))) / 360, i2 = Math.pow(2, e2.z);\n return [Math.round(r2 * i2 * Dr), Math.round(n2 * i2 * Dr)];\n }\n function zr(t2, e2) {\n const r2 = Math.pow(2, e2.z);\n return [(i2 = (t2[0] / Dr + e2.x) / r2, 360 * i2 - 180), (n2 = (t2[1] / Dr + e2.y) / r2, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * n2) * Math.PI / 180)) - 90)];\n var n2, i2;\n }\n function Br(t2, e2) {\n t2[0] = Math.min(t2[0], e2[0]), t2[1] = Math.min(t2[1], e2[1]), t2[2] = Math.max(t2[2], e2[0]), t2[3] = Math.max(t2[3], e2[1]);\n }\n function Vr(t2, e2) {\n return !(t2[0] <= e2[0] || t2[2] >= e2[2] || t2[1] <= e2[1] || t2[3] >= e2[3]);\n }\n function Cr(t2, e2, r2) {\n const n2 = t2[0] - e2[0], i2 = t2[1] - e2[1], s2 = t2[0] - r2[0], o2 = t2[1] - r2[1];\n return n2 * o2 - s2 * i2 == 0 && n2 * s2 <= 0 && i2 * o2 <= 0;\n }\n function Lr(t2, e2, r2, n2) {\n return 0 != (i2 = [n2[0] - r2[0], n2[1] - r2[1]])[0] * (s2 = [e2[0] - t2[0], e2[1] - t2[1]])[1] - i2[1] * s2[0] && !(!qr(t2, e2, r2, n2) || !qr(r2, n2, t2, e2));\n var i2, s2;\n }\n function Or(t2, e2, r2) {\n for (const n2 of r2) for (let r3 = 0; r3 < n2.length - 1; ++r3) if (Lr(t2, e2, n2[r3], n2[r3 + 1])) return true;\n return false;\n }\n function Rr(t2, e2, r2 = false) {\n let n2 = false;\n for (const a2 of e2) for (let e3 = 0; e3 < a2.length - 1; e3++) {\n if (Cr(t2, a2[e3], a2[e3 + 1])) return r2;\n (s2 = a2[e3])[1] > (i2 = t2)[1] != (o2 = a2[e3 + 1])[1] > i2[1] && i2[0] < (o2[0] - s2[0]) * (i2[1] - s2[1]) / (o2[1] - s2[1]) + s2[0] && (n2 = !n2);\n }\n var i2, s2, o2;\n return n2;\n }\n function Nr(t2, e2) {\n for (const r2 of e2) if (Rr(t2, r2)) return true;\n return false;\n }\n function $r(t2, e2) {\n for (const r2 of t2) if (!Rr(r2, e2)) return false;\n for (let r2 = 0; r2 < t2.length - 1; ++r2) if (Or(t2[r2], t2[r2 + 1], e2)) return false;\n return true;\n }\n function Ur(t2, e2) {\n for (const r2 of e2) if ($r(t2, r2)) return true;\n return false;\n }\n function qr(t2, e2, r2, n2) {\n const i2 = n2[0] - r2[0], s2 = n2[1] - r2[1], o2 = (t2[0] - r2[0]) * s2 - i2 * (t2[1] - r2[1]), a2 = (e2[0] - r2[0]) * s2 - i2 * (e2[1] - r2[1]);\n return o2 > 0 && a2 < 0 || o2 < 0 && a2 > 0;\n }\n function jr(t2, e2, r2) {\n const n2 = [];\n for (let i2 = 0; i2 < t2.length; i2++) {\n const s2 = [];\n for (let n3 = 0; n3 < t2[i2].length; n3++) {\n const o2 = Pr(t2[i2][n3], r2);\n Br(e2, o2), s2.push(o2);\n }\n n2.push(s2);\n }\n return n2;\n }\n function Gr(t2, e2, r2) {\n const n2 = [];\n for (let i2 = 0; i2 < t2.length; i2++) {\n const s2 = jr(t2[i2], e2, r2);\n n2.push(s2);\n }\n return n2;\n }\n function Xr(t2, e2, r2, n2) {\n if (t2[0] < r2[0] || t2[0] > r2[2]) {\n const e3 = 0.5 * n2;\n let i2 = t2[0] - r2[0] > e3 ? -n2 : r2[0] - t2[0] > e3 ? n2 : 0;\n 0 === i2 && (i2 = t2[0] - r2[2] > e3 ? -n2 : r2[2] - t2[0] > e3 ? n2 : 0), t2[0] += i2;\n }\n Br(e2, t2);\n }\n function Yr(t2, e2, r2, n2) {\n const i2 = Math.pow(2, n2.z) * Dr, s2 = [n2.x * Dr, n2.y * Dr], o2 = [];\n for (const n3 of t2) for (const t3 of n3) {\n const n4 = [t3.x + s2[0], t3.y + s2[1]];\n Xr(n4, e2, r2, i2), o2.push(n4);\n }\n return o2;\n }\n function Zr(t2, e2, r2, n2) {\n const i2 = Math.pow(2, n2.z) * Dr, s2 = [n2.x * Dr, n2.y * Dr], o2 = [];\n for (const r3 of t2) {\n const t3 = [];\n for (const n3 of r3) {\n const r4 = [n3.x + s2[0], n3.y + s2[1]];\n Br(e2, r4), t3.push(r4);\n }\n o2.push(t3);\n }\n if (e2[2] - e2[0] <= i2 / 2) {\n (a2 = e2)[0] = a2[1] = 1 / 0, a2[2] = a2[3] = -1 / 0;\n for (const t3 of o2) for (const n3 of t3) Xr(n3, e2, r2, i2);\n }\n var a2;\n return o2;\n }\n class Hr {\n constructor(t2, e2) {\n this.type = Ot, this.geojson = t2, this.geometries = e2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(`'within' expression requires exactly one argument, but found ${t2.length - 1} instead.`);\n if ($e(t2[1])) {\n const e3 = t2[1];\n if (\"FeatureCollection\" === e3.type) {\n const t3 = [];\n for (const r2 of e3.features) {\n const { type: e4, coordinates: n2 } = r2.geometry;\n \"Polygon\" === e4 && t3.push(n2), \"MultiPolygon\" === e4 && t3.push(...n2);\n }\n if (t3.length) return new Hr(e3, { type: \"MultiPolygon\", coordinates: t3 });\n } else if (\"Feature\" === e3.type) {\n const t3 = e3.geometry.type;\n if (\"Polygon\" === t3 || \"MultiPolygon\" === t3) return new Hr(e3, e3.geometry);\n } else if (\"Polygon\" === e3.type || \"MultiPolygon\" === e3.type) return new Hr(e3, e3);\n }\n return e2.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\");\n }\n evaluate(t2) {\n if (null != t2.geometry() && null != t2.canonicalID()) {\n if (\"Point\" === t2.geometryType()) return (function(t3, e2) {\n const r2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0], i2 = t3.canonicalID();\n if (\"Polygon\" === e2.type) {\n const s2 = jr(e2.coordinates, n2, i2), o2 = Yr(t3.geometry(), r2, n2, i2);\n if (!Vr(r2, n2)) return false;\n for (const t4 of o2) if (!Rr(t4, s2)) return false;\n }\n if (\"MultiPolygon\" === e2.type) {\n const s2 = Gr(e2.coordinates, n2, i2), o2 = Yr(t3.geometry(), r2, n2, i2);\n if (!Vr(r2, n2)) return false;\n for (const t4 of o2) if (!Nr(t4, s2)) return false;\n }\n return true;\n })(t2, this.geometries);\n if (\"LineString\" === t2.geometryType()) return (function(t3, e2) {\n const r2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0], i2 = t3.canonicalID();\n if (\"Polygon\" === e2.type) {\n const s2 = jr(e2.coordinates, n2, i2), o2 = Zr(t3.geometry(), r2, n2, i2);\n if (!Vr(r2, n2)) return false;\n for (const t4 of o2) if (!$r(t4, s2)) return false;\n }\n if (\"MultiPolygon\" === e2.type) {\n const s2 = Gr(e2.coordinates, n2, i2), o2 = Zr(t3.geometry(), r2, n2, i2);\n if (!Vr(r2, n2)) return false;\n for (const t4 of o2) if (!Ur(t4, s2)) return false;\n }\n return true;\n })(t2, this.geometries);\n }\n return false;\n }\n eachChild() {\n }\n outputDefined() {\n return true;\n }\n }\n let Kr = class {\n constructor(t2 = [], e2 = (t3, e3) => t3 < e3 ? -1 : t3 > e3 ? 1 : 0) {\n if (this.data = t2, this.length = this.data.length, this.compare = e2, this.length > 0) for (let t3 = (this.length >> 1) - 1; t3 >= 0; t3--) this._down(t3);\n }\n push(t2) {\n this.data.push(t2), this._up(this.length++);\n }\n pop() {\n if (0 === this.length) return;\n const t2 = this.data[0], e2 = this.data.pop();\n return --this.length > 0 && (this.data[0] = e2, this._down(0)), t2;\n }\n peek() {\n return this.data[0];\n }\n _up(t2) {\n const { data: e2, compare: r2 } = this, n2 = e2[t2];\n for (; t2 > 0; ) {\n const i2 = t2 - 1 >> 1, s2 = e2[i2];\n if (r2(n2, s2) >= 0) break;\n e2[t2] = s2, t2 = i2;\n }\n e2[t2] = n2;\n }\n _down(t2) {\n const { data: e2, compare: r2 } = this, n2 = this.length >> 1, i2 = e2[t2];\n for (; t2 < n2; ) {\n let n3 = 1 + (t2 << 1);\n const s2 = n3 + 1;\n if (s2 < this.length && r2(e2[s2], e2[n3]) < 0 && (n3 = s2), r2(e2[n3], i2) >= 0) break;\n e2[t2] = e2[n3], t2 = n3;\n }\n e2[t2] = i2;\n }\n };\n function Wr(t2, e2, r2 = 0, n2 = t2.length - 1, i2 = Qr) {\n for (; n2 > r2; ) {\n if (n2 - r2 > 600) {\n const s3 = n2 - r2 + 1, o3 = e2 - r2 + 1, a3 = Math.log(s3), l2 = 0.5 * Math.exp(2 * a3 / 3), u2 = 0.5 * Math.sqrt(a3 * l2 * (s3 - l2) / s3) * (o3 - s3 / 2 < 0 ? -1 : 1);\n Wr(t2, e2, Math.max(r2, Math.floor(e2 - o3 * l2 / s3 + u2)), Math.min(n2, Math.floor(e2 + (s3 - o3) * l2 / s3 + u2)), i2);\n }\n const s2 = t2[e2];\n let o2 = r2, a2 = n2;\n for (Jr(t2, r2, e2), i2(t2[n2], s2) > 0 && Jr(t2, r2, n2); o2 < a2; ) {\n for (Jr(t2, o2, a2), o2++, a2--; i2(t2[o2], s2) < 0; ) o2++;\n for (; i2(t2[a2], s2) > 0; ) a2--;\n }\n 0 === i2(t2[r2], s2) ? Jr(t2, r2, a2) : (a2++, Jr(t2, a2, n2)), a2 <= e2 && (r2 = a2 + 1), e2 <= a2 && (n2 = a2 - 1);\n }\n }\n function Jr(t2, e2, r2) {\n const n2 = t2[e2];\n t2[e2] = t2[r2], t2[r2] = n2;\n }\n function Qr(t2, e2) {\n return t2 < e2 ? -1 : t2 > e2 ? 1 : 0;\n }\n function tn(t2, e2) {\n if (t2.length <= 1) return [t2];\n const r2 = [];\n let n2, i2;\n for (const e3 of t2) {\n const t3 = rn(e3);\n 0 !== t3 && (e3.area = Math.abs(t3), void 0 === i2 && (i2 = t3 < 0), i2 === t3 < 0 ? (n2 && r2.push(n2), n2 = [e3]) : n2.push(e3));\n }\n if (n2 && r2.push(n2), e2 > 1) for (let t3 = 0; t3 < r2.length; t3++) r2[t3].length <= e2 || (Wr(r2[t3], e2, 1, r2[t3].length - 1, en), r2[t3] = r2[t3].slice(0, e2));\n return r2;\n }\n function en(t2, e2) {\n return e2.area - t2.area;\n }\n function rn(t2) {\n let e2 = 0;\n for (let r2, n2, i2 = 0, s2 = t2.length, o2 = s2 - 1; i2 < s2; o2 = i2++) r2 = t2[i2], n2 = t2[o2], e2 += (n2.x - r2.x) * (r2.y + n2.y);\n return e2;\n }\n const nn = 1 / 298.257223563, sn = nn * (2 - nn), on = Math.PI / 180;\n class an {\n constructor(t2) {\n const e2 = 6378.137 * on * 1e3, r2 = Math.cos(t2 * on), n2 = 1 / (1 - sn * (1 - r2 * r2)), i2 = Math.sqrt(n2);\n this.kx = e2 * i2 * r2, this.ky = e2 * i2 * n2 * (1 - sn);\n }\n distance(t2, e2) {\n const r2 = this.wrap(t2[0] - e2[0]) * this.kx, n2 = (t2[1] - e2[1]) * this.ky;\n return Math.sqrt(r2 * r2 + n2 * n2);\n }\n pointOnLine(t2, e2) {\n let r2, n2, i2, s2, o2 = 1 / 0;\n for (let a2 = 0; a2 < t2.length - 1; a2++) {\n let l2 = t2[a2][0], u2 = t2[a2][1], c2 = this.wrap(t2[a2 + 1][0] - l2) * this.kx, h2 = (t2[a2 + 1][1] - u2) * this.ky, p2 = 0;\n 0 === c2 && 0 === h2 || (p2 = (this.wrap(e2[0] - l2) * this.kx * c2 + (e2[1] - u2) * this.ky * h2) / (c2 * c2 + h2 * h2), p2 > 1 ? (l2 = t2[a2 + 1][0], u2 = t2[a2 + 1][1]) : p2 > 0 && (l2 += c2 / this.kx * p2, u2 += h2 / this.ky * p2)), c2 = this.wrap(e2[0] - l2) * this.kx, h2 = (e2[1] - u2) * this.ky;\n const f2 = c2 * c2 + h2 * h2;\n f2 < o2 && (o2 = f2, r2 = l2, n2 = u2, i2 = a2, s2 = p2);\n }\n return { point: [r2, n2], index: i2, t: Math.max(0, Math.min(1, s2)) };\n }\n wrap(t2) {\n for (; t2 < -180; ) t2 += 360;\n for (; t2 > 180; ) t2 -= 360;\n return t2;\n }\n }\n function ln(t2, e2) {\n return e2[0] - t2[0];\n }\n function un(t2) {\n return t2[1] - t2[0] + 1;\n }\n function cn(t2, e2) {\n return t2[1] >= t2[0] && t2[1] < e2;\n }\n function hn(t2, e2) {\n if (t2[0] > t2[1]) return [null, null];\n const r2 = un(t2);\n if (e2) {\n if (2 === r2) return [t2, null];\n const e3 = Math.floor(r2 / 2);\n return [[t2[0], t2[0] + e3], [t2[0] + e3, t2[1]]];\n }\n if (1 === r2) return [t2, null];\n const n2 = Math.floor(r2 / 2) - 1;\n return [[t2[0], t2[0] + n2], [t2[0] + n2 + 1, t2[1]]];\n }\n function pn(t2, e2) {\n if (!cn(e2, t2.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0];\n const r2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0];\n for (let n2 = e2[0]; n2 <= e2[1]; ++n2) Br(r2, t2[n2]);\n return r2;\n }\n function fn(t2) {\n const e2 = [1 / 0, 1 / 0, -1 / 0, -1 / 0];\n for (const r2 of t2) for (const t3 of r2) Br(e2, t3);\n return e2;\n }\n function dn(t2) {\n return t2[0] !== -1 / 0 && t2[1] !== -1 / 0 && t2[2] !== 1 / 0 && t2[3] !== 1 / 0;\n }\n function yn(t2, e2, r2) {\n if (!dn(t2) || !dn(e2)) return NaN;\n let n2 = 0, i2 = 0;\n return t2[2] < e2[0] && (n2 = e2[0] - t2[2]), t2[0] > e2[2] && (n2 = t2[0] - e2[2]), t2[1] > e2[3] && (i2 = t2[1] - e2[3]), t2[3] < e2[1] && (i2 = e2[1] - t2[3]), r2.distance([0, 0], [n2, i2]);\n }\n function mn(t2, e2, r2) {\n const n2 = r2.pointOnLine(e2, t2);\n return r2.distance(t2, n2.point);\n }\n function gn(t2, e2, r2, n2, i2) {\n const s2 = Math.min(mn(t2, [r2, n2], i2), mn(e2, [r2, n2], i2)), o2 = Math.min(mn(r2, [t2, e2], i2), mn(n2, [t2, e2], i2));\n return Math.min(s2, o2);\n }\n function xn(t2, e2, r2, n2, i2) {\n if (!cn(e2, t2.length) || !cn(n2, r2.length)) return 1 / 0;\n let s2 = 1 / 0;\n for (let o2 = e2[0]; o2 < e2[1]; ++o2) {\n const e3 = t2[o2], a2 = t2[o2 + 1];\n for (let t3 = n2[0]; t3 < n2[1]; ++t3) {\n const n3 = r2[t3], o3 = r2[t3 + 1];\n if (Lr(e3, a2, n3, o3)) return 0;\n s2 = Math.min(s2, gn(e3, a2, n3, o3, i2));\n }\n }\n return s2;\n }\n function vn(t2, e2, r2, n2, i2) {\n if (!cn(e2, t2.length) || !cn(n2, r2.length)) return NaN;\n let s2 = 1 / 0;\n for (let o2 = e2[0]; o2 <= e2[1]; ++o2) for (let e3 = n2[0]; e3 <= n2[1]; ++e3) if (s2 = Math.min(s2, i2.distance(t2[o2], r2[e3])), 0 === s2) return s2;\n return s2;\n }\n function bn(t2, e2, r2) {\n if (Rr(t2, e2, true)) return 0;\n let n2 = 1 / 0;\n for (const i2 of e2) {\n const e3 = i2[0], s2 = i2[i2.length - 1];\n if (e3 !== s2 && (n2 = Math.min(n2, mn(t2, [s2, e3], r2)), 0 === n2)) return n2;\n const o2 = r2.pointOnLine(i2, t2);\n if (n2 = Math.min(n2, r2.distance(t2, o2.point)), 0 === n2) return n2;\n }\n return n2;\n }\n function wn(t2, e2, r2, n2) {\n if (!cn(e2, t2.length)) return NaN;\n for (let n3 = e2[0]; n3 <= e2[1]; ++n3) if (Rr(t2[n3], r2, true)) return 0;\n let i2 = 1 / 0;\n for (let s2 = e2[0]; s2 < e2[1]; ++s2) {\n const e3 = t2[s2], o2 = t2[s2 + 1];\n for (const t3 of r2) for (let r3 = 0, s3 = t3.length, a2 = s3 - 1; r3 < s3; a2 = r3++) {\n const s4 = t3[a2], l2 = t3[r3];\n if (Lr(e3, o2, s4, l2)) return 0;\n i2 = Math.min(i2, gn(e3, o2, s4, l2, n2));\n }\n }\n return i2;\n }\n function _n(t2, e2) {\n for (const r2 of t2) for (const t3 of r2) if (Rr(t3, e2, true)) return true;\n return false;\n }\n function An(t2, e2, r2, n2 = 1 / 0) {\n const i2 = fn(t2), s2 = fn(e2);\n if (n2 !== 1 / 0 && yn(i2, s2, r2) >= n2) return n2;\n if (Vr(i2, s2)) {\n if (_n(t2, e2)) return 0;\n } else if (_n(e2, t2)) return 0;\n let o2 = 1 / 0;\n for (const n3 of t2) for (let t3 = 0, i3 = n3.length, s3 = i3 - 1; t3 < i3; s3 = t3++) {\n const i4 = n3[s3], a2 = n3[t3];\n for (const t4 of e2) for (let e3 = 0, n4 = t4.length, s4 = n4 - 1; e3 < n4; s4 = e3++) {\n const n5 = t4[s4], l2 = t4[e3];\n if (Lr(i4, a2, n5, l2)) return 0;\n o2 = Math.min(o2, gn(i4, a2, n5, l2, r2));\n }\n }\n return o2;\n }\n function Sn(t2, e2, r2, n2, i2, s2) {\n if (!s2) return;\n const o2 = yn(pn(n2, s2), i2, r2);\n o2 < e2 && t2.push([o2, s2, [0, 0]]);\n }\n function kn(t2, e2, r2, n2, i2, s2, o2) {\n if (!s2 || !o2) return;\n const a2 = yn(pn(n2, s2), pn(i2, o2), r2);\n a2 < e2 && t2.push([a2, s2, o2]);\n }\n function En(t2, e2, r2, n2, i2 = 1 / 0) {\n let s2 = Math.min(n2.distance(t2[0], r2[0][0]), i2);\n if (0 === s2) return s2;\n const o2 = new Kr([[0, [0, t2.length - 1], [0, 0]]], ln), a2 = fn(r2);\n for (; o2.length > 0; ) {\n const i3 = o2.pop();\n if (i3[0] >= s2) continue;\n const l2 = i3[1], u2 = e2 ? 50 : 100;\n if (un(l2) <= u2) {\n if (!cn(l2, t2.length)) return NaN;\n if (e2) {\n const e3 = wn(t2, l2, r2, n2);\n if (isNaN(e3) || 0 === e3) return e3;\n s2 = Math.min(s2, e3);\n } else for (let e3 = l2[0]; e3 <= l2[1]; ++e3) {\n const i4 = bn(t2[e3], r2, n2);\n if (s2 = Math.min(s2, i4), 0 === s2) return 0;\n }\n } else {\n const r3 = hn(l2, e2);\n Sn(o2, s2, n2, t2, a2, r3[0]), Sn(o2, s2, n2, t2, a2, r3[1]);\n }\n }\n return s2;\n }\n function Tn(t2, e2, r2, n2, i2, s2 = 1 / 0) {\n let o2 = Math.min(s2, i2.distance(t2[0], r2[0]));\n if (0 === o2) return o2;\n const a2 = new Kr([[0, [0, t2.length - 1], [0, r2.length - 1]]], ln);\n for (; a2.length > 0; ) {\n const s3 = a2.pop();\n if (s3[0] >= o2) continue;\n const l2 = s3[1], u2 = s3[2], c2 = e2 ? 50 : 100, h2 = n2 ? 50 : 100;\n if (un(l2) <= c2 && un(u2) <= h2) {\n if (!cn(l2, t2.length) && cn(u2, r2.length)) return NaN;\n let s4;\n if (e2 && n2) s4 = xn(t2, l2, r2, u2, i2), o2 = Math.min(o2, s4);\n else if (e2 && !n2) {\n const e3 = t2.slice(l2[0], l2[1] + 1);\n for (let t3 = u2[0]; t3 <= u2[1]; ++t3) if (s4 = mn(r2[t3], e3, i2), o2 = Math.min(o2, s4), 0 === o2) return o2;\n } else if (!e2 && n2) {\n const e3 = r2.slice(u2[0], u2[1] + 1);\n for (let r3 = l2[0]; r3 <= l2[1]; ++r3) if (s4 = mn(t2[r3], e3, i2), o2 = Math.min(o2, s4), 0 === o2) return o2;\n } else s4 = vn(t2, l2, r2, u2, i2), o2 = Math.min(o2, s4);\n } else {\n const s4 = hn(l2, e2), c3 = hn(u2, n2);\n kn(a2, o2, i2, t2, r2, s4[0], c3[0]), kn(a2, o2, i2, t2, r2, s4[0], c3[1]), kn(a2, o2, i2, t2, r2, s4[1], c3[0]), kn(a2, o2, i2, t2, r2, s4[1], c3[1]);\n }\n }\n return o2;\n }\n function In(t2) {\n return \"MultiPolygon\" === t2.type ? t2.coordinates.map(((t3) => ({ type: \"Polygon\", coordinates: t3 }))) : \"MultiLineString\" === t2.type ? t2.coordinates.map(((t3) => ({ type: \"LineString\", coordinates: t3 }))) : \"MultiPoint\" === t2.type ? t2.coordinates.map(((t3) => ({ type: \"Point\", coordinates: t3 }))) : [t2];\n }\n class Mn {\n constructor(t2, e2) {\n this.type = Ct, this.geojson = t2, this.geometries = e2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(`'distance' expression requires exactly one argument, but found ${t2.length - 1} instead.`);\n if ($e(t2[1])) {\n const e3 = t2[1];\n if (\"FeatureCollection\" === e3.type) return new Mn(e3, e3.features.map(((t3) => In(t3.geometry))).flat());\n if (\"Feature\" === e3.type) return new Mn(e3, In(e3.geometry));\n if (\"type\" in e3 && \"coordinates\" in e3) return new Mn(e3, In(e3));\n }\n return e2.error(\"'distance' expression requires valid geojson object that contains polygon geometry type.\");\n }\n evaluate(t2) {\n if (null != t2.geometry() && null != t2.canonicalID()) {\n if (\"Point\" === t2.geometryType()) return (function(t3, e2) {\n const r2 = t3.geometry(), n2 = r2.flat().map(((e3) => zr([e3.x, e3.y], t3.canonical)));\n if (0 === r2.length) return NaN;\n const i2 = new an(n2[0][1]);\n let s2 = 1 / 0;\n for (const t4 of e2) {\n switch (t4.type) {\n case \"Point\":\n s2 = Math.min(s2, Tn(n2, false, [t4.coordinates], false, i2, s2));\n break;\n case \"LineString\":\n s2 = Math.min(s2, Tn(n2, false, t4.coordinates, true, i2, s2));\n break;\n case \"Polygon\":\n s2 = Math.min(s2, En(n2, false, t4.coordinates, i2, s2));\n }\n if (0 === s2) return s2;\n }\n return s2;\n })(t2, this.geometries);\n if (\"LineString\" === t2.geometryType()) return (function(t3, e2) {\n const r2 = t3.geometry(), n2 = r2.flat().map(((e3) => zr([e3.x, e3.y], t3.canonical)));\n if (0 === r2.length) return NaN;\n const i2 = new an(n2[0][1]);\n let s2 = 1 / 0;\n for (const t4 of e2) {\n switch (t4.type) {\n case \"Point\":\n s2 = Math.min(s2, Tn(n2, true, [t4.coordinates], false, i2, s2));\n break;\n case \"LineString\":\n s2 = Math.min(s2, Tn(n2, true, t4.coordinates, true, i2, s2));\n break;\n case \"Polygon\":\n s2 = Math.min(s2, En(n2, true, t4.coordinates, i2, s2));\n }\n if (0 === s2) return s2;\n }\n return s2;\n })(t2, this.geometries);\n if (\"Polygon\" === t2.geometryType()) return (function(t3, e2) {\n const r2 = t3.geometry();\n if (0 === r2.length || 0 === r2[0].length) return NaN;\n const n2 = tn(r2, 0).map(((e3) => e3.map(((e4) => e4.map(((e5) => zr([e5.x, e5.y], t3.canonical))))))), i2 = new an(n2[0][0][0][1]);\n let s2 = 1 / 0;\n for (const t4 of e2) for (const e3 of n2) {\n switch (t4.type) {\n case \"Point\":\n s2 = Math.min(s2, En([t4.coordinates], false, e3, i2, s2));\n break;\n case \"LineString\":\n s2 = Math.min(s2, En(t4.coordinates, true, e3, i2, s2));\n break;\n case \"Polygon\":\n s2 = Math.min(s2, An(e3, t4.coordinates, i2, s2));\n }\n if (0 === s2) return s2;\n }\n return s2;\n })(t2, this.geometries);\n }\n return NaN;\n }\n eachChild() {\n }\n outputDefined() {\n return true;\n }\n }\n class Fn {\n constructor(t2) {\n this.type = Ut, this.key = t2;\n }\n static parse(t2, e2) {\n if (2 !== t2.length) return e2.error(`Expected 1 argument, but found ${t2.length - 1} instead.`);\n const r2 = t2[1];\n return null == r2 ? e2.error(\"Global state property must be defined.\") : \"string\" != typeof r2 ? e2.error(`Global state property must be string, but found ${typeof t2[1]} instead.`) : new Fn(r2);\n }\n evaluate(t2) {\n var e2;\n const r2 = null === (e2 = t2.globals) || void 0 === e2 ? void 0 : e2.globalState;\n return r2 && 0 !== Object.keys(r2).length ? ve(r2, this.key) : null;\n }\n eachChild() {\n }\n outputDefined() {\n return false;\n }\n }\n const Dn = { \"==\": br, \"!=\": wr, \">\": Ar, \"<\": _r, \">=\": kr, \"<=\": Sr, array: Xe, at: tr, boolean: Xe, case: ir, coalesce: mr, collator: Er, format: Ir, image: Mr, in: er, \"index-of\": rr, interpolate: fr, \"interpolate-hcl\": fr, \"interpolate-lab\": fr, length: Fr, let: Je, literal: je, match: nr, number: Xe, \"number-format\": Tr, object: Xe, slice: sr, step: ar, string: Xe, \"to-boolean\": Ze, \"to-color\": Ze, \"to-number\": Ze, \"to-string\": Ze, var: Qe, within: Hr, distance: Mn, \"global-state\": Fn };\n class Pn {\n constructor(t2, e2, r2, n2) {\n this.name = t2, this.type = e2, this._evaluate = r2, this.args = n2;\n }\n evaluate(t2) {\n return this._evaluate(t2, this.args);\n }\n eachChild(t2) {\n this.args.forEach(t2);\n }\n outputDefined() {\n return false;\n }\n static parse(t2, e2) {\n const r2 = t2[0], n2 = Pn.definitions[r2];\n if (!n2) return e2.error(`Unknown expression \"${r2}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n const i2 = Array.isArray(n2) ? n2[0] : n2.type, s2 = Array.isArray(n2) ? [[n2[1], n2[2]]] : n2.overloads, o2 = s2.filter((([e3]) => !Array.isArray(e3) || e3.length === t2.length - 1));\n let a2 = null;\n for (const [n3, s3] of o2) {\n a2 = new We(e2.registry, Ln, e2.path, null, e2.scope);\n const o3 = [];\n let l2 = false;\n for (let e3 = 1; e3 < t2.length; e3++) {\n const r3 = t2[e3], i3 = Array.isArray(n3) ? n3[e3 - 1] : n3.type, s4 = a2.parse(r3, 1 + o3.length, i3);\n if (!s4) {\n l2 = true;\n break;\n }\n o3.push(s4);\n }\n if (!l2) if (Array.isArray(n3) && n3.length !== o3.length) a2.error(`Expected ${n3.length} arguments, but found ${o3.length} instead.`);\n else {\n for (let t3 = 0; t3 < o3.length; t3++) {\n const e3 = Array.isArray(n3) ? n3[t3] : n3.type, r3 = o3[t3];\n a2.concat(t3 + 1).checkSubtype(e3, r3.type);\n }\n if (0 === a2.errors.length) return new Pn(r2, i2, s3, o3);\n }\n }\n if (1 === o2.length) e2.errors.push(...a2.errors);\n else {\n const r3 = (o2.length ? o2 : s2).map((([t3]) => {\n return e3 = t3, Array.isArray(e3) ? `(${e3.map(Wt).join(\", \")})` : `(${Wt(e3.type)}...)`;\n var e3;\n })).join(\" | \"), n3 = [];\n for (let r4 = 1; r4 < t2.length; r4++) {\n const i3 = e2.parse(t2[r4], 1 + n3.length);\n if (!i3) return null;\n n3.push(Wt(i3.type));\n }\n e2.error(`Expected arguments of type ${r3}, but found (${n3.join(\", \")}) instead.`);\n }\n return null;\n }\n static register(t2, e2) {\n Pn.definitions = e2;\n for (const r2 in e2) t2[r2] = Pn;\n }\n }\n function zn(t2, [e2, r2, n2, i2]) {\n e2 = e2.evaluate(t2), r2 = r2.evaluate(t2), n2 = n2.evaluate(t2);\n const s2 = i2 ? i2.evaluate(t2) : 1, o2 = Ne(e2, r2, n2, s2);\n if (o2) throw new Ve(o2);\n return new Te(e2 / 255, r2 / 255, n2 / 255, s2, false);\n }\n function Bn(t2, e2) {\n return t2 in e2;\n }\n function Vn(t2, e2) {\n const r2 = e2[t2];\n return void 0 === r2 ? null : r2;\n }\n function Cn(t2) {\n return { type: t2 };\n }\n function Ln(t2) {\n if (t2 instanceof Qe) return Ln(t2.boundExpression);\n if (t2 instanceof Pn && \"error\" === t2.name) return false;\n if (t2 instanceof Er) return false;\n if (t2 instanceof Hr) return false;\n if (t2 instanceof Mn) return false;\n if (t2 instanceof Fn) return false;\n const e2 = t2 instanceof Ze || t2 instanceof Xe;\n let r2 = true;\n return t2.eachChild(((t3) => {\n r2 = e2 ? r2 && Ln(t3) : r2 && t3 instanceof je;\n })), !!r2 && On(t2) && Nn(t2, [\"zoom\", \"heatmap-density\", \"elevation\", \"line-progress\", \"accumulated\", \"is-supported-script\"]);\n }\n function On(t2) {\n if (t2 instanceof Pn) {\n if (\"get\" === t2.name && 1 === t2.args.length) return false;\n if (\"feature-state\" === t2.name) return false;\n if (\"has\" === t2.name && 1 === t2.args.length) return false;\n if (\"properties\" === t2.name || \"geometry-type\" === t2.name || \"id\" === t2.name) return false;\n if (/^filter-/.test(t2.name)) return false;\n }\n if (t2 instanceof Hr) return false;\n if (t2 instanceof Mn) return false;\n let e2 = true;\n return t2.eachChild(((t3) => {\n e2 && !On(t3) && (e2 = false);\n })), e2;\n }\n function Rn(t2) {\n if (t2 instanceof Pn && \"feature-state\" === t2.name) return false;\n let e2 = true;\n return t2.eachChild(((t3) => {\n e2 && !Rn(t3) && (e2 = false);\n })), e2;\n }\n function Nn(t2, e2) {\n if (t2 instanceof Pn && e2.indexOf(t2.name) >= 0) return false;\n let r2 = true;\n return t2.eachChild(((t3) => {\n r2 && !Nn(t3, e2) && (r2 = false);\n })), r2;\n }\n function $n(t2) {\n return { result: \"success\", value: t2 };\n }\n function Un(t2) {\n return { result: \"error\", value: t2 };\n }\n function qn(t2) {\n return \"data-driven\" === t2[\"property-type\"] || \"cross-faded-data-driven\" === t2[\"property-type\"];\n }\n function jn(t2) {\n return !!t2.expression && t2.expression.parameters.indexOf(\"zoom\") > -1;\n }\n function Gn(t2) {\n return !!t2.expression && t2.expression.interpolated;\n }\n function Xn(t2) {\n return t2 instanceof Number ? \"number\" : t2 instanceof String ? \"string\" : t2 instanceof Boolean ? \"boolean\" : Array.isArray(t2) ? \"array\" : null === t2 ? \"null\" : typeof t2;\n }\n function Yn(t2) {\n return \"object\" == typeof t2 && null !== t2 && !Array.isArray(t2) && Ue(t2) === $t;\n }\n function Zn(t2) {\n return t2;\n }\n function Hn(t2, e2) {\n const r2 = t2.stops && \"object\" == typeof t2.stops[0][0], n2 = r2 || !(r2 || void 0 !== t2.property), i2 = t2.type || (Gn(e2) ? \"exponential\" : \"interval\"), s2 = (function(t3) {\n switch (t3.type) {\n case \"color\":\n return Te.parse;\n case \"padding\":\n return Pe.parse;\n case \"numberArray\":\n return ze.parse;\n case \"colorArray\":\n return Be.parse;\n default:\n return null;\n }\n })(e2);\n if (s2 && ((t2 = Pt({}, t2)).stops && (t2.stops = t2.stops.map(((t3) => [t3[0], s2(t3[1])]))), t2.default = s2(t2.default ? t2.default : e2.default)), t2.colorSpace && \"rgb\" !== (o2 = t2.colorSpace) && \"hcl\" !== o2 && \"lab\" !== o2) throw new Error(`Unknown color space: \"${t2.colorSpace}\"`);\n var o2;\n const a2 = (function(t3) {\n switch (t3) {\n case \"exponential\":\n return Qn;\n case \"interval\":\n return Jn;\n case \"categorical\":\n return Wn;\n case \"identity\":\n return ti;\n default:\n throw new Error(`Unknown function type \"${t3}\"`);\n }\n })(i2);\n let l2, u2;\n if (\"categorical\" === i2) {\n l2 = /* @__PURE__ */ Object.create(null);\n for (const e3 of t2.stops) l2[e3[0]] = e3[1];\n u2 = typeof t2.stops[0][0];\n }\n if (r2) {\n const r3 = {}, n3 = [];\n for (let e3 = 0; e3 < t2.stops.length; e3++) {\n const i4 = t2.stops[e3], s4 = i4[0].zoom;\n void 0 === r3[s4] && (r3[s4] = { zoom: s4, type: t2.type, property: t2.property, default: t2.default, stops: [] }, n3.push(s4)), r3[s4].stops.push([i4[0].value, i4[1]]);\n }\n const i3 = [];\n for (const t3 of n3) i3.push([r3[t3].zoom, Hn(r3[t3], e2)]);\n const s3 = { name: \"linear\" };\n return { kind: \"composite\", interpolationType: s3, interpolationFactor: fr.interpolationFactor.bind(void 0, s3), zoomStops: i3.map(((t3) => t3[0])), evaluate: ({ zoom: r4 }, n4) => Qn({ stops: i3, base: t2.base }, e2, r4).evaluate(r4, n4) };\n }\n if (n2) {\n const r3 = \"exponential\" === i2 ? { name: \"exponential\", base: void 0 !== t2.base ? t2.base : 1 } : null;\n return { kind: \"camera\", interpolationType: r3, interpolationFactor: fr.interpolationFactor.bind(void 0, r3), zoomStops: t2.stops.map(((t3) => t3[0])), evaluate: ({ zoom: r4 }) => a2(t2, e2, r4, l2, u2) };\n }\n return { kind: \"source\", evaluate(r3, n3) {\n const i3 = n3 && n3.properties ? n3.properties[t2.property] : void 0;\n return void 0 === i3 ? Kn(t2.default, e2.default) : a2(t2, e2, i3, l2, u2);\n } };\n }\n function Kn(t2, e2, r2) {\n return void 0 !== t2 ? t2 : void 0 !== e2 ? e2 : void 0 !== r2 ? r2 : void 0;\n }\n function Wn(t2, e2, r2, n2, i2) {\n return Kn(typeof r2 === i2 ? n2[r2] : void 0, t2.default, e2.default);\n }\n function Jn(t2, e2, r2) {\n if (\"number\" !== Xn(r2)) return Kn(t2.default, e2.default);\n const n2 = t2.stops.length;\n if (1 === n2) return t2.stops[0][1];\n if (r2 <= t2.stops[0][0]) return t2.stops[0][1];\n if (r2 >= t2.stops[n2 - 1][0]) return t2.stops[n2 - 1][1];\n const i2 = or(t2.stops.map(((t3) => t3[0])), r2);\n return t2.stops[i2][1];\n }\n function Qn(t2, e2, r2) {\n const n2 = void 0 !== t2.base ? t2.base : 1;\n if (\"number\" !== Xn(r2)) return Kn(t2.default, e2.default);\n const i2 = t2.stops.length;\n if (1 === i2) return t2.stops[0][1];\n if (r2 <= t2.stops[0][0]) return t2.stops[0][1];\n if (r2 >= t2.stops[i2 - 1][0]) return t2.stops[i2 - 1][1];\n const s2 = or(t2.stops.map(((t3) => t3[0])), r2), o2 = (function(t3, e3, r3, n3) {\n const i3 = n3 - r3, s3 = t3 - r3;\n return 0 === i3 ? 0 : 1 === e3 ? s3 / i3 : (Math.pow(e3, s3) - 1) / (Math.pow(e3, i3) - 1);\n })(r2, n2, t2.stops[s2][0], t2.stops[s2 + 1][0]), a2 = t2.stops[s2][1], l2 = t2.stops[s2 + 1][1], u2 = yr[e2.type] || Zn;\n return \"function\" == typeof a2.evaluate ? { evaluate(...e3) {\n const r3 = a2.evaluate.apply(void 0, e3), n3 = l2.evaluate.apply(void 0, e3);\n if (void 0 !== r3 && void 0 !== n3) return u2(r3, n3, o2, t2.colorSpace);\n } } : u2(a2, l2, o2, t2.colorSpace);\n }\n function ti(t2, e2, r2) {\n switch (e2.type) {\n case \"color\":\n r2 = Te.parse(r2);\n break;\n case \"formatted\":\n r2 = De.fromString(r2.toString());\n break;\n case \"resolvedImage\":\n r2 = Oe.fromString(r2.toString());\n break;\n case \"padding\":\n r2 = Pe.parse(r2);\n break;\n case \"colorArray\":\n r2 = Be.parse(r2);\n break;\n case \"numberArray\":\n r2 = ze.parse(r2);\n break;\n default:\n Xn(r2) === e2.type || \"enum\" === e2.type && e2.values[r2] || (r2 = void 0);\n }\n return Kn(r2, t2.default, e2.default);\n }\n Pn.register(Dn, { error: [{ kind: \"error\" }, [Lt], (t2, [e2]) => {\n throw new Ve(e2.evaluate(t2));\n }], typeof: [Lt, [Ut], (t2, [e2]) => Wt(Ue(e2.evaluate(t2)))], \"to-rgba\": [Kt(Ct, 4), [Rt], (t2, [e2]) => {\n const [r2, n2, i2, s2] = e2.evaluate(t2).rgb;\n return [255 * r2, 255 * n2, 255 * i2, s2];\n }], rgb: [Rt, [Ct, Ct, Ct], zn], rgba: [Rt, [Ct, Ct, Ct, Ct], zn], has: { type: Ot, overloads: [[[Lt], (t2, [e2]) => Bn(e2.evaluate(t2), t2.properties())], [[Lt, $t], (t2, [e2, r2]) => Bn(e2.evaluate(t2), r2.evaluate(t2))]] }, get: { type: Ut, overloads: [[[Lt], (t2, [e2]) => Vn(e2.evaluate(t2), t2.properties())], [[Lt, $t], (t2, [e2, r2]) => Vn(e2.evaluate(t2), r2.evaluate(t2))]] }, \"feature-state\": [Ut, [Lt], (t2, [e2]) => Vn(e2.evaluate(t2), t2.featureState || {})], properties: [$t, [], (t2) => t2.properties()], \"geometry-type\": [Lt, [], (t2) => t2.geometryType()], id: [Ut, [], (t2) => t2.id()], zoom: [Ct, [], (t2) => t2.globals.zoom], \"heatmap-density\": [Ct, [], (t2) => t2.globals.heatmapDensity || 0], elevation: [Ct, [], (t2) => t2.globals.elevation || 0], \"line-progress\": [Ct, [], (t2) => t2.globals.lineProgress || 0], accumulated: [Ut, [], (t2) => void 0 === t2.globals.accumulated ? null : t2.globals.accumulated], \"+\": [Ct, Cn(Ct), (t2, e2) => {\n let r2 = 0;\n for (const n2 of e2) r2 += n2.evaluate(t2);\n return r2;\n }], \"*\": [Ct, Cn(Ct), (t2, e2) => {\n let r2 = 1;\n for (const n2 of e2) r2 *= n2.evaluate(t2);\n return r2;\n }], \"-\": { type: Ct, overloads: [[[Ct, Ct], (t2, [e2, r2]) => e2.evaluate(t2) - r2.evaluate(t2)], [[Ct], (t2, [e2]) => -e2.evaluate(t2)]] }, \"/\": [Ct, [Ct, Ct], (t2, [e2, r2]) => e2.evaluate(t2) / r2.evaluate(t2)], \"%\": [Ct, [Ct, Ct], (t2, [e2, r2]) => e2.evaluate(t2) % r2.evaluate(t2)], ln2: [Ct, [], () => Math.LN2], pi: [Ct, [], () => Math.PI], e: [Ct, [], () => Math.E], \"^\": [Ct, [Ct, Ct], (t2, [e2, r2]) => Math.pow(e2.evaluate(t2), r2.evaluate(t2))], sqrt: [Ct, [Ct], (t2, [e2]) => Math.sqrt(e2.evaluate(t2))], log10: [Ct, [Ct], (t2, [e2]) => Math.log(e2.evaluate(t2)) / Math.LN10], ln: [Ct, [Ct], (t2, [e2]) => Math.log(e2.evaluate(t2))], log2: [Ct, [Ct], (t2, [e2]) => Math.log(e2.evaluate(t2)) / Math.LN2], sin: [Ct, [Ct], (t2, [e2]) => Math.sin(e2.evaluate(t2))], cos: [Ct, [Ct], (t2, [e2]) => Math.cos(e2.evaluate(t2))], tan: [Ct, [Ct], (t2, [e2]) => Math.tan(e2.evaluate(t2))], asin: [Ct, [Ct], (t2, [e2]) => Math.asin(e2.evaluate(t2))], acos: [Ct, [Ct], (t2, [e2]) => Math.acos(e2.evaluate(t2))], atan: [Ct, [Ct], (t2, [e2]) => Math.atan(e2.evaluate(t2))], min: [Ct, Cn(Ct), (t2, e2) => Math.min(...e2.map(((e3) => e3.evaluate(t2))))], max: [Ct, Cn(Ct), (t2, e2) => Math.max(...e2.map(((e3) => e3.evaluate(t2))))], abs: [Ct, [Ct], (t2, [e2]) => Math.abs(e2.evaluate(t2))], round: [Ct, [Ct], (t2, [e2]) => {\n const r2 = e2.evaluate(t2);\n return r2 < 0 ? -Math.round(-r2) : Math.round(r2);\n }], floor: [Ct, [Ct], (t2, [e2]) => Math.floor(e2.evaluate(t2))], ceil: [Ct, [Ct], (t2, [e2]) => Math.ceil(e2.evaluate(t2))], \"filter-==\": [Ot, [Lt, Ut], (t2, [e2, r2]) => t2.properties()[e2.value] === r2.value], \"filter-id-==\": [Ot, [Ut], (t2, [e2]) => t2.id() === e2.value], \"filter-type-==\": [Ot, [Lt], (t2, [e2]) => t2.geometryType() === e2.value], \"filter-<\": [Ot, [Lt, Ut], (t2, [e2, r2]) => {\n const n2 = t2.properties()[e2.value], i2 = r2.value;\n return typeof n2 == typeof i2 && n2 < i2;\n }], \"filter-id-<\": [Ot, [Ut], (t2, [e2]) => {\n const r2 = t2.id(), n2 = e2.value;\n return typeof r2 == typeof n2 && r2 < n2;\n }], \"filter->\": [Ot, [Lt, Ut], (t2, [e2, r2]) => {\n const n2 = t2.properties()[e2.value], i2 = r2.value;\n return typeof n2 == typeof i2 && n2 > i2;\n }], \"filter-id->\": [Ot, [Ut], (t2, [e2]) => {\n const r2 = t2.id(), n2 = e2.value;\n return typeof r2 == typeof n2 && r2 > n2;\n }], \"filter-<=\": [Ot, [Lt, Ut], (t2, [e2, r2]) => {\n const n2 = t2.properties()[e2.value], i2 = r2.value;\n return typeof n2 == typeof i2 && n2 <= i2;\n }], \"filter-id-<=\": [Ot, [Ut], (t2, [e2]) => {\n const r2 = t2.id(), n2 = e2.value;\n return typeof r2 == typeof n2 && r2 <= n2;\n }], \"filter->=\": [Ot, [Lt, Ut], (t2, [e2, r2]) => {\n const n2 = t2.properties()[e2.value], i2 = r2.value;\n return typeof n2 == typeof i2 && n2 >= i2;\n }], \"filter-id->=\": [Ot, [Ut], (t2, [e2]) => {\n const r2 = t2.id(), n2 = e2.value;\n return typeof r2 == typeof n2 && r2 >= n2;\n }], \"filter-has\": [Ot, [Ut], (t2, [e2]) => e2.value in t2.properties()], \"filter-has-id\": [Ot, [], (t2) => null !== t2.id() && void 0 !== t2.id()], \"filter-type-in\": [Ot, [Kt(Lt)], (t2, [e2]) => e2.value.indexOf(t2.geometryType()) >= 0], \"filter-id-in\": [Ot, [Kt(Ut)], (t2, [e2]) => e2.value.indexOf(t2.id()) >= 0], \"filter-in-small\": [Ot, [Lt, Kt(Ut)], (t2, [e2, r2]) => r2.value.indexOf(t2.properties()[e2.value]) >= 0], \"filter-in-large\": [Ot, [Lt, Kt(Ut)], (t2, [e2, r2]) => (function(t3, e3, r3, n2) {\n for (; r3 <= n2; ) {\n const i2 = r3 + n2 >> 1;\n if (e3[i2] === t3) return true;\n e3[i2] > t3 ? n2 = i2 - 1 : r3 = i2 + 1;\n }\n return false;\n })(t2.properties()[e2.value], r2.value, 0, r2.value.length - 1)], all: { type: Ot, overloads: [[[Ot, Ot], (t2, [e2, r2]) => e2.evaluate(t2) && r2.evaluate(t2)], [Cn(Ot), (t2, e2) => {\n for (const r2 of e2) if (!r2.evaluate(t2)) return false;\n return true;\n }]] }, any: { type: Ot, overloads: [[[Ot, Ot], (t2, [e2, r2]) => e2.evaluate(t2) || r2.evaluate(t2)], [Cn(Ot), (t2, e2) => {\n for (const r2 of e2) if (r2.evaluate(t2)) return true;\n return false;\n }]] }, \"!\": [Ot, [Ot], (t2, [e2]) => !e2.evaluate(t2)], \"is-supported-script\": [Ot, [Lt], (t2, [e2]) => {\n const r2 = t2.globals && t2.globals.isSupportedScript;\n return !r2 || r2(e2.evaluate(t2));\n }], upcase: [Lt, [Lt], (t2, [e2]) => e2.evaluate(t2).toUpperCase()], downcase: [Lt, [Lt], (t2, [e2]) => e2.evaluate(t2).toLowerCase()], concat: [Lt, Cn(Ut), (t2, e2) => e2.map(((e3) => qe(e3.evaluate(t2)))).join(\"\")], \"resolved-locale\": [Lt, [qt], (t2, [e2]) => e2.evaluate(t2).resolvedLocale()] });\n class ei {\n constructor(t2, e2, r2) {\n this.expression = t2, this._warningHistory = {}, this._evaluator = new Ke(), this._defaultValue = e2 ? (function(t3) {\n if (\"color\" === t3.type && Yn(t3.default)) return new Te(0, 0, 0, 0);\n switch (t3.type) {\n case \"color\":\n return Te.parse(t3.default) || null;\n case \"padding\":\n return Pe.parse(t3.default) || null;\n case \"numberArray\":\n return ze.parse(t3.default) || null;\n case \"colorArray\":\n return Be.parse(t3.default) || null;\n case \"variableAnchorOffsetCollection\":\n return Le.parse(t3.default) || null;\n case \"projectionDefinition\":\n return Re.parse(t3.default) || null;\n default:\n return void 0 === t3.default ? null : t3.default;\n }\n })(e2) : null, this._enumValues = e2 && \"enum\" === e2.type ? e2.values : null, this._globalState = r2;\n }\n evaluateWithoutErrorHandling(t2, e2, r2, n2, i2, s2) {\n return this._globalState && (t2 = ci(t2, this._globalState)), this._evaluator.globals = t2, this._evaluator.feature = e2, this._evaluator.featureState = r2, this._evaluator.canonical = n2, this._evaluator.availableImages = i2 || null, this._evaluator.formattedSection = s2, this.expression.evaluate(this._evaluator);\n }\n evaluate(t2, e2, r2, n2, i2, s2) {\n this._globalState && (t2 = ci(t2, this._globalState)), this._evaluator.globals = t2, this._evaluator.feature = e2 || null, this._evaluator.featureState = r2 || null, this._evaluator.canonical = n2, this._evaluator.availableImages = i2 || null, this._evaluator.formattedSection = s2 || null;\n try {\n const t3 = this.expression.evaluate(this._evaluator);\n if (null == t3 || \"number\" == typeof t3 && t3 != t3) return this._defaultValue;\n if (this._enumValues && !(t3 in this._enumValues)) throw new Ve(`Expected value to be one of ${Object.keys(this._enumValues).map(((t4) => JSON.stringify(t4))).join(\", \")}, but found ${JSON.stringify(t3)} instead.`);\n return t3;\n } catch (t3) {\n return this._warningHistory[t3.message] || (this._warningHistory[t3.message] = true, \"undefined\" != typeof console && console.warn(t3.message)), this._defaultValue;\n }\n }\n }\n function ri(t2) {\n return Array.isArray(t2) && t2.length > 0 && \"string\" == typeof t2[0] && t2[0] in Dn;\n }\n function ni(t2, e2, r2) {\n const n2 = new We(Dn, Ln, [], e2 ? (function(t3) {\n const e3 = { color: Rt, string: Lt, number: Ct, enum: Lt, boolean: Ot, formatted: jt, padding: Gt, numberArray: Yt, colorArray: Xt, projectionDefinition: Nt, resolvedImage: Zt, variableAnchorOffsetCollection: Ht };\n return \"array\" === t3.type ? Kt(e3[t3.value] || Ut, t3.length) : e3[t3.type];\n })(e2) : void 0), i2 = n2.parse(t2, void 0, void 0, void 0, e2 && \"string\" === e2.type ? { typeAnnotation: \"coerce\" } : void 0);\n return i2 ? $n(new ei(i2, e2, r2)) : Un(n2.errors);\n }\n class ii {\n constructor(t2, e2, r2) {\n this.kind = t2, this._styleExpression = e2, this.isStateDependent = \"constant\" !== t2 && !Rn(e2.expression), this.globalStateRefs = ui(e2.expression), this._globalState = r2;\n }\n evaluateWithoutErrorHandling(t2, e2, r2, n2, i2, s2) {\n return this._globalState && (t2 = ci(t2, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(t2, e2, r2, n2, i2, s2);\n }\n evaluate(t2, e2, r2, n2, i2, s2) {\n return this._globalState && (t2 = ci(t2, this._globalState)), this._styleExpression.evaluate(t2, e2, r2, n2, i2, s2);\n }\n }\n class si {\n constructor(t2, e2, r2, n2, i2) {\n this.kind = t2, this.zoomStops = r2, this._styleExpression = e2, this.isStateDependent = \"camera\" !== t2 && !Rn(e2.expression), this.globalStateRefs = ui(e2.expression), this.interpolationType = n2, this._globalState = i2;\n }\n evaluateWithoutErrorHandling(t2, e2, r2, n2, i2, s2) {\n return this._globalState && (t2 = ci(t2, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(t2, e2, r2, n2, i2, s2);\n }\n evaluate(t2, e2, r2, n2, i2, s2) {\n return this._globalState && (t2 = ci(t2, this._globalState)), this._styleExpression.evaluate(t2, e2, r2, n2, i2, s2);\n }\n interpolationFactor(t2, e2, r2) {\n return this.interpolationType ? fr.interpolationFactor(this.interpolationType, t2, e2, r2) : 0;\n }\n }\n function oi(t2, e2, r2) {\n const n2 = ni(t2, e2, r2);\n if (\"error\" === n2.result) return n2;\n const i2 = n2.value.expression, s2 = On(i2);\n if (!s2 && !qn(e2)) return Un([new zt(\"\", \"data expressions not supported\")]);\n const o2 = Nn(i2, [\"zoom\"]);\n if (!o2 && !jn(e2)) return Un([new zt(\"\", \"zoom expressions not supported\")]);\n const a2 = li(i2);\n return a2 || o2 ? a2 instanceof zt ? Un([a2]) : a2 instanceof fr && !Gn(e2) ? Un([new zt(\"\", '\"interpolate\" expressions cannot be used with this property')]) : $n(a2 ? new si(s2 ? \"camera\" : \"composite\", n2.value, a2.labels, a2 instanceof fr ? a2.interpolation : void 0, r2) : new ii(s2 ? \"constant\" : \"source\", n2.value, r2)) : Un([new zt(\"\", '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n }\n class ai {\n constructor(t2, e2) {\n this._parameters = t2, this._specification = e2, Pt(this, Hn(this._parameters, this._specification));\n }\n static deserialize(t2) {\n return new ai(t2._parameters, t2._specification);\n }\n static serialize(t2) {\n return { _parameters: t2._parameters, _specification: t2._specification };\n }\n }\n function li(t2) {\n let e2 = null;\n if (t2 instanceof Je) e2 = li(t2.result);\n else if (t2 instanceof mr) {\n for (const r2 of t2.args) if (e2 = li(r2), e2) break;\n } else (t2 instanceof ar || t2 instanceof fr) && t2.input instanceof Pn && \"zoom\" === t2.input.name && (e2 = t2);\n return e2 instanceof zt || t2.eachChild(((t3) => {\n const r2 = li(t3);\n r2 instanceof zt ? e2 = r2 : !e2 && r2 ? e2 = new zt(\"\", '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.') : e2 && r2 && e2 !== r2 && (e2 = new zt(\"\", 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'));\n })), e2;\n }\n function ui(t2, e2 = /* @__PURE__ */ new Set()) {\n return t2 instanceof Fn && e2.add(t2.key), t2.eachChild(((t3) => {\n ui(t3, e2);\n })), e2;\n }\n function ci(t2, e2) {\n const { zoom: r2, heatmapDensity: n2, elevation: i2, lineProgress: s2, isSupportedScript: o2, accumulated: a2 } = null != t2 ? t2 : {};\n return { zoom: r2, heatmapDensity: n2, elevation: i2, lineProgress: s2, isSupportedScript: o2, accumulated: a2, globalState: e2 };\n }\n function hi(t2) {\n if (true === t2 || false === t2) return true;\n if (!Array.isArray(t2) || 0 === t2.length) return false;\n switch (t2[0]) {\n case \"has\":\n return t2.length >= 2 && \"$id\" !== t2[1] && \"$type\" !== t2[1];\n case \"in\":\n return t2.length >= 3 && (\"string\" != typeof t2[1] || Array.isArray(t2[2]));\n case \"!in\":\n case \"!has\":\n case \"none\":\n return false;\n case \"==\":\n case \"!=\":\n case \">\":\n case \">=\":\n case \"<\":\n case \"<=\":\n return 3 !== t2.length || Array.isArray(t2[1]) || Array.isArray(t2[2]);\n case \"any\":\n case \"all\":\n for (const e2 of t2.slice(1)) if (!hi(e2) && \"boolean\" != typeof e2) return false;\n return true;\n default:\n return true;\n }\n }\n const pi = { type: \"boolean\", default: false, transition: false, \"property-type\": \"data-driven\", expression: { interpolated: false, parameters: [\"zoom\", \"feature\"] } };\n function fi(t2, e2) {\n if (null == t2) return { filter: () => true, needGeometry: false, getGlobalStateRefs: () => /* @__PURE__ */ new Set() };\n hi(t2) || (t2 = mi(t2));\n const r2 = ni(t2, pi, e2);\n if (\"error\" === r2.result) throw new Error(r2.value.map(((t3) => `${t3.key}: ${t3.message}`)).join(\", \"));\n return { filter: (t3, e3, n2) => r2.value.evaluate(t3, e3, {}, n2), needGeometry: yi(t2), getGlobalStateRefs: () => ui(r2.value.expression) };\n }\n function di(t2, e2) {\n return t2 < e2 ? -1 : t2 > e2 ? 1 : 0;\n }\n function yi(t2) {\n if (!Array.isArray(t2)) return false;\n if (\"within\" === t2[0] || \"distance\" === t2[0]) return true;\n for (let e2 = 1; e2 < t2.length; e2++) if (yi(t2[e2])) return true;\n return false;\n }\n function mi(t2) {\n if (!t2) return true;\n const e2 = t2[0];\n return t2.length <= 1 ? \"any\" !== e2 : \"==\" === e2 ? gi(t2[1], t2[2], \"==\") : \"!=\" === e2 ? bi(gi(t2[1], t2[2], \"==\")) : \"<\" === e2 || \">\" === e2 || \"<=\" === e2 || \">=\" === e2 ? gi(t2[1], t2[2], e2) : \"any\" === e2 ? (r2 = t2.slice(1), [\"any\"].concat(r2.map(mi))) : \"all\" === e2 ? [\"all\"].concat(t2.slice(1).map(mi)) : \"none\" === e2 ? [\"all\"].concat(t2.slice(1).map(mi).map(bi)) : \"in\" === e2 ? xi(t2[1], t2.slice(2)) : \"!in\" === e2 ? bi(xi(t2[1], t2.slice(2))) : \"has\" === e2 ? vi(t2[1]) : \"!has\" !== e2 || bi(vi(t2[1]));\n var r2;\n }\n function gi(t2, e2, r2) {\n switch (t2) {\n case \"$type\":\n return [`filter-type-${r2}`, e2];\n case \"$id\":\n return [`filter-id-${r2}`, e2];\n default:\n return [`filter-${r2}`, t2, e2];\n }\n }\n function xi(t2, e2) {\n if (0 === e2.length) return false;\n switch (t2) {\n case \"$type\":\n return [\"filter-type-in\", [\"literal\", e2]];\n case \"$id\":\n return [\"filter-id-in\", [\"literal\", e2]];\n default:\n return e2.length > 200 && !e2.some(((t3) => typeof t3 != typeof e2[0])) ? [\"filter-in-large\", t2, [\"literal\", e2.sort(di)]] : [\"filter-in-small\", t2, [\"literal\", e2]];\n }\n }\n function vi(t2) {\n switch (t2) {\n case \"$type\":\n return true;\n case \"$id\":\n return [\"filter-has-id\"];\n default:\n return [\"filter-has\", t2];\n }\n }\n function bi(t2) {\n return [\"!\", t2];\n }\n function wi(t2) {\n const e2 = typeof t2;\n if (\"number\" === e2 || \"boolean\" === e2 || \"string\" === e2 || null == t2) return JSON.stringify(t2);\n if (Array.isArray(t2)) {\n let e3 = \"[\";\n for (const r3 of t2) e3 += `${wi(r3)},`;\n return `${e3}]`;\n }\n const r2 = Object.keys(t2).sort();\n let n2 = \"{\";\n for (let e3 = 0; e3 < r2.length; e3++) n2 += `${JSON.stringify(r2[e3])}:${wi(t2[r2[e3]])},`;\n return `${n2}}`;\n }\n function _i(t2) {\n let e2 = \"\";\n for (const r2 of bt) e2 += `/${wi(t2[r2])}`;\n return e2;\n }\n function Ai(t2) {\n const e2 = t2.value;\n return e2 ? [new Dt(t2.key, e2, \"constants have been deprecated as of v8\")] : [];\n }\n function Si(t2) {\n return t2 instanceof Number || t2 instanceof String || t2 instanceof Boolean ? t2.valueOf() : t2;\n }\n function ki(t2) {\n if (Array.isArray(t2)) return t2.map(ki);\n if (t2 instanceof Object && !(t2 instanceof Number || t2 instanceof String || t2 instanceof Boolean)) {\n const e2 = {};\n for (const r2 in t2) e2[r2] = ki(t2[r2]);\n return e2;\n }\n return Si(t2);\n }\n function Ei(t2) {\n const e2 = t2.key, r2 = t2.value, n2 = t2.valueSpec || {}, i2 = t2.objectElementValidators || {}, s2 = t2.style, o2 = t2.styleSpec, a2 = t2.validateSpec;\n let l2 = [];\n const u2 = Xn(r2);\n if (\"object\" !== u2) return [new Dt(e2, r2, `object expected, ${u2} found`)];\n for (const t3 in r2) {\n const u3 = t3.split(\".\")[0], c2 = ve(n2, u3) || n2[\"*\"];\n let h2;\n if (ve(i2, u3)) h2 = i2[u3];\n else if (ve(n2, u3)) h2 = a2;\n else if (i2[\"*\"]) h2 = i2[\"*\"];\n else {\n if (!n2[\"*\"]) {\n l2.push(new Dt(e2, r2[t3], `unknown property \"${t3}\"`));\n continue;\n }\n h2 = a2;\n }\n l2 = l2.concat(h2({ key: (e2 ? `${e2}.` : e2) + t3, value: r2[t3], valueSpec: c2, style: s2, styleSpec: o2, object: r2, objectKey: t3, validateSpec: a2 }, r2));\n }\n for (const t3 in n2) i2[t3] || n2[t3].required && void 0 === n2[t3].default && void 0 === r2[t3] && l2.push(new Dt(e2, r2, `missing required property \"${t3}\"`));\n return l2;\n }\n function Ti(t2) {\n const e2 = t2.value, r2 = t2.valueSpec, n2 = t2.style, i2 = t2.styleSpec, s2 = t2.key, o2 = t2.arrayElementValidator || t2.validateSpec;\n if (\"array\" !== Xn(e2)) return [new Dt(s2, e2, `array expected, ${Xn(e2)} found`)];\n if (r2.length && e2.length !== r2.length) return [new Dt(s2, e2, `array length ${r2.length} expected, length ${e2.length} found`)];\n if (r2[\"min-length\"] && e2.length < r2[\"min-length\"]) return [new Dt(s2, e2, `array length at least ${r2[\"min-length\"]} expected, length ${e2.length} found`)];\n let a2 = { type: r2.value, values: r2.values };\n i2.$version < 7 && (a2.function = r2.function), \"object\" === Xn(r2.value) && (a2 = r2.value);\n let l2 = [];\n for (let r3 = 0; r3 < e2.length; r3++) l2 = l2.concat(o2({ array: e2, arrayIndex: r3, value: e2[r3], valueSpec: a2, validateSpec: t2.validateSpec, style: n2, styleSpec: i2, key: `${s2}[${r3}]` }));\n return l2;\n }\n function Ii(t2) {\n const e2 = t2.key, r2 = t2.value, n2 = t2.valueSpec;\n let i2 = Xn(r2);\n return \"number\" === i2 && r2 != r2 && (i2 = \"NaN\"), \"number\" !== i2 ? [new Dt(e2, r2, `number expected, ${i2} found`)] : \"minimum\" in n2 && r2 < n2.minimum ? [new Dt(e2, r2, `${r2} is less than the minimum value ${n2.minimum}`)] : \"maximum\" in n2 && r2 > n2.maximum ? [new Dt(e2, r2, `${r2} is greater than the maximum value ${n2.maximum}`)] : [];\n }\n function Mi(t2) {\n const e2 = t2.valueSpec, r2 = Si(t2.value.type);\n let n2, i2, s2, o2 = {};\n const a2 = \"categorical\" !== r2 && void 0 === t2.value.property, l2 = !a2, u2 = \"array\" === Xn(t2.value.stops) && \"array\" === Xn(t2.value.stops[0]) && \"object\" === Xn(t2.value.stops[0][0]), c2 = Ei({ key: t2.key, value: t2.value, valueSpec: t2.styleSpec.function, validateSpec: t2.validateSpec, style: t2.style, styleSpec: t2.styleSpec, objectElementValidators: { stops: function(t3) {\n if (\"identity\" === r2) return [new Dt(t3.key, t3.value, 'identity function may not have a \"stops\" property')];\n let e3 = [];\n const n3 = t3.value;\n return e3 = e3.concat(Ti({ key: t3.key, value: n3, valueSpec: t3.valueSpec, validateSpec: t3.validateSpec, style: t3.style, styleSpec: t3.styleSpec, arrayElementValidator: h2 })), \"array\" === Xn(n3) && 0 === n3.length && e3.push(new Dt(t3.key, n3, \"array must have at least one stop\")), e3;\n }, default: function(t3) {\n return t3.validateSpec({ key: t3.key, value: t3.value, valueSpec: e2, validateSpec: t3.validateSpec, style: t3.style, styleSpec: t3.styleSpec });\n } } });\n return \"identity\" === r2 && a2 && c2.push(new Dt(t2.key, t2.value, 'missing required property \"property\"')), \"identity\" === r2 || t2.value.stops || c2.push(new Dt(t2.key, t2.value, 'missing required property \"stops\"')), \"exponential\" === r2 && t2.valueSpec.expression && !Gn(t2.valueSpec) && c2.push(new Dt(t2.key, t2.value, \"exponential functions not supported\")), t2.styleSpec.$version >= 8 && (l2 && !qn(t2.valueSpec) ? c2.push(new Dt(t2.key, t2.value, \"property functions not supported\")) : a2 && !jn(t2.valueSpec) && c2.push(new Dt(t2.key, t2.value, \"zoom functions not supported\"))), \"categorical\" !== r2 && !u2 || void 0 !== t2.value.property || c2.push(new Dt(t2.key, t2.value, '\"property\" property is required')), c2;\n function h2(t3) {\n let r3 = [];\n const n3 = t3.value, a3 = t3.key;\n if (\"array\" !== Xn(n3)) return [new Dt(a3, n3, `array expected, ${Xn(n3)} found`)];\n if (2 !== n3.length) return [new Dt(a3, n3, `array length 2 expected, length ${n3.length} found`)];\n if (u2) {\n if (\"object\" !== Xn(n3[0])) return [new Dt(a3, n3, `object expected, ${Xn(n3[0])} found`)];\n if (void 0 === n3[0].zoom) return [new Dt(a3, n3, \"object stop key must have zoom\")];\n if (void 0 === n3[0].value) return [new Dt(a3, n3, \"object stop key must have value\")];\n if (s2 && s2 > Si(n3[0].zoom)) return [new Dt(a3, n3[0].zoom, \"stop zoom values must appear in ascending order\")];\n Si(n3[0].zoom) !== s2 && (s2 = Si(n3[0].zoom), i2 = void 0, o2 = {}), r3 = r3.concat(Ei({ key: `${a3}[0]`, value: n3[0], valueSpec: { zoom: {} }, validateSpec: t3.validateSpec, style: t3.style, styleSpec: t3.styleSpec, objectElementValidators: { zoom: Ii, value: p2 } }));\n } else r3 = r3.concat(p2({ key: `${a3}[0]`, value: n3[0], validateSpec: t3.validateSpec, style: t3.style, styleSpec: t3.styleSpec }, n3));\n return ri(ki(n3[1])) ? r3.concat([new Dt(`${a3}[1]`, n3[1], \"expressions are not allowed in function stops.\")]) : r3.concat(t3.validateSpec({ key: `${a3}[1]`, value: n3[1], valueSpec: e2, validateSpec: t3.validateSpec, style: t3.style, styleSpec: t3.styleSpec }));\n }\n function p2(t3, s3) {\n const a3 = Xn(t3.value), l3 = Si(t3.value), u3 = null !== t3.value ? t3.value : s3;\n if (n2) {\n if (a3 !== n2) return [new Dt(t3.key, u3, `${a3} stop domain type must match previous stop domain type ${n2}`)];\n } else n2 = a3;\n if (\"number\" !== a3 && \"string\" !== a3 && \"boolean\" !== a3) return [new Dt(t3.key, u3, \"stop domain value must be a number, string, or boolean\")];\n if (\"number\" !== a3 && \"categorical\" !== r2) {\n let n3 = `number expected, ${a3} found`;\n return qn(e2) && void 0 === r2 && (n3 += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'), [new Dt(t3.key, u3, n3)];\n }\n return \"categorical\" !== r2 || \"number\" !== a3 || isFinite(l3) && Math.floor(l3) === l3 ? \"categorical\" !== r2 && \"number\" === a3 && void 0 !== i2 && l3 < i2 ? [new Dt(t3.key, u3, \"stop domain values must appear in ascending order\")] : (i2 = l3, \"categorical\" === r2 && l3 in o2 ? [new Dt(t3.key, u3, \"stop domain values must be unique\")] : (o2[l3] = true, [])) : [new Dt(t3.key, u3, `integer expected, found ${l3}`)];\n }\n }\n function Fi(t2) {\n const e2 = (\"property\" === t2.expressionContext ? oi : ni)(ki(t2.value), t2.valueSpec);\n if (\"error\" === e2.result) return e2.value.map(((e3) => new Dt(`${t2.key}${e3.key}`, t2.value, e3.message)));\n const r2 = e2.value.expression || e2.value._styleExpression.expression;\n if (\"property\" === t2.expressionContext && \"text-font\" === t2.propertyKey && !r2.outputDefined()) return [new Dt(t2.key, t2.value, `Invalid data expression for \"${t2.propertyKey}\". Output values must be contained as literals within the expression.`)];\n if (\"property\" === t2.expressionContext && \"layout\" === t2.propertyType && !Rn(r2)) return [new Dt(t2.key, t2.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n if (\"filter\" === t2.expressionContext && !Rn(r2)) return [new Dt(t2.key, t2.value, '\"feature-state\" data expressions are not supported with filters.')];\n if (t2.expressionContext && 0 === t2.expressionContext.indexOf(\"cluster\")) {\n if (!Nn(r2, [\"zoom\", \"feature-state\"])) return [new Dt(t2.key, t2.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n if (\"cluster-initial\" === t2.expressionContext && !On(r2)) return [new Dt(t2.key, t2.value, \"Feature data expressions are not supported with initial expression part of cluster properties.\")];\n }\n return [];\n }\n function Di(t2) {\n const e2 = t2.key, r2 = t2.value, n2 = Xn(r2);\n return \"string\" !== n2 ? [new Dt(e2, r2, `color expected, ${n2} found`)] : Te.parse(String(r2)) ? [] : [new Dt(e2, r2, `color expected, \"${r2}\" found`)];\n }\n function Pi(t2) {\n const e2 = t2.key, r2 = t2.value, n2 = t2.valueSpec, i2 = [];\n return Array.isArray(n2.values) ? -1 === n2.values.indexOf(Si(r2)) && i2.push(new Dt(e2, r2, `expected one of [${n2.values.join(\", \")}], ${JSON.stringify(r2)} found`)) : -1 === Object.keys(n2.values).indexOf(Si(r2)) && i2.push(new Dt(e2, r2, `expected one of [${Object.keys(n2.values).join(\", \")}], ${JSON.stringify(r2)} found`)), i2;\n }\n function zi(t2) {\n return hi(ki(t2.value)) ? Fi(Pt({}, t2, { expressionContext: \"filter\", valueSpec: { value: \"boolean\" } })) : Bi(t2);\n }\n function Bi(t2) {\n const e2 = t2.value, r2 = t2.key;\n if (\"array\" !== Xn(e2)) return [new Dt(r2, e2, `array expected, ${Xn(e2)} found`)];\n const n2 = t2.styleSpec;\n let i2, s2 = [];\n if (e2.length < 1) return [new Dt(r2, e2, \"filter array must have at least 1 element\")];\n switch (s2 = s2.concat(Pi({ key: `${r2}[0]`, value: e2[0], valueSpec: n2.filter_operator, style: t2.style, styleSpec: t2.styleSpec })), Si(e2[0])) {\n case \"<\":\n case \"<=\":\n case \">\":\n case \">=\":\n e2.length >= 2 && \"$type\" === Si(e2[1]) && s2.push(new Dt(r2, e2, `\"$type\" cannot be use with operator \"${e2[0]}\"`));\n case \"==\":\n case \"!=\":\n 3 !== e2.length && s2.push(new Dt(r2, e2, `filter array for operator \"${e2[0]}\" must have 3 elements`));\n case \"in\":\n case \"!in\":\n e2.length >= 2 && (i2 = Xn(e2[1]), \"string\" !== i2 && s2.push(new Dt(`${r2}[1]`, e2[1], `string expected, ${i2} found`)));\n for (let o2 = 2; o2 < e2.length; o2++) i2 = Xn(e2[o2]), \"$type\" === Si(e2[1]) ? s2 = s2.concat(Pi({ key: `${r2}[${o2}]`, value: e2[o2], valueSpec: n2.geometry_type, style: t2.style, styleSpec: t2.styleSpec })) : \"string\" !== i2 && \"number\" !== i2 && \"boolean\" !== i2 && s2.push(new Dt(`${r2}[${o2}]`, e2[o2], `string, number, or boolean expected, ${i2} found`));\n break;\n case \"any\":\n case \"all\":\n case \"none\":\n for (let n3 = 1; n3 < e2.length; n3++) s2 = s2.concat(Bi({ key: `${r2}[${n3}]`, value: e2[n3], style: t2.style, styleSpec: t2.styleSpec }));\n break;\n case \"has\":\n case \"!has\":\n i2 = Xn(e2[1]), 2 !== e2.length ? s2.push(new Dt(r2, e2, `filter array for \"${e2[0]}\" operator must have 2 elements`)) : \"string\" !== i2 && s2.push(new Dt(`${r2}[1]`, e2[1], `string expected, ${i2} found`));\n }\n return s2;\n }\n function Vi(t2, e2) {\n const r2 = t2.key, n2 = t2.validateSpec, i2 = t2.style, s2 = t2.styleSpec, o2 = t2.value, a2 = t2.objectKey, l2 = s2[`${e2}_${t2.layerType}`];\n if (!l2) return [];\n const u2 = a2.match(/^(.*)-transition$/);\n if (\"paint\" === e2 && u2 && l2[u2[1]] && l2[u2[1]].transition) return n2({ key: r2, value: o2, valueSpec: s2.transition, style: i2, styleSpec: s2 });\n const c2 = t2.valueSpec || l2[a2];\n if (!c2) return [new Dt(r2, o2, `unknown property \"${a2}\"`)];\n let h2;\n if (\"string\" === Xn(o2) && qn(c2) && !c2.tokens && (h2 = /^{([^}]+)}$/.exec(o2))) return [new Dt(r2, o2, `\"${a2}\" does not support interpolation syntax\nUse an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(h2[1])} }\\`.`)];\n const p2 = [];\n return \"symbol\" === t2.layerType && \"text-font\" === a2 && Yn(ki(o2)) && \"identity\" === Si(o2.type) && p2.push(new Dt(r2, o2, '\"text-font\" does not support identity functions')), p2.concat(n2({ key: t2.key, value: o2, valueSpec: c2, style: i2, styleSpec: s2, expressionContext: \"property\", propertyType: e2, propertyKey: a2 }));\n }\n function Ci(t2) {\n return Vi(t2, \"paint\");\n }\n function Li(t2) {\n return Vi(t2, \"layout\");\n }\n function Oi(t2) {\n let e2 = [];\n const r2 = t2.value, n2 = t2.key, i2 = t2.style, s2 = t2.styleSpec;\n if (\"object\" !== Xn(r2)) return [new Dt(n2, r2, `object expected, ${Xn(r2)} found`)];\n r2.type || r2.ref || e2.push(new Dt(n2, r2, 'either \"type\" or \"ref\" is required'));\n let o2 = Si(r2.type);\n const a2 = Si(r2.ref);\n if (r2.id) {\n const s3 = Si(r2.id);\n for (let o3 = 0; o3 < t2.arrayIndex; o3++) {\n const t3 = i2.layers[o3];\n Si(t3.id) === s3 && e2.push(new Dt(n2, r2.id, `duplicate layer id \"${r2.id}\", previously used at line ${t3.id.__line__}`));\n }\n }\n if (\"ref\" in r2) {\n let t3;\n [\"type\", \"source\", \"source-layer\", \"filter\", \"layout\"].forEach(((t4) => {\n t4 in r2 && e2.push(new Dt(n2, r2[t4], `\"${t4}\" is prohibited for ref layers`));\n })), i2.layers.forEach(((e3) => {\n Si(e3.id) === a2 && (t3 = e3);\n })), t3 ? t3.ref ? e2.push(new Dt(n2, r2.ref, \"ref cannot reference another ref layer\")) : o2 = Si(t3.type) : e2.push(new Dt(n2, r2.ref, `ref layer \"${a2}\" not found`));\n } else if (\"background\" !== o2) if (r2.source) {\n const t3 = i2.sources && i2.sources[r2.source], s3 = t3 && Si(t3.type);\n t3 ? \"vector\" === s3 && \"raster\" === o2 ? e2.push(new Dt(n2, r2.source, `layer \"${r2.id}\" requires a raster source`)) : \"raster-dem\" !== s3 && \"hillshade\" === o2 || \"raster-dem\" !== s3 && \"color-relief\" === o2 ? e2.push(new Dt(n2, r2.source, `layer \"${r2.id}\" requires a raster-dem source`)) : \"raster\" === s3 && \"raster\" !== o2 ? e2.push(new Dt(n2, r2.source, `layer \"${r2.id}\" requires a vector source`)) : \"vector\" !== s3 || r2[\"source-layer\"] ? \"raster-dem\" === s3 && \"hillshade\" !== o2 && \"color-relief\" !== o2 ? e2.push(new Dt(n2, r2.source, \"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.\")) : \"line\" !== o2 || !r2.paint || !r2.paint[\"line-gradient\"] || \"geojson\" === s3 && t3.lineMetrics || e2.push(new Dt(n2, r2, `layer \"${r2.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)) : e2.push(new Dt(n2, r2, `layer \"${r2.id}\" must specify a \"source-layer\"`)) : e2.push(new Dt(n2, r2.source, `source \"${r2.source}\" not found`));\n } else e2.push(new Dt(n2, r2, 'missing required property \"source\"'));\n return e2 = e2.concat(Ei({ key: n2, value: r2, valueSpec: s2.layer, style: t2.style, styleSpec: t2.styleSpec, validateSpec: t2.validateSpec, objectElementValidators: { \"*\": () => [], type: () => t2.validateSpec({ key: `${n2}.type`, value: r2.type, valueSpec: s2.layer.type, style: t2.style, styleSpec: t2.styleSpec, validateSpec: t2.validateSpec, object: r2, objectKey: \"type\" }), filter: zi, layout: (t3) => Ei({ layer: r2, key: t3.key, value: t3.value, style: t3.style, styleSpec: t3.styleSpec, validateSpec: t3.validateSpec, objectElementValidators: { \"*\": (t4) => Li(Pt({ layerType: o2 }, t4)) } }), paint: (t3) => Ei({ layer: r2, key: t3.key, value: t3.value, style: t3.style, styleSpec: t3.styleSpec, validateSpec: t3.validateSpec, objectElementValidators: { \"*\": (t4) => Ci(Pt({ layerType: o2 }, t4)) } }) } })), e2;\n }\n function Ri(t2) {\n const e2 = t2.value, r2 = t2.key, n2 = Xn(e2);\n return \"string\" !== n2 ? [new Dt(r2, e2, `string expected, ${n2} found`)] : [];\n }\n const Ni = { promoteId: function({ key: t2, value: e2 }) {\n if (\"string\" === Xn(e2)) return Ri({ key: t2, value: e2 });\n {\n const r2 = [];\n for (const n2 in e2) r2.push(...Ri({ key: `${t2}.${n2}`, value: e2[n2] }));\n return r2;\n }\n } };\n function $i(t2) {\n const e2 = t2.value, r2 = t2.key, n2 = t2.styleSpec, i2 = t2.style, s2 = t2.validateSpec;\n if (!e2.type) return [new Dt(r2, e2, '\"type\" is required')];\n const o2 = Si(e2.type);\n let a2;\n switch (o2) {\n case \"vector\":\n case \"raster\":\n return a2 = Ei({ key: r2, value: e2, valueSpec: n2[`source_${o2.replace(\"-\", \"_\")}`], style: t2.style, styleSpec: n2, objectElementValidators: Ni, validateSpec: s2 }), a2;\n case \"raster-dem\":\n return a2 = (function(t3) {\n var e3;\n const r3 = null !== (e3 = t3.sourceName) && void 0 !== e3 ? e3 : \"\", n3 = t3.value, i3 = t3.styleSpec, s3 = i3.source_raster_dem, o3 = t3.style;\n let a3 = [];\n const l2 = Xn(n3);\n if (void 0 === n3) return a3;\n if (\"object\" !== l2) return a3.push(new Dt(\"source_raster_dem\", n3, `object expected, ${l2} found`)), a3;\n const u2 = \"custom\" === Si(n3.encoding), c2 = [\"redFactor\", \"greenFactor\", \"blueFactor\", \"baseShift\"], h2 = t3.value.encoding ? `\"${t3.value.encoding}\"` : \"Default\";\n for (const e4 in n3) !u2 && c2.includes(e4) ? a3.push(new Dt(e4, n3[e4], `In \"${r3}\": \"${e4}\" is only valid when \"encoding\" is set to \"custom\". ${h2} encoding found`)) : s3[e4] ? a3 = a3.concat(t3.validateSpec({ key: e4, value: n3[e4], valueSpec: s3[e4], validateSpec: t3.validateSpec, style: o3, styleSpec: i3 })) : a3.push(new Dt(e4, n3[e4], `unknown property \"${e4}\"`));\n return a3;\n })({ sourceName: r2, value: e2, style: t2.style, styleSpec: n2, validateSpec: s2 }), a2;\n case \"geojson\":\n if (a2 = Ei({ key: r2, value: e2, valueSpec: n2.source_geojson, style: i2, styleSpec: n2, validateSpec: s2, objectElementValidators: Ni }), e2.cluster) for (const t3 in e2.clusterProperties) {\n const [n3, i3] = e2.clusterProperties[t3], s3 = \"string\" == typeof n3 ? [n3, [\"accumulated\"], [\"get\", t3]] : n3;\n a2.push(...Fi({ key: `${r2}.${t3}.map`, value: i3, expressionContext: \"cluster-map\" })), a2.push(...Fi({ key: `${r2}.${t3}.reduce`, value: s3, expressionContext: \"cluster-reduce\" }));\n }\n return a2;\n case \"video\":\n return Ei({ key: r2, value: e2, valueSpec: n2.source_video, style: i2, validateSpec: s2, styleSpec: n2 });\n case \"image\":\n return Ei({ key: r2, value: e2, valueSpec: n2.source_image, style: i2, validateSpec: s2, styleSpec: n2 });\n case \"canvas\":\n return [new Dt(r2, null, \"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\", \"source.canvas\")];\n default:\n return Pi({ key: `${r2}.type`, value: e2.type, valueSpec: { values: [\"vector\", \"raster\", \"raster-dem\", \"geojson\", \"video\", \"image\"] } });\n }\n }\n function Ui(t2) {\n const e2 = t2.value, r2 = t2.styleSpec, n2 = r2.light, i2 = t2.style;\n let s2 = [];\n const o2 = Xn(e2);\n if (void 0 === e2) return s2;\n if (\"object\" !== o2) return s2 = s2.concat([new Dt(\"light\", e2, `object expected, ${o2} found`)]), s2;\n for (const o3 in e2) {\n const a2 = o3.match(/^(.*)-transition$/);\n s2 = s2.concat(a2 && n2[a2[1]] && n2[a2[1]].transition ? t2.validateSpec({ key: o3, value: e2[o3], valueSpec: r2.transition, validateSpec: t2.validateSpec, style: i2, styleSpec: r2 }) : n2[o3] ? t2.validateSpec({ key: o3, value: e2[o3], valueSpec: n2[o3], validateSpec: t2.validateSpec, style: i2, styleSpec: r2 }) : [new Dt(o3, e2[o3], `unknown property \"${o3}\"`)]);\n }\n return s2;\n }\n function qi(t2) {\n const e2 = t2.value, r2 = t2.styleSpec, n2 = r2.sky, i2 = t2.style, s2 = Xn(e2);\n if (void 0 === e2) return [];\n if (\"object\" !== s2) return [new Dt(\"sky\", e2, `object expected, ${s2} found`)];\n let o2 = [];\n for (const s3 in e2) o2 = o2.concat(n2[s3] ? t2.validateSpec({ key: s3, value: e2[s3], valueSpec: n2[s3], style: i2, styleSpec: r2 }) : [new Dt(s3, e2[s3], `unknown property \"${s3}\"`)]);\n return o2;\n }\n function ji(t2) {\n const e2 = t2.value, r2 = t2.styleSpec, n2 = r2.terrain, i2 = t2.style;\n let s2 = [];\n const o2 = Xn(e2);\n if (void 0 === e2) return s2;\n if (\"object\" !== o2) return s2 = s2.concat([new Dt(\"terrain\", e2, `object expected, ${o2} found`)]), s2;\n for (const o3 in e2) s2 = s2.concat(n2[o3] ? t2.validateSpec({ key: o3, value: e2[o3], valueSpec: n2[o3], validateSpec: t2.validateSpec, style: i2, styleSpec: r2 }) : [new Dt(o3, e2[o3], `unknown property \"${o3}\"`)]);\n return s2;\n }\n function Gi(t2) {\n let e2 = [];\n const r2 = t2.value, n2 = t2.key;\n if (Array.isArray(r2)) {\n const i2 = [], s2 = [];\n for (const o2 in r2) r2[o2].id && i2.includes(r2[o2].id) && e2.push(new Dt(n2, r2, `all the sprites' ids must be unique, but ${r2[o2].id} is duplicated`)), i2.push(r2[o2].id), r2[o2].url && s2.includes(r2[o2].url) && e2.push(new Dt(n2, r2, `all the sprites' URLs must be unique, but ${r2[o2].url} is duplicated`)), s2.push(r2[o2].url), e2 = e2.concat(Ei({ key: `${n2}[${o2}]`, value: r2[o2], valueSpec: { id: { type: \"string\", required: true }, url: { type: \"string\", required: true } }, validateSpec: t2.validateSpec }));\n return e2;\n }\n return Ri({ key: n2, value: r2 });\n }\n function Xi(t2) {\n return e2 = t2.value, Boolean(e2) && e2.constructor === Object ? [] : [new Dt(t2.key, t2.value, `object expected, ${Xn(t2.value)} found`)];\n var e2;\n }\n const Yi = { \"*\": () => [], array: Ti, boolean: function(t2) {\n const e2 = t2.value, r2 = t2.key, n2 = Xn(e2);\n return \"boolean\" !== n2 ? [new Dt(r2, e2, `boolean expected, ${n2} found`)] : [];\n }, number: Ii, color: Di, constants: Ai, enum: Pi, filter: zi, function: Mi, layer: Oi, object: Ei, source: $i, light: Ui, sky: qi, terrain: ji, projection: function(t2) {\n const e2 = t2.value, r2 = t2.styleSpec, n2 = r2.projection, i2 = t2.style, s2 = Xn(e2);\n if (void 0 === e2) return [];\n if (\"object\" !== s2) return [new Dt(\"projection\", e2, `object expected, ${s2} found`)];\n let o2 = [];\n for (const s3 in e2) o2 = o2.concat(n2[s3] ? t2.validateSpec({ key: s3, value: e2[s3], valueSpec: n2[s3], style: i2, styleSpec: r2 }) : [new Dt(s3, e2[s3], `unknown property \"${s3}\"`)]);\n return o2;\n }, projectionDefinition: function(t2) {\n const e2 = t2.key;\n let r2 = t2.value;\n r2 = r2 instanceof String ? r2.valueOf() : r2;\n const n2 = Xn(r2);\n return \"array\" !== n2 || (function(t3) {\n return Array.isArray(t3) && 3 === t3.length && \"string\" == typeof t3[0] && \"string\" == typeof t3[1] && \"number\" == typeof t3[2];\n })(r2) || (function(t3) {\n return !![\"interpolate\", \"step\", \"literal\"].includes(t3[0]);\n })(r2) ? [\"array\", \"string\"].includes(n2) ? [] : [new Dt(e2, r2, `projection expected, invalid type \"${n2}\" found`)] : [new Dt(e2, r2, `projection expected, invalid array ${JSON.stringify(r2)} found`)];\n }, string: Ri, formatted: function(t2) {\n return 0 === Ri(t2).length ? [] : Fi(t2);\n }, resolvedImage: function(t2) {\n return 0 === Ri(t2).length ? [] : Fi(t2);\n }, padding: function(t2) {\n const e2 = t2.key, r2 = t2.value;\n if (\"array\" === Xn(r2)) {\n if (r2.length < 1 || r2.length > 4) return [new Dt(e2, r2, `padding requires 1 to 4 values; ${r2.length} values found`)];\n const n2 = { type: \"number\" };\n let i2 = [];\n for (let s2 = 0; s2 < r2.length; s2++) i2 = i2.concat(t2.validateSpec({ key: `${e2}[${s2}]`, value: r2[s2], validateSpec: t2.validateSpec, valueSpec: n2 }));\n return i2;\n }\n return Ii({ key: e2, value: r2, valueSpec: {} });\n }, numberArray: function(t2) {\n const e2 = t2.key, r2 = t2.value;\n if (\"array\" === Xn(r2)) {\n const n2 = { type: \"number\" };\n if (r2.length < 1) return [new Dt(e2, r2, \"array length at least 1 expected, length 0 found\")];\n let i2 = [];\n for (let s2 = 0; s2 < r2.length; s2++) i2 = i2.concat(t2.validateSpec({ key: `${e2}[${s2}]`, value: r2[s2], validateSpec: t2.validateSpec, valueSpec: n2 }));\n return i2;\n }\n return Ii({ key: e2, value: r2, valueSpec: {} });\n }, colorArray: function(t2) {\n const e2 = t2.key, r2 = t2.value;\n if (\"array\" === Xn(r2)) {\n if (r2.length < 1) return [new Dt(e2, r2, \"array length at least 1 expected, length 0 found\")];\n let t3 = [];\n for (let n2 = 0; n2 < r2.length; n2++) t3 = t3.concat(Di({ key: `${e2}[${n2}]`, value: r2[n2] }));\n return t3;\n }\n return Di({ key: e2, value: r2 });\n }, variableAnchorOffsetCollection: function(t2) {\n const e2 = t2.key, r2 = t2.value, n2 = Xn(r2), i2 = t2.styleSpec;\n if (\"array\" !== n2 || r2.length < 1 || r2.length % 2 != 0) return [new Dt(e2, r2, \"variableAnchorOffsetCollection requires a non-empty array of even length\")];\n let s2 = [];\n for (let n3 = 0; n3 < r2.length; n3 += 2) s2 = s2.concat(Pi({ key: `${e2}[${n3}]`, value: r2[n3], valueSpec: i2.layout_symbol[\"text-anchor\"] })), s2 = s2.concat(Ti({ key: `${e2}[${n3 + 1}]`, value: r2[n3 + 1], valueSpec: { length: 2, value: \"number\" }, validateSpec: t2.validateSpec, style: t2.style, styleSpec: i2 }));\n return s2;\n }, sprite: Gi, state: Xi };\n function Zi(t2) {\n const e2 = t2.value, r2 = t2.valueSpec, n2 = t2.styleSpec;\n return t2.validateSpec = Zi, r2.expression && Yn(Si(e2)) ? Mi(t2) : r2.expression && ri(ki(e2)) ? Fi(t2) : r2.type && Yi[r2.type] ? Yi[r2.type](t2) : Ei(Pt({}, t2, { valueSpec: r2.type ? n2[r2.type] : r2 }));\n }\n function Hi(t2) {\n const e2 = t2.value, r2 = t2.key, n2 = Ri(t2);\n return n2.length || (-1 === e2.indexOf(\"{fontstack}\") && n2.push(new Dt(r2, e2, '\"glyphs\" url must include a \"{fontstack}\" token')), -1 === e2.indexOf(\"{range}\") && n2.push(new Dt(r2, e2, '\"glyphs\" url must include a \"{range}\" token'))), n2;\n }\n function Ki(t2, e2 = vt) {\n let r2 = [];\n return r2 = r2.concat(Zi({ key: \"\", value: t2, valueSpec: e2.$root, styleSpec: e2, style: t2, validateSpec: Zi, objectElementValidators: { glyphs: Hi, \"*\": () => [] } })), t2.constants && (r2 = r2.concat(Ai({ key: \"constants\", value: t2.constants }))), Ji(r2);\n }\n function Wi(t2) {\n return function(e2) {\n return t2(Object.assign({}, e2, { validateSpec: Zi }));\n };\n }\n function Ji(t2) {\n return [].concat(t2).sort(((t3, e2) => t3.line - e2.line));\n }\n function Qi(t2) {\n return function(...e2) {\n return Ji(t2.apply(this, e2));\n };\n }\n Ki.source = Qi(Wi($i)), Ki.sprite = Qi(Wi(Gi)), Ki.glyphs = Qi(Wi(Hi)), Ki.light = Qi(Wi(Ui)), Ki.sky = Qi(Wi(qi)), Ki.terrain = Qi(Wi(ji)), Ki.state = Qi(Wi(Xi)), Ki.layer = Qi(Wi(Oi)), Ki.filter = Qi(Wi(zi)), Ki.paintProperty = Qi(Wi(Ci)), Ki.layoutProperty = Qi(Wi(Li));\n const ts = vt, es = Ki, rs = es.light, ns = es.sky, is = es.paintProperty, ss = es.layoutProperty;\n function os(t2, e2) {\n let r2 = false;\n if (e2 && e2.length) for (const n2 of e2) t2.fire(new gt(new Error(n2.message))), r2 = true;\n return r2;\n }\n class as {\n constructor(t2, e2, r2) {\n const n2 = this.cells = [];\n if (t2 instanceof ArrayBuffer) {\n this.arrayBuffer = t2;\n const i3 = new Int32Array(this.arrayBuffer);\n t2 = i3[0], this.d = (e2 = i3[1]) + 2 * (r2 = i3[2]);\n for (let t3 = 0; t3 < this.d * this.d; t3++) {\n const e3 = i3[3 + t3], r3 = i3[3 + t3 + 1];\n n2.push(e3 === r3 ? null : i3.subarray(e3, r3));\n }\n const s2 = i3[3 + n2.length + 1];\n this.keys = i3.subarray(i3[3 + n2.length], s2), this.bboxes = i3.subarray(s2), this.insert = this._insertReadonly;\n } else {\n this.d = e2 + 2 * r2;\n for (let t3 = 0; t3 < this.d * this.d; t3++) n2.push([]);\n this.keys = [], this.bboxes = [];\n }\n this.n = e2, this.extent = t2, this.padding = r2, this.scale = e2 / t2, this.uid = 0;\n const i2 = r2 / e2 * t2;\n this.min = -i2, this.max = t2 + i2;\n }\n insert(t2, e2, r2, n2, i2) {\n this._forEachCell(e2, r2, n2, i2, this._insertCell, this.uid++, void 0, void 0), this.keys.push(t2), this.bboxes.push(e2), this.bboxes.push(r2), this.bboxes.push(n2), this.bboxes.push(i2);\n }\n _insertReadonly() {\n throw new Error(\"Cannot insert into a GridIndex created from an ArrayBuffer.\");\n }\n _insertCell(t2, e2, r2, n2, i2, s2) {\n this.cells[i2].push(s2);\n }\n query(t2, e2, r2, n2, i2) {\n const s2 = this.min, o2 = this.max;\n if (t2 <= s2 && e2 <= s2 && o2 <= r2 && o2 <= n2 && !i2) return Array.prototype.slice.call(this.keys);\n {\n const s3 = [];\n return this._forEachCell(t2, e2, r2, n2, this._queryCell, s3, {}, i2), s3;\n }\n }\n _queryCell(t2, e2, r2, n2, i2, s2, o2, a2) {\n const l2 = this.cells[i2];\n if (null !== l2) {\n const i3 = this.keys, u2 = this.bboxes;\n for (let c2 = 0; c2 < l2.length; c2++) {\n const h2 = l2[c2];\n if (void 0 === o2[h2]) {\n const l3 = 4 * h2;\n (a2 ? a2(u2[l3 + 0], u2[l3 + 1], u2[l3 + 2], u2[l3 + 3]) : t2 <= u2[l3 + 2] && e2 <= u2[l3 + 3] && r2 >= u2[l3 + 0] && n2 >= u2[l3 + 1]) ? (o2[h2] = true, s2.push(i3[h2])) : o2[h2] = false;\n }\n }\n }\n }\n _forEachCell(t2, e2, r2, n2, i2, s2, o2, a2) {\n const l2 = this._convertToCellCoord(t2), u2 = this._convertToCellCoord(e2), c2 = this._convertToCellCoord(r2), h2 = this._convertToCellCoord(n2);\n for (let p2 = l2; p2 <= c2; p2++) for (let l3 = u2; l3 <= h2; l3++) {\n const u3 = this.d * l3 + p2;\n if ((!a2 || a2(this._convertFromCellCoord(p2), this._convertFromCellCoord(l3), this._convertFromCellCoord(p2 + 1), this._convertFromCellCoord(l3 + 1))) && i2.call(this, t2, e2, r2, n2, u3, s2, o2, a2)) return;\n }\n }\n _convertFromCellCoord(t2) {\n return (t2 - this.padding) / this.scale;\n }\n _convertToCellCoord(t2) {\n return Math.max(0, Math.min(this.d - 1, Math.floor(t2 * this.scale) + this.padding));\n }\n toArrayBuffer() {\n if (this.arrayBuffer) return this.arrayBuffer;\n const t2 = this.cells, e2 = 3 + this.cells.length + 1 + 1;\n let r2 = 0;\n for (let t3 = 0; t3 < this.cells.length; t3++) r2 += this.cells[t3].length;\n const n2 = new Int32Array(e2 + r2 + this.keys.length + this.bboxes.length);\n n2[0] = this.extent, n2[1] = this.n, n2[2] = this.padding;\n let i2 = e2;\n for (let e3 = 0; e3 < t2.length; e3++) {\n const r3 = t2[e3];\n n2[3 + e3] = i2, n2.set(r3, i2), i2 += r3.length;\n }\n return n2[3 + t2.length] = i2, n2.set(this.keys, i2), i2 += this.keys.length, n2[3 + t2.length + 1] = i2, n2.set(this.bboxes, i2), i2 += this.bboxes.length, n2.buffer;\n }\n static serialize(t2, e2) {\n const r2 = t2.toArrayBuffer();\n return e2 && e2.push(r2), { buffer: r2 };\n }\n static deserialize(t2) {\n return new as(t2.buffer);\n }\n }\n const ls = {};\n function us(t2, e2, r2 = {}) {\n if (ls[t2]) throw new Error(`${t2} is already registered.`);\n Object.defineProperty(e2, \"_classRegistryKey\", { value: t2, writeable: false }), ls[t2] = { klass: e2, omit: r2.omit || [], shallow: r2.shallow || [] };\n }\n us(\"Object\", Object), us(\"Set\", Set), us(\"TransferableGridIndex\", as), us(\"Color\", Te), us(\"Error\", Error), us(\"AJAXError\", ct), us(\"ResolvedImage\", Oe), us(\"StylePropertyFunction\", ai), us(\"StyleExpression\", ei, { omit: [\"_evaluator\"] }), us(\"ZoomDependentExpression\", si), us(\"ZoomConstantExpression\", ii), us(\"CompoundExpression\", Pn, { omit: [\"_evaluate\"] });\n for (const t2 in Dn) Dn[t2]._classRegistryKey || us(`Expression_${t2}`, Dn[t2]);\n function cs(t2) {\n return t2 && \"undefined\" != typeof ArrayBuffer && (t2 instanceof ArrayBuffer || t2.constructor && \"ArrayBuffer\" === t2.constructor.name);\n }\n function hs(t2) {\n return t2.$name || t2.constructor._classRegistryKey;\n }\n function ps(t2) {\n return !(function(t3) {\n if (null === t3 || \"object\" != typeof t3) return false;\n const e2 = hs(t3);\n return !(!e2 || \"Object\" === e2);\n })(t2) && (null == t2 || \"boolean\" == typeof t2 || \"number\" == typeof t2 || \"string\" == typeof t2 || t2 instanceof Boolean || t2 instanceof Number || t2 instanceof String || t2 instanceof Date || t2 instanceof RegExp || t2 instanceof Blob || t2 instanceof Error || cs(t2) || Z(t2) || ArrayBuffer.isView(t2) || t2 instanceof ImageData);\n }\n function fs(t2, e2) {\n if (ps(t2)) return (cs(t2) || Z(t2)) && e2 && e2.push(t2), ArrayBuffer.isView(t2) && e2 && e2.push(t2.buffer), t2 instanceof ImageData && e2 && e2.push(t2.data.buffer), t2;\n if (Array.isArray(t2)) {\n const r3 = [];\n for (const n3 of t2) r3.push(fs(n3, e2));\n return r3;\n }\n if (\"object\" != typeof t2) throw new Error(\"can't serialize object of type \" + typeof t2);\n const r2 = hs(t2);\n if (!r2) throw new Error(`can't serialize object of unregistered class ${t2.constructor.name}`);\n if (!ls[r2]) throw new Error(`${r2} is not registered.`);\n const { klass: n2 } = ls[r2], i2 = n2.serialize ? n2.serialize(t2, e2) : {};\n if (n2.serialize) {\n if (e2 && i2 === e2[e2.length - 1]) throw new Error(\"statically serialized object won't survive transfer of $name property\");\n } else {\n for (const n3 in t2) {\n if (!t2.hasOwnProperty(n3)) continue;\n if (ls[r2].omit.indexOf(n3) >= 0) continue;\n const s2 = t2[n3];\n i2[n3] = ls[r2].shallow.indexOf(n3) >= 0 ? s2 : fs(s2, e2);\n }\n t2 instanceof Error && (i2.message = t2.message);\n }\n if (i2.$name) throw new Error(\"$name property is reserved for worker serialization logic.\");\n return \"Object\" !== r2 && (i2.$name = r2), i2;\n }\n function ds(t2) {\n if (ps(t2)) return t2;\n if (Array.isArray(t2)) return t2.map(ds);\n if (\"object\" != typeof t2) throw new Error(\"can't deserialize object of type \" + typeof t2);\n const e2 = hs(t2) || \"Object\";\n if (!ls[e2]) throw new Error(`can't deserialize unregistered class ${e2}`);\n const { klass: r2 } = ls[e2];\n if (!r2) throw new Error(`can't deserialize unregistered class ${e2}`);\n if (r2.deserialize) return r2.deserialize(t2);\n const n2 = Object.create(r2.prototype);\n for (const r3 of Object.keys(t2)) {\n if (\"$name\" === r3) continue;\n const i2 = t2[r3];\n n2[r3] = ls[e2].shallow.indexOf(r3) >= 0 ? i2 : ds(i2);\n }\n return n2;\n }\n class ys {\n constructor() {\n this.first = true;\n }\n update(t2, e2) {\n const r2 = Math.floor(t2);\n return this.first ? (this.first = false, this.lastIntegerZoom = r2, this.lastIntegerZoomTime = 0, this.lastZoom = t2, this.lastFloorZoom = r2, true) : (this.lastFloorZoom > r2 ? (this.lastIntegerZoom = r2 + 1, this.lastIntegerZoomTime = e2) : this.lastFloorZoom < r2 && (this.lastIntegerZoom = r2, this.lastIntegerZoomTime = e2), t2 !== this.lastZoom && (this.lastZoom = t2, this.lastFloorZoom = r2, true));\n }\n }\n function ms(t2) {\n return /[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t2));\n }\n function gs(t2) {\n return /[\\u02EA\\u02EB\\u1100-\\u11FF\\u1400-\\u167F\\u18B0-\\u18F5\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u303F\\u3041-\\u3096\\u309D-\\u30FB\\u30FD-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFE4\\uDFF0-\\uDFF6]|[\\uD81C-\\uD822\\uD83D\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD30-\\uDEFB]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83C[\\uDC00-\\uDE00\\uDF00-\\uDFFF]|\\uD83E[\\uDD00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t2));\n }\n function xs(t2) {\n return /\\s/u.test(String.fromCodePoint(t2));\n }\n function vs(t2) {\n for (const e2 of t2) if (gs(e2.codePointAt(0))) return true;\n return false;\n }\n function bs(t2) {\n for (const e2 of t2) if (!As(e2.codePointAt(0))) return false;\n return true;\n }\n function ws(t2) {\n const e2 = t2.map(((t3) => {\n try {\n return new RegExp(`\\\\p{sc=${t3}}`, \"u\").source;\n } catch (t4) {\n return null;\n }\n })).filter(((t3) => t3));\n return new RegExp(e2.join(\"|\"), \"u\");\n }\n const _s = ws([\"Arab\", \"Dupl\", \"Mong\", \"Ougr\", \"Syrc\"]);\n function As(t2) {\n return !_s.test(String.fromCodePoint(t2));\n }\n function Ss(t2) {\n return !(gs(t2) || (e2 = t2, /[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(e2))));\n var e2;\n }\n const ks = ws([\"Adlm\", \"Arab\", \"Armi\", \"Avst\", \"Chrs\", \"Cprt\", \"Egyp\", \"Elym\", \"Gara\", \"Hatr\", \"Hebr\", \"Hung\", \"Khar\", \"Lydi\", \"Mand\", \"Mani\", \"Mend\", \"Merc\", \"Mero\", \"Narb\", \"Nbat\", \"Nkoo\", \"Orkh\", \"Palm\", \"Phli\", \"Phlp\", \"Phnx\", \"Prti\", \"Rohg\", \"Samr\", \"Sarb\", \"Sogo\", \"Syrc\", \"Thaa\", \"Todr\", \"Yezi\"]);\n function Es(t2) {\n return ks.test(String.fromCodePoint(t2));\n }\n function Ts(t2, e2) {\n return !(!e2 && Es(t2) || /[\\u0900-\\u0DFF\\u0F00-\\u109F\\u1780-\\u17FF]/gim.test(String.fromCodePoint(t2)));\n }\n function Is(t2) {\n for (const e2 of t2) if (Es(e2.codePointAt(0))) return true;\n return false;\n }\n const Ms = new class {\n constructor() {\n this.TIMEOUT = 5e3, this.applyArabicShaping = null, this.processBidirectionalText = null, this.processStyledBidirectionalText = null, this.pluginStatus = \"unavailable\", this.pluginURL = null, this.loadScriptResolve = () => {\n };\n }\n setState(t2) {\n this.pluginStatus = t2.pluginStatus, this.pluginURL = t2.pluginURL;\n }\n getState() {\n return { pluginStatus: this.pluginStatus, pluginURL: this.pluginURL };\n }\n setMethods(t2) {\n if (Ms.isParsed()) throw new Error(\"RTL text plugin already registered.\");\n this.applyArabicShaping = t2.applyArabicShaping, this.processBidirectionalText = t2.processBidirectionalText, this.processStyledBidirectionalText = t2.processStyledBidirectionalText, this.loadScriptResolve();\n }\n isParsed() {\n return null != this.applyArabicShaping && null != this.processBidirectionalText && null != this.processStyledBidirectionalText;\n }\n getRTLTextPluginStatus() {\n return this.pluginStatus;\n }\n syncState(t2, r2) {\n return e(this, void 0, void 0, (function* () {\n if (this.isParsed()) return this.getState();\n if (\"loading\" !== t2.pluginStatus) return this.setState(t2), t2;\n const e2 = t2.pluginURL, n2 = new Promise(((t3) => {\n this.loadScriptResolve = t3;\n }));\n r2(e2);\n const i2 = new Promise(((t3) => setTimeout((() => t3()), this.TIMEOUT)));\n if (yield Promise.race([n2, i2]), this.isParsed()) {\n const t3 = { pluginStatus: \"loaded\", pluginURL: e2 };\n return this.setState(t3), t3;\n }\n throw this.setState({ pluginStatus: \"error\", pluginURL: \"\" }), new Error(`RTL Text Plugin failed to import scripts from ${e2}`);\n }));\n }\n }();\n class Fs {\n constructor(t2, e2) {\n this.isSupportedScript = Ds, this.zoom = t2, e2 ? (this.now = e2.now || 0, this.fadeDuration = e2.fadeDuration || 0, this.zoomHistory = e2.zoomHistory || new ys(), this.transition = e2.transition || {}) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new ys(), this.transition = {});\n }\n crossFadingFactor() {\n return 0 === this.fadeDuration ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);\n }\n getCrossfadeParameters() {\n const t2 = this.zoom, e2 = t2 - Math.floor(t2), r2 = this.crossFadingFactor();\n return t2 > this.zoomHistory.lastIntegerZoom ? { fromScale: 2, toScale: 1, t: e2 + (1 - e2) * r2 } : { fromScale: 0.5, toScale: 1, t: 1 - (1 - r2) * e2 };\n }\n }\n function Ds(t2) {\n return (function(t3, e2) {\n for (const r2 of t3) if (!Ts(r2.codePointAt(0), e2)) return false;\n return true;\n })(t2, \"loaded\" === Ms.getRTLTextPluginStatus());\n }\n const Ps = \"-transition\";\n class zs {\n constructor(t2, e2, r2) {\n this.property = t2, this.value = e2, this.expression = (function(t3, e3, r3) {\n if (Yn(t3)) return new ai(t3, e3);\n if (ri(t3)) {\n const n2 = oi(t3, e3, r3);\n if (\"error\" === n2.result) throw new Error(n2.value.map(((t4) => `${t4.key}: ${t4.message}`)).join(\", \"));\n return n2.value;\n }\n {\n let r4 = t3;\n return \"color\" === e3.type && \"string\" == typeof t3 ? r4 = Te.parse(t3) : \"padding\" !== e3.type || \"number\" != typeof t3 && !Array.isArray(t3) ? \"numberArray\" !== e3.type || \"number\" != typeof t3 && !Array.isArray(t3) ? \"colorArray\" !== e3.type || \"string\" != typeof t3 && !Array.isArray(t3) ? \"variableAnchorOffsetCollection\" === e3.type && Array.isArray(t3) ? r4 = Le.parse(t3) : \"projectionDefinition\" === e3.type && \"string\" == typeof t3 && (r4 = Re.parse(t3)) : r4 = Be.parse(t3) : r4 = ze.parse(t3) : r4 = Pe.parse(t3), { globalStateRefs: /* @__PURE__ */ new Set(), _globalState: null, kind: \"constant\", evaluate: () => r4 };\n }\n })(void 0 === e2 ? t2.specification.default : e2, t2.specification, r2);\n }\n isDataDriven() {\n return \"source\" === this.expression.kind || \"composite\" === this.expression.kind;\n }\n getGlobalStateRefs() {\n return this.expression.globalStateRefs || /* @__PURE__ */ new Set();\n }\n possiblyEvaluate(t2, e2, r2) {\n return this.property.possiblyEvaluate(this, t2, e2, r2);\n }\n }\n class Bs {\n constructor(t2, e2) {\n this.property = t2, this.value = new zs(t2, void 0, e2);\n }\n transitioned(t2, e2) {\n return new Cs(this.property, this.value, e2, O({}, t2.transition, this.transition), t2.now);\n }\n untransitioned() {\n return new Cs(this.property, this.value, null, {}, 0);\n }\n }\n class Vs {\n constructor(t2, e2) {\n this._properties = t2, this._values = Object.create(t2.defaultTransitionablePropertyValues), this._globalState = e2;\n }\n getValue(t2) {\n return U(this._values[t2].value.value);\n }\n setValue(t2, e2) {\n Object.prototype.hasOwnProperty.call(this._values, t2) || (this._values[t2] = new Bs(this._values[t2].property, this._globalState)), this._values[t2].value = new zs(this._values[t2].property, null === e2 ? void 0 : U(e2), this._globalState);\n }\n getTransition(t2) {\n return U(this._values[t2].transition);\n }\n setTransition(t2, e2) {\n Object.prototype.hasOwnProperty.call(this._values, t2) || (this._values[t2] = new Bs(this._values[t2].property, this._globalState)), this._values[t2].transition = U(e2) || void 0;\n }\n serialize() {\n const t2 = {};\n for (const e2 of Object.keys(this._values)) {\n const r2 = this.getValue(e2);\n void 0 !== r2 && (t2[e2] = r2);\n const n2 = this.getTransition(e2);\n void 0 !== n2 && (t2[`${e2}${Ps}`] = n2);\n }\n return t2;\n }\n transitioned(t2, e2) {\n const r2 = new Ls(this._properties);\n for (const n2 of Object.keys(this._values)) r2._values[n2] = this._values[n2].transitioned(t2, e2._values[n2]);\n return r2;\n }\n untransitioned() {\n const t2 = new Ls(this._properties);\n for (const e2 of Object.keys(this._values)) t2._values[e2] = this._values[e2].untransitioned();\n return t2;\n }\n }\n class Cs {\n constructor(t2, e2, r2, n2, i2) {\n this.property = t2, this.value = e2, this.begin = i2 + n2.delay || 0, this.end = this.begin + n2.duration || 0, t2.specification.transition && (n2.delay || n2.duration) && (this.prior = r2);\n }\n possiblyEvaluate(t2, e2, r2) {\n const n2 = t2.now || 0, i2 = this.value.possiblyEvaluate(t2, e2, r2), s2 = this.prior;\n if (s2) {\n if (n2 > this.end) return this.prior = null, i2;\n if (this.value.isDataDriven()) return this.prior = null, i2;\n if (n2 < this.begin) return s2.possiblyEvaluate(t2, e2, r2);\n {\n const o2 = (n2 - this.begin) / (this.end - this.begin);\n return this.property.interpolate(s2.possiblyEvaluate(t2, e2, r2), i2, z(o2));\n }\n }\n return i2;\n }\n }\n class Ls {\n constructor(t2) {\n this._properties = t2, this._values = Object.create(t2.defaultTransitioningPropertyValues);\n }\n possiblyEvaluate(t2, e2, r2) {\n const n2 = new Ns(this._properties);\n for (const i2 of Object.keys(this._values)) n2._values[i2] = this._values[i2].possiblyEvaluate(t2, e2, r2);\n return n2;\n }\n hasTransition() {\n for (const t2 of Object.keys(this._values)) if (this._values[t2].prior) return true;\n return false;\n }\n }\n class Os {\n constructor(t2, e2) {\n this._properties = t2, this._values = Object.create(t2.defaultPropertyValues), this._globalState = e2;\n }\n hasValue(t2) {\n return void 0 !== this._values[t2].value;\n }\n getValue(t2) {\n return U(this._values[t2].value);\n }\n setValue(t2, e2) {\n this._values[t2] = new zs(this._values[t2].property, null === e2 ? void 0 : U(e2), this._globalState);\n }\n serialize() {\n const t2 = {};\n for (const e2 of Object.keys(this._values)) {\n const r2 = this.getValue(e2);\n void 0 !== r2 && (t2[e2] = r2);\n }\n return t2;\n }\n possiblyEvaluate(t2, e2, r2) {\n const n2 = new Ns(this._properties);\n for (const i2 of Object.keys(this._values)) n2._values[i2] = this._values[i2].possiblyEvaluate(t2, e2, r2);\n return n2;\n }\n }\n class Rs {\n constructor(t2, e2, r2) {\n this.property = t2, this.value = e2, this.parameters = r2;\n }\n isConstant() {\n return \"constant\" === this.value.kind;\n }\n constantOr(t2) {\n return \"constant\" === this.value.kind ? this.value.value : t2;\n }\n evaluate(t2, e2, r2, n2) {\n return this.property.evaluate(this.value, this.parameters, t2, e2, r2, n2);\n }\n }\n class Ns {\n constructor(t2) {\n this._properties = t2, this._values = Object.create(t2.defaultPossiblyEvaluatedValues);\n }\n get(t2) {\n return this._values[t2];\n }\n }\n class $s {\n constructor(t2) {\n this.specification = t2;\n }\n possiblyEvaluate(t2, e2) {\n if (t2.isDataDriven()) throw new Error(\"Value should not be data driven\");\n return t2.expression.evaluate(e2);\n }\n interpolate(t2, e2, r2) {\n const n2 = yr[this.specification.type];\n return n2 ? n2(t2, e2, r2) : t2;\n }\n }\n class Us {\n constructor(t2, e2) {\n this.specification = t2, this.overrides = e2;\n }\n possiblyEvaluate(t2, e2, r2, n2) {\n return new Rs(this, \"constant\" === t2.expression.kind || \"camera\" === t2.expression.kind ? { kind: \"constant\", value: t2.expression.evaluate(e2, null, {}, r2, n2) } : t2.expression, e2);\n }\n interpolate(t2, e2, r2) {\n if (\"constant\" !== t2.value.kind || \"constant\" !== e2.value.kind) return t2;\n if (void 0 === t2.value.value || void 0 === e2.value.value) return new Rs(this, { kind: \"constant\", value: void 0 }, t2.parameters);\n const n2 = yr[this.specification.type];\n if (n2) {\n const i2 = n2(t2.value.value, e2.value.value, r2);\n return new Rs(this, { kind: \"constant\", value: i2 }, t2.parameters);\n }\n return t2;\n }\n evaluate(t2, e2, r2, n2, i2, s2) {\n return \"constant\" === t2.kind ? t2.value : t2.evaluate(e2, r2, n2, i2, s2);\n }\n }\n class qs extends Us {\n possiblyEvaluate(t2, e2, r2, n2) {\n if (void 0 === t2.value) return new Rs(this, { kind: \"constant\", value: void 0 }, e2);\n if (\"constant\" === t2.expression.kind) {\n const i2 = t2.expression.evaluate(e2, null, {}, r2, n2), s2 = \"resolvedImage\" === t2.property.specification.type && \"string\" != typeof i2 ? i2.name : i2, o2 = this._calculate(s2, s2, s2, e2);\n return new Rs(this, { kind: \"constant\", value: o2 }, e2);\n }\n if (\"camera\" === t2.expression.kind) {\n const r3 = this._calculate(t2.expression.evaluate({ zoom: e2.zoom - 1 }), t2.expression.evaluate({ zoom: e2.zoom }), t2.expression.evaluate({ zoom: e2.zoom + 1 }), e2);\n return new Rs(this, { kind: \"constant\", value: r3 }, e2);\n }\n return new Rs(this, t2.expression, e2);\n }\n evaluate(t2, e2, r2, n2, i2, s2) {\n if (\"source\" === t2.kind) {\n const o2 = t2.evaluate(e2, r2, n2, i2, s2);\n return this._calculate(o2, o2, o2, e2);\n }\n return \"composite\" === t2.kind ? this._calculate(t2.evaluate({ zoom: Math.floor(e2.zoom) - 1 }, r2, n2), t2.evaluate({ zoom: Math.floor(e2.zoom) }, r2, n2), t2.evaluate({ zoom: Math.floor(e2.zoom) + 1 }, r2, n2), e2) : t2.value;\n }\n _calculate(t2, e2, r2, n2) {\n return n2.zoom > n2.zoomHistory.lastIntegerZoom ? { from: t2, to: e2 } : { from: r2, to: e2 };\n }\n interpolate(t2) {\n return t2;\n }\n }\n class js {\n constructor(t2) {\n this.specification = t2;\n }\n possiblyEvaluate(t2, e2, r2, n2) {\n if (void 0 !== t2.value) {\n if (\"constant\" === t2.expression.kind) {\n const i2 = t2.expression.evaluate(e2, null, {}, r2, n2);\n return this._calculate(i2, i2, i2, e2);\n }\n return this._calculate(t2.expression.evaluate(new Fs(Math.floor(e2.zoom - 1), e2)), t2.expression.evaluate(new Fs(Math.floor(e2.zoom), e2)), t2.expression.evaluate(new Fs(Math.floor(e2.zoom + 1), e2)), e2);\n }\n }\n _calculate(t2, e2, r2, n2) {\n return n2.zoom > n2.zoomHistory.lastIntegerZoom ? { from: t2, to: e2 } : { from: r2, to: e2 };\n }\n interpolate(t2) {\n return t2;\n }\n }\n class Gs {\n constructor(t2) {\n this.specification = t2;\n }\n possiblyEvaluate(t2, e2, r2, n2) {\n return !!t2.expression.evaluate(e2, null, {}, r2, n2);\n }\n interpolate() {\n return false;\n }\n }\n class Xs {\n constructor(t2) {\n this.properties = t2, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = [];\n for (const e2 in t2) {\n const r2 = t2[e2];\n r2.specification.overridable && this.overridableProperties.push(e2);\n const n2 = this.defaultPropertyValues[e2] = new zs(r2, void 0, void 0), i2 = this.defaultTransitionablePropertyValues[e2] = new Bs(r2, void 0);\n this.defaultTransitioningPropertyValues[e2] = i2.untransitioned(), this.defaultPossiblyEvaluatedValues[e2] = n2.possiblyEvaluate({});\n }\n }\n }\n us(\"DataDrivenProperty\", Us), us(\"DataConstantProperty\", $s), us(\"CrossFadedDataDrivenProperty\", qs), us(\"CrossFadedProperty\", js), us(\"ColorRampProperty\", Gs);\n class Ys extends xt {\n constructor(t2, e2, r2) {\n if (super(), this.id = t2.id, this.type = t2.type, this._globalState = r2, this._featureFilter = { filter: () => true, needGeometry: false, getGlobalStateRefs: () => /* @__PURE__ */ new Set() }, \"custom\" !== t2.type && (this.metadata = t2.metadata, this.minzoom = t2.minzoom, this.maxzoom = t2.maxzoom, \"background\" !== t2.type && (this.source = t2.source, this.sourceLayer = t2[\"source-layer\"], this.filter = t2.filter, this._featureFilter = fi(t2.filter, r2)), e2.layout && (this._unevaluatedLayout = new Os(e2.layout, r2)), e2.paint)) {\n this._transitionablePaint = new Vs(e2.paint, r2);\n for (const e3 in t2.paint) this.setPaintProperty(e3, t2.paint[e3], { validate: false });\n for (const e3 in t2.layout) this.setLayoutProperty(e3, t2.layout[e3], { validate: false });\n this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new Ns(e2.paint);\n }\n }\n setFilter(t2) {\n this.filter = t2, this._featureFilter = fi(t2, this._globalState);\n }\n getCrossfadeParameters() {\n return this._crossfadeParameters;\n }\n getLayoutProperty(t2) {\n return \"visibility\" === t2 ? this.visibility : this._unevaluatedLayout.getValue(t2);\n }\n getLayoutAffectingGlobalStateRefs() {\n const t2 = /* @__PURE__ */ new Set();\n if (this._unevaluatedLayout) for (const e2 in this._unevaluatedLayout._values) {\n const r2 = this._unevaluatedLayout._values[e2];\n for (const e3 of r2.getGlobalStateRefs()) t2.add(e3);\n }\n for (const e2 of this._featureFilter.getGlobalStateRefs()) t2.add(e2);\n return t2;\n }\n getPaintAffectingGlobalStateRefs() {\n var t2;\n const e2 = new globalThis.Map();\n if (this._transitionablePaint) for (const r2 in this._transitionablePaint._values) {\n const n2 = this._transitionablePaint._values[r2].value;\n for (const i2 of n2.getGlobalStateRefs()) {\n const s2 = null !== (t2 = e2.get(i2)) && void 0 !== t2 ? t2 : [];\n s2.push({ name: r2, value: n2.value }), e2.set(i2, s2);\n }\n }\n return e2;\n }\n setLayoutProperty(t2, e2, r2 = {}) {\n null != e2 && this._validate(ss, `layers.${this.id}.layout.${t2}`, t2, e2, r2) || (\"visibility\" !== t2 ? this._unevaluatedLayout.setValue(t2, e2) : this.visibility = e2);\n }\n getPaintProperty(t2) {\n return t2.endsWith(Ps) ? this._transitionablePaint.getTransition(t2.slice(0, -11)) : this._transitionablePaint.getValue(t2);\n }\n setPaintProperty(t2, e2, r2 = {}) {\n if (null != e2 && this._validate(is, `layers.${this.id}.paint.${t2}`, t2, e2, r2)) return false;\n if (t2.endsWith(Ps)) return this._transitionablePaint.setTransition(t2.slice(0, -11), e2 || void 0), false;\n {\n const r3 = this._transitionablePaint._values[t2], n2 = \"cross-faded-data-driven\" === r3.property.specification[\"property-type\"], i2 = r3.value.isDataDriven(), s2 = r3.value;\n this._transitionablePaint.setValue(t2, e2), this._handleSpecialPaintPropertyUpdate(t2);\n const o2 = this._transitionablePaint._values[t2].value;\n return o2.isDataDriven() || i2 || n2 || this._handleOverridablePaintPropertyUpdate(t2, s2, o2);\n }\n }\n _handleSpecialPaintPropertyUpdate(t2) {\n }\n _handleOverridablePaintPropertyUpdate(t2, e2, r2) {\n return false;\n }\n isHidden(t2, e2 = false) {\n return !!(this.minzoom && t2 < (e2 ? Math.floor(this.minzoom) : this.minzoom)) || !!(this.maxzoom && t2 >= this.maxzoom) || \"none\" === this.visibility;\n }\n updateTransitions(t2) {\n this._transitioningPaint = this._transitionablePaint.transitioned(t2, this._transitioningPaint);\n }\n hasTransition() {\n return this._transitioningPaint.hasTransition();\n }\n recalculate(t2, e2) {\n t2.getCrossfadeParameters && (this._crossfadeParameters = t2.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(t2, void 0, e2)), this.paint = this._transitioningPaint.possiblyEvaluate(t2, void 0, e2);\n }\n serialize() {\n const t2 = { id: this.id, type: this.type, source: this.source, \"source-layer\": this.sourceLayer, metadata: this.metadata, minzoom: this.minzoom, maxzoom: this.maxzoom, filter: this.filter, layout: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), paint: this._transitionablePaint && this._transitionablePaint.serialize() };\n return this.visibility && (t2.layout = t2.layout || {}, t2.layout.visibility = this.visibility), $(t2, ((t3, e2) => !(void 0 === t3 || \"layout\" === e2 && !Object.keys(t3).length || \"paint\" === e2 && !Object.keys(t3).length)));\n }\n _validate(t2, e2, r2, n2, i2 = {}) {\n return (!i2 || false !== i2.validate) && os(this, t2.call(es, { key: e2, layerType: this.type, objectKey: r2, value: n2, styleSpec: vt, style: { glyphs: true, sprite: true } }));\n }\n is3D() {\n return false;\n }\n isTileClipped() {\n return false;\n }\n hasOffscreenPass() {\n return false;\n }\n resize() {\n }\n isStateDependent() {\n for (const t2 in this.paint._values) {\n const e2 = this.paint.get(t2);\n if (e2 instanceof Rs && qn(e2.property.specification) && (\"source\" === e2.value.kind || \"composite\" === e2.value.kind) && e2.value.isStateDependent) return true;\n }\n return false;\n }\n }\n let Zs;\n var Hs = { get paint() {\n return Zs = Zs || new Xs({ \"raster-opacity\": new $s(vt.paint_raster[\"raster-opacity\"]), \"raster-hue-rotate\": new $s(vt.paint_raster[\"raster-hue-rotate\"]), \"raster-brightness-min\": new $s(vt.paint_raster[\"raster-brightness-min\"]), \"raster-brightness-max\": new $s(vt.paint_raster[\"raster-brightness-max\"]), \"raster-saturation\": new $s(vt.paint_raster[\"raster-saturation\"]), \"raster-contrast\": new $s(vt.paint_raster[\"raster-contrast\"]), \"raster-resampling\": new $s(vt.paint_raster[\"raster-resampling\"]), \"raster-fade-duration\": new $s(vt.paint_raster[\"raster-fade-duration\"]) });\n } };\n class Ks extends Ys {\n constructor(t2, e2) {\n super(t2, Hs, e2);\n }\n }\n const Ws = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array };\n class Js {\n constructor(t2, e2) {\n this._structArray = t2, this._pos1 = e2 * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;\n }\n }\n class Qs {\n constructor() {\n this.isTransferred = false, this.capacity = -1, this.resize(0);\n }\n static serialize(t2, e2) {\n return t2._trim(), e2 && (t2.isTransferred = true, e2.push(t2.arrayBuffer)), { length: t2.length, arrayBuffer: t2.arrayBuffer };\n }\n static deserialize(t2) {\n const e2 = Object.create(this.prototype);\n return e2.arrayBuffer = t2.arrayBuffer, e2.length = t2.length, e2.capacity = t2.arrayBuffer.byteLength / e2.bytesPerElement, e2._refreshViews(), e2;\n }\n _trim() {\n this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews());\n }\n clear() {\n this.length = 0;\n }\n resize(t2) {\n this.reserve(t2), this.length = t2;\n }\n reserve(t2) {\n if (t2 > this.capacity) {\n this.capacity = Math.max(t2, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);\n const e2 = this.uint8;\n this._refreshViews(), e2 && this.uint8.set(e2);\n }\n }\n _refreshViews() {\n throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\");\n }\n }\n function to(t2, e2 = 1) {\n let r2 = 0, n2 = 0;\n return { members: t2.map(((t3) => {\n const i2 = Ws[t3.type].BYTES_PER_ELEMENT, s2 = r2 = eo(r2, Math.max(e2, i2)), o2 = t3.components || 1;\n return n2 = Math.max(n2, i2), r2 += i2 * o2, { name: t3.name, type: t3.type, components: o2, offset: s2 };\n })), size: eo(r2, Math.max(n2, e2)), alignment: e2 };\n }\n function eo(t2, e2) {\n return Math.ceil(t2 / e2) * e2;\n }\n class ro extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2) {\n const r2 = this.length;\n return this.resize(r2 + 1), this.emplace(r2, t2, e2);\n }\n emplace(t2, e2, r2) {\n const n2 = 2 * t2;\n return this.int16[n2 + 0] = e2, this.int16[n2 + 1] = r2, t2;\n }\n }\n ro.prototype.bytesPerElement = 4, us(\"StructArrayLayout2i4\", ro);\n class no extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2) {\n const n2 = this.length;\n return this.resize(n2 + 1), this.emplace(n2, t2, e2, r2);\n }\n emplace(t2, e2, r2, n2) {\n const i2 = 3 * t2;\n return this.int16[i2 + 0] = e2, this.int16[i2 + 1] = r2, this.int16[i2 + 2] = n2, t2;\n }\n }\n no.prototype.bytesPerElement = 6, us(\"StructArrayLayout3i6\", no);\n class io extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2) {\n const i2 = this.length;\n return this.resize(i2 + 1), this.emplace(i2, t2, e2, r2, n2);\n }\n emplace(t2, e2, r2, n2, i2) {\n const s2 = 4 * t2;\n return this.int16[s2 + 0] = e2, this.int16[s2 + 1] = r2, this.int16[s2 + 2] = n2, this.int16[s2 + 3] = i2, t2;\n }\n }\n io.prototype.bytesPerElement = 8, us(\"StructArrayLayout4i8\", io);\n class so extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2) {\n const o2 = this.length;\n return this.resize(o2 + 1), this.emplace(o2, t2, e2, r2, n2, i2, s2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = 6 * t2;\n return this.int16[a2 + 0] = e2, this.int16[a2 + 1] = r2, this.int16[a2 + 2] = n2, this.int16[a2 + 3] = i2, this.int16[a2 + 4] = s2, this.int16[a2 + 5] = o2, t2;\n }\n }\n so.prototype.bytesPerElement = 12, us(\"StructArrayLayout2i4i12\", so);\n class oo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2) {\n const o2 = this.length;\n return this.resize(o2 + 1), this.emplace(o2, t2, e2, r2, n2, i2, s2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = 4 * t2, l2 = 8 * t2;\n return this.int16[a2 + 0] = e2, this.int16[a2 + 1] = r2, this.uint8[l2 + 4] = n2, this.uint8[l2 + 5] = i2, this.uint8[l2 + 6] = s2, this.uint8[l2 + 7] = o2, t2;\n }\n }\n oo.prototype.bytesPerElement = 8, us(\"StructArrayLayout2i4ub8\", oo);\n class ao extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2) {\n const r2 = this.length;\n return this.resize(r2 + 1), this.emplace(r2, t2, e2);\n }\n emplace(t2, e2, r2) {\n const n2 = 2 * t2;\n return this.float32[n2 + 0] = e2, this.float32[n2 + 1] = r2, t2;\n }\n }\n ao.prototype.bytesPerElement = 8, us(\"StructArrayLayout2f8\", ao);\n class lo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2) {\n const c2 = this.length;\n return this.resize(c2 + 1), this.emplace(c2, t2, e2, r2, n2, i2, s2, o2, a2, l2, u2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2) {\n const h2 = 10 * t2;\n return this.uint16[h2 + 0] = e2, this.uint16[h2 + 1] = r2, this.uint16[h2 + 2] = n2, this.uint16[h2 + 3] = i2, this.uint16[h2 + 4] = s2, this.uint16[h2 + 5] = o2, this.uint16[h2 + 6] = a2, this.uint16[h2 + 7] = l2, this.uint16[h2 + 8] = u2, this.uint16[h2 + 9] = c2, t2;\n }\n }\n lo.prototype.bytesPerElement = 20, us(\"StructArrayLayout10ui20\", lo);\n class uo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2) {\n const l2 = this.length;\n return this.resize(l2 + 1), this.emplace(l2, t2, e2, r2, n2, i2, s2, o2, a2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = 8 * t2;\n return this.uint16[u2 + 0] = e2, this.uint16[u2 + 1] = r2, this.uint16[u2 + 2] = n2, this.uint16[u2 + 3] = i2, this.uint16[u2 + 4] = s2, this.uint16[u2 + 5] = o2, this.uint16[u2 + 6] = a2, this.uint16[u2 + 7] = l2, t2;\n }\n }\n uo.prototype.bytesPerElement = 16, us(\"StructArrayLayout8ui16\", uo);\n class co extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2) {\n const p2 = this.length;\n return this.resize(p2 + 1), this.emplace(p2, t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2) {\n const f2 = 12 * t2;\n return this.int16[f2 + 0] = e2, this.int16[f2 + 1] = r2, this.int16[f2 + 2] = n2, this.int16[f2 + 3] = i2, this.uint16[f2 + 4] = s2, this.uint16[f2 + 5] = o2, this.uint16[f2 + 6] = a2, this.uint16[f2 + 7] = l2, this.int16[f2 + 8] = u2, this.int16[f2 + 9] = c2, this.int16[f2 + 10] = h2, this.int16[f2 + 11] = p2, t2;\n }\n }\n co.prototype.bytesPerElement = 24, us(\"StructArrayLayout4i4ui4i24\", co);\n class ho extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2) {\n const n2 = this.length;\n return this.resize(n2 + 1), this.emplace(n2, t2, e2, r2);\n }\n emplace(t2, e2, r2, n2) {\n const i2 = 3 * t2;\n return this.float32[i2 + 0] = e2, this.float32[i2 + 1] = r2, this.float32[i2 + 2] = n2, t2;\n }\n }\n ho.prototype.bytesPerElement = 12, us(\"StructArrayLayout3f12\", ho);\n class po extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);\n }\n emplaceBack(t2) {\n const e2 = this.length;\n return this.resize(e2 + 1), this.emplace(e2, t2);\n }\n emplace(t2, e2) {\n return this.uint32[1 * t2 + 0] = e2, t2;\n }\n }\n po.prototype.bytesPerElement = 4, us(\"StructArrayLayout1ul4\", po);\n class fo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = this.length;\n return this.resize(u2 + 1), this.emplace(u2, t2, e2, r2, n2, i2, s2, o2, a2, l2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2) {\n const c2 = 10 * t2, h2 = 5 * t2;\n return this.int16[c2 + 0] = e2, this.int16[c2 + 1] = r2, this.int16[c2 + 2] = n2, this.int16[c2 + 3] = i2, this.int16[c2 + 4] = s2, this.int16[c2 + 5] = o2, this.uint32[h2 + 3] = a2, this.uint16[c2 + 8] = l2, this.uint16[c2 + 9] = u2, t2;\n }\n }\n fo.prototype.bytesPerElement = 20, us(\"StructArrayLayout6i1ul2ui20\", fo);\n class yo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2) {\n const o2 = this.length;\n return this.resize(o2 + 1), this.emplace(o2, t2, e2, r2, n2, i2, s2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = 6 * t2;\n return this.int16[a2 + 0] = e2, this.int16[a2 + 1] = r2, this.int16[a2 + 2] = n2, this.int16[a2 + 3] = i2, this.int16[a2 + 4] = s2, this.int16[a2 + 5] = o2, t2;\n }\n }\n yo.prototype.bytesPerElement = 12, us(\"StructArrayLayout2i2i2i12\", yo);\n class mo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2) {\n const s2 = this.length;\n return this.resize(s2 + 1), this.emplace(s2, t2, e2, r2, n2, i2);\n }\n emplace(t2, e2, r2, n2, i2, s2) {\n const o2 = 4 * t2, a2 = 8 * t2;\n return this.float32[o2 + 0] = e2, this.float32[o2 + 1] = r2, this.float32[o2 + 2] = n2, this.int16[a2 + 6] = i2, this.int16[a2 + 7] = s2, t2;\n }\n }\n mo.prototype.bytesPerElement = 16, us(\"StructArrayLayout2f1f2i16\", mo);\n class go extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2) {\n const o2 = this.length;\n return this.resize(o2 + 1), this.emplace(o2, t2, e2, r2, n2, i2, s2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = 16 * t2, l2 = 4 * t2, u2 = 8 * t2;\n return this.uint8[a2 + 0] = e2, this.uint8[a2 + 1] = r2, this.float32[l2 + 1] = n2, this.float32[l2 + 2] = i2, this.int16[u2 + 6] = s2, this.int16[u2 + 7] = o2, t2;\n }\n }\n go.prototype.bytesPerElement = 16, us(\"StructArrayLayout2ub2f2i16\", go);\n class xo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2) {\n const n2 = this.length;\n return this.resize(n2 + 1), this.emplace(n2, t2, e2, r2);\n }\n emplace(t2, e2, r2, n2) {\n const i2 = 3 * t2;\n return this.uint16[i2 + 0] = e2, this.uint16[i2 + 1] = r2, this.uint16[i2 + 2] = n2, t2;\n }\n }\n xo.prototype.bytesPerElement = 6, us(\"StructArrayLayout3ui6\", xo);\n class vo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2) {\n const g2 = this.length;\n return this.resize(g2 + 1), this.emplace(g2, t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2, g2) {\n const x2 = 24 * t2, v2 = 12 * t2, b2 = 48 * t2;\n return this.int16[x2 + 0] = e2, this.int16[x2 + 1] = r2, this.uint16[x2 + 2] = n2, this.uint16[x2 + 3] = i2, this.uint32[v2 + 2] = s2, this.uint32[v2 + 3] = o2, this.uint32[v2 + 4] = a2, this.uint16[x2 + 10] = l2, this.uint16[x2 + 11] = u2, this.uint16[x2 + 12] = c2, this.float32[v2 + 7] = h2, this.float32[v2 + 8] = p2, this.uint8[b2 + 36] = f2, this.uint8[b2 + 37] = d2, this.uint8[b2 + 38] = y2, this.uint32[v2 + 10] = m2, this.int16[x2 + 22] = g2, t2;\n }\n }\n vo.prototype.bytesPerElement = 48, us(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\", vo);\n class bo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2, g2, x2, v2, b2, w2, _2, A2, S2, k2, E2, T2) {\n const I2 = this.length;\n return this.resize(I2 + 1), this.emplace(I2, t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2, g2, x2, v2, b2, w2, _2, A2, S2, k2, E2, T2);\n }\n emplace(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2, m2, g2, x2, v2, b2, w2, _2, A2, S2, k2, E2, T2, I2) {\n const M2 = 32 * t2, F2 = 16 * t2;\n return this.int16[M2 + 0] = e2, this.int16[M2 + 1] = r2, this.int16[M2 + 2] = n2, this.int16[M2 + 3] = i2, this.int16[M2 + 4] = s2, this.int16[M2 + 5] = o2, this.int16[M2 + 6] = a2, this.int16[M2 + 7] = l2, this.uint16[M2 + 8] = u2, this.uint16[M2 + 9] = c2, this.uint16[M2 + 10] = h2, this.uint16[M2 + 11] = p2, this.uint16[M2 + 12] = f2, this.uint16[M2 + 13] = d2, this.uint16[M2 + 14] = y2, this.uint16[M2 + 15] = m2, this.uint16[M2 + 16] = g2, this.uint16[M2 + 17] = x2, this.uint16[M2 + 18] = v2, this.uint16[M2 + 19] = b2, this.uint16[M2 + 20] = w2, this.uint16[M2 + 21] = _2, this.uint16[M2 + 22] = A2, this.uint32[F2 + 12] = S2, this.float32[F2 + 13] = k2, this.float32[F2 + 14] = E2, this.uint16[M2 + 30] = T2, this.uint16[M2 + 31] = I2, t2;\n }\n }\n bo.prototype.bytesPerElement = 64, us(\"StructArrayLayout8i15ui1ul2f2ui64\", bo);\n class wo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2) {\n const e2 = this.length;\n return this.resize(e2 + 1), this.emplace(e2, t2);\n }\n emplace(t2, e2) {\n return this.float32[1 * t2 + 0] = e2, t2;\n }\n }\n wo.prototype.bytesPerElement = 4, us(\"StructArrayLayout1f4\", wo);\n class _o extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2) {\n const n2 = this.length;\n return this.resize(n2 + 1), this.emplace(n2, t2, e2, r2);\n }\n emplace(t2, e2, r2, n2) {\n const i2 = 3 * t2;\n return this.uint16[6 * t2 + 0] = e2, this.float32[i2 + 1] = r2, this.float32[i2 + 2] = n2, t2;\n }\n }\n _o.prototype.bytesPerElement = 12, us(\"StructArrayLayout1ui2f12\", _o);\n class Ao extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2) {\n const n2 = this.length;\n return this.resize(n2 + 1), this.emplace(n2, t2, e2, r2);\n }\n emplace(t2, e2, r2, n2) {\n const i2 = 4 * t2;\n return this.uint32[2 * t2 + 0] = e2, this.uint16[i2 + 2] = r2, this.uint16[i2 + 3] = n2, t2;\n }\n }\n Ao.prototype.bytesPerElement = 8, us(\"StructArrayLayout1ul2ui8\", Ao);\n class So extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2) {\n const r2 = this.length;\n return this.resize(r2 + 1), this.emplace(r2, t2, e2);\n }\n emplace(t2, e2, r2) {\n const n2 = 2 * t2;\n return this.uint16[n2 + 0] = e2, this.uint16[n2 + 1] = r2, t2;\n }\n }\n So.prototype.bytesPerElement = 4, us(\"StructArrayLayout2ui4\", So);\n class ko extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n emplaceBack(t2) {\n const e2 = this.length;\n return this.resize(e2 + 1), this.emplace(e2, t2);\n }\n emplace(t2, e2) {\n return this.uint16[1 * t2 + 0] = e2, t2;\n }\n }\n ko.prototype.bytesPerElement = 2, us(\"StructArrayLayout1ui2\", ko);\n class Eo extends Qs {\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);\n }\n emplaceBack(t2, e2, r2, n2) {\n const i2 = this.length;\n return this.resize(i2 + 1), this.emplace(i2, t2, e2, r2, n2);\n }\n emplace(t2, e2, r2, n2, i2) {\n const s2 = 4 * t2;\n return this.float32[s2 + 0] = e2, this.float32[s2 + 1] = r2, this.float32[s2 + 2] = n2, this.float32[s2 + 3] = i2, t2;\n }\n }\n Eo.prototype.bytesPerElement = 16, us(\"StructArrayLayout4f16\", Eo);\n class To extends Js {\n get anchorPointX() {\n return this._structArray.int16[this._pos2 + 0];\n }\n get anchorPointY() {\n return this._structArray.int16[this._pos2 + 1];\n }\n get x1() {\n return this._structArray.int16[this._pos2 + 2];\n }\n get y1() {\n return this._structArray.int16[this._pos2 + 3];\n }\n get x2() {\n return this._structArray.int16[this._pos2 + 4];\n }\n get y2() {\n return this._structArray.int16[this._pos2 + 5];\n }\n get featureIndex() {\n return this._structArray.uint32[this._pos4 + 3];\n }\n get sourceLayerIndex() {\n return this._structArray.uint16[this._pos2 + 8];\n }\n get bucketIndex() {\n return this._structArray.uint16[this._pos2 + 9];\n }\n get anchorPoint() {\n return new r(this.anchorPointX, this.anchorPointY);\n }\n }\n To.prototype.size = 20;\n class Io extends fo {\n get(t2) {\n return new To(this, t2);\n }\n }\n us(\"CollisionBoxArray\", Io);\n class Mo extends Js {\n get anchorX() {\n return this._structArray.int16[this._pos2 + 0];\n }\n get anchorY() {\n return this._structArray.int16[this._pos2 + 1];\n }\n get glyphStartIndex() {\n return this._structArray.uint16[this._pos2 + 2];\n }\n get numGlyphs() {\n return this._structArray.uint16[this._pos2 + 3];\n }\n get vertexStartIndex() {\n return this._structArray.uint32[this._pos4 + 2];\n }\n get lineStartIndex() {\n return this._structArray.uint32[this._pos4 + 3];\n }\n get lineLength() {\n return this._structArray.uint32[this._pos4 + 4];\n }\n get segment() {\n return this._structArray.uint16[this._pos2 + 10];\n }\n get lowerSize() {\n return this._structArray.uint16[this._pos2 + 11];\n }\n get upperSize() {\n return this._structArray.uint16[this._pos2 + 12];\n }\n get lineOffsetX() {\n return this._structArray.float32[this._pos4 + 7];\n }\n get lineOffsetY() {\n return this._structArray.float32[this._pos4 + 8];\n }\n get writingMode() {\n return this._structArray.uint8[this._pos1 + 36];\n }\n get placedOrientation() {\n return this._structArray.uint8[this._pos1 + 37];\n }\n set placedOrientation(t2) {\n this._structArray.uint8[this._pos1 + 37] = t2;\n }\n get hidden() {\n return this._structArray.uint8[this._pos1 + 38];\n }\n set hidden(t2) {\n this._structArray.uint8[this._pos1 + 38] = t2;\n }\n get crossTileID() {\n return this._structArray.uint32[this._pos4 + 10];\n }\n set crossTileID(t2) {\n this._structArray.uint32[this._pos4 + 10] = t2;\n }\n get associatedIconIndex() {\n return this._structArray.int16[this._pos2 + 22];\n }\n }\n Mo.prototype.size = 48;\n class Fo extends vo {\n get(t2) {\n return new Mo(this, t2);\n }\n }\n us(\"PlacedSymbolArray\", Fo);\n class Do extends Js {\n get anchorX() {\n return this._structArray.int16[this._pos2 + 0];\n }\n get anchorY() {\n return this._structArray.int16[this._pos2 + 1];\n }\n get rightJustifiedTextSymbolIndex() {\n return this._structArray.int16[this._pos2 + 2];\n }\n get centerJustifiedTextSymbolIndex() {\n return this._structArray.int16[this._pos2 + 3];\n }\n get leftJustifiedTextSymbolIndex() {\n return this._structArray.int16[this._pos2 + 4];\n }\n get verticalPlacedTextSymbolIndex() {\n return this._structArray.int16[this._pos2 + 5];\n }\n get placedIconSymbolIndex() {\n return this._structArray.int16[this._pos2 + 6];\n }\n get verticalPlacedIconSymbolIndex() {\n return this._structArray.int16[this._pos2 + 7];\n }\n get key() {\n return this._structArray.uint16[this._pos2 + 8];\n }\n get textBoxStartIndex() {\n return this._structArray.uint16[this._pos2 + 9];\n }\n get textBoxEndIndex() {\n return this._structArray.uint16[this._pos2 + 10];\n }\n get verticalTextBoxStartIndex() {\n return this._structArray.uint16[this._pos2 + 11];\n }\n get verticalTextBoxEndIndex() {\n return this._structArray.uint16[this._pos2 + 12];\n }\n get iconBoxStartIndex() {\n return this._structArray.uint16[this._pos2 + 13];\n }\n get iconBoxEndIndex() {\n return this._structArray.uint16[this._pos2 + 14];\n }\n get verticalIconBoxStartIndex() {\n return this._structArray.uint16[this._pos2 + 15];\n }\n get verticalIconBoxEndIndex() {\n return this._structArray.uint16[this._pos2 + 16];\n }\n get featureIndex() {\n return this._structArray.uint16[this._pos2 + 17];\n }\n get numHorizontalGlyphVertices() {\n return this._structArray.uint16[this._pos2 + 18];\n }\n get numVerticalGlyphVertices() {\n return this._structArray.uint16[this._pos2 + 19];\n }\n get numIconVertices() {\n return this._structArray.uint16[this._pos2 + 20];\n }\n get numVerticalIconVertices() {\n return this._structArray.uint16[this._pos2 + 21];\n }\n get useRuntimeCollisionCircles() {\n return this._structArray.uint16[this._pos2 + 22];\n }\n get crossTileID() {\n return this._structArray.uint32[this._pos4 + 12];\n }\n set crossTileID(t2) {\n this._structArray.uint32[this._pos4 + 12] = t2;\n }\n get textBoxScale() {\n return this._structArray.float32[this._pos4 + 13];\n }\n get collisionCircleDiameter() {\n return this._structArray.float32[this._pos4 + 14];\n }\n get textAnchorOffsetStartIndex() {\n return this._structArray.uint16[this._pos2 + 30];\n }\n get textAnchorOffsetEndIndex() {\n return this._structArray.uint16[this._pos2 + 31];\n }\n }\n Do.prototype.size = 64;\n class Po extends bo {\n get(t2) {\n return new Do(this, t2);\n }\n }\n us(\"SymbolInstanceArray\", Po);\n class zo extends wo {\n getoffsetX(t2) {\n return this.float32[1 * t2 + 0];\n }\n }\n us(\"GlyphOffsetArray\", zo);\n class Bo extends no {\n getx(t2) {\n return this.int16[3 * t2 + 0];\n }\n gety(t2) {\n return this.int16[3 * t2 + 1];\n }\n gettileUnitDistanceFromAnchor(t2) {\n return this.int16[3 * t2 + 2];\n }\n }\n us(\"SymbolLineVertexArray\", Bo);\n class Vo extends Js {\n get textAnchor() {\n return this._structArray.uint16[this._pos2 + 0];\n }\n get textOffset0() {\n return this._structArray.float32[this._pos4 + 1];\n }\n get textOffset1() {\n return this._structArray.float32[this._pos4 + 2];\n }\n }\n Vo.prototype.size = 12;\n class Co extends _o {\n get(t2) {\n return new Vo(this, t2);\n }\n }\n us(\"TextAnchorOffsetArray\", Co);\n class Lo extends Js {\n get featureIndex() {\n return this._structArray.uint32[this._pos4 + 0];\n }\n get sourceLayerIndex() {\n return this._structArray.uint16[this._pos2 + 2];\n }\n get bucketIndex() {\n return this._structArray.uint16[this._pos2 + 3];\n }\n }\n Lo.prototype.size = 8;\n class Oo extends Ao {\n get(t2) {\n return new Lo(this, t2);\n }\n }\n us(\"FeatureIndexArray\", Oo);\n class Ro extends ro {\n }\n class No extends ro {\n }\n class $o extends ro {\n }\n class Uo extends so {\n }\n class qo extends oo {\n }\n class jo extends ao {\n }\n class Go extends lo {\n }\n class Xo extends uo {\n }\n class Yo extends co {\n }\n class Zo extends ho {\n }\n class Ho extends po {\n }\n class Ko extends yo {\n }\n class Wo extends go {\n }\n class Jo extends xo {\n }\n class Qo extends So {\n }\n const ta = to([{ name: \"a_pos\", components: 2, type: \"Int16\" }], 4), { members: ea } = ta;\n class ra {\n constructor(t2 = []) {\n this._forceNewSegmentOnNextPrepare = false, this.segments = t2;\n }\n prepareSegment(t2, e2, r2, n2) {\n const i2 = this.segments[this.segments.length - 1];\n return t2 > ra.MAX_VERTEX_ARRAY_LENGTH && j(`Max vertices per segment is ${ra.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t2}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${ra.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !i2 || i2.vertexLength + t2 > ra.MAX_VERTEX_ARRAY_LENGTH || i2.sortKey !== n2 ? this.createNewSegment(e2, r2, n2) : i2;\n }\n createNewSegment(t2, e2, r2) {\n const n2 = { vertexOffset: t2.length, primitiveOffset: e2.length, vertexLength: 0, primitiveLength: 0, vaos: {} };\n return void 0 !== r2 && (n2.sortKey = r2), this._forceNewSegmentOnNextPrepare = false, this.segments.push(n2), n2;\n }\n getOrCreateLatestSegment(t2, e2, r2) {\n return this.prepareSegment(0, t2, e2, r2);\n }\n forceNewSegmentOnNextPrepare() {\n this._forceNewSegmentOnNextPrepare = true;\n }\n get() {\n return this.segments;\n }\n destroy() {\n for (const t2 of this.segments) for (const e2 in t2.vaos) t2.vaos[e2].destroy();\n }\n static simpleSegment(t2, e2, r2, n2) {\n return new ra([{ vertexOffset: t2, primitiveOffset: e2, vertexLength: r2, primitiveLength: n2, vaos: {}, sortKey: 0 }]);\n }\n }\n function na(t2, e2) {\n return 256 * (t2 = C(Math.floor(t2), 0, 255)) + C(Math.floor(e2), 0, 255);\n }\n ra.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, us(\"SegmentVector\", ra);\n const ia = to([{ name: \"a_pattern_from\", components: 4, type: \"Uint16\" }, { name: \"a_pattern_to\", components: 4, type: \"Uint16\" }, { name: \"a_pixel_ratio_from\", components: 1, type: \"Uint16\" }, { name: \"a_pixel_ratio_to\", components: 1, type: \"Uint16\" }]), sa = to([{ name: \"a_dasharray_from\", components: 4, type: \"Uint16\" }, { name: \"a_dasharray_to\", components: 4, type: \"Uint16\" }]);\n var oa, aa, la, ua = { exports: {} }, ca = { exports: {} }, ha = { exports: {} }, pa = (function() {\n if (la) return ua.exports;\n la = 1;\n var t2 = (oa || (oa = 1, ca.exports = function(t3, e3) {\n var r2, n2, i2, s2, o2, a2, l2, u2;\n for (n2 = t3.length - (r2 = 3 & t3.length), i2 = e3, o2 = 3432918353, a2 = 461845907, u2 = 0; u2 < n2; ) l2 = 255 & t3.charCodeAt(u2) | (255 & t3.charCodeAt(++u2)) << 8 | (255 & t3.charCodeAt(++u2)) << 16 | (255 & t3.charCodeAt(++u2)) << 24, ++u2, i2 = 27492 + (65535 & (s2 = 5 * (65535 & (i2 = (i2 ^= l2 = (65535 & (l2 = (l2 = (65535 & l2) * o2 + (((l2 >>> 16) * o2 & 65535) << 16) & 4294967295) << 15 | l2 >>> 17)) * a2 + (((l2 >>> 16) * a2 & 65535) << 16) & 4294967295) << 13 | i2 >>> 19)) + ((5 * (i2 >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (s2 >>> 16) & 65535) << 16);\n switch (l2 = 0, r2) {\n case 3:\n l2 ^= (255 & t3.charCodeAt(u2 + 2)) << 16;\n case 2:\n l2 ^= (255 & t3.charCodeAt(u2 + 1)) << 8;\n case 1:\n i2 ^= l2 = (65535 & (l2 = (l2 = (65535 & (l2 ^= 255 & t3.charCodeAt(u2))) * o2 + (((l2 >>> 16) * o2 & 65535) << 16) & 4294967295) << 15 | l2 >>> 17)) * a2 + (((l2 >>> 16) * a2 & 65535) << 16) & 4294967295;\n }\n return i2 ^= t3.length, i2 = 2246822507 * (65535 & (i2 ^= i2 >>> 16)) + ((2246822507 * (i2 >>> 16) & 65535) << 16) & 4294967295, i2 = 3266489909 * (65535 & (i2 ^= i2 >>> 13)) + ((3266489909 * (i2 >>> 16) & 65535) << 16) & 4294967295, (i2 ^= i2 >>> 16) >>> 0;\n }), ca.exports), e2 = (aa || (aa = 1, ha.exports = function(t3, e3) {\n for (var r2, n2 = t3.length, i2 = e3 ^ n2, s2 = 0; n2 >= 4; ) r2 = 1540483477 * (65535 & (r2 = 255 & t3.charCodeAt(s2) | (255 & t3.charCodeAt(++s2)) << 8 | (255 & t3.charCodeAt(++s2)) << 16 | (255 & t3.charCodeAt(++s2)) << 24)) + ((1540483477 * (r2 >>> 16) & 65535) << 16), i2 = 1540483477 * (65535 & i2) + ((1540483477 * (i2 >>> 16) & 65535) << 16) ^ (r2 = 1540483477 * (65535 & (r2 ^= r2 >>> 24)) + ((1540483477 * (r2 >>> 16) & 65535) << 16)), n2 -= 4, ++s2;\n switch (n2) {\n case 3:\n i2 ^= (255 & t3.charCodeAt(s2 + 2)) << 16;\n case 2:\n i2 ^= (255 & t3.charCodeAt(s2 + 1)) << 8;\n case 1:\n i2 = 1540483477 * (65535 & (i2 ^= 255 & t3.charCodeAt(s2))) + ((1540483477 * (i2 >>> 16) & 65535) << 16);\n }\n return i2 = 1540483477 * (65535 & (i2 ^= i2 >>> 13)) + ((1540483477 * (i2 >>> 16) & 65535) << 16), (i2 ^= i2 >>> 15) >>> 0;\n }), ha.exports);\n return ua.exports = t2, ua.exports.murmur3 = t2, ua.exports.murmur2 = e2, ua.exports;\n })(), fa = n(pa);\n class da {\n constructor() {\n this.ids = [], this.positions = [], this.indexed = false;\n }\n add(t2, e2, r2, n2) {\n this.ids.push(ya(t2)), this.positions.push(e2, r2, n2);\n }\n getPositions(t2) {\n if (!this.indexed) throw new Error(\"Trying to get index, but feature positions are not indexed\");\n const e2 = ya(t2);\n let r2 = 0, n2 = this.ids.length - 1;\n for (; r2 < n2; ) {\n const t3 = r2 + n2 >> 1;\n this.ids[t3] >= e2 ? n2 = t3 : r2 = t3 + 1;\n }\n const i2 = [];\n for (; this.ids[r2] === e2; ) i2.push({ index: this.positions[3 * r2], start: this.positions[3 * r2 + 1], end: this.positions[3 * r2 + 2] }), r2++;\n return i2;\n }\n static serialize(t2, e2) {\n const r2 = new Float64Array(t2.ids), n2 = new Uint32Array(t2.positions);\n return ma(r2, n2, 0, r2.length - 1), e2 && e2.push(r2.buffer, n2.buffer), { ids: r2, positions: n2 };\n }\n static deserialize(t2) {\n const e2 = new da();\n return e2.ids = t2.ids, e2.positions = t2.positions, e2.indexed = true, e2;\n }\n }\n function ya(t2) {\n const e2 = +t2;\n return !isNaN(e2) && e2 <= Number.MAX_SAFE_INTEGER ? e2 : fa(String(t2));\n }\n function ma(t2, e2, r2, n2) {\n for (; r2 < n2; ) {\n const i2 = t2[r2 + n2 >> 1];\n let s2 = r2 - 1, o2 = n2 + 1;\n for (; ; ) {\n do {\n s2++;\n } while (t2[s2] < i2);\n do {\n o2--;\n } while (t2[o2] > i2);\n if (s2 >= o2) break;\n ga(t2, s2, o2), ga(e2, 3 * s2, 3 * o2), ga(e2, 3 * s2 + 1, 3 * o2 + 1), ga(e2, 3 * s2 + 2, 3 * o2 + 2);\n }\n o2 - r2 < n2 - o2 ? (ma(t2, e2, r2, o2), r2 = o2 + 1) : (ma(t2, e2, o2 + 1, n2), n2 = o2);\n }\n }\n function ga(t2, e2, r2) {\n const n2 = t2[e2];\n t2[e2] = t2[r2], t2[r2] = n2;\n }\n us(\"FeaturePositionMap\", da);\n class xa {\n constructor(t2, e2) {\n this.gl = t2.gl, this.location = e2;\n }\n }\n class va extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = 0;\n }\n set(t2) {\n this.current !== t2 && (this.current = t2, this.gl.uniform1f(this.location, t2));\n }\n }\n class ba extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = [0, 0, 0, 0];\n }\n set(t2) {\n t2[0] === this.current[0] && t2[1] === this.current[1] && t2[2] === this.current[2] && t2[3] === this.current[3] || (this.current = t2, this.gl.uniform4f(this.location, t2[0], t2[1], t2[2], t2[3]));\n }\n }\n class wa extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = Te.transparent;\n }\n set(t2) {\n t2.r === this.current.r && t2.g === this.current.g && t2.b === this.current.b && t2.a === this.current.a || (this.current = t2, this.gl.uniform4f(this.location, t2.r, t2.g, t2.b, t2.a));\n }\n }\n const _a = new Float32Array(16);\n function Aa(t2) {\n return [na(255 * t2.r, 255 * t2.g), na(255 * t2.b, 255 * t2.a)];\n }\n class Sa {\n constructor(t2, e2, r2) {\n this.value = t2, this.uniformNames = e2.map(((t3) => `u_${t3}`)), this.type = r2;\n }\n setUniform(t2, e2, r2) {\n t2.set(r2.constantOr(this.value));\n }\n getBinding(t2, e2, r2) {\n return \"color\" === this.type ? new wa(t2, e2) : new va(t2, e2);\n }\n }\n class ka {\n constructor(t2, e2) {\n this.uniformNames = e2.map(((t3) => `u_${t3}`)), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1;\n }\n setConstantPatternPositions(t2, e2) {\n this.pixelRatioFrom = e2.pixelRatio, this.pixelRatioTo = t2.pixelRatio, this.patternFrom = e2.tlbr, this.patternTo = t2.tlbr;\n }\n setConstantDashPositions(t2, e2) {\n this.dashTo = [0, t2.y, t2.height, t2.width], this.dashFrom = [0, e2.y, e2.height, e2.width];\n }\n setUniform(t2, e2, r2, n2) {\n let i2 = null;\n \"u_pattern_to\" === n2 ? i2 = this.patternTo : \"u_pattern_from\" === n2 ? i2 = this.patternFrom : \"u_dasharray_to\" === n2 ? i2 = this.dashTo : \"u_dasharray_from\" === n2 ? i2 = this.dashFrom : \"u_pixel_ratio_to\" === n2 ? i2 = this.pixelRatioTo : \"u_pixel_ratio_from\" === n2 && (i2 = this.pixelRatioFrom), null !== i2 && t2.set(i2);\n }\n getBinding(t2, e2, r2) {\n return \"u_pattern\" === r2.substr(0, 9) || \"u_dasharray_\" === r2.substr(0, 12) ? new ba(t2, e2) : new va(t2, e2);\n }\n }\n class Ea {\n constructor(t2, e2, r2, n2) {\n this.expression = t2, this.type = r2, this.maxValue = 0, this.paintVertexAttributes = e2.map(((t3) => ({ name: `a_${t3}`, type: \"Float32\", components: \"color\" === r2 ? 2 : 1, offset: 0 }))), this.paintVertexArray = new n2();\n }\n populatePaintArray(t2, e2, r2) {\n const n2 = this.paintVertexArray.length, i2 = this.expression.evaluate(new Fs(0, r2), e2, {}, r2.canonical, [], r2.formattedSection);\n this.paintVertexArray.resize(t2), this._setPaintValue(n2, t2, i2);\n }\n updatePaintArray(t2, e2, r2, n2, i2) {\n const s2 = this.expression.evaluate(new Fs(0, i2), r2, n2);\n this._setPaintValue(t2, e2, s2);\n }\n _setPaintValue(t2, e2, r2) {\n if (\"color\" === this.type) {\n const n2 = Aa(r2);\n for (let r3 = t2; r3 < e2; r3++) this.paintVertexArray.emplace(r3, n2[0], n2[1]);\n } else {\n for (let n2 = t2; n2 < e2; n2++) this.paintVertexArray.emplace(n2, r2);\n this.maxValue = Math.max(this.maxValue, Math.abs(r2));\n }\n }\n upload(t2) {\n this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = t2.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));\n }\n destroy() {\n this.paintVertexBuffer && this.paintVertexBuffer.destroy();\n }\n }\n class Ta {\n constructor(t2, e2, r2, n2, i2, s2) {\n this.expression = t2, this.uniformNames = e2.map(((t3) => `u_${t3}_t`)), this.type = r2, this.useIntegerZoom = n2, this.zoom = i2, this.maxValue = 0, this.paintVertexAttributes = e2.map(((t3) => ({ name: `a_${t3}`, type: \"Float32\", components: \"color\" === r2 ? 4 : 2, offset: 0 }))), this.paintVertexArray = new s2();\n }\n populatePaintArray(t2, e2, r2) {\n const n2 = this.expression.evaluate(new Fs(this.zoom, r2), e2, {}, r2.canonical, [], r2.formattedSection), i2 = this.expression.evaluate(new Fs(this.zoom + 1, r2), e2, {}, r2.canonical, [], r2.formattedSection), s2 = this.paintVertexArray.length;\n this.paintVertexArray.resize(t2), this._setPaintValue(s2, t2, n2, i2);\n }\n updatePaintArray(t2, e2, r2, n2, i2) {\n const s2 = this.expression.evaluate(new Fs(this.zoom, i2), r2, n2), o2 = this.expression.evaluate(new Fs(this.zoom + 1, i2), r2, n2);\n this._setPaintValue(t2, e2, s2, o2);\n }\n _setPaintValue(t2, e2, r2, n2) {\n if (\"color\" === this.type) {\n const i2 = Aa(r2), s2 = Aa(n2);\n for (let r3 = t2; r3 < e2; r3++) this.paintVertexArray.emplace(r3, i2[0], i2[1], s2[0], s2[1]);\n } else {\n for (let i2 = t2; i2 < e2; i2++) this.paintVertexArray.emplace(i2, r2, n2);\n this.maxValue = Math.max(this.maxValue, Math.abs(r2), Math.abs(n2));\n }\n }\n upload(t2) {\n this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = t2.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));\n }\n destroy() {\n this.paintVertexBuffer && this.paintVertexBuffer.destroy();\n }\n setUniform(t2, e2) {\n const r2 = this.useIntegerZoom ? Math.floor(e2.zoom) : e2.zoom, n2 = C(this.expression.interpolationFactor(r2, this.zoom, this.zoom + 1), 0, 1);\n t2.set(n2);\n }\n getBinding(t2, e2, r2) {\n return new va(t2, e2);\n }\n }\n class Ia {\n constructor(t2, e2, r2, n2, i2, s2) {\n this.expression = t2, this.type = e2, this.useIntegerZoom = r2, this.zoom = n2, this.layerId = s2, this.zoomInPaintVertexArray = new i2(), this.zoomOutPaintVertexArray = new i2();\n }\n populatePaintArray(t2, e2, r2) {\n const n2 = this.zoomInPaintVertexArray.length;\n this.zoomInPaintVertexArray.resize(t2), this.zoomOutPaintVertexArray.resize(t2), this._setPaintValues(n2, t2, this.getPositionIds(e2), r2);\n }\n updatePaintArray(t2, e2, r2, n2, i2) {\n this._setPaintValues(t2, e2, this.getPositionIds(r2), i2);\n }\n _setPaintValues(t2, e2, r2, n2) {\n const i2 = this.getPositions(n2);\n if (!i2 || !r2) return;\n const s2 = i2[r2.min], o2 = i2[r2.mid], a2 = i2[r2.max];\n if (s2 && o2 && a2) for (let r3 = t2; r3 < e2; r3++) this.emplace(this.zoomInPaintVertexArray, r3, o2, s2), this.emplace(this.zoomOutPaintVertexArray, r3, o2, a2);\n }\n upload(t2) {\n if (this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer) {\n const e2 = this.getVertexAttributes();\n this.zoomInPaintVertexBuffer = t2.createVertexBuffer(this.zoomInPaintVertexArray, e2, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = t2.createVertexBuffer(this.zoomOutPaintVertexArray, e2, this.expression.isStateDependent);\n }\n }\n destroy() {\n this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();\n }\n }\n class Ma extends Ia {\n getPositions(t2) {\n return t2.imagePositions;\n }\n getPositionIds(t2) {\n return t2.patterns && t2.patterns[this.layerId];\n }\n getVertexAttributes() {\n return ia.members;\n }\n emplace(t2, e2, r2, n2) {\n t2.emplace(e2, r2.tlbr[0], r2.tlbr[1], r2.tlbr[2], r2.tlbr[3], n2.tlbr[0], n2.tlbr[1], n2.tlbr[2], n2.tlbr[3], r2.pixelRatio, n2.pixelRatio);\n }\n }\n class Fa extends Ia {\n getPositions(t2) {\n return t2.dashPositions;\n }\n getPositionIds(t2) {\n return t2.dashes && t2.dashes[this.layerId];\n }\n getVertexAttributes() {\n return sa.members;\n }\n emplace(t2, e2, r2, n2) {\n t2.emplace(e2, 0, r2.y, r2.height, r2.width, 0, n2.y, n2.height, n2.width);\n }\n }\n class Da {\n constructor(t2, e2, r2) {\n this.binders = {}, this._buffers = [];\n const n2 = [];\n for (const i2 in t2.paint._values) {\n if (!r2(i2)) continue;\n const s2 = t2.paint.get(i2);\n if (!(s2 instanceof Rs && qn(s2.property.specification))) continue;\n const o2 = za(i2, t2.type), a2 = s2.value, l2 = s2.property.specification.type, u2 = s2.property.useIntegerZoom, c2 = s2.property.specification[\"property-type\"], h2 = \"cross-faded\" === c2 || \"cross-faded-data-driven\" === c2;\n if (\"constant\" === a2.kind) this.binders[i2] = h2 ? new ka(a2.value, o2) : new Sa(a2.value, o2, l2), n2.push(`/u_${i2}`);\n else if (\"source\" === a2.kind || h2) {\n const r3 = Ba(i2, l2, \"source\");\n this.binders[i2] = h2 ? \"line-dasharray\" === i2 ? new Fa(a2, l2, u2, e2, r3, t2.id) : new Ma(a2, l2, u2, e2, r3, t2.id) : new Ea(a2, o2, l2, r3), n2.push(`/a_${i2}`);\n } else {\n const t3 = Ba(i2, l2, \"composite\");\n this.binders[i2] = new Ta(a2, o2, l2, u2, e2, t3), n2.push(`/z_${i2}`);\n }\n }\n this.cacheKey = n2.sort().join(\"\");\n }\n getMaxValue(t2) {\n const e2 = this.binders[t2];\n return e2 instanceof Ea || e2 instanceof Ta ? e2.maxValue : 0;\n }\n populatePaintArrays(t2, e2, r2) {\n for (const n2 in this.binders) {\n const i2 = this.binders[n2];\n (i2 instanceof Ea || i2 instanceof Ta || i2 instanceof Ia) && i2.populatePaintArray(t2, e2, r2);\n }\n }\n setConstantPatternPositions(t2, e2) {\n for (const r2 in this.binders) {\n const n2 = this.binders[r2];\n n2 instanceof ka && n2.setConstantPatternPositions(t2, e2);\n }\n }\n setConstantDashPositions(t2, e2) {\n for (const r2 in this.binders) {\n const n2 = this.binders[r2];\n n2 instanceof ka && n2.setConstantDashPositions(t2, e2);\n }\n }\n updatePaintArrays(t2, e2, r2, n2, i2) {\n let s2 = false;\n for (const o2 in t2) {\n const a2 = e2.getPositions(o2);\n for (const e3 of a2) {\n const a3 = r2.feature(e3.index);\n for (const r3 in this.binders) {\n const l2 = this.binders[r3];\n if ((l2 instanceof Ea || l2 instanceof Ta || l2 instanceof Ia) && true === l2.expression.isStateDependent) {\n const u2 = n2.paint.get(r3);\n l2.expression = u2.value, l2.updatePaintArray(e3.start, e3.end, a3, t2[o2], i2), s2 = true;\n }\n }\n }\n }\n return s2;\n }\n defines() {\n const t2 = [];\n for (const e2 in this.binders) {\n const r2 = this.binders[e2];\n (r2 instanceof Sa || r2 instanceof ka) && t2.push(...r2.uniformNames.map(((t3) => `#define HAS_UNIFORM_${t3}`)));\n }\n return t2;\n }\n getBinderAttributes() {\n const t2 = [];\n for (const e2 in this.binders) {\n const r2 = this.binders[e2];\n if (r2 instanceof Ea || r2 instanceof Ta) for (let e3 = 0; e3 < r2.paintVertexAttributes.length; e3++) t2.push(r2.paintVertexAttributes[e3].name);\n else if (r2 instanceof Ia) {\n const e3 = r2.getVertexAttributes();\n for (const r3 of e3) t2.push(r3.name);\n }\n }\n return t2;\n }\n getBinderUniforms() {\n const t2 = [];\n for (const e2 in this.binders) {\n const r2 = this.binders[e2];\n if (r2 instanceof Sa || r2 instanceof ka || r2 instanceof Ta) for (const e3 of r2.uniformNames) t2.push(e3);\n }\n return t2;\n }\n getPaintVertexBuffers() {\n return this._buffers;\n }\n getUniforms(t2, e2) {\n const r2 = [];\n for (const n2 in this.binders) {\n const i2 = this.binders[n2];\n if (i2 instanceof Sa || i2 instanceof ka || i2 instanceof Ta) {\n for (const s2 of i2.uniformNames) if (e2[s2]) {\n const o2 = i2.getBinding(t2, e2[s2], s2);\n r2.push({ name: s2, property: n2, binding: o2 });\n }\n }\n }\n return r2;\n }\n setUniforms(t2, e2, r2, n2) {\n for (const { name: t3, property: i2, binding: s2 } of e2) this.binders[i2].setUniform(s2, n2, r2.get(i2), t3);\n }\n updatePaintBuffers(t2) {\n this._buffers = [];\n for (const e2 in this.binders) {\n const r2 = this.binders[e2];\n if (t2 && r2 instanceof Ia) {\n const e3 = 2 === t2.fromScale ? r2.zoomInPaintVertexBuffer : r2.zoomOutPaintVertexBuffer;\n e3 && this._buffers.push(e3);\n } else (r2 instanceof Ea || r2 instanceof Ta) && r2.paintVertexBuffer && this._buffers.push(r2.paintVertexBuffer);\n }\n }\n upload(t2) {\n for (const e2 in this.binders) {\n const r2 = this.binders[e2];\n (r2 instanceof Ea || r2 instanceof Ta || r2 instanceof Ia) && r2.upload(t2);\n }\n this.updatePaintBuffers();\n }\n destroy() {\n for (const t2 in this.binders) {\n const e2 = this.binders[t2];\n (e2 instanceof Ea || e2 instanceof Ta || e2 instanceof Ia) && e2.destroy();\n }\n }\n }\n class Pa {\n constructor(t2, e2, r2 = () => true) {\n this.programConfigurations = {};\n for (const n2 of t2) this.programConfigurations[n2.id] = new Da(n2, e2, r2);\n this.needsUpload = false, this._featureMap = new da(), this._bufferOffset = 0;\n }\n populatePaintArrays(t2, e2, r2, n2) {\n for (const r3 in this.programConfigurations) this.programConfigurations[r3].populatePaintArrays(t2, e2, n2);\n void 0 !== e2.id && this._featureMap.add(e2.id, r2, this._bufferOffset, t2), this._bufferOffset = t2, this.needsUpload = true;\n }\n updatePaintArrays(t2, e2, r2, n2) {\n for (const i2 of r2) this.needsUpload = this.programConfigurations[i2.id].updatePaintArrays(t2, this._featureMap, e2, i2, n2) || this.needsUpload;\n }\n get(t2) {\n return this.programConfigurations[t2];\n }\n upload(t2) {\n if (this.needsUpload) {\n for (const e2 in this.programConfigurations) this.programConfigurations[e2].upload(t2);\n this.needsUpload = false;\n }\n }\n destroy() {\n for (const t2 in this.programConfigurations) this.programConfigurations[t2].destroy();\n }\n }\n function za(t2, e2) {\n return { \"text-opacity\": [\"opacity\"], \"icon-opacity\": [\"opacity\"], \"text-color\": [\"fill_color\"], \"icon-color\": [\"fill_color\"], \"text-halo-color\": [\"halo_color\"], \"icon-halo-color\": [\"halo_color\"], \"text-halo-blur\": [\"halo_blur\"], \"icon-halo-blur\": [\"halo_blur\"], \"text-halo-width\": [\"halo_width\"], \"icon-halo-width\": [\"halo_width\"], \"line-gap-width\": [\"gapwidth\"], \"line-dasharray\": [\"dasharray_to\", \"dasharray_from\"], \"line-pattern\": [\"pattern_to\", \"pattern_from\", \"pixel_ratio_to\", \"pixel_ratio_from\"], \"fill-pattern\": [\"pattern_to\", \"pattern_from\", \"pixel_ratio_to\", \"pixel_ratio_from\"], \"fill-extrusion-pattern\": [\"pattern_to\", \"pattern_from\", \"pixel_ratio_to\", \"pixel_ratio_from\"] }[t2] || [t2.replace(`${e2}-`, \"\").replace(/-/g, \"_\")];\n }\n function Ba(t2, e2, r2) {\n const n2 = { color: { source: ao, composite: Eo }, number: { source: wo, composite: ao } }, i2 = (function(t3) {\n return { \"line-pattern\": { source: Go, composite: Go }, \"fill-pattern\": { source: Go, composite: Go }, \"fill-extrusion-pattern\": { source: Go, composite: Go }, \"line-dasharray\": { source: Xo, composite: Xo } }[t3];\n })(t2);\n return i2 && i2[r2] || n2[e2][r2];\n }\n us(\"ConstantBinder\", Sa), us(\"CrossFadedConstantBinder\", ka), us(\"SourceExpressionBinder\", Ea), us(\"CrossFadedPatternBinder\", Ma), us(\"CrossFadedDasharrayBinder\", Fa), us(\"CompositeExpressionBinder\", Ta), us(\"ProgramConfiguration\", Da, { omit: [\"_buffers\"] }), us(\"ProgramConfigurationSet\", Pa);\n const Va = Math.pow(2, 14) - 1, Ca = -Va - 1;\n function La(t2) {\n const e2 = M / t2.extent, r2 = t2.loadGeometry();\n for (let t3 = 0; t3 < r2.length; t3++) {\n const n2 = r2[t3];\n for (let t4 = 0; t4 < n2.length; t4++) {\n const r3 = n2[t4], i2 = Math.round(r3.x * e2), s2 = Math.round(r3.y * e2);\n r3.x = C(i2, Ca, Va), r3.y = C(s2, Ca, Va), (i2 < r3.x || i2 > r3.x + 1 || s2 < r3.y || s2 > r3.y + 1) && j(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\");\n }\n }\n return r2;\n }\n function Oa(t2, e2) {\n return { type: t2.type, id: t2.id, properties: t2.properties, geometry: e2 ? La(t2) : [] };\n }\n const Ra = -32768;\n function Na(t2, e2, r2, n2, i2) {\n t2.emplaceBack(Ra + 8 * e2 + n2, Ra + 8 * r2 + i2);\n }\n class $a {\n constructor(t2) {\n this.zoom = t2.zoom, this.overscaling = t2.overscaling, this.layers = t2.layers, this.layerIds = this.layers.map(((t3) => t3.id)), this.index = t2.index, this.hasDependencies = false, this.layoutVertexArray = new No(), this.indexArray = new Jo(), this.segments = new ra(), this.programConfigurations = new Pa(t2.layers, t2.zoom), this.stateDependentLayerIds = this.layers.filter(((t3) => t3.isStateDependent())).map(((t3) => t3.id));\n }\n populate(t2, e2, r2) {\n const n2 = this.layers[0], i2 = [];\n let s2 = null, o2 = false, a2 = \"heatmap\" === n2.type;\n if (\"circle\" === n2.type) {\n const t3 = n2;\n s2 = t3.layout.get(\"circle-sort-key\"), o2 = !s2.isConstant(), a2 = a2 || \"map\" === t3.paint.get(\"circle-pitch-alignment\");\n }\n const l2 = a2 ? e2.subdivisionGranularity.circle : 1;\n for (const { feature: e3, id: n3, index: a3, sourceLayerIndex: l3 } of t2) {\n const t3 = this.layers[0]._featureFilter.needGeometry, u2 = Oa(e3, t3);\n if (!this.layers[0]._featureFilter.filter(new Fs(this.zoom), u2, r2)) continue;\n const c2 = o2 ? s2.evaluate(u2, {}, r2) : void 0, h2 = { id: n3, properties: e3.properties, type: e3.type, sourceLayerIndex: l3, index: a3, geometry: t3 ? u2.geometry : La(e3), patterns: {}, sortKey: c2 };\n i2.push(h2);\n }\n o2 && i2.sort(((t3, e3) => t3.sortKey - e3.sortKey));\n for (const n3 of i2) {\n const { geometry: i3, index: s3, sourceLayerIndex: o3 } = n3, a3 = t2[s3].feature;\n this.addFeature(n3, i3, s3, r2, l2), e2.featureIndex.insert(a3, i3, s3, o3, this.index);\n }\n }\n update(t2, e2, r2) {\n this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t2, e2, this.stateDependentLayers, { imagePositions: r2 });\n }\n isEmpty() {\n return 0 === this.layoutVertexArray.length;\n }\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n upload(t2) {\n this.uploaded || (this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, ea), this.indexBuffer = t2.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(t2), this.uploaded = true;\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());\n }\n addFeature(t2, e2, r2, n2, i2 = 1) {\n let s2;\n switch (i2) {\n case 1:\n s2 = [0, 7];\n break;\n case 3:\n s2 = [0, 2, 5, 7];\n break;\n case 5:\n s2 = [0, 1, 3, 4, 6, 7];\n break;\n case 7:\n s2 = [0, 1, 2, 3, 4, 5, 6, 7];\n break;\n default:\n throw new Error(`Invalid circle bucket granularity: ${i2}; valid values are 1, 3, 5, 7.`);\n }\n const o2 = s2.length;\n for (const r3 of e2) for (const e3 of r3) {\n const r4 = e3.x, n3 = e3.y;\n if (r4 < 0 || r4 >= M || n3 < 0 || n3 >= M) continue;\n const i3 = this.segments.prepareSegment(o2 * o2, this.layoutVertexArray, this.indexArray, t2.sortKey), a2 = i3.vertexLength;\n for (let t3 = 0; t3 < o2; t3++) for (let e4 = 0; e4 < o2; e4++) Na(this.layoutVertexArray, r4, n3, s2[e4], s2[t3]);\n for (let t3 = 0; t3 < o2 - 1; t3++) for (let e4 = 0; e4 < o2 - 1; e4++) {\n const r5 = a2 + t3 * o2 + e4, n4 = a2 + (t3 + 1) * o2 + e4;\n this.indexArray.emplaceBack(r5, n4 + 1, r5 + 1), this.indexArray.emplaceBack(r5, n4, n4 + 1);\n }\n i3.vertexLength += o2 * o2, i3.primitiveLength += (o2 - 1) * (o2 - 1) * 2;\n }\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t2, r2, { imagePositions: {}, canonical: n2 });\n }\n }\n function Ua(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) if (Wa(e2, t2[r2])) return true;\n for (let r2 = 0; r2 < e2.length; r2++) if (Wa(t2, e2[r2])) return true;\n return !!Xa(t2, e2);\n }\n function qa(t2, e2, r2) {\n return !!Wa(t2, e2) || !!Za(e2, t2, r2);\n }\n function ja(t2, e2) {\n if (1 === t2.length) return Ka(e2, t2[0]);\n for (let r2 = 0; r2 < e2.length; r2++) {\n const n2 = e2[r2];\n for (let e3 = 0; e3 < n2.length; e3++) if (Wa(t2, n2[e3])) return true;\n }\n for (let r2 = 0; r2 < t2.length; r2++) if (Ka(e2, t2[r2])) return true;\n for (let r2 = 0; r2 < e2.length; r2++) if (Xa(t2, e2[r2])) return true;\n return false;\n }\n function Ga(t2, e2, r2) {\n if (t2.length > 1) {\n if (Xa(t2, e2)) return true;\n for (let n2 = 0; n2 < e2.length; n2++) if (Za(e2[n2], t2, r2)) return true;\n }\n for (let n2 = 0; n2 < t2.length; n2++) if (Za(t2[n2], e2, r2)) return true;\n return false;\n }\n function Xa(t2, e2) {\n if (0 === t2.length || 0 === e2.length) return false;\n for (let r2 = 0; r2 < t2.length - 1; r2++) {\n const n2 = t2[r2], i2 = t2[r2 + 1];\n for (let t3 = 0; t3 < e2.length - 1; t3++) if (Ya(n2, i2, e2[t3], e2[t3 + 1])) return true;\n }\n return false;\n }\n function Ya(t2, e2, r2, n2) {\n return G(t2, r2, n2) !== G(e2, r2, n2) && G(t2, e2, r2) !== G(t2, e2, n2);\n }\n function Za(t2, e2, r2) {\n const n2 = r2 * r2;\n if (1 === e2.length) return t2.distSqr(e2[0]) < n2;\n for (let r3 = 1; r3 < e2.length; r3++) if (Ha(t2, e2[r3 - 1], e2[r3]) < n2) return true;\n return false;\n }\n function Ha(t2, e2, r2) {\n const n2 = e2.distSqr(r2);\n if (0 === n2) return t2.distSqr(e2);\n const i2 = ((t2.x - e2.x) * (r2.x - e2.x) + (t2.y - e2.y) * (r2.y - e2.y)) / n2;\n return t2.distSqr(i2 < 0 ? e2 : i2 > 1 ? r2 : r2.sub(e2)._mult(i2)._add(e2));\n }\n function Ka(t2, e2) {\n let r2, n2, i2, s2 = false;\n for (let o2 = 0; o2 < t2.length; o2++) {\n r2 = t2[o2];\n for (let t3 = 0, o3 = r2.length - 1; t3 < r2.length; o3 = t3++) n2 = r2[t3], i2 = r2[o3], n2.y > e2.y != i2.y > e2.y && e2.x < (i2.x - n2.x) * (e2.y - n2.y) / (i2.y - n2.y) + n2.x && (s2 = !s2);\n }\n return s2;\n }\n function Wa(t2, e2) {\n let r2 = false;\n for (let n2 = 0, i2 = t2.length - 1; n2 < t2.length; i2 = n2++) {\n const s2 = t2[n2], o2 = t2[i2];\n s2.y > e2.y != o2.y > e2.y && e2.x < (o2.x - s2.x) * (e2.y - s2.y) / (o2.y - s2.y) + s2.x && (r2 = !r2);\n }\n return r2;\n }\n function Ja(t2, e2, r2) {\n const n2 = r2[0], i2 = r2[2];\n if (t2.x < n2.x && e2.x < n2.x || t2.x > i2.x && e2.x > i2.x || t2.y < n2.y && e2.y < n2.y || t2.y > i2.y && e2.y > i2.y) return false;\n const s2 = G(t2, e2, r2[0]);\n return s2 !== G(t2, e2, r2[1]) || s2 !== G(t2, e2, r2[2]) || s2 !== G(t2, e2, r2[3]);\n }\n function Qa(t2, e2, r2) {\n const n2 = e2.paint.get(t2).value;\n return \"constant\" === n2.kind ? n2.value : r2.programConfigurations.get(e2.id).getMaxValue(t2);\n }\n function tl(t2) {\n return Math.sqrt(t2[0] * t2[0] + t2[1] * t2[1]);\n }\n function el(t2, e2, n2, i2, s2) {\n if (!e2[0] && !e2[1]) return t2;\n const o2 = r.convert(e2)._mult(s2);\n \"viewport\" === n2 && o2._rotate(-i2);\n const a2 = [];\n for (let e3 = 0; e3 < t2.length; e3++) a2.push(t2[e3].sub(o2));\n return a2;\n }\n function rl(t2) {\n const e2 = [];\n for (let r2 = 0; r2 < t2.length; r2++) {\n const n2 = t2[r2], i2 = e2.at(-1);\n (0 === r2 || i2 && !n2.equals(i2)) && e2.push(n2);\n }\n return e2;\n }\n function nl({ queryGeometry: t2, size: e2 }, r2) {\n return qa(t2, r2, e2);\n }\n function il({ queryGeometry: t2, size: e2, transform: r2, unwrappedTileID: n2, getElevation: i2 }, s2) {\n return qa(t2, s2, e2 * (r2.projectTileCoordinates(s2.x, s2.y, n2, i2).signedDistanceFromCamera / r2.cameraToCenterDistance));\n }\n function sl({ queryGeometry: t2, size: e2, transform: r2, unwrappedTileID: n2, getElevation: i2 }, s2) {\n const o2 = r2.projectTileCoordinates(s2.x, s2.y, n2, i2).signedDistanceFromCamera, a2 = e2 * (r2.cameraToCenterDistance / o2);\n return qa(t2, ll(s2, r2, n2, i2), a2);\n }\n function ol({ queryGeometry: t2, size: e2, transform: r2, unwrappedTileID: n2, getElevation: i2 }, s2) {\n return qa(t2, ll(s2, r2, n2, i2), e2);\n }\n function al({ queryGeometry: t2, size: e2, transform: r2, unwrappedTileID: n2, getElevation: i2, pitchAlignment: s2 = \"map\", pitchScale: o2 = \"map\" }, a2) {\n const l2 = \"map\" === s2 ? \"map\" === o2 ? nl : il : \"map\" === o2 ? sl : ol, u2 = { queryGeometry: t2, size: e2, transform: r2, unwrappedTileID: n2, getElevation: i2 };\n for (const t3 of a2) for (const e3 of t3) if (l2(u2, e3)) return true;\n return false;\n }\n function ll(t2, e2, n2, i2) {\n const s2 = e2.projectTileCoordinates(t2.x, t2.y, n2, i2).point;\n return new r((0.5 * s2.x + 0.5) * e2.width, (0.5 * -s2.y + 0.5) * e2.height);\n }\n let ul, cl;\n us(\"CircleBucket\", $a, { omit: [\"layers\"] });\n var hl = { get paint() {\n return cl = cl || new Xs({ \"circle-radius\": new Us(vt.paint_circle[\"circle-radius\"]), \"circle-color\": new Us(vt.paint_circle[\"circle-color\"]), \"circle-blur\": new Us(vt.paint_circle[\"circle-blur\"]), \"circle-opacity\": new Us(vt.paint_circle[\"circle-opacity\"]), \"circle-translate\": new $s(vt.paint_circle[\"circle-translate\"]), \"circle-translate-anchor\": new $s(vt.paint_circle[\"circle-translate-anchor\"]), \"circle-pitch-scale\": new $s(vt.paint_circle[\"circle-pitch-scale\"]), \"circle-pitch-alignment\": new $s(vt.paint_circle[\"circle-pitch-alignment\"]), \"circle-stroke-width\": new Us(vt.paint_circle[\"circle-stroke-width\"]), \"circle-stroke-color\": new Us(vt.paint_circle[\"circle-stroke-color\"]), \"circle-stroke-opacity\": new Us(vt.paint_circle[\"circle-stroke-opacity\"]) });\n }, get layout() {\n return ul = ul || new Xs({ \"circle-sort-key\": new Us(vt.layout_circle[\"circle-sort-key\"]) });\n } };\n class pl extends Ys {\n constructor(t2, e2) {\n super(t2, hl, e2);\n }\n createBucket(t2) {\n return new $a(t2);\n }\n queryRadius(t2) {\n const e2 = t2;\n return Qa(\"circle-radius\", this, e2) + Qa(\"circle-stroke-width\", this, e2) + tl(this.paint.get(\"circle-translate\"));\n }\n queryIntersectsFeature({ queryGeometry: t2, feature: e2, featureState: r2, geometry: n2, transform: i2, pixelsToTileUnits: s2, unwrappedTileID: o2, getElevation: a2 }) {\n const l2 = el(t2, this.paint.get(\"circle-translate\"), this.paint.get(\"circle-translate-anchor\"), -i2.bearingInRadians, s2), u2 = this.paint.get(\"circle-radius\").evaluate(e2, r2) + this.paint.get(\"circle-stroke-width\").evaluate(e2, r2), c2 = this.paint.get(\"circle-pitch-scale\"), h2 = this.paint.get(\"circle-pitch-alignment\");\n let p2, f2;\n return \"map\" === h2 ? (p2 = l2, f2 = u2 * s2) : (p2 = (function(t3, e3, r3, n3) {\n return t3.map(((t4) => ll(t4, e3, r3, n3)));\n })(l2, i2, o2, a2), f2 = u2), al({ queryGeometry: p2, size: f2, transform: i2, unwrappedTileID: o2, getElevation: a2, pitchAlignment: h2, pitchScale: c2 }, n2);\n }\n }\n class fl extends $a {\n }\n let dl;\n us(\"HeatmapBucket\", fl, { omit: [\"layers\"] });\n var yl = { get paint() {\n return dl = dl || new Xs({ \"heatmap-radius\": new Us(vt.paint_heatmap[\"heatmap-radius\"]), \"heatmap-weight\": new Us(vt.paint_heatmap[\"heatmap-weight\"]), \"heatmap-intensity\": new $s(vt.paint_heatmap[\"heatmap-intensity\"]), \"heatmap-color\": new Gs(vt.paint_heatmap[\"heatmap-color\"]), \"heatmap-opacity\": new $s(vt.paint_heatmap[\"heatmap-opacity\"]) });\n } };\n function ml(t2, { width: e2, height: r2 }, n2, i2) {\n if (i2) {\n if (i2 instanceof Uint8ClampedArray) i2 = new Uint8Array(i2.buffer);\n else if (i2.length !== e2 * r2 * n2) throw new RangeError(`mismatched image size. expected: ${i2.length} but got: ${e2 * r2 * n2}`);\n } else i2 = new Uint8Array(e2 * r2 * n2);\n return t2.width = e2, t2.height = r2, t2.data = i2, t2;\n }\n function gl(t2, { width: e2, height: r2 }, n2) {\n if (e2 === t2.width && r2 === t2.height) return;\n const i2 = ml({}, { width: e2, height: r2 }, n2);\n xl(t2, i2, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(t2.width, e2), height: Math.min(t2.height, r2) }, n2), t2.width = e2, t2.height = r2, t2.data = i2.data;\n }\n function xl(t2, e2, r2, n2, i2, s2) {\n if (0 === i2.width || 0 === i2.height) return e2;\n if (i2.width > t2.width || i2.height > t2.height || r2.x > t2.width - i2.width || r2.y > t2.height - i2.height) throw new RangeError(\"out of range source coordinates for image copy\");\n if (i2.width > e2.width || i2.height > e2.height || n2.x > e2.width - i2.width || n2.y > e2.height - i2.height) throw new RangeError(\"out of range destination coordinates for image copy\");\n const o2 = t2.data, a2 = e2.data;\n if (o2 === a2) throw new Error(\"srcData equals dstData, so image is already copied\");\n for (let l2 = 0; l2 < i2.height; l2++) {\n const u2 = ((r2.y + l2) * t2.width + r2.x) * s2, c2 = ((n2.y + l2) * e2.width + n2.x) * s2;\n for (let t3 = 0; t3 < i2.width * s2; t3++) a2[c2 + t3] = o2[u2 + t3];\n }\n return e2;\n }\n class vl {\n constructor(t2, e2) {\n ml(this, t2, 1, e2);\n }\n resize(t2) {\n gl(this, t2, 1);\n }\n clone() {\n return new vl({ width: this.width, height: this.height }, new Uint8Array(this.data));\n }\n static copy(t2, e2, r2, n2, i2) {\n xl(t2, e2, r2, n2, i2, 1);\n }\n }\n class bl {\n constructor(t2, e2) {\n ml(this, t2, 4, e2);\n }\n resize(t2) {\n gl(this, t2, 4);\n }\n replace(t2, e2) {\n e2 ? this.data.set(t2) : this.data = t2 instanceof Uint8ClampedArray ? new Uint8Array(t2.buffer) : t2;\n }\n clone() {\n return new bl({ width: this.width, height: this.height }, new Uint8Array(this.data));\n }\n static copy(t2, e2, r2, n2, i2) {\n xl(t2, e2, r2, n2, i2, 4);\n }\n setPixel(t2, e2, r2) {\n const n2 = 4 * (t2 * this.width + e2);\n this.data[n2 + 0] = Math.round(255 * r2.r / r2.a), this.data[n2 + 1] = Math.round(255 * r2.g / r2.a), this.data[n2 + 2] = Math.round(255 * r2.b / r2.a), this.data[n2 + 3] = Math.round(255 * r2.a);\n }\n }\n function wl(t2) {\n const e2 = {}, r2 = t2.resolution || 256, n2 = t2.clips ? t2.clips.length : 1, i2 = t2.image || new bl({ width: r2, height: n2 });\n if (Math.log(r2) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${r2}`);\n const s2 = (n3, s3, o2) => {\n e2[t2.evaluationKey] = o2;\n const a2 = t2.expression.evaluate(e2);\n i2.setPixel(n3 / 4 / r2, s3 / 4, a2);\n };\n if (t2.clips) for (let e3 = 0, i3 = 0; e3 < n2; ++e3, i3 += 4 * r2) for (let n3 = 0, o2 = 0; n3 < r2; n3++, o2 += 4) {\n const a2 = n3 / (r2 - 1), { start: l2, end: u2 } = t2.clips[e3];\n s2(i3, o2, l2 * (1 - a2) + u2 * a2);\n }\n else for (let t3 = 0, e3 = 0; t3 < r2; t3++, e3 += 4) s2(0, e3, t3 / (r2 - 1));\n return i2;\n }\n us(\"AlphaImage\", vl), us(\"RGBAImage\", bl);\n const _l = \"big-fb\";\n class Al extends Ys {\n createBucket(t2) {\n return new fl(t2);\n }\n constructor(t2, e2) {\n super(t2, yl, e2), this.heatmapFbos = /* @__PURE__ */ new Map(), this._updateColorRamp();\n }\n _handleSpecialPaintPropertyUpdate(t2) {\n \"heatmap-color\" === t2 && this._updateColorRamp();\n }\n _updateColorRamp() {\n this.colorRamp = wl({ expression: this._transitionablePaint._values[\"heatmap-color\"].value.expression, evaluationKey: \"heatmapDensity\", image: this.colorRamp }), this.colorRampTexture = null;\n }\n resize() {\n this.heatmapFbos.has(_l) && this.heatmapFbos.delete(_l);\n }\n queryRadius(t2) {\n return Qa(\"heatmap-radius\", this, t2);\n }\n queryIntersectsFeature({ queryGeometry: t2, feature: e2, featureState: r2, geometry: n2, transform: i2, pixelsToTileUnits: s2, unwrappedTileID: o2, getElevation: a2 }) {\n return al({ queryGeometry: t2, size: this.paint.get(\"heatmap-radius\").evaluate(e2, r2) * s2, transform: i2, unwrappedTileID: o2, getElevation: a2 }, n2);\n }\n hasOffscreenPass() {\n return 0 !== this.paint.get(\"heatmap-opacity\") && \"none\" !== this.visibility;\n }\n }\n let Sl;\n var kl = { get paint() {\n return Sl = Sl || new Xs({ \"hillshade-illumination-direction\": new $s(vt.paint_hillshade[\"hillshade-illumination-direction\"]), \"hillshade-illumination-altitude\": new $s(vt.paint_hillshade[\"hillshade-illumination-altitude\"]), \"hillshade-illumination-anchor\": new $s(vt.paint_hillshade[\"hillshade-illumination-anchor\"]), \"hillshade-exaggeration\": new $s(vt.paint_hillshade[\"hillshade-exaggeration\"]), \"hillshade-shadow-color\": new $s(vt.paint_hillshade[\"hillshade-shadow-color\"]), \"hillshade-highlight-color\": new $s(vt.paint_hillshade[\"hillshade-highlight-color\"]), \"hillshade-accent-color\": new $s(vt.paint_hillshade[\"hillshade-accent-color\"]), \"hillshade-method\": new $s(vt.paint_hillshade[\"hillshade-method\"]) });\n } };\n class El extends Ys {\n constructor(t2, e2) {\n super(t2, kl, e2), this.recalculate({ zoom: 0, zoomHistory: {} }, void 0);\n }\n getIlluminationProperties() {\n let t2 = this.paint.get(\"hillshade-illumination-direction\").values, e2 = this.paint.get(\"hillshade-illumination-altitude\").values, r2 = this.paint.get(\"hillshade-highlight-color\").values, n2 = this.paint.get(\"hillshade-shadow-color\").values;\n const i2 = Math.max(t2.length, e2.length, r2.length, n2.length);\n t2 = t2.concat(Array(i2 - t2.length).fill(t2.at(-1))), e2 = e2.concat(Array(i2 - e2.length).fill(e2.at(-1))), r2 = r2.concat(Array(i2 - r2.length).fill(r2.at(-1))), n2 = n2.concat(Array(i2 - n2.length).fill(n2.at(-1)));\n const s2 = e2.map(tt);\n return { directionRadians: t2.map(tt), altitudeRadians: s2, shadowColor: n2, highlightColor: r2 };\n }\n hasOffscreenPass() {\n return 0 !== this.paint.get(\"hillshade-exaggeration\") && \"none\" !== this.visibility;\n }\n }\n let Tl;\n var Il = { get paint() {\n return Tl = Tl || new Xs({ \"color-relief-opacity\": new $s(vt[\"paint_color-relief\"][\"color-relief-opacity\"]), \"color-relief-color\": new Gs(vt[\"paint_color-relief\"][\"color-relief-color\"]) });\n } };\n class Ml {\n constructor(t2, e2, r2, n2) {\n this.context = t2, this.format = r2, this.texture = t2.gl.createTexture(), this.update(e2, n2);\n }\n update(t2, e2, r2) {\n const { width: n2, height: i2 } = t2, s2 = !(this.size && this.size[0] === n2 && this.size[1] === i2 || r2), { context: o2 } = this, { gl: a2 } = o2;\n if (this.useMipmap = Boolean(e2 && e2.useMipmap), a2.bindTexture(a2.TEXTURE_2D, this.texture), o2.pixelStoreUnpackFlipY.set(false), o2.pixelStoreUnpack.set(1), o2.pixelStoreUnpackPremultiplyAlpha.set(this.format === a2.RGBA && (!e2 || false !== e2.premultiply)), s2) this.size = [n2, i2], t2 instanceof HTMLImageElement || t2 instanceof HTMLCanvasElement || t2 instanceof HTMLVideoElement || t2 instanceof ImageData || Z(t2) ? a2.texImage2D(a2.TEXTURE_2D, 0, this.format, this.format, a2.UNSIGNED_BYTE, t2) : a2.texImage2D(a2.TEXTURE_2D, 0, this.format, n2, i2, 0, this.format, a2.UNSIGNED_BYTE, t2.data);\n else {\n const { x: e3, y: s3 } = r2 || { x: 0, y: 0 };\n t2 instanceof HTMLImageElement || t2 instanceof HTMLCanvasElement || t2 instanceof HTMLVideoElement || t2 instanceof ImageData || Z(t2) ? a2.texSubImage2D(a2.TEXTURE_2D, 0, e3, s3, a2.RGBA, a2.UNSIGNED_BYTE, t2) : a2.texSubImage2D(a2.TEXTURE_2D, 0, e3, s3, n2, i2, a2.RGBA, a2.UNSIGNED_BYTE, t2.data);\n }\n this.useMipmap && this.isSizePowerOfTwo() && a2.generateMipmap(a2.TEXTURE_2D), o2.pixelStoreUnpackFlipY.setDefault(), o2.pixelStoreUnpack.setDefault(), o2.pixelStoreUnpackPremultiplyAlpha.setDefault();\n }\n bind(t2, e2, r2) {\n const { context: n2 } = this, { gl: i2 } = n2;\n i2.bindTexture(i2.TEXTURE_2D, this.texture), r2 !== i2.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (r2 = i2.LINEAR), t2 !== this.filter && (i2.texParameteri(i2.TEXTURE_2D, i2.TEXTURE_MAG_FILTER, t2), i2.texParameteri(i2.TEXTURE_2D, i2.TEXTURE_MIN_FILTER, r2 || t2), this.filter = t2), e2 !== this.wrap && (i2.texParameteri(i2.TEXTURE_2D, i2.TEXTURE_WRAP_S, e2), i2.texParameteri(i2.TEXTURE_2D, i2.TEXTURE_WRAP_T, e2), this.wrap = e2);\n }\n isSizePowerOfTwo() {\n return this.size[0] === this.size[1] && Math.log(this.size[0]) / Math.LN2 % 1 == 0;\n }\n destroy() {\n const { gl: t2 } = this.context;\n t2.deleteTexture(this.texture), this.texture = null;\n }\n }\n class Fl {\n constructor(t2, e2, r2, n2 = 1, i2 = 1, s2 = 1, o2 = 0) {\n if (this.uid = t2, e2.height !== e2.width) throw new RangeError(\"DEM tiles must be square\");\n if (r2 && ![\"mapbox\", \"terrarium\", \"custom\"].includes(r2)) return void j(`\"${r2}\" is not a valid encoding type. Valid types include \"mapbox\", \"terrarium\" and \"custom\".`);\n this.stride = e2.height;\n const a2 = this.dim = e2.height - 2;\n switch (this.data = new Uint32Array(e2.data.buffer), r2) {\n case \"terrarium\":\n this.redFactor = 256, this.greenFactor = 1, this.blueFactor = 1 / 256, this.baseShift = 32768;\n break;\n case \"custom\":\n this.redFactor = n2, this.greenFactor = i2, this.blueFactor = s2, this.baseShift = o2;\n break;\n default:\n this.redFactor = 6553.6, this.greenFactor = 25.6, this.blueFactor = 0.1, this.baseShift = 1e4;\n }\n for (let t3 = 0; t3 < a2; t3++) this.data[this._idx(-1, t3)] = this.data[this._idx(0, t3)], this.data[this._idx(a2, t3)] = this.data[this._idx(a2 - 1, t3)], this.data[this._idx(t3, -1)] = this.data[this._idx(t3, 0)], this.data[this._idx(t3, a2)] = this.data[this._idx(t3, a2 - 1)];\n this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(a2, -1)] = this.data[this._idx(a2 - 1, 0)], this.data[this._idx(-1, a2)] = this.data[this._idx(0, a2 - 1)], this.data[this._idx(a2, a2)] = this.data[this._idx(a2 - 1, a2 - 1)], this.min = Number.MAX_SAFE_INTEGER, this.max = Number.MIN_SAFE_INTEGER;\n for (let t3 = 0; t3 < a2; t3++) for (let e3 = 0; e3 < a2; e3++) {\n const r3 = this.get(t3, e3);\n r3 > this.max && (this.max = r3), r3 < this.min && (this.min = r3);\n }\n }\n get(t2, e2) {\n const r2 = new Uint8Array(this.data.buffer), n2 = 4 * this._idx(t2, e2);\n return this.unpack(r2[n2], r2[n2 + 1], r2[n2 + 2]);\n }\n getUnpackVector() {\n return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift];\n }\n _idx(t2, e2) {\n if (t2 < -1 || t2 >= this.dim + 1 || e2 < -1 || e2 >= this.dim + 1) throw new RangeError(\"out of range source coordinates for DEM data\");\n return (e2 + 1) * this.stride + (t2 + 1);\n }\n unpack(t2, e2, r2) {\n return t2 * this.redFactor + e2 * this.greenFactor + r2 * this.blueFactor - this.baseShift;\n }\n pack(t2) {\n return Dl(t2, this.getUnpackVector());\n }\n getPixels() {\n return new bl({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));\n }\n backfillBorder(t2, e2, r2) {\n if (this.dim !== t2.dim) throw new Error(\"dem dimension mismatch\");\n let n2 = e2 * this.dim, i2 = e2 * this.dim + this.dim, s2 = r2 * this.dim, o2 = r2 * this.dim + this.dim;\n switch (e2) {\n case -1:\n n2 = i2 - 1;\n break;\n case 1:\n i2 = n2 + 1;\n }\n switch (r2) {\n case -1:\n s2 = o2 - 1;\n break;\n case 1:\n o2 = s2 + 1;\n }\n const a2 = -e2 * this.dim, l2 = -r2 * this.dim;\n for (let e3 = s2; e3 < o2; e3++) for (let r3 = n2; r3 < i2; r3++) this.data[this._idx(r3, e3)] = t2.data[this._idx(r3 + a2, e3 + l2)];\n }\n }\n function Dl(t2, e2) {\n const r2 = e2[0], n2 = e2[1], i2 = e2[2], s2 = e2[3], o2 = Math.min(r2, n2, i2), a2 = Math.round((t2 + s2) / o2);\n return { r: Math.floor(a2 * o2 / r2) % 256, g: Math.floor(a2 * o2 / n2) % 256, b: Math.floor(a2 * o2 / i2) % 256 };\n }\n us(\"DEMData\", Fl);\n class Pl extends Ys {\n constructor(t2, e2) {\n super(t2, Il, e2);\n }\n _createColorRamp(t2) {\n const e2 = { elevationStops: [], colorStops: [] }, r2 = this._transitionablePaint._values[\"color-relief-color\"].value.expression;\n if (r2 instanceof ii && r2._styleExpression.expression instanceof fr) {\n this.colorRampExpression = r2;\n const t3 = r2._styleExpression.expression;\n e2.elevationStops = t3.labels, e2.colorStops = [];\n for (const r3 of e2.elevationStops) e2.colorStops.push(t3.evaluate({ globals: { elevation: r3 } }));\n }\n if (e2.elevationStops.length < 1 && (e2.elevationStops = [0], e2.colorStops = [Te.transparent]), e2.elevationStops.length < 2 && (e2.elevationStops.push(e2.elevationStops[0] + 1), e2.colorStops.push(e2.colorStops[0])), e2.elevationStops.length <= t2) return e2;\n const n2 = { elevationStops: [], colorStops: [] }, i2 = (e2.elevationStops.length - 1) / (t2 - 1);\n for (let t3 = 0; t3 < e2.elevationStops.length - 0.5; t3 += i2) n2.elevationStops.push(e2.elevationStops[Math.round(t3)]), n2.colorStops.push(e2.colorStops[Math.round(t3)]);\n return j(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${t2}, provided: ${e2.elevationStops.length}`), n2;\n }\n _colorRampChanged() {\n return this.colorRampExpression != this._transitionablePaint._values[\"color-relief-color\"].value.expression;\n }\n getColorRampTextures(t2, e2, r2) {\n if (this.colorRampTextures && !this._colorRampChanged()) return this.colorRampTextures;\n const n2 = this._createColorRamp(e2), i2 = new bl({ width: n2.colorStops.length, height: 1 }), s2 = new bl({ width: n2.colorStops.length, height: 1 });\n for (let t3 = 0; t3 < n2.elevationStops.length; t3++) {\n const e3 = Dl(n2.elevationStops[t3], r2);\n s2.setPixel(0, t3, new Te(e3.r / 255, e3.g / 255, e3.b / 255, 1)), i2.setPixel(0, t3, n2.colorStops[t3]);\n }\n return this.colorRampTextures = { elevationTexture: new Ml(t2, s2, t2.gl.RGBA), colorTexture: new Ml(t2, i2, t2.gl.RGBA) }, this.colorRampTextures;\n }\n hasOffscreenPass() {\n return \"none\" !== this.visibility && !!this.colorRampTextures;\n }\n }\n const zl = to([{ name: \"a_pos\", components: 2, type: \"Int16\" }], 4), { members: Bl } = zl;\n function Vl(t2, e2, r2) {\n const n2 = r2.patternDependencies;\n let i2 = false;\n for (const r3 of e2) {\n const e3 = r3.paint.get(`${t2}-pattern`);\n e3.isConstant() || (i2 = true);\n const s2 = e3.constantOr(null);\n s2 && (i2 = true, n2[s2.to] = true, n2[s2.from] = true);\n }\n return i2;\n }\n function Cl(t2, e2, r2, n2, i2) {\n const { zoom: s2 } = n2, o2 = i2.patternDependencies;\n for (const n3 of e2) {\n const e3 = n3.paint.get(`${t2}-pattern`).value;\n if (\"constant\" !== e3.kind) {\n let t3 = e3.evaluate({ zoom: s2 - 1 }, r2, {}, i2.availableImages), a2 = e3.evaluate({ zoom: s2 }, r2, {}, i2.availableImages), l2 = e3.evaluate({ zoom: s2 + 1 }, r2, {}, i2.availableImages);\n t3 = t3 && t3.name ? t3.name : t3, a2 = a2 && a2.name ? a2.name : a2, l2 = l2 && l2.name ? l2.name : l2, o2[t3] = true, o2[a2] = true, o2[l2] = true, r2.patterns[n3.id] = { min: t3, mid: a2, max: l2 };\n }\n }\n return r2;\n }\n function Ll(t2, e2, r2, n2, i2) {\n let s2;\n if (i2 === (function(t3, e3, r3, n3) {\n let i3 = 0;\n for (let s3 = e3, o2 = r3 - n3; s3 < r3; s3 += n3) i3 += (t3[o2] - t3[s3]) * (t3[s3 + 1] + t3[o2 + 1]), o2 = s3;\n return i3;\n })(t2, e2, r2, n2) > 0) for (let i3 = e2; i3 < r2; i3 += n2) s2 = su(i3 / n2 | 0, t2[i3], t2[i3 + 1], s2);\n else for (let i3 = r2 - n2; i3 >= e2; i3 -= n2) s2 = su(i3 / n2 | 0, t2[i3], t2[i3 + 1], s2);\n return s2 && Ql(s2, s2.next) && (ou(s2), s2 = s2.next), s2;\n }\n function Ol(t2, e2) {\n if (!t2) return t2;\n e2 || (e2 = t2);\n let r2, n2 = t2;\n do {\n if (r2 = false, n2.steiner || !Ql(n2, n2.next) && 0 !== Jl(n2.prev, n2, n2.next)) n2 = n2.next;\n else {\n if (ou(n2), n2 = e2 = n2.prev, n2 === n2.next) break;\n r2 = true;\n }\n } while (r2 || n2 !== e2);\n return e2;\n }\n function Rl(t2, e2, r2, n2, i2, s2, o2) {\n if (!t2) return;\n !o2 && s2 && (function(t3, e3, r3, n3) {\n let i3 = t3;\n do {\n 0 === i3.z && (i3.z = Yl(i3.x, i3.y, e3, r3, n3)), i3.prevZ = i3.prev, i3.nextZ = i3.next, i3 = i3.next;\n } while (i3 !== t3);\n i3.prevZ.nextZ = null, i3.prevZ = null, (function(t4) {\n let e4, r4 = 1;\n do {\n let n4, i4 = t4;\n t4 = null;\n let s3 = null;\n for (e4 = 0; i4; ) {\n e4++;\n let o3 = i4, a3 = 0;\n for (let t5 = 0; t5 < r4 && (a3++, o3 = o3.nextZ, o3); t5++) ;\n let l2 = r4;\n for (; a3 > 0 || l2 > 0 && o3; ) 0 !== a3 && (0 === l2 || !o3 || i4.z <= o3.z) ? (n4 = i4, i4 = i4.nextZ, a3--) : (n4 = o3, o3 = o3.nextZ, l2--), s3 ? s3.nextZ = n4 : t4 = n4, n4.prevZ = s3, s3 = n4;\n i4 = o3;\n }\n s3.nextZ = null, r4 *= 2;\n } while (e4 > 1);\n })(i3);\n })(t2, n2, i2, s2);\n let a2 = t2;\n for (; t2.prev !== t2.next; ) {\n const l2 = t2.prev, u2 = t2.next;\n if (s2 ? $l(t2, n2, i2, s2) : Nl(t2)) e2.push(l2.i, t2.i, u2.i), ou(t2), t2 = u2.next, a2 = u2.next;\n else if ((t2 = u2) === a2) {\n o2 ? 1 === o2 ? Rl(t2 = Ul(Ol(t2), e2), e2, r2, n2, i2, s2, 2) : 2 === o2 && ql(t2, e2, r2, n2, i2, s2) : Rl(Ol(t2), e2, r2, n2, i2, s2, 1);\n break;\n }\n }\n }\n function Nl(t2) {\n const e2 = t2.prev, r2 = t2, n2 = t2.next;\n if (Jl(e2, r2, n2) >= 0) return false;\n const i2 = e2.x, s2 = r2.x, o2 = n2.x, a2 = e2.y, l2 = r2.y, u2 = n2.y, c2 = Math.min(i2, s2, o2), h2 = Math.min(a2, l2, u2), p2 = Math.max(i2, s2, o2), f2 = Math.max(a2, l2, u2);\n let d2 = n2.next;\n for (; d2 !== e2; ) {\n if (d2.x >= c2 && d2.x <= p2 && d2.y >= h2 && d2.y <= f2 && Kl(i2, a2, s2, l2, o2, u2, d2.x, d2.y) && Jl(d2.prev, d2, d2.next) >= 0) return false;\n d2 = d2.next;\n }\n return true;\n }\n function $l(t2, e2, r2, n2) {\n const i2 = t2.prev, s2 = t2, o2 = t2.next;\n if (Jl(i2, s2, o2) >= 0) return false;\n const a2 = i2.x, l2 = s2.x, u2 = o2.x, c2 = i2.y, h2 = s2.y, p2 = o2.y, f2 = Math.min(a2, l2, u2), d2 = Math.min(c2, h2, p2), y2 = Math.max(a2, l2, u2), m2 = Math.max(c2, h2, p2), g2 = Yl(f2, d2, e2, r2, n2), x2 = Yl(y2, m2, e2, r2, n2);\n let v2 = t2.prevZ, b2 = t2.nextZ;\n for (; v2 && v2.z >= g2 && b2 && b2.z <= x2; ) {\n if (v2.x >= f2 && v2.x <= y2 && v2.y >= d2 && v2.y <= m2 && v2 !== i2 && v2 !== o2 && Kl(a2, c2, l2, h2, u2, p2, v2.x, v2.y) && Jl(v2.prev, v2, v2.next) >= 0) return false;\n if (v2 = v2.prevZ, b2.x >= f2 && b2.x <= y2 && b2.y >= d2 && b2.y <= m2 && b2 !== i2 && b2 !== o2 && Kl(a2, c2, l2, h2, u2, p2, b2.x, b2.y) && Jl(b2.prev, b2, b2.next) >= 0) return false;\n b2 = b2.nextZ;\n }\n for (; v2 && v2.z >= g2; ) {\n if (v2.x >= f2 && v2.x <= y2 && v2.y >= d2 && v2.y <= m2 && v2 !== i2 && v2 !== o2 && Kl(a2, c2, l2, h2, u2, p2, v2.x, v2.y) && Jl(v2.prev, v2, v2.next) >= 0) return false;\n v2 = v2.prevZ;\n }\n for (; b2 && b2.z <= x2; ) {\n if (b2.x >= f2 && b2.x <= y2 && b2.y >= d2 && b2.y <= m2 && b2 !== i2 && b2 !== o2 && Kl(a2, c2, l2, h2, u2, p2, b2.x, b2.y) && Jl(b2.prev, b2, b2.next) >= 0) return false;\n b2 = b2.nextZ;\n }\n return true;\n }\n function Ul(t2, e2) {\n let r2 = t2;\n do {\n const n2 = r2.prev, i2 = r2.next.next;\n !Ql(n2, i2) && tu(n2, r2, r2.next, i2) && nu(n2, i2) && nu(i2, n2) && (e2.push(n2.i, r2.i, i2.i), ou(r2), ou(r2.next), r2 = t2 = i2), r2 = r2.next;\n } while (r2 !== t2);\n return Ol(r2);\n }\n function ql(t2, e2, r2, n2, i2, s2) {\n let o2 = t2;\n do {\n let t3 = o2.next.next;\n for (; t3 !== o2.prev; ) {\n if (o2.i !== t3.i && Wl(o2, t3)) {\n let a2 = iu(o2, t3);\n return o2 = Ol(o2, o2.next), a2 = Ol(a2, a2.next), Rl(o2, e2, r2, n2, i2, s2, 0), void Rl(a2, e2, r2, n2, i2, s2, 0);\n }\n t3 = t3.next;\n }\n o2 = o2.next;\n } while (o2 !== t2);\n }\n function jl(t2, e2) {\n let r2 = t2.x - e2.x;\n return 0 === r2 && (r2 = t2.y - e2.y, 0 === r2) && (r2 = (t2.next.y - t2.y) / (t2.next.x - t2.x) - (e2.next.y - e2.y) / (e2.next.x - e2.x)), r2;\n }\n function Gl(t2, e2) {\n const r2 = (function(t3, e3) {\n let r3 = e3;\n const n3 = t3.x, i2 = t3.y;\n let s2, o2 = -1 / 0;\n if (Ql(t3, r3)) return r3;\n do {\n if (Ql(t3, r3.next)) return r3.next;\n if (i2 <= r3.y && i2 >= r3.next.y && r3.next.y !== r3.y) {\n const t4 = r3.x + (i2 - r3.y) * (r3.next.x - r3.x) / (r3.next.y - r3.y);\n if (t4 <= n3 && t4 > o2 && (o2 = t4, s2 = r3.x < r3.next.x ? r3 : r3.next, t4 === n3)) return s2;\n }\n r3 = r3.next;\n } while (r3 !== e3);\n if (!s2) return null;\n const a2 = s2, l2 = s2.x, u2 = s2.y;\n let c2 = 1 / 0;\n r3 = s2;\n do {\n if (n3 >= r3.x && r3.x >= l2 && n3 !== r3.x && Hl(i2 < u2 ? n3 : o2, i2, l2, u2, i2 < u2 ? o2 : n3, i2, r3.x, r3.y)) {\n const e4 = Math.abs(i2 - r3.y) / (n3 - r3.x);\n nu(r3, t3) && (e4 < c2 || e4 === c2 && (r3.x > s2.x || r3.x === s2.x && Xl(s2, r3))) && (s2 = r3, c2 = e4);\n }\n r3 = r3.next;\n } while (r3 !== a2);\n return s2;\n })(t2, e2);\n if (!r2) return e2;\n const n2 = iu(r2, t2);\n return Ol(n2, n2.next), Ol(r2, r2.next);\n }\n function Xl(t2, e2) {\n return Jl(t2.prev, t2, e2.prev) < 0 && Jl(e2.next, t2, t2.next) < 0;\n }\n function Yl(t2, e2, r2, n2, i2) {\n return (t2 = 1431655765 & ((t2 = 858993459 & ((t2 = 252645135 & ((t2 = 16711935 & ((t2 = (t2 - r2) * i2 | 0) | t2 << 8)) | t2 << 4)) | t2 << 2)) | t2 << 1)) | (e2 = 1431655765 & ((e2 = 858993459 & ((e2 = 252645135 & ((e2 = 16711935 & ((e2 = (e2 - n2) * i2 | 0) | e2 << 8)) | e2 << 4)) | e2 << 2)) | e2 << 1)) << 1;\n }\n function Zl(t2) {\n let e2 = t2, r2 = t2;\n do {\n (e2.x < r2.x || e2.x === r2.x && e2.y < r2.y) && (r2 = e2), e2 = e2.next;\n } while (e2 !== t2);\n return r2;\n }\n function Hl(t2, e2, r2, n2, i2, s2, o2, a2) {\n return (i2 - o2) * (e2 - a2) >= (t2 - o2) * (s2 - a2) && (t2 - o2) * (n2 - a2) >= (r2 - o2) * (e2 - a2) && (r2 - o2) * (s2 - a2) >= (i2 - o2) * (n2 - a2);\n }\n function Kl(t2, e2, r2, n2, i2, s2, o2, a2) {\n return !(t2 === o2 && e2 === a2) && Hl(t2, e2, r2, n2, i2, s2, o2, a2);\n }\n function Wl(t2, e2) {\n return t2.next.i !== e2.i && t2.prev.i !== e2.i && !(function(t3, e3) {\n let r2 = t3;\n do {\n if (r2.i !== t3.i && r2.next.i !== t3.i && r2.i !== e3.i && r2.next.i !== e3.i && tu(r2, r2.next, t3, e3)) return true;\n r2 = r2.next;\n } while (r2 !== t3);\n return false;\n })(t2, e2) && (nu(t2, e2) && nu(e2, t2) && (function(t3, e3) {\n let r2 = t3, n2 = false;\n const i2 = (t3.x + e3.x) / 2, s2 = (t3.y + e3.y) / 2;\n do {\n r2.y > s2 != r2.next.y > s2 && r2.next.y !== r2.y && i2 < (r2.next.x - r2.x) * (s2 - r2.y) / (r2.next.y - r2.y) + r2.x && (n2 = !n2), r2 = r2.next;\n } while (r2 !== t3);\n return n2;\n })(t2, e2) && (Jl(t2.prev, t2, e2.prev) || Jl(t2, e2.prev, e2)) || Ql(t2, e2) && Jl(t2.prev, t2, t2.next) > 0 && Jl(e2.prev, e2, e2.next) > 0);\n }\n function Jl(t2, e2, r2) {\n return (e2.y - t2.y) * (r2.x - e2.x) - (e2.x - t2.x) * (r2.y - e2.y);\n }\n function Ql(t2, e2) {\n return t2.x === e2.x && t2.y === e2.y;\n }\n function tu(t2, e2, r2, n2) {\n const i2 = ru(Jl(t2, e2, r2)), s2 = ru(Jl(t2, e2, n2)), o2 = ru(Jl(r2, n2, t2)), a2 = ru(Jl(r2, n2, e2));\n return i2 !== s2 && o2 !== a2 || !(0 !== i2 || !eu(t2, r2, e2)) || !(0 !== s2 || !eu(t2, n2, e2)) || !(0 !== o2 || !eu(r2, t2, n2)) || !(0 !== a2 || !eu(r2, e2, n2));\n }\n function eu(t2, e2, r2) {\n return e2.x <= Math.max(t2.x, r2.x) && e2.x >= Math.min(t2.x, r2.x) && e2.y <= Math.max(t2.y, r2.y) && e2.y >= Math.min(t2.y, r2.y);\n }\n function ru(t2) {\n return t2 > 0 ? 1 : t2 < 0 ? -1 : 0;\n }\n function nu(t2, e2) {\n return Jl(t2.prev, t2, t2.next) < 0 ? Jl(t2, e2, t2.next) >= 0 && Jl(t2, t2.prev, e2) >= 0 : Jl(t2, e2, t2.prev) < 0 || Jl(t2, t2.next, e2) < 0;\n }\n function iu(t2, e2) {\n const r2 = au(t2.i, t2.x, t2.y), n2 = au(e2.i, e2.x, e2.y), i2 = t2.next, s2 = e2.prev;\n return t2.next = e2, e2.prev = t2, r2.next = i2, i2.prev = r2, n2.next = r2, r2.prev = n2, s2.next = n2, n2.prev = s2, n2;\n }\n function su(t2, e2, r2, n2) {\n const i2 = au(t2, e2, r2);\n return n2 ? (i2.next = n2.next, i2.prev = n2, n2.next.prev = i2, n2.next = i2) : (i2.prev = i2, i2.next = i2), i2;\n }\n function ou(t2) {\n t2.next.prev = t2.prev, t2.prev.next = t2.next, t2.prevZ && (t2.prevZ.nextZ = t2.nextZ), t2.nextZ && (t2.nextZ.prevZ = t2.prevZ);\n }\n function au(t2, e2, r2) {\n return { i: t2, x: e2, y: r2, prev: null, next: null, z: 0, prevZ: null, nextZ: null, steiner: false };\n }\n class lu {\n constructor(t2, e2) {\n if (e2 > t2) throw new Error(\"Min granularity must not be greater than base granularity.\");\n this._baseZoomGranularity = t2, this._minGranularity = e2;\n }\n getGranularityForZoomLevel(t2) {\n return Math.max(Math.floor(this._baseZoomGranularity / (1 << t2)), this._minGranularity, 1);\n }\n }\n class uu {\n constructor(t2) {\n this.fill = t2.fill, this.line = t2.line, this.tile = t2.tile, this.stencil = t2.stencil, this.circle = t2.circle;\n }\n }\n uu.noSubdivision = new uu({ fill: new lu(0, 0), line: new lu(0, 0), tile: new lu(0, 0), stencil: new lu(0, 0), circle: 1 }), us(\"SubdivisionGranularityExpression\", lu), us(\"SubdivisionGranularitySetting\", uu);\n const cu = -32768, hu = 32767;\n class pu {\n constructor(t2, e2) {\n this._vertexBuffer = [], this._vertexDictionary = /* @__PURE__ */ new Map(), this._used = false, this._granularity = t2, this._granularityCellSize = M / t2, this._canonical = e2;\n }\n _getKey(t2, e2) {\n return (t2 += 32768) << 16 | e2 + 32768;\n }\n _vertexToIndex(t2, e2) {\n if (t2 < -32768 || e2 < -32768 || t2 > 32767 || e2 > 32767) throw new Error(\"Vertex coordinates are out of signed 16 bit integer range.\");\n const r2 = 0 | Math.round(t2), n2 = 0 | Math.round(e2), i2 = this._getKey(r2, n2);\n if (this._vertexDictionary.has(i2)) return this._vertexDictionary.get(i2);\n const s2 = this._vertexBuffer.length / 2;\n return this._vertexDictionary.set(i2, s2), this._vertexBuffer.push(r2, n2), s2;\n }\n _subdivideTrianglesScanline(t2) {\n if (this._granularity < 2) return (function(t3, e3) {\n const r3 = [];\n for (let n2 = 0; n2 < e3.length; n2 += 3) {\n const i2 = e3[n2], s2 = e3[n2 + 1], o2 = e3[n2 + 2], a2 = t3[2 * i2], l2 = t3[2 * i2 + 1];\n (t3[2 * s2] - a2) * (t3[2 * o2 + 1] - l2) - (t3[2 * s2 + 1] - l2) * (t3[2 * o2] - a2) > 0 ? (r3.push(i2), r3.push(o2), r3.push(s2)) : (r3.push(i2), r3.push(s2), r3.push(o2));\n }\n return r3;\n })(this._vertexBuffer, t2);\n const e2 = [], r2 = t2.length;\n for (let n2 = 0; n2 < r2; n2 += 3) {\n const r3 = [t2[n2 + 0], t2[n2 + 1], t2[n2 + 2]], i2 = [this._vertexBuffer[2 * t2[n2 + 0] + 0], this._vertexBuffer[2 * t2[n2 + 0] + 1], this._vertexBuffer[2 * t2[n2 + 1] + 0], this._vertexBuffer[2 * t2[n2 + 1] + 1], this._vertexBuffer[2 * t2[n2 + 2] + 0], this._vertexBuffer[2 * t2[n2 + 2] + 1]];\n let s2 = 1 / 0, o2 = 1 / 0, a2 = -1 / 0, l2 = -1 / 0;\n for (let t3 = 0; t3 < 3; t3++) {\n const e3 = i2[2 * t3], r4 = i2[2 * t3 + 1];\n s2 = Math.min(s2, e3), a2 = Math.max(a2, e3), o2 = Math.min(o2, r4), l2 = Math.max(l2, r4);\n }\n if (s2 === a2 || o2 === l2) continue;\n const u2 = Math.floor(s2 / this._granularityCellSize), c2 = Math.ceil(a2 / this._granularityCellSize), h2 = Math.floor(o2 / this._granularityCellSize), p2 = Math.ceil(l2 / this._granularityCellSize);\n if (u2 !== c2 || h2 !== p2) for (let t3 = h2; t3 < p2; t3++) {\n const n3 = this._scanlineGenerateVertexRingForCellRow(t3, i2, r3);\n yu(this._vertexBuffer, n3, e2);\n }\n else e2.push(...r3);\n }\n return e2;\n }\n _scanlineGenerateVertexRingForCellRow(t2, e2, r2) {\n const n2 = t2 * this._granularityCellSize, i2 = n2 + this._granularityCellSize, s2 = [];\n for (let t3 = 0; t3 < 3; t3++) {\n const o2 = e2[2 * t3], a2 = e2[2 * t3 + 1], l2 = e2[2 * (t3 + 1) % 6], u2 = e2[(2 * (t3 + 1) + 1) % 6], c2 = e2[2 * (t3 + 2) % 6], h2 = e2[(2 * (t3 + 2) + 1) % 6], p2 = l2 - o2, f2 = u2 - a2, d2 = 0 === p2, y2 = 0 === f2, m2 = (n2 - a2) / f2, g2 = (i2 - a2) / f2, x2 = Math.min(m2, g2), v2 = Math.max(m2, g2);\n if (!y2 && (x2 >= 1 || v2 <= 0) || y2 && (a2 < n2 || a2 > i2)) {\n u2 >= n2 && u2 <= i2 && s2.push(r2[(t3 + 1) % 3]);\n continue;\n }\n !y2 && x2 > 0 && s2.push(this._vertexToIndex(o2 + p2 * x2, a2 + f2 * x2));\n const b2 = o2 + p2 * Math.max(x2, 0), w2 = o2 + p2 * Math.min(v2, 1);\n d2 || this._generateIntraEdgeVertices(s2, o2, a2, l2, u2, b2, w2), !y2 && v2 < 1 && s2.push(this._vertexToIndex(o2 + p2 * v2, a2 + f2 * v2)), (y2 || u2 >= n2 && u2 <= i2) && s2.push(r2[(t3 + 1) % 3]), !y2 && (u2 <= n2 || u2 >= i2) && this._generateInterEdgeVertices(s2, o2, a2, l2, u2, c2, h2, w2, n2, i2);\n }\n return s2;\n }\n _generateIntraEdgeVertices(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = n2 - e2, l2 = i2 - r2, u2 = 0 === l2, c2 = u2 ? Math.min(e2, n2) : Math.min(s2, o2), h2 = u2 ? Math.max(e2, n2) : Math.max(s2, o2), p2 = Math.floor(c2 / this._granularityCellSize) + 1, f2 = Math.ceil(h2 / this._granularityCellSize) - 1;\n if (u2 ? e2 < n2 : s2 < o2) for (let n3 = p2; n3 <= f2; n3++) {\n const i3 = n3 * this._granularityCellSize;\n t2.push(this._vertexToIndex(i3, r2 + l2 * (i3 - e2) / a2));\n }\n else for (let n3 = f2; n3 >= p2; n3--) {\n const i3 = n3 * this._granularityCellSize;\n t2.push(this._vertexToIndex(i3, r2 + l2 * (i3 - e2) / a2));\n }\n }\n _generateInterEdgeVertices(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2) {\n const c2 = i2 - r2, h2 = s2 - n2, p2 = o2 - i2, f2 = (l2 - i2) / p2, d2 = (u2 - i2) / p2, y2 = Math.min(f2, d2), m2 = Math.max(f2, d2), g2 = n2 + h2 * y2;\n let x2 = Math.floor(Math.min(g2, a2) / this._granularityCellSize) + 1, v2 = Math.ceil(Math.max(g2, a2) / this._granularityCellSize) - 1, b2 = a2 < g2;\n const w2 = 0 === p2;\n if (w2 && (o2 === l2 || o2 === u2)) return;\n if (w2 || y2 >= 1 || m2 <= 0) {\n const t3 = r2 - o2, n3 = s2 + (e2 - s2) * Math.min((l2 - o2) / t3, (u2 - o2) / t3);\n x2 = Math.floor(Math.min(n3, a2) / this._granularityCellSize) + 1, v2 = Math.ceil(Math.max(n3, a2) / this._granularityCellSize) - 1, b2 = a2 < n3;\n }\n const _2 = c2 > 0 ? u2 : l2;\n if (b2) for (let e3 = x2; e3 <= v2; e3++) t2.push(this._vertexToIndex(e3 * this._granularityCellSize, _2));\n else for (let e3 = v2; e3 >= x2; e3--) t2.push(this._vertexToIndex(e3 * this._granularityCellSize, _2));\n }\n _generateOutline(t2) {\n const e2 = [];\n for (const r2 of t2) {\n const t3 = du(r2, this._granularity, true), n2 = this._pointArrayToIndices(t3), i2 = [];\n for (let t4 = 1; t4 < n2.length; t4++) i2.push(n2[t4 - 1]), i2.push(n2[t4]);\n e2.push(i2);\n }\n return e2;\n }\n _handlePoles(t2) {\n let e2 = false, r2 = false;\n this._canonical && (0 === this._canonical.y && (e2 = true), this._canonical.y === (1 << this._canonical.z) - 1 && (r2 = true)), (e2 || r2) && this._fillPoles(t2, e2, r2);\n }\n _ensureNoPoleVertices() {\n const t2 = this._vertexBuffer;\n for (let e2 = 0; e2 < t2.length; e2 += 2) {\n const r2 = t2[e2 + 1];\n r2 === cu && (t2[e2 + 1] = -32767), r2 === hu && (t2[e2 + 1] = 32766);\n }\n }\n _generatePoleQuad(t2, e2, r2, n2, i2, s2) {\n n2 > i2 != (s2 === cu) ? (t2.push(e2), t2.push(r2), t2.push(this._vertexToIndex(n2, s2)), t2.push(r2), t2.push(this._vertexToIndex(i2, s2)), t2.push(this._vertexToIndex(n2, s2))) : (t2.push(r2), t2.push(e2), t2.push(this._vertexToIndex(n2, s2)), t2.push(this._vertexToIndex(i2, s2)), t2.push(r2), t2.push(this._vertexToIndex(n2, s2)));\n }\n _fillPoles(t2, e2, r2) {\n const n2 = this._vertexBuffer, i2 = M, s2 = t2.length;\n for (let o2 = 2; o2 < s2; o2 += 3) {\n const s3 = t2[o2 - 2], a2 = t2[o2 - 1], l2 = t2[o2], u2 = n2[2 * s3], c2 = n2[2 * s3 + 1], h2 = n2[2 * a2], p2 = n2[2 * a2 + 1], f2 = n2[2 * l2], d2 = n2[2 * l2 + 1];\n e2 && (0 === c2 && 0 === p2 && this._generatePoleQuad(t2, s3, a2, u2, h2, cu), 0 === p2 && 0 === d2 && this._generatePoleQuad(t2, a2, l2, h2, f2, cu), 0 === d2 && 0 === c2 && this._generatePoleQuad(t2, l2, s3, f2, u2, cu)), r2 && (c2 === i2 && p2 === i2 && this._generatePoleQuad(t2, s3, a2, u2, h2, hu), p2 === i2 && d2 === i2 && this._generatePoleQuad(t2, a2, l2, h2, f2, hu), d2 === i2 && c2 === i2 && this._generatePoleQuad(t2, l2, s3, f2, u2, hu));\n }\n }\n _initializeVertices(t2) {\n for (let e2 = 0; e2 < t2.length; e2 += 2) this._vertexToIndex(t2[e2], t2[e2 + 1]);\n }\n subdividePolygonInternal(t2, e2) {\n if (this._used) throw new Error(\"Subdivision: multiple use not allowed.\");\n this._used = true;\n const { flattened: r2, holeIndices: n2 } = (function(t3) {\n const e3 = [], r3 = [];\n for (const n3 of t3) if (0 !== n3.length) {\n n3 !== t3[0] && e3.push(r3.length / 2);\n for (let t4 = 0; t4 < n3.length; t4++) r3.push(n3[t4].x), r3.push(n3[t4].y);\n }\n return { flattened: r3, holeIndices: e3 };\n })(t2);\n let i2;\n this._initializeVertices(r2);\n try {\n const t3 = (function(t4, e4, r3 = 2) {\n const n3 = e4 && e4.length, i3 = n3 ? e4[0] * r3 : t4.length;\n let s3 = Ll(t4, 0, i3, r3, true);\n const o2 = [];\n if (!s3 || s3.next === s3.prev) return o2;\n let a2, l2, u2;\n if (n3 && (s3 = (function(t5, e5, r4, n4) {\n const i4 = [];\n for (let r5 = 0, s4 = e5.length; r5 < s4; r5++) {\n const o3 = Ll(t5, e5[r5] * n4, r5 < s4 - 1 ? e5[r5 + 1] * n4 : t5.length, n4, false);\n o3 === o3.next && (o3.steiner = true), i4.push(Zl(o3));\n }\n i4.sort(jl);\n for (let t6 = 0; t6 < i4.length; t6++) r4 = Gl(i4[t6], r4);\n return r4;\n })(t4, e4, s3, r3)), t4.length > 80 * r3) {\n a2 = t4[0], l2 = t4[1];\n let e5 = a2, n4 = l2;\n for (let s4 = r3; s4 < i3; s4 += r3) {\n const r4 = t4[s4], i4 = t4[s4 + 1];\n r4 < a2 && (a2 = r4), i4 < l2 && (l2 = i4), r4 > e5 && (e5 = r4), i4 > n4 && (n4 = i4);\n }\n u2 = Math.max(e5 - a2, n4 - l2), u2 = 0 !== u2 ? 32767 / u2 : 0;\n }\n return Rl(s3, o2, r3, a2, l2, u2, 0), o2;\n })(r2, n2), e3 = this._convertIndices(r2, t3);\n i2 = this._subdivideTrianglesScanline(e3);\n } catch (t3) {\n console.error(t3);\n }\n let s2 = [];\n return e2 && (s2 = this._generateOutline(t2)), this._ensureNoPoleVertices(), this._handlePoles(i2), { verticesFlattened: this._vertexBuffer, indicesTriangles: i2, indicesLineList: s2 };\n }\n _convertIndices(t2, e2) {\n const r2 = [];\n for (let n2 = 0; n2 < e2.length; n2++) r2.push(this._vertexToIndex(t2[2 * e2[n2]], t2[2 * e2[n2] + 1]));\n return r2;\n }\n _pointArrayToIndices(t2) {\n const e2 = [];\n for (let r2 = 0; r2 < t2.length; r2++) {\n const n2 = t2[r2];\n e2.push(this._vertexToIndex(n2.x, n2.y));\n }\n return e2;\n }\n }\n function fu(t2, e2, r2, n2 = true) {\n return new pu(r2, e2).subdividePolygonInternal(t2, n2);\n }\n function du(t2, e2, n2 = false) {\n if (!t2 || t2.length < 1) return [];\n if (t2.length < 2) return [];\n const i2 = t2[0], s2 = t2[t2.length - 1], o2 = n2 && (i2.x !== s2.x || i2.y !== s2.y);\n if (e2 < 2) return o2 ? [...t2, t2[0]] : [...t2];\n const a2 = Math.floor(M / e2), l2 = [];\n l2.push(new r(t2[0].x, t2[0].y));\n const u2 = t2.length, c2 = o2 ? u2 : u2 - 1;\n for (let e3 = 0; e3 < c2; e3++) {\n const n3 = t2[e3], i3 = e3 < u2 - 1 ? t2[e3 + 1] : t2[0], s3 = n3.x, o3 = n3.y, c3 = i3.x, h2 = i3.y, p2 = s3 !== c3, f2 = o3 !== h2;\n if (!p2 && !f2) continue;\n const d2 = c3 - s3, y2 = h2 - o3, m2 = Math.abs(d2), g2 = Math.abs(y2);\n let x2 = s3, v2 = o3;\n for (; ; ) {\n const t3 = d2 > 0 ? (Math.floor(x2 / a2) + 1) * a2 : (Math.ceil(x2 / a2) - 1) * a2, e4 = y2 > 0 ? (Math.floor(v2 / a2) + 1) * a2 : (Math.ceil(v2 / a2) - 1) * a2, n4 = Math.abs(x2 - t3), i4 = Math.abs(v2 - e4), s4 = Math.abs(x2 - c3), o4 = Math.abs(v2 - h2), u3 = p2 ? n4 / m2 : Number.POSITIVE_INFINITY, b3 = f2 ? i4 / g2 : Number.POSITIVE_INFINITY;\n if ((s4 <= n4 || !p2) && (o4 <= i4 || !f2)) break;\n if (u3 < b3 && p2 || !f2) {\n x2 = t3, v2 += y2 * u3;\n const e5 = new r(x2, Math.round(v2));\n l2[l2.length - 1].x === e5.x && l2[l2.length - 1].y === e5.y || l2.push(e5);\n } else {\n x2 += d2 * b3, v2 = e4;\n const t4 = new r(Math.round(x2), v2);\n l2[l2.length - 1].x === t4.x && l2[l2.length - 1].y === t4.y || l2.push(t4);\n }\n }\n const b2 = new r(c3, h2);\n l2[l2.length - 1].x === b2.x && l2[l2.length - 1].y === b2.y || l2.push(b2);\n }\n return l2;\n }\n function yu(t2, e2, r2) {\n if (0 === e2.length) throw new Error(\"Subdivision vertex ring is empty.\");\n let n2 = 0, i2 = t2[2 * e2[0]];\n for (let r3 = 1; r3 < e2.length; r3++) {\n const s3 = t2[2 * e2[r3]];\n s3 < i2 && (i2 = s3, n2 = r3);\n }\n const s2 = e2.length;\n let o2 = n2, a2 = (o2 + 1) % s2;\n for (; ; ) {\n const n3 = o2 - 1 >= 0 ? o2 - 1 : s2 - 1, i3 = (a2 + 1) % s2, l2 = t2[2 * e2[n3]], u2 = t2[2 * e2[i3]], c2 = t2[2 * e2[o2]], h2 = t2[2 * e2[o2] + 1], p2 = t2[2 * e2[a2] + 1];\n let f2 = false;\n if (l2 < u2) f2 = true;\n else if (l2 > u2) f2 = false;\n else {\n const r3 = p2 - h2, s3 = -(t2[2 * e2[a2]] - c2), o3 = h2 < p2 ? 1 : -1;\n ((l2 - c2) * r3 + (t2[2 * e2[n3] + 1] - h2) * s3) * o3 > ((u2 - c2) * r3 + (t2[2 * e2[i3] + 1] - h2) * s3) * o3 && (f2 = true);\n }\n if (f2) {\n const t3 = e2[n3], i4 = e2[o2], l3 = e2[a2];\n t3 !== i4 && t3 !== l3 && i4 !== l3 && r2.push(l3, i4, t3), o2--, o2 < 0 && (o2 = s2 - 1);\n } else {\n const t3 = e2[i3], n4 = e2[o2], l3 = e2[a2];\n t3 !== n4 && t3 !== l3 && n4 !== l3 && r2.push(l3, n4, t3), a2++, a2 >= s2 && (a2 = 0);\n }\n if (n3 === i3) break;\n }\n }\n function mu(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = i2.length / 2, c2 = o2 && a2 && l2;\n if (u2 < ra.MAX_VERTEX_ARRAY_LENGTH) {\n const h2 = e2.prepareSegment(u2, r2, n2), p2 = h2.vertexLength;\n for (let t3 = 0; t3 < s2.length; t3 += 3) n2.emplaceBack(p2 + s2[t3], p2 + s2[t3 + 1], p2 + s2[t3 + 2]);\n let f2, d2;\n h2.vertexLength += u2, h2.primitiveLength += s2.length / 3, c2 && (d2 = o2.prepareSegment(u2, r2, a2), f2 = d2.vertexLength, d2.vertexLength += u2);\n for (let e3 = 0; e3 < i2.length; e3 += 2) t2(i2[e3], i2[e3 + 1]);\n if (c2) for (let t3 = 0; t3 < l2.length; t3++) {\n const e3 = l2[t3];\n for (let t4 = 1; t4 < e3.length; t4 += 2) a2.emplaceBack(f2 + e3[t4 - 1], f2 + e3[t4]);\n d2.primitiveLength += e3.length / 2;\n }\n } else !(function(t3, e3, r3, n3, i3, s3) {\n const o3 = [];\n for (let t4 = 0; t4 < n3.length / 2; t4++) o3.push(-1);\n const a3 = { count: 0 };\n let l3 = 0, u3 = t3.getOrCreateLatestSegment(e3, r3), c3 = u3.vertexLength;\n for (let h2 = 2; h2 < i3.length; h2 += 3) {\n const p2 = i3[h2 - 2], f2 = i3[h2 - 1], d2 = i3[h2];\n let y2 = o3[p2] < l3, m2 = o3[f2] < l3, g2 = o3[d2] < l3;\n u3.vertexLength + ((y2 ? 1 : 0) + (m2 ? 1 : 0) + (g2 ? 1 : 0)) > ra.MAX_VERTEX_ARRAY_LENGTH && (u3 = t3.createNewSegment(e3, r3), l3 = a3.count, y2 = true, m2 = true, g2 = true, c3 = 0);\n const x2 = gu(o3, n3, s3, a3, p2, y2, u3), v2 = gu(o3, n3, s3, a3, f2, m2, u3), b2 = gu(o3, n3, s3, a3, d2, g2, u3);\n r3.emplaceBack(c3 + x2 - l3, c3 + v2 - l3, c3 + b2 - l3), u3.primitiveLength++;\n }\n })(e2, r2, n2, i2, s2, t2), c2 && (function(t3, e3, r3, n3, i3, s3) {\n const o3 = [];\n for (let t4 = 0; t4 < n3.length / 2; t4++) o3.push(-1);\n const a3 = { count: 0 };\n let l3 = 0, u3 = t3.getOrCreateLatestSegment(e3, r3), c3 = u3.vertexLength;\n for (let h2 = 0; h2 < i3.length; h2++) {\n const p2 = i3[h2];\n for (let f2 = 1; f2 < i3[h2].length; f2 += 2) {\n const i4 = p2[f2 - 1], h3 = p2[f2];\n let d2 = o3[i4] < l3, y2 = o3[h3] < l3;\n u3.vertexLength + ((d2 ? 1 : 0) + (y2 ? 1 : 0)) > ra.MAX_VERTEX_ARRAY_LENGTH && (u3 = t3.createNewSegment(e3, r3), l3 = a3.count, d2 = true, y2 = true, c3 = 0);\n const m2 = gu(o3, n3, s3, a3, i4, d2, u3), g2 = gu(o3, n3, s3, a3, h3, y2, u3);\n r3.emplaceBack(c3 + m2 - l3, c3 + g2 - l3), u3.primitiveLength++;\n }\n }\n })(o2, r2, a2, i2, l2, t2), e2.forceNewSegmentOnNextPrepare(), null == o2 || o2.forceNewSegmentOnNextPrepare();\n }\n function gu(t2, e2, r2, n2, i2, s2, o2) {\n if (s2) {\n const s3 = n2.count;\n return r2(e2[2 * i2], e2[2 * i2 + 1]), t2[i2] = n2.count, n2.count++, o2.vertexLength++, s3;\n }\n return t2[i2];\n }\n class xu {\n constructor(t2) {\n this.zoom = t2.zoom, this.overscaling = t2.overscaling, this.layers = t2.layers, this.layerIds = this.layers.map(((t3) => t3.id)), this.index = t2.index, this.hasDependencies = false, this.patternFeatures = [], this.layoutVertexArray = new $o(), this.indexArray = new Jo(), this.indexArray2 = new Qo(), this.programConfigurations = new Pa(t2.layers, t2.zoom), this.segments = new ra(), this.segments2 = new ra(), this.stateDependentLayerIds = this.layers.filter(((t3) => t3.isStateDependent())).map(((t3) => t3.id));\n }\n populate(t2, e2, r2) {\n this.hasDependencies = Vl(\"fill\", this.layers, e2);\n const n2 = this.layers[0].layout.get(\"fill-sort-key\"), i2 = !n2.isConstant(), s2 = [];\n for (const { feature: o2, id: a2, index: l2, sourceLayerIndex: u2 } of t2) {\n const t3 = this.layers[0]._featureFilter.needGeometry, c2 = Oa(o2, t3);\n if (!this.layers[0]._featureFilter.filter(new Fs(this.zoom), c2, r2)) continue;\n const h2 = i2 ? n2.evaluate(c2, {}, r2, e2.availableImages) : void 0, p2 = { id: a2, properties: o2.properties, type: o2.type, sourceLayerIndex: u2, index: l2, geometry: t3 ? c2.geometry : La(o2), patterns: {}, sortKey: h2 };\n s2.push(p2);\n }\n i2 && s2.sort(((t3, e3) => t3.sortKey - e3.sortKey));\n for (const n3 of s2) {\n const { geometry: i3, index: s3, sourceLayerIndex: o2 } = n3;\n if (this.hasDependencies) {\n const t3 = Cl(\"fill\", this.layers, n3, { zoom: this.zoom }, e2);\n this.patternFeatures.push(t3);\n } else this.addFeature(n3, i3, s3, r2, {}, e2.subdivisionGranularity);\n e2.featureIndex.insert(t2[s3].feature, i3, s3, o2, this.index);\n }\n }\n update(t2, e2, r2) {\n this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t2, e2, this.stateDependentLayers, { imagePositions: r2 });\n }\n addFeatures(t2, e2, r2) {\n for (const n2 of this.patternFeatures) this.addFeature(n2, n2.geometry, n2.index, e2, r2, t2.subdivisionGranularity);\n }\n isEmpty() {\n return 0 === this.layoutVertexArray.length;\n }\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n upload(t2) {\n this.uploaded || (this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, Bl), this.indexBuffer = t2.createIndexBuffer(this.indexArray), this.indexBuffer2 = t2.createIndexBuffer(this.indexArray2)), this.programConfigurations.upload(t2), this.uploaded = true;\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.indexBuffer2.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.segments2.destroy());\n }\n addFeature(t2, e2, r2, n2, i2, s2) {\n for (const t3 of tn(e2, 500)) {\n const e3 = fu(t3, n2, s2.fill.getGranularityForZoomLevel(n2.z)), r3 = this.layoutVertexArray;\n mu(((t4, e4) => {\n r3.emplaceBack(t4, e4);\n }), this.segments, this.layoutVertexArray, this.indexArray, e3.verticesFlattened, e3.indicesTriangles, this.segments2, this.indexArray2, e3.indicesLineList);\n }\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t2, r2, { imagePositions: i2, canonical: n2 });\n }\n }\n let vu, bu;\n us(\"FillBucket\", xu, { omit: [\"layers\", \"patternFeatures\"] });\n var wu = { get paint() {\n return bu = bu || new Xs({ \"fill-antialias\": new $s(vt.paint_fill[\"fill-antialias\"]), \"fill-opacity\": new Us(vt.paint_fill[\"fill-opacity\"]), \"fill-color\": new Us(vt.paint_fill[\"fill-color\"]), \"fill-outline-color\": new Us(vt.paint_fill[\"fill-outline-color\"]), \"fill-translate\": new $s(vt.paint_fill[\"fill-translate\"]), \"fill-translate-anchor\": new $s(vt.paint_fill[\"fill-translate-anchor\"]), \"fill-pattern\": new qs(vt.paint_fill[\"fill-pattern\"]) });\n }, get layout() {\n return vu = vu || new Xs({ \"fill-sort-key\": new Us(vt.layout_fill[\"fill-sort-key\"]) });\n } };\n class _u extends Ys {\n constructor(t2, e2) {\n super(t2, wu, e2);\n }\n recalculate(t2, e2) {\n super.recalculate(t2, e2);\n const r2 = this.paint._values[\"fill-outline-color\"];\n \"constant\" === r2.value.kind && void 0 === r2.value.value && (this.paint._values[\"fill-outline-color\"] = this.paint._values[\"fill-color\"]);\n }\n createBucket(t2) {\n return new xu(t2);\n }\n queryRadius() {\n return tl(this.paint.get(\"fill-translate\"));\n }\n queryIntersectsFeature({ queryGeometry: t2, geometry: e2, transform: r2, pixelsToTileUnits: n2 }) {\n return ja(el(t2, this.paint.get(\"fill-translate\"), this.paint.get(\"fill-translate-anchor\"), -r2.bearingInRadians, n2), e2);\n }\n isTileClipped() {\n return true;\n }\n }\n const Au = to([{ name: \"a_pos\", components: 2, type: \"Int16\" }, { name: \"a_normal_ed\", components: 4, type: \"Int16\" }], 4), Su = to([{ name: \"a_centroid\", components: 2, type: \"Int16\" }], 4), { members: ku } = Au;\n class Eu {\n constructor(t2, e2, r2, n2, i2) {\n this.properties = {}, this.extent = r2, this.type = 0, this.id = void 0, this._pbf = t2, this._geometry = -1, this._keys = n2, this._values = i2, t2.readFields(Tu, this, e2);\n }\n loadGeometry() {\n const t2 = this._pbf;\n t2.pos = this._geometry;\n const e2 = t2.readVarint() + t2.pos, n2 = [];\n let i2, s2 = 1, o2 = 0, a2 = 0, l2 = 0;\n for (; t2.pos < e2; ) {\n if (o2 <= 0) {\n const e3 = t2.readVarint();\n s2 = 7 & e3, o2 = e3 >> 3;\n }\n if (o2--, 1 === s2 || 2 === s2) a2 += t2.readSVarint(), l2 += t2.readSVarint(), 1 === s2 && (i2 && n2.push(i2), i2 = []), i2 && i2.push(new r(a2, l2));\n else {\n if (7 !== s2) throw new Error(`unknown command ${s2}`);\n i2 && i2.push(i2[0].clone());\n }\n }\n return i2 && n2.push(i2), n2;\n }\n bbox() {\n const t2 = this._pbf;\n t2.pos = this._geometry;\n const e2 = t2.readVarint() + t2.pos;\n let r2 = 1, n2 = 0, i2 = 0, s2 = 0, o2 = 1 / 0, a2 = -1 / 0, l2 = 1 / 0, u2 = -1 / 0;\n for (; t2.pos < e2; ) {\n if (n2 <= 0) {\n const e3 = t2.readVarint();\n r2 = 7 & e3, n2 = e3 >> 3;\n }\n if (n2--, 1 === r2 || 2 === r2) i2 += t2.readSVarint(), s2 += t2.readSVarint(), i2 < o2 && (o2 = i2), i2 > a2 && (a2 = i2), s2 < l2 && (l2 = s2), s2 > u2 && (u2 = s2);\n else if (7 !== r2) throw new Error(`unknown command ${r2}`);\n }\n return [o2, l2, a2, u2];\n }\n toGeoJSON(t2, e2, r2) {\n const n2 = this.extent * Math.pow(2, r2), i2 = this.extent * t2, s2 = this.extent * e2, o2 = this.loadGeometry();\n function a2(t3) {\n return [360 * (t3.x + i2) / n2 - 180, 360 / Math.PI * Math.atan(Math.exp((1 - 2 * (t3.y + s2) / n2) * Math.PI)) - 90];\n }\n function l2(t3) {\n return t3.map(a2);\n }\n let u2;\n if (1 === this.type) {\n const t3 = [];\n for (const e4 of o2) t3.push(e4[0]);\n const e3 = l2(t3);\n u2 = 1 === t3.length ? { type: \"Point\", coordinates: e3[0] } : { type: \"MultiPoint\", coordinates: e3 };\n } else if (2 === this.type) {\n const t3 = o2.map(l2);\n u2 = 1 === t3.length ? { type: \"LineString\", coordinates: t3[0] } : { type: \"MultiLineString\", coordinates: t3 };\n } else {\n if (3 !== this.type) throw new Error(\"unknown feature type\");\n {\n const t3 = Iu(o2), e3 = [];\n for (const r3 of t3) e3.push(r3.map(l2));\n u2 = 1 === e3.length ? { type: \"Polygon\", coordinates: e3[0] } : { type: \"MultiPolygon\", coordinates: e3 };\n }\n }\n const c2 = { type: \"Feature\", geometry: u2, properties: this.properties };\n return null != this.id && (c2.id = this.id), c2;\n }\n }\n function Tu(t2, e2, r2) {\n 1 === t2 ? e2.id = r2.readVarint() : 2 === t2 ? (function(t3, e3) {\n const r3 = t3.readVarint() + t3.pos;\n for (; t3.pos < r3; ) {\n const r4 = e3._keys[t3.readVarint()], n2 = e3._values[t3.readVarint()];\n e3.properties[r4] = n2;\n }\n })(r2, e2) : 3 === t2 ? e2.type = r2.readVarint() : 4 === t2 && (e2._geometry = r2.pos);\n }\n function Iu(t2) {\n const e2 = t2.length;\n if (e2 <= 1) return [t2];\n const r2 = [];\n let n2, i2;\n for (let s2 = 0; s2 < e2; s2++) {\n const e3 = Mu(t2[s2]);\n 0 !== e3 && (void 0 === i2 && (i2 = e3 < 0), i2 === e3 < 0 ? (n2 && r2.push(n2), n2 = [t2[s2]]) : n2 && n2.push(t2[s2]));\n }\n return n2 && r2.push(n2), r2;\n }\n function Mu(t2) {\n let e2 = 0;\n for (let r2, n2, i2 = 0, s2 = t2.length, o2 = s2 - 1; i2 < s2; o2 = i2++) r2 = t2[i2], n2 = t2[o2], e2 += (n2.x - r2.x) * (r2.y + n2.y);\n return e2;\n }\n Eu.types = [\"Unknown\", \"Point\", \"LineString\", \"Polygon\"];\n class Fu {\n constructor(t2, e2) {\n this.version = 1, this.name = \"\", this.extent = 4096, this.length = 0, this._pbf = t2, this._keys = [], this._values = [], this._features = [], t2.readFields(Du, this, e2), this.length = this._features.length;\n }\n feature(t2) {\n if (t2 < 0 || t2 >= this._features.length) throw new Error(\"feature index out of bounds\");\n this._pbf.pos = this._features[t2];\n const e2 = this._pbf.readVarint() + this._pbf.pos;\n return new Eu(this._pbf, e2, this.extent, this._keys, this._values);\n }\n }\n function Du(t2, e2, r2) {\n 15 === t2 ? e2.version = r2.readVarint() : 1 === t2 ? e2.name = r2.readString() : 5 === t2 ? e2.extent = r2.readVarint() : 2 === t2 ? e2._features.push(r2.pos) : 3 === t2 ? e2._keys.push(r2.readString()) : 4 === t2 && e2._values.push((function(t3) {\n let e3 = null;\n const r3 = t3.readVarint() + t3.pos;\n for (; t3.pos < r3; ) {\n const r4 = t3.readVarint() >> 3;\n e3 = 1 === r4 ? t3.readString() : 2 === r4 ? t3.readFloat() : 3 === r4 ? t3.readDouble() : 4 === r4 ? t3.readVarint64() : 5 === r4 ? t3.readVarint() : 6 === r4 ? t3.readSVarint() : 7 === r4 ? t3.readBoolean() : null;\n }\n if (null == e3) throw new Error(\"unknown feature value\");\n return e3;\n })(r2));\n }\n class Pu {\n constructor(t2, e2) {\n this.layers = t2.readFields(zu, {}, e2);\n }\n }\n function zu(t2, e2, r2) {\n if (3 === t2) {\n const t3 = new Fu(r2, r2.readVarint() + r2.pos);\n t3.length && (e2[t3.name] = t3);\n }\n }\n const Bu = Math.pow(2, 13);\n function Vu(t2, e2, r2, n2, i2, s2, o2, a2) {\n t2.emplaceBack(e2, r2, 2 * Math.floor(n2 * Bu) + o2, i2 * Bu * 2, s2 * Bu * 2, Math.round(a2));\n }\n class Cu {\n constructor(t2) {\n this.zoom = t2.zoom, this.overscaling = t2.overscaling, this.layers = t2.layers, this.layerIds = this.layers.map(((t3) => t3.id)), this.index = t2.index, this.hasDependencies = false, this.layoutVertexArray = new Uo(), this.centroidVertexArray = new Ro(), this.indexArray = new Jo(), this.programConfigurations = new Pa(t2.layers, t2.zoom), this.segments = new ra(), this.stateDependentLayerIds = this.layers.filter(((t3) => t3.isStateDependent())).map(((t3) => t3.id));\n }\n populate(t2, e2, r2) {\n this.features = [], this.hasDependencies = Vl(\"fill-extrusion\", this.layers, e2);\n for (const { feature: n2, id: i2, index: s2, sourceLayerIndex: o2 } of t2) {\n const t3 = this.layers[0]._featureFilter.needGeometry, a2 = Oa(n2, t3);\n if (!this.layers[0]._featureFilter.filter(new Fs(this.zoom), a2, r2)) continue;\n const l2 = { id: i2, sourceLayerIndex: o2, index: s2, geometry: t3 ? a2.geometry : La(n2), properties: n2.properties, type: n2.type, patterns: {} };\n this.hasDependencies ? this.features.push(Cl(\"fill-extrusion\", this.layers, l2, { zoom: this.zoom }, e2)) : this.addFeature(l2, l2.geometry, s2, r2, {}, e2.subdivisionGranularity), e2.featureIndex.insert(n2, l2.geometry, s2, o2, this.index, true);\n }\n }\n addFeatures(t2, e2, r2) {\n for (const n2 of this.features) {\n const { geometry: i2 } = n2;\n this.addFeature(n2, i2, n2.index, e2, r2, t2.subdivisionGranularity);\n }\n }\n update(t2, e2, r2) {\n this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t2, e2, this.stateDependentLayers, { imagePositions: r2 });\n }\n isEmpty() {\n return 0 === this.layoutVertexArray.length && 0 === this.centroidVertexArray.length;\n }\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n upload(t2) {\n this.uploaded || (this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, ku), this.centroidVertexBuffer = t2.createVertexBuffer(this.centroidVertexArray, Su.members, true), this.indexBuffer = t2.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(t2), this.uploaded = true;\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.centroidVertexBuffer.destroy());\n }\n addFeature(t2, e2, r2, n2, i2, s2) {\n for (const r3 of tn(e2, 500)) {\n const e3 = { x: 0, y: 0, sampleCount: 0 }, i3 = this.layoutVertexArray.length;\n this.processPolygon(e3, n2, t2, r3, s2);\n const o2 = this.layoutVertexArray.length - i3, a2 = Math.floor(e3.x / e3.sampleCount), l2 = Math.floor(e3.y / e3.sampleCount);\n for (let t3 = 0; t3 < o2; t3++) this.centroidVertexArray.emplaceBack(a2, l2);\n }\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t2, r2, { imagePositions: i2, canonical: n2 });\n }\n processPolygon(t2, e2, r2, n2, i2) {\n if (n2.length < 1) return;\n if (Ru(n2[0])) return;\n for (const e3 of n2) 0 !== e3.length && Lu(t2, e3);\n const s2 = { segment: this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray) }, o2 = i2.fill.getGranularityForZoomLevel(e2.z), a2 = \"Polygon\" === Eu.types[r2.type];\n for (const t3 of n2) {\n if (0 === t3.length) continue;\n if (Ru(t3)) continue;\n const e3 = du(t3, o2, a2);\n this._generateSideFaces(e3, s2);\n }\n if (!a2) return;\n const l2 = fu(n2, e2, o2, false), u2 = this.layoutVertexArray;\n mu(((t3, e3) => {\n Vu(u2, t3, e3, 0, 0, 1, 1, 0);\n }), this.segments, this.layoutVertexArray, this.indexArray, l2.verticesFlattened, l2.indicesTriangles);\n }\n _generateSideFaces(t2, e2) {\n let r2 = 0;\n for (let n2 = 1; n2 < t2.length; n2++) {\n const i2 = t2[n2], s2 = t2[n2 - 1];\n if (Ou(i2, s2)) continue;\n e2.segment.vertexLength + 4 > ra.MAX_VERTEX_ARRAY_LENGTH && (e2.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));\n const o2 = i2.sub(s2)._perp()._unit(), a2 = s2.dist(i2);\n r2 + a2 > 32768 && (r2 = 0), Vu(this.layoutVertexArray, i2.x, i2.y, o2.x, o2.y, 0, 0, r2), Vu(this.layoutVertexArray, i2.x, i2.y, o2.x, o2.y, 0, 1, r2), r2 += a2, Vu(this.layoutVertexArray, s2.x, s2.y, o2.x, o2.y, 0, 0, r2), Vu(this.layoutVertexArray, s2.x, s2.y, o2.x, o2.y, 0, 1, r2);\n const l2 = e2.segment.vertexLength;\n this.indexArray.emplaceBack(l2, l2 + 2, l2 + 1), this.indexArray.emplaceBack(l2 + 1, l2 + 2, l2 + 3), e2.segment.vertexLength += 4, e2.segment.primitiveLength += 2;\n }\n }\n }\n function Lu(t2, e2) {\n for (let r2 = 0; r2 < e2.length; r2++) {\n const n2 = e2[r2];\n r2 === e2.length - 1 && e2[0].x === n2.x && e2[0].y === n2.y || (t2.x += n2.x, t2.y += n2.y, t2.sampleCount++);\n }\n }\n function Ou(t2, e2) {\n return t2.x === e2.x && (t2.x < 0 || t2.x > M) || t2.y === e2.y && (t2.y < 0 || t2.y > M);\n }\n function Ru(t2) {\n return t2.every(((t3) => t3.x < 0)) || t2.every(((t3) => t3.x > M)) || t2.every(((t3) => t3.y < 0)) || t2.every(((t3) => t3.y > M));\n }\n let Nu;\n us(\"FillExtrusionBucket\", Cu, { omit: [\"layers\", \"features\"] });\n var $u = { get paint() {\n return Nu = Nu || new Xs({ \"fill-extrusion-opacity\": new $s(vt[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]), \"fill-extrusion-color\": new Us(vt[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]), \"fill-extrusion-translate\": new $s(vt[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]), \"fill-extrusion-translate-anchor\": new $s(vt[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]), \"fill-extrusion-pattern\": new qs(vt[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]), \"fill-extrusion-height\": new Us(vt[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]), \"fill-extrusion-base\": new Us(vt[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]), \"fill-extrusion-vertical-gradient\": new $s(vt[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"]) });\n } };\n class Uu extends Ys {\n constructor(t2, e2) {\n super(t2, $u, e2);\n }\n createBucket(t2) {\n return new Cu(t2);\n }\n queryRadius() {\n return tl(this.paint.get(\"fill-extrusion-translate\"));\n }\n is3D() {\n return true;\n }\n queryIntersectsFeature({ queryGeometry: t2, feature: e2, featureState: n2, geometry: i2, transform: s2, pixelsToTileUnits: o2, pixelPosMatrix: a2 }) {\n const l2 = el(t2, this.paint.get(\"fill-extrusion-translate\"), this.paint.get(\"fill-extrusion-translate-anchor\"), -s2.bearingInRadians, o2), u2 = this.paint.get(\"fill-extrusion-height\").evaluate(e2, n2), c2 = this.paint.get(\"fill-extrusion-base\").evaluate(e2, n2), h2 = (function(t3, e3) {\n const n3 = [];\n for (const i3 of t3) {\n const t4 = [i3.x, i3.y, 0, 1];\n S(t4, t4, e3), n3.push(new r(t4[0] / t4[3], t4[1] / t4[3]));\n }\n return n3;\n })(l2, a2), p2 = (function(t3, e3, n3, i3) {\n const s3 = [], o3 = [], a3 = i3[8] * e3, l3 = i3[9] * e3, u3 = i3[10] * e3, c3 = i3[11] * e3, h3 = i3[8] * n3, p3 = i3[9] * n3, f2 = i3[10] * n3, d2 = i3[11] * n3;\n for (const e4 of t3) {\n const t4 = [], n4 = [];\n for (const s4 of e4) {\n const e5 = s4.x, o4 = s4.y, y2 = i3[0] * e5 + i3[4] * o4 + i3[12], m2 = i3[1] * e5 + i3[5] * o4 + i3[13], g2 = i3[2] * e5 + i3[6] * o4 + i3[14], x2 = i3[3] * e5 + i3[7] * o4 + i3[15], v2 = g2 + u3, b2 = x2 + c3, w2 = y2 + h3, _2 = m2 + p3, A2 = g2 + f2, S2 = x2 + d2, k2 = new r((y2 + a3) / b2, (m2 + l3) / b2);\n k2.z = v2 / b2, t4.push(k2);\n const E2 = new r(w2 / S2, _2 / S2);\n E2.z = A2 / S2, n4.push(E2);\n }\n s3.push(t4), o3.push(n4);\n }\n return [s3, o3];\n })(i2, c2, u2, a2);\n return (function(t3, e3, r2) {\n let n3 = 1 / 0;\n ja(r2, e3) && (n3 = ju(r2, e3[0]));\n for (let i3 = 0; i3 < e3.length; i3++) {\n const s3 = e3[i3], o3 = t3[i3];\n for (let t4 = 0; t4 < s3.length - 1; t4++) {\n const e4 = s3[t4], i4 = [e4, s3[t4 + 1], o3[t4 + 1], o3[t4], e4];\n Ua(r2, i4) && (n3 = Math.min(n3, ju(r2, i4)));\n }\n }\n return n3 !== 1 / 0 && n3;\n })(p2[0], p2[1], h2);\n }\n }\n function qu(t2, e2) {\n return t2.x * e2.x + t2.y * e2.y;\n }\n function ju(t2, e2) {\n if (1 === t2.length) {\n let r2 = 0;\n const n2 = e2[r2++];\n let i2;\n for (; !i2 || n2.equals(i2); ) if (i2 = e2[r2++], !i2) return 1 / 0;\n for (; r2 < e2.length; r2++) {\n const s2 = e2[r2], o2 = t2[0], a2 = i2.sub(n2), l2 = s2.sub(n2), u2 = o2.sub(n2), c2 = qu(a2, a2), h2 = qu(a2, l2), p2 = qu(l2, l2), f2 = qu(u2, a2), d2 = qu(u2, l2), y2 = c2 * p2 - h2 * h2, m2 = (p2 * f2 - h2 * d2) / y2, g2 = (c2 * d2 - h2 * f2) / y2, x2 = n2.z * (1 - m2 - g2) + i2.z * m2 + s2.z * g2;\n if (isFinite(x2)) return x2;\n }\n return 1 / 0;\n }\n {\n let t3 = 1 / 0;\n for (const r2 of e2) t3 = Math.min(t3, r2.z);\n return t3;\n }\n }\n const Gu = to([{ name: \"a_pos_normal\", components: 2, type: \"Int16\" }, { name: \"a_data\", components: 4, type: \"Uint8\" }], 4), { members: Xu } = Gu, Yu = to([{ name: \"a_uv_x\", components: 1, type: \"Float32\" }, { name: \"a_split_index\", components: 1, type: \"Float32\" }]), { members: Zu } = Yu, Hu = Math.cos(Math.PI / 180 * 37.5), Ku = Math.pow(2, 14) / 0.5;\n class Wu {\n constructor(t2) {\n this.zoom = t2.zoom, this.overscaling = t2.overscaling, this.layers = t2.layers, this.layerIds = this.layers.map(((t3) => t3.id)), this.index = t2.index, this.hasDependencies = false, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach(((t3) => {\n this.gradients[t3.id] = {};\n })), this.layoutVertexArray = new qo(), this.layoutVertexArray2 = new jo(), this.indexArray = new Jo(), this.programConfigurations = new Pa(t2.layers, t2.zoom), this.segments = new ra(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((t3) => t3.isStateDependent())).map(((t3) => t3.id));\n }\n populate(t2, e2, r2) {\n this.hasDependencies = Vl(\"line\", this.layers, e2) || this.hasLineDasharray(this.layers);\n const n2 = this.layers[0].layout.get(\"line-sort-key\"), i2 = !n2.isConstant(), s2 = [];\n for (const { feature: e3, id: o2, index: a2, sourceLayerIndex: l2 } of t2) {\n const t3 = this.layers[0]._featureFilter.needGeometry, u2 = Oa(e3, t3);\n if (!this.layers[0]._featureFilter.filter(new Fs(this.zoom), u2, r2)) continue;\n const c2 = i2 ? n2.evaluate(u2, {}, r2) : void 0, h2 = { id: o2, properties: e3.properties, type: e3.type, sourceLayerIndex: l2, index: a2, geometry: t3 ? u2.geometry : La(e3), patterns: {}, dashes: {}, sortKey: c2 };\n s2.push(h2);\n }\n i2 && s2.sort(((t3, e3) => t3.sortKey - e3.sortKey));\n for (const n3 of s2) {\n const { geometry: i3, index: s3, sourceLayerIndex: o2 } = n3;\n this.hasDependencies ? (Vl(\"line\", this.layers, e2) ? Cl(\"line\", this.layers, n3, { zoom: this.zoom }, e2) : this.hasLineDasharray(this.layers) && this.addLineDashDependencies(this.layers, n3, this.zoom, e2), this.patternFeatures.push(n3)) : this.addFeature(n3, i3, s3, r2, {}, {}, e2.subdivisionGranularity), e2.featureIndex.insert(t2[s3].feature, i3, s3, o2, this.index);\n }\n }\n update(t2, e2, r2, n2) {\n this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t2, e2, this.stateDependentLayers, { imagePositions: r2, dashPositions: n2 });\n }\n addFeatures(t2, e2, r2, n2) {\n for (const i2 of this.patternFeatures) this.addFeature(i2, i2.geometry, i2.index, e2, r2, n2, t2.subdivisionGranularity);\n }\n isEmpty() {\n return 0 === this.layoutVertexArray.length;\n }\n uploadPending() {\n return !this.uploaded || this.programConfigurations.needsUpload;\n }\n upload(t2) {\n this.uploaded || (0 !== this.layoutVertexArray2.length && (this.layoutVertexBuffer2 = t2.createVertexBuffer(this.layoutVertexArray2, Zu)), this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, Xu), this.indexBuffer = t2.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(t2), this.uploaded = true;\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());\n }\n lineFeatureClips(t2) {\n if (t2.properties && Object.prototype.hasOwnProperty.call(t2.properties, \"mapbox_clip_start\") && Object.prototype.hasOwnProperty.call(t2.properties, \"mapbox_clip_end\")) return { start: +t2.properties.mapbox_clip_start, end: +t2.properties.mapbox_clip_end };\n }\n addFeature(t2, e2, r2, n2, i2, s2, o2) {\n const a2 = this.layers[0].layout, l2 = a2.get(\"line-join\").evaluate(t2, {}), u2 = a2.get(\"line-cap\"), c2 = a2.get(\"line-miter-limit\"), h2 = a2.get(\"line-round-limit\");\n this.lineClips = this.lineFeatureClips(t2);\n for (const r3 of e2) this.addLine(r3, t2, l2, u2, c2, h2, n2, o2);\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t2, r2, { imagePositions: i2, dashPositions: s2, canonical: n2 });\n }\n addLine(t2, e2, r2, n2, i2, s2, o2, a2) {\n if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, t2 = du(t2, o2 ? a2.line.getGranularityForZoomLevel(o2.z) : 1), this.lineClips) {\n this.lineClipsArray.push(this.lineClips);\n for (let e3 = 0; e3 < t2.length - 1; e3++) this.totalDistance += t2[e3].dist(t2[e3 + 1]);\n this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);\n }\n const l2 = \"Polygon\" === Eu.types[e2.type];\n let u2 = t2.length;\n for (; u2 >= 2 && t2[u2 - 1].equals(t2[u2 - 2]); ) u2--;\n let c2 = 0;\n for (; c2 < u2 - 1 && t2[c2].equals(t2[c2 + 1]); ) c2++;\n if (u2 < (l2 ? 3 : 2)) return;\n \"bevel\" === r2 && (i2 = 1.05);\n const h2 = this.overscaling <= 16 ? 122880 / (512 * this.overscaling) : 0, p2 = this.segments.prepareSegment(10 * u2, this.layoutVertexArray, this.indexArray);\n let f2, d2, y2, m2, g2;\n this.e1 = this.e2 = -1, l2 && (f2 = t2[u2 - 2], g2 = t2[c2].sub(f2)._unit()._perp());\n for (let e3 = c2; e3 < u2; e3++) {\n if (y2 = e3 === u2 - 1 ? l2 ? t2[c2 + 1] : void 0 : t2[e3 + 1], y2 && t2[e3].equals(y2)) continue;\n g2 && (m2 = g2), f2 && (d2 = f2), f2 = t2[e3], g2 = y2 ? y2.sub(f2)._unit()._perp() : m2, m2 = m2 || g2;\n let o3 = m2.add(g2);\n 0 === o3.x && 0 === o3.y || o3._unit();\n const a3 = m2.x * g2.x + m2.y * g2.y, x2 = o3.x * g2.x + o3.y * g2.y, v2 = 0 !== x2 ? 1 / x2 : 1 / 0, b2 = 2 * Math.sqrt(2 - 2 * x2), w2 = x2 < Hu && d2 && y2, _2 = m2.x * g2.y - m2.y * g2.x > 0;\n if (w2 && e3 > c2) {\n const t3 = f2.dist(d2);\n if (t3 > 2 * h2) {\n const e4 = f2.sub(f2.sub(d2)._mult(h2 / t3)._round());\n this.updateDistance(d2, e4), this.addCurrentVertex(e4, m2, 0, 0, p2), d2 = e4;\n }\n }\n const A2 = d2 && y2;\n let S2 = A2 ? r2 : l2 ? \"butt\" : n2;\n if (A2 && \"round\" === S2 && (v2 < s2 ? S2 = \"miter\" : v2 <= 2 && (S2 = \"fakeround\")), \"miter\" === S2 && v2 > i2 && (S2 = \"bevel\"), \"bevel\" === S2 && (v2 > 2 && (S2 = \"flipbevel\"), v2 < i2 && (S2 = \"miter\")), d2 && this.updateDistance(d2, f2), \"miter\" === S2) o3._mult(v2), this.addCurrentVertex(f2, o3, 0, 0, p2);\n else if (\"flipbevel\" === S2) {\n if (v2 > 100) o3 = g2.mult(-1);\n else {\n const t3 = v2 * m2.add(g2).mag() / m2.sub(g2).mag();\n o3._perp()._mult(t3 * (_2 ? -1 : 1));\n }\n this.addCurrentVertex(f2, o3, 0, 0, p2), this.addCurrentVertex(f2, o3.mult(-1), 0, 0, p2);\n } else if (\"bevel\" === S2 || \"fakeround\" === S2) {\n const t3 = -Math.sqrt(v2 * v2 - 1), e4 = _2 ? t3 : 0, r3 = _2 ? 0 : t3;\n if (d2 && this.addCurrentVertex(f2, m2, e4, r3, p2), \"fakeround\" === S2) {\n const t4 = Math.round(180 * b2 / Math.PI / 20);\n for (let e5 = 1; e5 < t4; e5++) {\n let r4 = e5 / t4;\n if (0.5 !== r4) {\n const t5 = r4 - 0.5;\n r4 += r4 * t5 * (r4 - 1) * ((1.0904 + a3 * (a3 * (3.55645 - 1.43519 * a3) - 3.2452)) * t5 * t5 + (0.848013 + a3 * (0.215638 * a3 - 1.06021)));\n }\n const n3 = g2.sub(m2)._mult(r4)._add(m2)._unit()._mult(_2 ? -1 : 1);\n this.addHalfVertex(f2, n3.x, n3.y, false, _2, 0, p2);\n }\n }\n y2 && this.addCurrentVertex(f2, g2, -e4, -r3, p2);\n } else if (\"butt\" === S2) this.addCurrentVertex(f2, o3, 0, 0, p2);\n else if (\"square\" === S2) {\n const t3 = d2 ? 1 : -1;\n this.addCurrentVertex(f2, o3, t3, t3, p2);\n } else \"round\" === S2 && (d2 && (this.addCurrentVertex(f2, m2, 0, 0, p2), this.addCurrentVertex(f2, m2, 1, 1, p2, true)), y2 && (this.addCurrentVertex(f2, g2, -1, -1, p2, true), this.addCurrentVertex(f2, g2, 0, 0, p2)));\n if (w2 && e3 < u2 - 1) {\n const t3 = f2.dist(y2);\n if (t3 > 2 * h2) {\n const e4 = f2.add(y2.sub(f2)._mult(h2 / t3)._round());\n this.updateDistance(f2, e4), this.addCurrentVertex(e4, g2, 0, 0, p2), f2 = e4;\n }\n }\n }\n }\n addCurrentVertex(t2, e2, r2, n2, i2, s2 = false) {\n const o2 = e2.y * n2 - e2.x, a2 = -e2.y - e2.x * n2;\n this.addHalfVertex(t2, e2.x + e2.y * r2, e2.y - e2.x * r2, s2, false, r2, i2), this.addHalfVertex(t2, o2, a2, s2, true, -n2, i2), this.distance > Ku / 2 && 0 === this.totalDistance && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(t2, e2, r2, n2, i2, s2));\n }\n addHalfVertex({ x: t2, y: e2 }, r2, n2, i2, s2, o2, a2) {\n const l2 = 0.5 * (this.lineClips ? this.scaledDistance * (Ku - 1) : this.scaledDistance);\n this.layoutVertexArray.emplaceBack((t2 << 1) + (i2 ? 1 : 0), (e2 << 1) + (s2 ? 1 : 0), Math.round(63 * r2) + 128, Math.round(63 * n2) + 128, 1 + (0 === o2 ? 0 : o2 < 0 ? -1 : 1) | (63 & l2) << 2, l2 >> 6), this.lineClips && this.layoutVertexArray2.emplaceBack((this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start), this.lineClipsArray.length);\n const u2 = a2.vertexLength++;\n this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, u2, this.e2), a2.primitiveLength++), s2 ? this.e2 = u2 : this.e1 = u2;\n }\n updateScaledDistance() {\n this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance;\n }\n updateDistance(t2, e2) {\n this.distance += t2.dist(e2), this.updateScaledDistance();\n }\n hasLineDasharray(t2) {\n for (const e2 of t2) {\n const t3 = e2.paint.get(\"line-dasharray\");\n if (t3 && !t3.isConstant()) return true;\n }\n return false;\n }\n addLineDashDependencies(t2, e2, r2, n2) {\n for (const i2 of t2) {\n const t3 = i2.paint.get(\"line-dasharray\");\n if (!t3 || \"constant\" === t3.value.kind) continue;\n const s2 = \"round\" === i2.layout.get(\"line-cap\"), o2 = { dasharray: t3.value.evaluate({ zoom: r2 - 1 }, e2, {}), round: s2 }, a2 = { dasharray: t3.value.evaluate({ zoom: r2 }, e2, {}), round: s2 }, l2 = { dasharray: t3.value.evaluate({ zoom: r2 + 1 }, e2, {}), round: s2 }, u2 = `${o2.dasharray.join(\",\")},${o2.round}`, c2 = `${a2.dasharray.join(\",\")},${a2.round}`, h2 = `${l2.dasharray.join(\",\")},${l2.round}`;\n n2.dashDependencies[u2] = o2, n2.dashDependencies[c2] = a2, n2.dashDependencies[h2] = l2, e2.dashes[i2.id] = { min: u2, mid: c2, max: h2 };\n }\n }\n }\n let Ju, Qu;\n us(\"LineBucket\", Wu, { omit: [\"layers\", \"patternFeatures\"] });\n var tc = { get paint() {\n return Qu = Qu || new Xs({ \"line-opacity\": new Us(vt.paint_line[\"line-opacity\"]), \"line-color\": new Us(vt.paint_line[\"line-color\"]), \"line-translate\": new $s(vt.paint_line[\"line-translate\"]), \"line-translate-anchor\": new $s(vt.paint_line[\"line-translate-anchor\"]), \"line-width\": new Us(vt.paint_line[\"line-width\"]), \"line-gap-width\": new Us(vt.paint_line[\"line-gap-width\"]), \"line-offset\": new Us(vt.paint_line[\"line-offset\"]), \"line-blur\": new Us(vt.paint_line[\"line-blur\"]), \"line-dasharray\": new qs(vt.paint_line[\"line-dasharray\"]), \"line-pattern\": new qs(vt.paint_line[\"line-pattern\"]), \"line-gradient\": new Gs(vt.paint_line[\"line-gradient\"]) });\n }, get layout() {\n return Ju = Ju || new Xs({ \"line-cap\": new $s(vt.layout_line[\"line-cap\"]), \"line-join\": new Us(vt.layout_line[\"line-join\"]), \"line-miter-limit\": new $s(vt.layout_line[\"line-miter-limit\"]), \"line-round-limit\": new $s(vt.layout_line[\"line-round-limit\"]), \"line-sort-key\": new Us(vt.layout_line[\"line-sort-key\"]) });\n } };\n class ec extends Us {\n possiblyEvaluate(t2, e2) {\n return e2 = new Fs(Math.floor(e2.zoom), { now: e2.now, fadeDuration: e2.fadeDuration, zoomHistory: e2.zoomHistory, transition: e2.transition }), super.possiblyEvaluate(t2, e2);\n }\n evaluate(t2, e2, r2, n2) {\n return e2 = O({}, e2, { zoom: Math.floor(e2.zoom) }), super.evaluate(t2, e2, r2, n2);\n }\n }\n let rc;\n class nc extends Ys {\n constructor(t2, e2) {\n super(t2, tc, e2), this.gradientVersion = 0, rc || (rc = new ec(tc.paint.properties[\"line-width\"].specification), rc.useIntegerZoom = true);\n }\n _handleSpecialPaintPropertyUpdate(t2) {\n if (\"line-gradient\" === t2) {\n const t3 = this.gradientExpression();\n this.stepInterpolant = !!(function(t4) {\n return void 0 !== t4._styleExpression;\n })(t3) && t3._styleExpression.expression instanceof ar, this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER;\n }\n }\n gradientExpression() {\n return this._transitionablePaint._values[\"line-gradient\"].value.expression;\n }\n recalculate(t2, e2) {\n super.recalculate(t2, e2), this.paint._values[\"line-floorwidth\"] = rc.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value, t2);\n }\n createBucket(t2) {\n return new Wu(t2);\n }\n queryRadius(t2) {\n const e2 = t2, r2 = ic(Qa(\"line-width\", this, e2), Qa(\"line-gap-width\", this, e2)), n2 = Qa(\"line-offset\", this, e2);\n return r2 / 2 + Math.abs(n2) + tl(this.paint.get(\"line-translate\"));\n }\n queryIntersectsFeature({ queryGeometry: t2, feature: e2, featureState: n2, geometry: i2, transform: s2, pixelsToTileUnits: o2 }) {\n const a2 = el(t2, this.paint.get(\"line-translate\"), this.paint.get(\"line-translate-anchor\"), -s2.bearingInRadians, o2), l2 = o2 / 2 * ic(this.paint.get(\"line-width\").evaluate(e2, n2), this.paint.get(\"line-gap-width\").evaluate(e2, n2)), u2 = this.paint.get(\"line-offset\").evaluate(e2, n2);\n return u2 && (i2 = (function(t3, e3) {\n const n3 = [];\n for (let i3 = 0; i3 < t3.length; i3++) {\n const s3 = rl(t3[i3]), o3 = [];\n for (let t4 = 0; t4 < s3.length; t4++) {\n const n4 = s3[t4], i4 = s3[t4 - 1], a3 = s3[t4 + 1], l3 = 0 === t4 ? new r(0, 0) : n4.sub(i4)._unit()._perp(), u3 = t4 === s3.length - 1 ? new r(0, 0) : a3.sub(n4)._unit()._perp(), c2 = l3._add(u3)._unit(), h2 = c2.x * u3.x + c2.y * u3.y;\n 0 !== h2 && c2._mult(1 / h2), o3.push(c2._mult(e3)._add(n4));\n }\n n3.push(o3);\n }\n return n3;\n })(i2, u2 * o2)), (function(t3, e3, r2) {\n for (let n3 = 0; n3 < e3.length; n3++) {\n const i3 = e3[n3];\n if (t3.length >= 3) {\n for (let e4 = 0; e4 < i3.length; e4++) if (Wa(t3, i3[e4])) return true;\n }\n if (Ga(t3, i3, r2)) return true;\n }\n return false;\n })(a2, i2, l2);\n }\n isTileClipped() {\n return true;\n }\n }\n function ic(t2, e2) {\n return e2 > 0 ? e2 + 2 * t2 : t2;\n }\n const sc = to([{ name: \"a_pos_offset\", components: 4, type: \"Int16\" }, { name: \"a_data\", components: 4, type: \"Uint16\" }, { name: \"a_pixeloffset\", components: 4, type: \"Int16\" }], 4), oc = to([{ name: \"a_projected_pos\", components: 3, type: \"Float32\" }], 4);\n to([{ name: \"a_fade_opacity\", components: 1, type: \"Uint32\" }], 4);\n const ac = to([{ name: \"a_placed\", components: 2, type: \"Uint8\" }, { name: \"a_shift\", components: 2, type: \"Float32\" }, { name: \"a_box_real\", components: 2, type: \"Int16\" }]);\n to([{ type: \"Int16\", name: \"anchorPointX\" }, { type: \"Int16\", name: \"anchorPointY\" }, { type: \"Int16\", name: \"x1\" }, { type: \"Int16\", name: \"y1\" }, { type: \"Int16\", name: \"x2\" }, { type: \"Int16\", name: \"y2\" }, { type: \"Uint32\", name: \"featureIndex\" }, { type: \"Uint16\", name: \"sourceLayerIndex\" }, { type: \"Uint16\", name: \"bucketIndex\" }]);\n const lc = to([{ name: \"a_pos\", components: 2, type: \"Int16\" }, { name: \"a_anchor_pos\", components: 2, type: \"Int16\" }, { name: \"a_extrude\", components: 2, type: \"Int16\" }], 4), uc = to([{ name: \"a_pos\", components: 2, type: \"Float32\" }, { name: \"a_radius\", components: 1, type: \"Float32\" }, { name: \"a_flags\", components: 2, type: \"Int16\" }], 4);\n function cc(t2, e2, r2) {\n return t2.sections.forEach(((t3) => {\n t3.text = (function(t4, e3, r3) {\n const n2 = e3.layout.get(\"text-transform\").evaluate(r3, {});\n return \"uppercase\" === n2 ? t4 = t4.toLocaleUpperCase() : \"lowercase\" === n2 && (t4 = t4.toLocaleLowerCase()), Ms.applyArabicShaping && (t4 = Ms.applyArabicShaping(t4)), t4;\n })(t3.text, e2, r2);\n })), t2;\n }\n to([{ name: \"triangle\", components: 3, type: \"Uint16\" }]), to([{ type: \"Int16\", name: \"anchorX\" }, { type: \"Int16\", name: \"anchorY\" }, { type: \"Uint16\", name: \"glyphStartIndex\" }, { type: \"Uint16\", name: \"numGlyphs\" }, { type: \"Uint32\", name: \"vertexStartIndex\" }, { type: \"Uint32\", name: \"lineStartIndex\" }, { type: \"Uint32\", name: \"lineLength\" }, { type: \"Uint16\", name: \"segment\" }, { type: \"Uint16\", name: \"lowerSize\" }, { type: \"Uint16\", name: \"upperSize\" }, { type: \"Float32\", name: \"lineOffsetX\" }, { type: \"Float32\", name: \"lineOffsetY\" }, { type: \"Uint8\", name: \"writingMode\" }, { type: \"Uint8\", name: \"placedOrientation\" }, { type: \"Uint8\", name: \"hidden\" }, { type: \"Uint32\", name: \"crossTileID\" }, { type: \"Int16\", name: \"associatedIconIndex\" }]), to([{ type: \"Int16\", name: \"anchorX\" }, { type: \"Int16\", name: \"anchorY\" }, { type: \"Int16\", name: \"rightJustifiedTextSymbolIndex\" }, { type: \"Int16\", name: \"centerJustifiedTextSymbolIndex\" }, { type: \"Int16\", name: \"leftJustifiedTextSymbolIndex\" }, { type: \"Int16\", name: \"verticalPlacedTextSymbolIndex\" }, { type: \"Int16\", name: \"placedIconSymbolIndex\" }, { type: \"Int16\", name: \"verticalPlacedIconSymbolIndex\" }, { type: \"Uint16\", name: \"key\" }, { type: \"Uint16\", name: \"textBoxStartIndex\" }, { type: \"Uint16\", name: \"textBoxEndIndex\" }, { type: \"Uint16\", name: \"verticalTextBoxStartIndex\" }, { type: \"Uint16\", name: \"verticalTextBoxEndIndex\" }, { type: \"Uint16\", name: \"iconBoxStartIndex\" }, { type: \"Uint16\", name: \"iconBoxEndIndex\" }, { type: \"Uint16\", name: \"verticalIconBoxStartIndex\" }, { type: \"Uint16\", name: \"verticalIconBoxEndIndex\" }, { type: \"Uint16\", name: \"featureIndex\" }, { type: \"Uint16\", name: \"numHorizontalGlyphVertices\" }, { type: \"Uint16\", name: \"numVerticalGlyphVertices\" }, { type: \"Uint16\", name: \"numIconVertices\" }, { type: \"Uint16\", name: \"numVerticalIconVertices\" }, { type: \"Uint16\", name: \"useRuntimeCollisionCircles\" }, { type: \"Uint32\", name: \"crossTileID\" }, { type: \"Float32\", name: \"textBoxScale\" }, { type: \"Float32\", name: \"collisionCircleDiameter\" }, { type: \"Uint16\", name: \"textAnchorOffsetStartIndex\" }, { type: \"Uint16\", name: \"textAnchorOffsetEndIndex\" }]), to([{ type: \"Float32\", name: \"offsetX\" }]), to([{ type: \"Int16\", name: \"x\" }, { type: \"Int16\", name: \"y\" }, { type: \"Int16\", name: \"tileUnitDistanceFromAnchor\" }]), to([{ type: \"Uint16\", name: \"textAnchor\" }, { type: \"Float32\", components: 2, name: \"textOffset\" }]);\n var hc = 24;\n const pc = { \"!\": \"\\uFE15\", \"#\": \"\\uFF03\", $: \"\\uFF04\", \"%\": \"\\uFF05\", \"&\": \"\\uFF06\", \"(\": \"\\uFE35\", \")\": \"\\uFE36\", \"*\": \"\\uFF0A\", \"+\": \"\\uFF0B\", \",\": \"\\uFE10\", \"-\": \"\\uFE32\", \".\": \"\\u30FB\", \"/\": \"\\uFF0F\", \":\": \"\\uFE13\", \";\": \"\\uFE14\", \"<\": \"\\uFE3F\", \"=\": \"\\uFF1D\", \">\": \"\\uFE40\", \"?\": \"\\uFE16\", \"@\": \"\\uFF20\", \"[\": \"\\uFE47\", \"\\\\\": \"\\uFF3C\", \"]\": \"\\uFE48\", \"^\": \"\\uFF3E\", _: \"\\uFE33\", \"`\": \"\\uFF40\", \"{\": \"\\uFE37\", \"|\": \"\\u2015\", \"}\": \"\\uFE38\", \"~\": \"\\uFF5E\", \"\\xA2\": \"\\uFFE0\", \"\\xA3\": \"\\uFFE1\", \"\\xA5\": \"\\uFFE5\", \"\\xA6\": \"\\uFFE4\", \"\\xAC\": \"\\uFFE2\", \"\\xAF\": \"\\uFFE3\", \"\\u2013\": \"\\uFE32\", \"\\u2014\": \"\\uFE31\", \"\\u2018\": \"\\uFE43\", \"\\u2019\": \"\\uFE44\", \"\\u201C\": \"\\uFE41\", \"\\u201D\": \"\\uFE42\", \"\\u2026\": \"\\uFE19\", \"\\u22EF\": \"\\uFE19\", \"\\u2027\": \"\\u30FB\", \"\\u20A9\": \"\\uFFE6\", \"\\u3001\": \"\\uFE11\", \"\\u3002\": \"\\uFE12\", \"\\u3008\": \"\\uFE3F\", \"\\u3009\": \"\\uFE40\", \"\\u300A\": \"\\uFE3D\", \"\\u300B\": \"\\uFE3E\", \"\\u300C\": \"\\uFE41\", \"\\u300D\": \"\\uFE42\", \"\\u300E\": \"\\uFE43\", \"\\u300F\": \"\\uFE44\", \"\\u3010\": \"\\uFE3B\", \"\\u3011\": \"\\uFE3C\", \"\\u3014\": \"\\uFE39\", \"\\u3015\": \"\\uFE3A\", \"\\u3016\": \"\\uFE17\", \"\\u3017\": \"\\uFE18\", \"\\uFF01\": \"\\uFE15\", \"\\uFF08\": \"\\uFE35\", \"\\uFF09\": \"\\uFE36\", \"\\uFF0C\": \"\\uFE10\", \"\\uFF0D\": \"\\uFE32\", \"\\uFF0E\": \"\\u30FB\", \"\\uFF1A\": \"\\uFE13\", \"\\uFF1B\": \"\\uFE14\", \"\\uFF1C\": \"\\uFE3F\", \"\\uFF1E\": \"\\uFE40\", \"\\uFF1F\": \"\\uFE16\", \"\\uFF3B\": \"\\uFE47\", \"\\uFF3D\": \"\\uFE48\", \"\\uFF3F\": \"\\uFE33\", \"\\uFF5B\": \"\\uFE37\", \"\\uFF5C\": \"\\u2015\", \"\\uFF5D\": \"\\uFE38\", \"\\uFF5F\": \"\\uFE35\", \"\\uFF60\": \"\\uFE36\", \"\\uFF61\": \"\\uFE12\", \"\\uFF62\": \"\\uFE41\", \"\\uFF63\": \"\\uFE42\" }, fc = { 10: true, 32: true, 38: true, 41: true, 43: true, 45: true, 47: true, 173: true, 183: true, 8203: true, 8208: true, 8211: true, 8231: true }, dc = { 40: true };\n function yc(t2, e2, r2, n2, i2, s2) {\n if (\"fontStack\" in e2) {\n const n3 = r2[e2.fontStack], s3 = n3 && n3[t2];\n return s3 ? s3.metrics.advance * e2.scale + i2 : 0;\n }\n {\n const t3 = n2[e2.imageName];\n return t3 ? t3.displaySize[0] * e2.scale * hc / s2 + i2 : 0;\n }\n }\n function mc(t2, e2, r2, n2) {\n const i2 = Math.pow(t2 - e2, 2);\n return n2 ? t2 < e2 ? i2 / 2 : 2 * i2 : i2 + Math.abs(r2) * r2;\n }\n function gc(t2, e2, r2) {\n let n2 = 0;\n return 10 === t2 && (n2 -= 1e4), r2 && (n2 += 150), 40 !== t2 && 65288 !== t2 || (n2 += 50), 41 !== e2 && 65289 !== e2 || (n2 += 50), n2;\n }\n function xc(t2, e2, r2, n2, i2, s2) {\n let o2 = null, a2 = mc(e2, r2, i2, s2);\n for (const t3 of n2) {\n const n3 = mc(e2 - t3.x, r2, i2, s2) + t3.badness;\n n3 <= a2 && (o2 = t3, a2 = n3);\n }\n return { index: t2, x: e2, priorBreak: o2, badness: a2 };\n }\n function vc(t2) {\n return t2 ? vc(t2.priorBreak).concat(t2.index) : [];\n }\n class bc {\n constructor(t2 = \"\", e2 = [], r2 = []) {\n this.text = t2, this.sections = e2, this.sectionIndex = r2, this.imageSectionID = null;\n }\n static fromFeature(t2, e2) {\n const r2 = new bc();\n for (let n2 = 0; n2 < t2.sections.length; n2++) {\n const i2 = t2.sections[n2];\n i2.image ? r2.addImageSection(i2) : r2.addTextSection(i2, e2);\n }\n return r2;\n }\n length() {\n return [...this.text].length;\n }\n getSection(t2) {\n return this.sections[this.sectionIndex[t2]];\n }\n getSectionIndex(t2) {\n return this.sectionIndex[t2];\n }\n verticalizePunctuation() {\n this.text = (function(t2) {\n let e2 = \"\", r2 = { premature: true, value: void 0 };\n const n2 = t2[Symbol.iterator]();\n let i2 = n2.next();\n const s2 = t2[Symbol.iterator]();\n s2.next();\n let o2 = s2.next();\n for (; !i2.done; ) e2 += !o2.done && Ss(o2.value.codePointAt(0)) && !pc[o2.value] || !r2.premature && Ss(r2.value.codePointAt(0)) && !pc[r2.value] || !pc[i2.value] ? i2.value : pc[i2.value], r2 = { value: i2.value, premature: false }, i2 = n2.next(), o2 = s2.next();\n return e2;\n })(this.text);\n }\n hasZeroWidthSpaces() {\n return this.text.includes(\"\\u200B\");\n }\n trim() {\n const t2 = this.text.match(/^\\s*/), e2 = t2 ? t2[0].length : 0, r2 = this.text.match(/\\S\\s*$/), n2 = r2 ? r2[0].length - 1 : 0;\n this.text = this.text.substring(e2, this.text.length - n2), this.sectionIndex = this.sectionIndex.slice(e2, this.sectionIndex.length - n2);\n }\n substring(t2, e2) {\n const r2 = [...this.text].slice(t2, e2).join(\"\"), n2 = this.sectionIndex.slice(t2, e2);\n return new bc(r2, this.sections, n2);\n }\n toCodeUnitIndex(t2) {\n return [...this.text].slice(0, t2).join(\"\").length;\n }\n toString() {\n return this.text;\n }\n getMaxScale() {\n return this.sectionIndex.reduce(((t2, e2) => Math.max(t2, this.sections[e2].scale)), 0);\n }\n getMaxImageSize(t2) {\n let e2 = 0, r2 = 0;\n for (let n2 = 0; n2 < this.length(); n2++) {\n const i2 = this.getSection(n2);\n if (\"imageName\" in i2) {\n const n3 = t2[i2.imageName];\n if (!n3) continue;\n const s2 = n3.displaySize;\n e2 = Math.max(e2, s2[0]), r2 = Math.max(r2, s2[1]);\n }\n }\n return { maxImageWidth: e2, maxImageHeight: r2 };\n }\n addTextSection(t2, e2) {\n this.text += t2.text, this.sections.push({ scale: t2.scale || 1, verticalAlign: t2.verticalAlign || \"bottom\", fontStack: t2.fontStack || e2 });\n const r2 = this.sections.length - 1;\n this.sectionIndex.push(...[...t2.text].map((() => r2)));\n }\n addImageSection(t2) {\n const e2 = t2.image ? t2.image.name : \"\";\n if (0 === e2.length) return void j(\"Can't add FormattedSection with an empty image.\");\n const r2 = this.getNextImageSectionCharCode();\n r2 ? (this.text += String.fromCharCode(r2), this.sections.push({ scale: 1, verticalAlign: t2.verticalAlign || \"bottom\", imageName: e2 }), this.sectionIndex.push(this.sections.length - 1)) : j(\"Reached maximum number of images 6401\");\n }\n getNextImageSectionCharCode() {\n return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);\n }\n determineLineBreaks(t2, e2, r2, n2, i2) {\n const s2 = [], o2 = this.determineAverageLineWidth(t2, e2, r2, n2, i2), a2 = this.hasZeroWidthSpaces();\n let l2 = 0, u2 = 0;\n const c2 = this.text[Symbol.iterator]();\n let h2 = c2.next();\n const p2 = this.text[Symbol.iterator]();\n p2.next();\n let f2 = p2.next();\n const d2 = this.text[Symbol.iterator]();\n d2.next(), d2.next();\n let y2 = d2.next();\n for (; !h2.done; ) {\n const e3 = this.getSection(u2), m2 = h2.value.codePointAt(0);\n if (xs(m2) || (l2 += yc(m2, e3, r2, n2, t2, i2)), !f2.done) {\n const t3 = ms(m2), r3 = f2.value.codePointAt(0);\n (fc[m2] || t3 || \"imageName\" in e3 || !y2.done && dc[r3]) && s2.push(xc(u2 + 1, l2, o2, s2, gc(m2, r3, t3 && a2), false));\n }\n u2++, h2 = c2.next(), f2 = p2.next(), y2 = d2.next();\n }\n return vc(xc(this.length(), l2, o2, s2, 0, true));\n }\n determineAverageLineWidth(t2, e2, r2, n2, i2) {\n let s2 = 0, o2 = 0;\n for (const e3 of this.text) {\n const a2 = this.getSection(o2);\n s2 += yc(e3.codePointAt(0), a2, r2, n2, t2, i2), o2++;\n }\n return s2 / Math.max(1, Math.ceil(s2 / e2));\n }\n }\n const wc = 4294967296, _c = 1 / wc, Ac = \"undefined\" == typeof TextDecoder ? null : new TextDecoder(\"utf-8\");\n class Sc {\n constructor(t2 = new Uint8Array(16)) {\n this.buf = ArrayBuffer.isView(t2) ? t2 : new Uint8Array(t2), this.dataView = new DataView(this.buf.buffer), this.pos = 0, this.type = 0, this.length = this.buf.length;\n }\n readFields(t2, e2, r2 = this.length) {\n for (; this.pos < r2; ) {\n const r3 = this.readVarint(), n2 = r3 >> 3, i2 = this.pos;\n this.type = 7 & r3, t2(n2, e2, this), this.pos === i2 && this.skip(r3);\n }\n return e2;\n }\n readMessage(t2, e2) {\n return this.readFields(t2, e2, this.readVarint() + this.pos);\n }\n readFixed32() {\n const t2 = this.dataView.getUint32(this.pos, true);\n return this.pos += 4, t2;\n }\n readSFixed32() {\n const t2 = this.dataView.getInt32(this.pos, true);\n return this.pos += 4, t2;\n }\n readFixed64() {\n const t2 = this.dataView.getUint32(this.pos, true) + this.dataView.getUint32(this.pos + 4, true) * wc;\n return this.pos += 8, t2;\n }\n readSFixed64() {\n const t2 = this.dataView.getUint32(this.pos, true) + this.dataView.getInt32(this.pos + 4, true) * wc;\n return this.pos += 8, t2;\n }\n readFloat() {\n const t2 = this.dataView.getFloat32(this.pos, true);\n return this.pos += 4, t2;\n }\n readDouble() {\n const t2 = this.dataView.getFloat64(this.pos, true);\n return this.pos += 8, t2;\n }\n readVarint(t2) {\n const e2 = this.buf;\n let r2, n2;\n return n2 = e2[this.pos++], r2 = 127 & n2, n2 < 128 ? r2 : (n2 = e2[this.pos++], r2 |= (127 & n2) << 7, n2 < 128 ? r2 : (n2 = e2[this.pos++], r2 |= (127 & n2) << 14, n2 < 128 ? r2 : (n2 = e2[this.pos++], r2 |= (127 & n2) << 21, n2 < 128 ? r2 : (n2 = e2[this.pos], r2 |= (15 & n2) << 28, (function(t3, e3, r3) {\n const n3 = r3.buf;\n let i2, s2;\n if (s2 = n3[r3.pos++], i2 = (112 & s2) >> 4, s2 < 128) return kc(t3, i2, e3);\n if (s2 = n3[r3.pos++], i2 |= (127 & s2) << 3, s2 < 128) return kc(t3, i2, e3);\n if (s2 = n3[r3.pos++], i2 |= (127 & s2) << 10, s2 < 128) return kc(t3, i2, e3);\n if (s2 = n3[r3.pos++], i2 |= (127 & s2) << 17, s2 < 128) return kc(t3, i2, e3);\n if (s2 = n3[r3.pos++], i2 |= (127 & s2) << 24, s2 < 128) return kc(t3, i2, e3);\n if (s2 = n3[r3.pos++], i2 |= (1 & s2) << 31, s2 < 128) return kc(t3, i2, e3);\n throw new Error(\"Expected varint not more than 10 bytes\");\n })(r2, t2, this)))));\n }\n readVarint64() {\n return this.readVarint(true);\n }\n readSVarint() {\n const t2 = this.readVarint();\n return t2 % 2 == 1 ? (t2 + 1) / -2 : t2 / 2;\n }\n readBoolean() {\n return Boolean(this.readVarint());\n }\n readString() {\n const t2 = this.readVarint() + this.pos, e2 = this.pos;\n return this.pos = t2, t2 - e2 >= 12 && Ac ? Ac.decode(this.buf.subarray(e2, t2)) : (function(t3, e3, r2) {\n let n2 = \"\", i2 = e3;\n for (; i2 < r2; ) {\n const e4 = t3[i2];\n let s2, o2, a2, l2 = null, u2 = e4 > 239 ? 4 : e4 > 223 ? 3 : e4 > 191 ? 2 : 1;\n if (i2 + u2 > r2) break;\n 1 === u2 ? e4 < 128 && (l2 = e4) : 2 === u2 ? (s2 = t3[i2 + 1], 128 == (192 & s2) && (l2 = (31 & e4) << 6 | 63 & s2, l2 <= 127 && (l2 = null))) : 3 === u2 ? (s2 = t3[i2 + 1], o2 = t3[i2 + 2], 128 == (192 & s2) && 128 == (192 & o2) && (l2 = (15 & e4) << 12 | (63 & s2) << 6 | 63 & o2, (l2 <= 2047 || l2 >= 55296 && l2 <= 57343) && (l2 = null))) : 4 === u2 && (s2 = t3[i2 + 1], o2 = t3[i2 + 2], a2 = t3[i2 + 3], 128 == (192 & s2) && 128 == (192 & o2) && 128 == (192 & a2) && (l2 = (15 & e4) << 18 | (63 & s2) << 12 | (63 & o2) << 6 | 63 & a2, (l2 <= 65535 || l2 >= 1114112) && (l2 = null))), null === l2 ? (l2 = 65533, u2 = 1) : l2 > 65535 && (l2 -= 65536, n2 += String.fromCharCode(l2 >>> 10 & 1023 | 55296), l2 = 56320 | 1023 & l2), n2 += String.fromCharCode(l2), i2 += u2;\n }\n return n2;\n })(this.buf, e2, t2);\n }\n readBytes() {\n const t2 = this.readVarint() + this.pos, e2 = this.buf.subarray(this.pos, t2);\n return this.pos = t2, e2;\n }\n readPackedVarint(t2 = [], e2) {\n const r2 = this.readPackedEnd();\n for (; this.pos < r2; ) t2.push(this.readVarint(e2));\n return t2;\n }\n readPackedSVarint(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readSVarint());\n return t2;\n }\n readPackedBoolean(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readBoolean());\n return t2;\n }\n readPackedFloat(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readFloat());\n return t2;\n }\n readPackedDouble(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readDouble());\n return t2;\n }\n readPackedFixed32(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readFixed32());\n return t2;\n }\n readPackedSFixed32(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readSFixed32());\n return t2;\n }\n readPackedFixed64(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readFixed64());\n return t2;\n }\n readPackedSFixed64(t2 = []) {\n const e2 = this.readPackedEnd();\n for (; this.pos < e2; ) t2.push(this.readSFixed64());\n return t2;\n }\n readPackedEnd() {\n return 2 === this.type ? this.readVarint() + this.pos : this.pos + 1;\n }\n skip(t2) {\n const e2 = 7 & t2;\n if (0 === e2) for (; this.buf[this.pos++] > 127; ) ;\n else if (2 === e2) this.pos = this.readVarint() + this.pos;\n else if (5 === e2) this.pos += 4;\n else {\n if (1 !== e2) throw new Error(`Unimplemented type: ${e2}`);\n this.pos += 8;\n }\n }\n writeTag(t2, e2) {\n this.writeVarint(t2 << 3 | e2);\n }\n realloc(t2) {\n let e2 = this.length || 16;\n for (; e2 < this.pos + t2; ) e2 *= 2;\n if (e2 !== this.length) {\n const t3 = new Uint8Array(e2);\n t3.set(this.buf), this.buf = t3, this.dataView = new DataView(t3.buffer), this.length = e2;\n }\n }\n finish() {\n return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);\n }\n writeFixed32(t2) {\n this.realloc(4), this.dataView.setInt32(this.pos, t2, true), this.pos += 4;\n }\n writeSFixed32(t2) {\n this.realloc(4), this.dataView.setInt32(this.pos, t2, true), this.pos += 4;\n }\n writeFixed64(t2) {\n this.realloc(8), this.dataView.setInt32(this.pos, -1 & t2, true), this.dataView.setInt32(this.pos + 4, Math.floor(t2 * _c), true), this.pos += 8;\n }\n writeSFixed64(t2) {\n this.realloc(8), this.dataView.setInt32(this.pos, -1 & t2, true), this.dataView.setInt32(this.pos + 4, Math.floor(t2 * _c), true), this.pos += 8;\n }\n writeVarint(t2) {\n (t2 = +t2 || 0) > 268435455 || t2 < 0 ? (function(t3, e2) {\n let r2, n2;\n if (t3 >= 0 ? (r2 = t3 % 4294967296 | 0, n2 = t3 / 4294967296 | 0) : (r2 = ~(-t3 % 4294967296), n2 = ~(-t3 / 4294967296), 4294967295 ^ r2 ? r2 = r2 + 1 | 0 : (r2 = 0, n2 = n2 + 1 | 0)), t3 >= 18446744073709552e3 || t3 < -18446744073709552e3) throw new Error(\"Given varint doesn't fit into 10 bytes\");\n e2.realloc(10), (function(t4, e3, r3) {\n r3.buf[r3.pos++] = 127 & t4 | 128, t4 >>>= 7, r3.buf[r3.pos++] = 127 & t4 | 128, t4 >>>= 7, r3.buf[r3.pos++] = 127 & t4 | 128, t4 >>>= 7, r3.buf[r3.pos++] = 127 & t4 | 128, r3.buf[r3.pos] = 127 & (t4 >>>= 7);\n })(r2, 0, e2), (function(t4, e3) {\n const r3 = (7 & t4) << 4;\n e3.buf[e3.pos++] |= r3 | ((t4 >>>= 3) ? 128 : 0), t4 && (e3.buf[e3.pos++] = 127 & t4 | ((t4 >>>= 7) ? 128 : 0), t4 && (e3.buf[e3.pos++] = 127 & t4 | ((t4 >>>= 7) ? 128 : 0), t4 && (e3.buf[e3.pos++] = 127 & t4 | ((t4 >>>= 7) ? 128 : 0), t4 && (e3.buf[e3.pos++] = 127 & t4 | ((t4 >>>= 7) ? 128 : 0), t4 && (e3.buf[e3.pos++] = 127 & t4)))));\n })(n2, e2);\n })(t2, this) : (this.realloc(4), this.buf[this.pos++] = 127 & t2 | (t2 > 127 ? 128 : 0), t2 <= 127 || (this.buf[this.pos++] = 127 & (t2 >>>= 7) | (t2 > 127 ? 128 : 0), t2 <= 127 || (this.buf[this.pos++] = 127 & (t2 >>>= 7) | (t2 > 127 ? 128 : 0), t2 <= 127 || (this.buf[this.pos++] = t2 >>> 7 & 127))));\n }\n writeSVarint(t2) {\n this.writeVarint(t2 < 0 ? 2 * -t2 - 1 : 2 * t2);\n }\n writeBoolean(t2) {\n this.writeVarint(+t2);\n }\n writeString(t2) {\n t2 = String(t2), this.realloc(4 * t2.length), this.pos++;\n const e2 = this.pos;\n this.pos = (function(t3, e3, r3) {\n for (let n2, i2, s2 = 0; s2 < e3.length; s2++) {\n if (n2 = e3.charCodeAt(s2), n2 > 55295 && n2 < 57344) {\n if (!i2) {\n n2 > 56319 || s2 + 1 === e3.length ? (t3[r3++] = 239, t3[r3++] = 191, t3[r3++] = 189) : i2 = n2;\n continue;\n }\n if (n2 < 56320) {\n t3[r3++] = 239, t3[r3++] = 191, t3[r3++] = 189, i2 = n2;\n continue;\n }\n n2 = i2 - 55296 << 10 | n2 - 56320 | 65536, i2 = null;\n } else i2 && (t3[r3++] = 239, t3[r3++] = 191, t3[r3++] = 189, i2 = null);\n n2 < 128 ? t3[r3++] = n2 : (n2 < 2048 ? t3[r3++] = n2 >> 6 | 192 : (n2 < 65536 ? t3[r3++] = n2 >> 12 | 224 : (t3[r3++] = n2 >> 18 | 240, t3[r3++] = n2 >> 12 & 63 | 128), t3[r3++] = n2 >> 6 & 63 | 128), t3[r3++] = 63 & n2 | 128);\n }\n return r3;\n })(this.buf, t2, this.pos);\n const r2 = this.pos - e2;\n r2 >= 128 && Ec(e2, r2, this), this.pos = e2 - 1, this.writeVarint(r2), this.pos += r2;\n }\n writeFloat(t2) {\n this.realloc(4), this.dataView.setFloat32(this.pos, t2, true), this.pos += 4;\n }\n writeDouble(t2) {\n this.realloc(8), this.dataView.setFloat64(this.pos, t2, true), this.pos += 8;\n }\n writeBytes(t2) {\n const e2 = t2.length;\n this.writeVarint(e2), this.realloc(e2);\n for (let r2 = 0; r2 < e2; r2++) this.buf[this.pos++] = t2[r2];\n }\n writeRawMessage(t2, e2) {\n this.pos++;\n const r2 = this.pos;\n t2(e2, this);\n const n2 = this.pos - r2;\n n2 >= 128 && Ec(r2, n2, this), this.pos = r2 - 1, this.writeVarint(n2), this.pos += n2;\n }\n writeMessage(t2, e2, r2) {\n this.writeTag(t2, 2), this.writeRawMessage(e2, r2);\n }\n writePackedVarint(t2, e2) {\n e2.length && this.writeMessage(t2, Tc, e2);\n }\n writePackedSVarint(t2, e2) {\n e2.length && this.writeMessage(t2, Ic, e2);\n }\n writePackedBoolean(t2, e2) {\n e2.length && this.writeMessage(t2, Dc, e2);\n }\n writePackedFloat(t2, e2) {\n e2.length && this.writeMessage(t2, Mc, e2);\n }\n writePackedDouble(t2, e2) {\n e2.length && this.writeMessage(t2, Fc, e2);\n }\n writePackedFixed32(t2, e2) {\n e2.length && this.writeMessage(t2, Pc, e2);\n }\n writePackedSFixed32(t2, e2) {\n e2.length && this.writeMessage(t2, zc, e2);\n }\n writePackedFixed64(t2, e2) {\n e2.length && this.writeMessage(t2, Bc, e2);\n }\n writePackedSFixed64(t2, e2) {\n e2.length && this.writeMessage(t2, Vc, e2);\n }\n writeBytesField(t2, e2) {\n this.writeTag(t2, 2), this.writeBytes(e2);\n }\n writeFixed32Field(t2, e2) {\n this.writeTag(t2, 5), this.writeFixed32(e2);\n }\n writeSFixed32Field(t2, e2) {\n this.writeTag(t2, 5), this.writeSFixed32(e2);\n }\n writeFixed64Field(t2, e2) {\n this.writeTag(t2, 1), this.writeFixed64(e2);\n }\n writeSFixed64Field(t2, e2) {\n this.writeTag(t2, 1), this.writeSFixed64(e2);\n }\n writeVarintField(t2, e2) {\n this.writeTag(t2, 0), this.writeVarint(e2);\n }\n writeSVarintField(t2, e2) {\n this.writeTag(t2, 0), this.writeSVarint(e2);\n }\n writeStringField(t2, e2) {\n this.writeTag(t2, 2), this.writeString(e2);\n }\n writeFloatField(t2, e2) {\n this.writeTag(t2, 5), this.writeFloat(e2);\n }\n writeDoubleField(t2, e2) {\n this.writeTag(t2, 1), this.writeDouble(e2);\n }\n writeBooleanField(t2, e2) {\n this.writeVarintField(t2, +e2);\n }\n }\n function kc(t2, e2, r2) {\n return r2 ? 4294967296 * e2 + (t2 >>> 0) : 4294967296 * (e2 >>> 0) + (t2 >>> 0);\n }\n function Ec(t2, e2, r2) {\n const n2 = e2 <= 16383 ? 1 : e2 <= 2097151 ? 2 : e2 <= 268435455 ? 3 : Math.floor(Math.log(e2) / (7 * Math.LN2));\n r2.realloc(n2);\n for (let e3 = r2.pos - 1; e3 >= t2; e3--) r2.buf[e3 + n2] = r2.buf[e3];\n }\n function Tc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeVarint(t2[r2]);\n }\n function Ic(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeSVarint(t2[r2]);\n }\n function Mc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeFloat(t2[r2]);\n }\n function Fc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeDouble(t2[r2]);\n }\n function Dc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeBoolean(t2[r2]);\n }\n function Pc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeFixed32(t2[r2]);\n }\n function zc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeSFixed32(t2[r2]);\n }\n function Bc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeFixed64(t2[r2]);\n }\n function Vc(t2, e2) {\n for (let r2 = 0; r2 < t2.length; r2++) e2.writeSFixed64(t2[r2]);\n }\n function Cc(t2, e2, r2) {\n 1 === t2 && r2.readMessage(Lc, e2);\n }\n function Lc(t2, e2, r2) {\n if (3 === t2) {\n const { id: t3, bitmap: n2, width: i2, height: s2, left: o2, top: a2, advance: l2 } = r2.readMessage(Oc, {});\n e2.push({ id: t3, bitmap: new vl({ width: i2 + 6, height: s2 + 6 }, n2), metrics: { width: i2, height: s2, left: o2, top: a2, advance: l2 } });\n }\n }\n function Oc(t2, e2, r2) {\n 1 === t2 ? e2.id = r2.readVarint() : 2 === t2 ? e2.bitmap = r2.readBytes() : 3 === t2 ? e2.width = r2.readVarint() : 4 === t2 ? e2.height = r2.readVarint() : 5 === t2 ? e2.left = r2.readSVarint() : 6 === t2 ? e2.top = r2.readSVarint() : 7 === t2 && (e2.advance = r2.readVarint());\n }\n function Rc(t2) {\n let e2 = 0, r2 = 0;\n for (const n3 of t2) e2 += n3.w * n3.h, r2 = Math.max(r2, n3.w);\n t2.sort(((t3, e3) => e3.h - t3.h));\n const n2 = [{ x: 0, y: 0, w: Math.max(Math.ceil(Math.sqrt(e2 / 0.95)), r2), h: 1 / 0 }];\n let i2 = 0, s2 = 0;\n for (const e3 of t2) for (let t3 = n2.length - 1; t3 >= 0; t3--) {\n const r3 = n2[t3];\n if (!(e3.w > r3.w || e3.h > r3.h)) {\n if (e3.x = r3.x, e3.y = r3.y, s2 = Math.max(s2, e3.y + e3.h), i2 = Math.max(i2, e3.x + e3.w), e3.w === r3.w && e3.h === r3.h) {\n const e4 = n2.pop();\n e4 && t3 < n2.length && (n2[t3] = e4);\n } else e3.h === r3.h ? (r3.x += e3.w, r3.w -= e3.w) : e3.w === r3.w ? (r3.y += e3.h, r3.h -= e3.h) : (n2.push({ x: r3.x + e3.w, y: r3.y, w: r3.w - e3.w, h: e3.h }), r3.y += e3.h, r3.h -= e3.h);\n break;\n }\n }\n return { w: i2, h: s2, fill: e2 / (i2 * s2) || 0 };\n }\n class Nc {\n constructor(t2, { pixelRatio: e2, version: r2, stretchX: n2, stretchY: i2, content: s2, textFitWidth: o2, textFitHeight: a2 }) {\n this.paddedRect = t2, this.pixelRatio = e2, this.stretchX = n2, this.stretchY = i2, this.content = s2, this.version = r2, this.textFitWidth = o2, this.textFitHeight = a2;\n }\n get tl() {\n return [this.paddedRect.x + 1, this.paddedRect.y + 1];\n }\n get br() {\n return [this.paddedRect.x + this.paddedRect.w - 1, this.paddedRect.y + this.paddedRect.h - 1];\n }\n get tlbr() {\n return this.tl.concat(this.br);\n }\n get displaySize() {\n return [(this.paddedRect.w - 2) / this.pixelRatio, (this.paddedRect.h - 2) / this.pixelRatio];\n }\n }\n class $c {\n constructor(t2, e2) {\n const r2 = {}, n2 = {};\n this.haveRenderCallbacks = [];\n const i2 = [];\n this.addImages(t2, r2, i2), this.addImages(e2, n2, i2);\n const { w: s2, h: o2 } = Rc(i2), a2 = new bl({ width: s2 || 1, height: o2 || 1 });\n for (const e3 in t2) {\n const n3 = t2[e3], i3 = r2[e3].paddedRect;\n bl.copy(n3.data, a2, { x: 0, y: 0 }, { x: i3.x + 1, y: i3.y + 1 }, n3.data);\n }\n for (const t3 in e2) {\n const r3 = e2[t3], i3 = n2[t3].paddedRect, s3 = i3.x + 1, o3 = i3.y + 1, l2 = r3.data.width, u2 = r3.data.height;\n bl.copy(r3.data, a2, { x: 0, y: 0 }, { x: s3, y: o3 }, r3.data), bl.copy(r3.data, a2, { x: 0, y: u2 - 1 }, { x: s3, y: o3 - 1 }, { width: l2, height: 1 }), bl.copy(r3.data, a2, { x: 0, y: 0 }, { x: s3, y: o3 + u2 }, { width: l2, height: 1 }), bl.copy(r3.data, a2, { x: l2 - 1, y: 0 }, { x: s3 - 1, y: o3 }, { width: 1, height: u2 }), bl.copy(r3.data, a2, { x: 0, y: 0 }, { x: s3 + l2, y: o3 }, { width: 1, height: u2 });\n }\n this.image = a2, this.iconPositions = r2, this.patternPositions = n2;\n }\n addImages(t2, e2, r2) {\n for (const n2 in t2) {\n const i2 = t2[n2], s2 = { x: 0, y: 0, w: i2.data.width + 2, h: i2.data.height + 2 };\n r2.push(s2), e2[n2] = new Nc(s2, i2), i2.hasRenderCallback && this.haveRenderCallbacks.push(n2);\n }\n }\n patchUpdatedImages(t2, e2) {\n t2.dispatchRenderCallbacks(this.haveRenderCallbacks);\n for (const r2 in t2.updatedImages) this.patchUpdatedImage(this.iconPositions[r2], t2.getImage(r2), e2), this.patchUpdatedImage(this.patternPositions[r2], t2.getImage(r2), e2);\n }\n patchUpdatedImage(t2, e2, r2) {\n if (!t2 || !e2) return;\n if (t2.version === e2.version) return;\n t2.version = e2.version;\n const [n2, i2] = t2.tl;\n r2.update(e2.data, void 0, { x: n2, y: i2 });\n }\n }\n var Uc;\n function qc(e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2) {\n const m2 = bc.fromFeature(e2, s2);\n let g2;\n p2 === t.aA.vertical && m2.verticalizePunctuation();\n let x2 = m2.determineLineBreaks(c2, o2, r2, i2, d2);\n const { processBidirectionalText: v2, processStyledBidirectionalText: b2 } = Ms;\n if (v2 && 1 === m2.sections.length) {\n g2 = [], x2 = x2.map(((t3) => m2.toCodeUnitIndex(t3)));\n const t2 = v2(m2.toString(), x2);\n for (const e3 of t2) {\n const t3 = [...e3].map((() => 0));\n g2.push(new bc(e3, m2.sections, t3));\n }\n } else if (b2) {\n g2 = [], x2 = x2.map(((t3) => m2.toCodeUnitIndex(t3)));\n let t2 = 0;\n const e3 = [];\n for (const r4 of m2.text) e3.push(...Array(r4.length).fill(m2.sectionIndex[t2])), t2++;\n const r3 = b2(m2.text, e3, x2);\n for (const t3 of r3) {\n const e4 = [];\n let r4 = \"\";\n for (const n3 of t3[0]) e4.push(t3[1][r4.length]), r4 += n3;\n g2.push(new bc(t3[0], m2.sections, e4));\n }\n } else g2 = (function(t2, e3) {\n const r3 = [];\n let n3 = 0;\n for (const i3 of e3) r3.push(t2.substring(n3, i3)), n3 = i3;\n return n3 < t2.length() && r3.push(t2.substring(n3, t2.length())), r3;\n })(m2, x2);\n const w2 = [], _2 = { positionedLines: w2, text: m2.toString(), top: h2[1], bottom: h2[1], left: h2[0], right: h2[0], writingMode: p2, iconsInText: false, verticalizable: false };\n return (function(t2, e3, r3, n3, i3, s3, o3, a3, l3, u3, c3, h3) {\n let p3 = 0, f3 = 0, d3 = 0, y3 = 0;\n const m3 = \"right\" === a3 ? 1 : \"left\" === a3 ? 0 : 0.5, g3 = hc / h3;\n let x3 = 0;\n for (const o4 of i3) {\n o4.trim();\n const i4 = o4.getMaxScale(), a4 = { positionedGlyphs: [], lineOffset: 0 };\n t2.positionedLines[x3] = a4;\n const h4 = a4.positionedGlyphs;\n let v4 = 0;\n if (!o4.length()) {\n f3 += s3, ++x3;\n continue;\n }\n const b4 = Gc(n3, o4, g3);\n let w3 = 0;\n for (const s4 of o4.text) {\n const a5 = o4.getSection(w3), d4 = s4.codePointAt(0), y4 = Yc(l3, c3, d4), m4 = { glyph: d4, imageName: null, x: p3, y: f3 + -17, vertical: y4, scale: 1, fontStack: \"\", sectionIndex: o4.getSectionIndex(w3), metrics: null, rect: null };\n let x4;\n if (\"fontStack\" in a5) {\n if (x4 = Zc(a5, d4, y4, b4, e3, r3), !x4) continue;\n m4.fontStack = a5.fontStack;\n } else {\n if (t2.iconsInText = true, a5.scale *= g3, x4 = Hc(a5, y4, i4, b4, n3), !x4) continue;\n v4 = Math.max(v4, x4.imageOffset), m4.imageName = a5.imageName;\n }\n const { rect: _4, metrics: A2, baselineOffset: S2 } = x4;\n m4.y += S2, m4.scale = a5.scale, m4.metrics = A2, m4.rect = _4, h4.push(m4), y4 ? (t2.verticalizable = true, p3 += (\"imageName\" in a5 ? A2.advance : hc) * a5.scale + u3) : p3 += A2.advance * a5.scale + u3, w3++;\n }\n 0 !== h4.length && (d3 = Math.max(p3 - u3, d3), Kc(h4, 0, h4.length - 1, m3)), p3 = 0, a4.lineOffset = Math.max(v4, (i4 - 1) * hc);\n const _3 = s3 * i4 + v4;\n f3 += _3, y3 = Math.max(_3, y3), ++x3;\n }\n const { horizontalAlign: v3, verticalAlign: b3 } = jc(o3);\n (function(t3, e4, r4, n4, i4, s4, o4, a4, l4) {\n const u4 = (e4 - r4) * i4;\n let c4 = 0;\n c4 = s4 !== o4 ? -a4 * n4 - -17 : -n4 * l4 * o4 + 0.5 * o4;\n for (const e5 of t3) for (const t4 of e5.positionedGlyphs) t4.x += u4, t4.y += c4;\n })(t2.positionedLines, m3, v3, b3, d3, y3, s3, f3, i3.length), t2.top += -b3 * f3, t2.bottom = t2.top + f3, t2.left += -v3 * d3, t2.right = t2.left + d3;\n })(_2, r2, n2, i2, g2, a2, l2, u2, p2, c2, f2, y2), !(function(t2) {\n for (const e3 of t2) if (0 !== e3.positionedGlyphs.length) return false;\n return true;\n })(w2) && _2;\n }\n function jc(t2) {\n let e2 = 0.5, r2 = 0.5;\n switch (t2) {\n case \"right\":\n case \"top-right\":\n case \"bottom-right\":\n e2 = 1;\n break;\n case \"left\":\n case \"top-left\":\n case \"bottom-left\":\n e2 = 0;\n }\n switch (t2) {\n case \"bottom\":\n case \"bottom-right\":\n case \"bottom-left\":\n r2 = 1;\n break;\n case \"top\":\n case \"top-right\":\n case \"top-left\":\n r2 = 0;\n }\n return { horizontalAlign: e2, verticalAlign: r2 };\n }\n function Gc(t2, e2, r2) {\n const n2 = e2.getMaxScale() * hc, { maxImageWidth: i2, maxImageHeight: s2 } = e2.getMaxImageSize(t2), o2 = Math.max(n2, s2 * r2);\n return { verticalLineContentWidth: Math.max(n2, i2 * r2), horizontalLineContentHeight: o2 };\n }\n function Xc(t2) {\n switch (t2) {\n case \"top\":\n return 0;\n case \"center\":\n return 0.5;\n default:\n return 1;\n }\n }\n function Yc(e2, r2, n2) {\n return !(e2 === t.aA.horizontal || !r2 && !gs(n2) || r2 && (xs(n2) || (i2 = n2, /\\p{sc=Arab}/u.test(String.fromCodePoint(i2)))));\n var i2;\n }\n function Zc(t2, e2, r2, n2, i2, s2) {\n const o2 = s2[t2.fontStack], a2 = (function(t3, e3, r3, n3) {\n if (t3 && t3.rect) return t3;\n const i3 = e3[r3.fontStack], s3 = i3 && i3[n3];\n return s3 ? { rect: null, metrics: s3.metrics } : null;\n })(o2 && o2[e2], i2, t2, e2);\n if (null === a2) return null;\n let l2;\n if (r2) l2 = n2.verticalLineContentWidth - t2.scale * hc;\n else {\n const e3 = Xc(t2.verticalAlign);\n l2 = (n2.horizontalLineContentHeight - t2.scale * hc) * e3;\n }\n return { rect: a2.rect, metrics: a2.metrics, baselineOffset: l2 };\n }\n function Hc(t2, e2, r2, n2, i2) {\n const s2 = i2[t2.imageName];\n if (!s2) return null;\n const o2 = s2.paddedRect, a2 = s2.displaySize, l2 = { width: a2[0], height: a2[1], left: 1, top: -3, advance: e2 ? a2[1] : a2[0] };\n let u2;\n if (e2) u2 = n2.verticalLineContentWidth - a2[1] * t2.scale;\n else {\n const e3 = Xc(t2.verticalAlign);\n u2 = (n2.horizontalLineContentHeight - a2[1] * t2.scale) * e3;\n }\n return { rect: o2, metrics: l2, baselineOffset: u2, imageOffset: (e2 ? a2[0] : a2[1]) * t2.scale - hc * r2 };\n }\n function Kc(t2, e2, r2, n2) {\n if (0 === n2) return;\n const i2 = t2[r2], s2 = (t2[r2].x + i2.metrics.advance * i2.scale) * n2;\n for (let n3 = e2; n3 <= r2; n3++) t2[n3].x -= s2;\n }\n function Wc(t2, e2, r2) {\n const { horizontalAlign: n2, verticalAlign: i2 } = jc(r2), s2 = e2[0] - t2.displaySize[0] * n2, o2 = e2[1] - t2.displaySize[1] * i2;\n return { image: t2, top: o2, bottom: o2 + t2.displaySize[1], left: s2, right: s2 + t2.displaySize[0] };\n }\n function Jc(t2) {\n var e2, r2;\n let n2 = t2.left, i2 = t2.top, s2 = t2.right - n2, o2 = t2.bottom - i2;\n const a2 = null !== (e2 = t2.image.textFitWidth) && void 0 !== e2 ? e2 : \"stretchOrShrink\", l2 = null !== (r2 = t2.image.textFitHeight) && void 0 !== r2 ? r2 : \"stretchOrShrink\", u2 = (t2.image.content[2] - t2.image.content[0]) / (t2.image.content[3] - t2.image.content[1]);\n if (\"proportional\" === l2) {\n if (\"stretchOnly\" === a2 && s2 / o2 < u2 || \"proportional\" === a2) {\n const t3 = Math.ceil(o2 * u2);\n n2 *= t3 / s2, s2 = t3;\n }\n } else if (\"proportional\" === a2 && \"stretchOnly\" === l2 && 0 !== u2 && s2 / o2 > u2) {\n const t3 = Math.ceil(s2 / u2);\n i2 *= t3 / o2, o2 = t3;\n }\n return { x1: n2, y1: i2, x2: n2 + s2, y2: i2 + o2 };\n }\n function Qc(t2, e2, r2, n2, i2, s2) {\n const o2 = t2.image;\n let a2;\n if (o2.content) {\n const t3 = o2.content, e3 = o2.pixelRatio || 1;\n a2 = [t3[0] / e3, t3[1] / e3, o2.displaySize[0] - t3[2] / e3, o2.displaySize[1] - t3[3] / e3];\n }\n const l2 = e2.left * s2, u2 = e2.right * s2;\n let c2, h2, p2, f2;\n \"width\" === r2 || \"both\" === r2 ? (f2 = i2[0] + l2 - n2[3], h2 = i2[0] + u2 + n2[1]) : (f2 = i2[0] + (l2 + u2 - o2.displaySize[0]) / 2, h2 = f2 + o2.displaySize[0]);\n const d2 = e2.top * s2, y2 = e2.bottom * s2;\n return \"height\" === r2 || \"both\" === r2 ? (c2 = i2[1] + d2 - n2[0], p2 = i2[1] + y2 + n2[2]) : (c2 = i2[1] + (d2 + y2 - o2.displaySize[1]) / 2, p2 = c2 + o2.displaySize[1]), { image: o2, top: c2, right: h2, bottom: p2, left: f2, collisionPadding: a2 };\n }\n us(\"ImagePosition\", Nc), us(\"ImageAtlas\", $c), t.aA = void 0, (Uc = t.aA || (t.aA = {}))[Uc.none = 0] = \"none\", Uc[Uc.horizontal = 1] = \"horizontal\", Uc[Uc.vertical = 2] = \"vertical\", Uc[Uc.horizontalOnly = 3] = \"horizontalOnly\";\n const th = 128, eh = 32640;\n function rh(t2, e2) {\n const { expression: r2 } = e2;\n if (\"constant\" === r2.kind) return { kind: \"constant\", layoutSize: r2.evaluate(new Fs(t2 + 1)) };\n if (\"source\" === r2.kind) return { kind: \"source\" };\n {\n const { zoomStops: e3, interpolationType: n2 } = r2;\n let i2 = 0;\n for (; i2 < e3.length && e3[i2] <= t2; ) i2++;\n i2 = Math.max(0, i2 - 1);\n let s2 = i2;\n for (; s2 < e3.length && e3[s2] < t2 + 1; ) s2++;\n s2 = Math.min(e3.length - 1, s2);\n const o2 = e3[i2], a2 = e3[s2];\n return \"composite\" === r2.kind ? { kind: \"composite\", minZoom: o2, maxZoom: a2, interpolationType: n2 } : { kind: \"camera\", minZoom: o2, maxZoom: a2, minSize: r2.evaluate(new Fs(o2)), maxSize: r2.evaluate(new Fs(a2)), interpolationType: n2 };\n }\n }\n function nh(t2, e2, r2) {\n let n2 = \"never\";\n const i2 = t2.get(e2);\n return i2 ? n2 = i2 : t2.get(r2) && (n2 = \"always\"), n2;\n }\n const ih = [{ name: \"a_fade_opacity\", components: 1, type: \"Uint8\", offset: 0 }];\n function sh(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2) {\n const f2 = a2 ? Math.min(eh, Math.round(a2[0])) : 0, d2 = a2 ? Math.min(eh, Math.round(a2[1])) : 0;\n t2.emplaceBack(e2, r2, Math.round(32 * n2), Math.round(32 * i2), s2, o2, (f2 << 1) + (l2 ? 1 : 0), d2, 16 * u2, 16 * c2, 256 * h2, 256 * p2);\n }\n function oh(t2, e2, r2) {\n t2.emplaceBack(e2.x, e2.y, r2), t2.emplaceBack(e2.x, e2.y, r2), t2.emplaceBack(e2.x, e2.y, r2), t2.emplaceBack(e2.x, e2.y, r2);\n }\n function ah(t2) {\n for (const e2 of t2.sections) if (Is(e2.text)) return true;\n return false;\n }\n class lh {\n constructor(t2) {\n this.layoutVertexArray = new Yo(), this.indexArray = new Jo(), this.programConfigurations = t2, this.segments = new ra(), this.dynamicLayoutVertexArray = new Zo(), this.opacityVertexArray = new Ho(), this.hasVisibleVertices = false, this.placedSymbolArray = new Fo();\n }\n isEmpty() {\n return 0 === this.layoutVertexArray.length && 0 === this.indexArray.length && 0 === this.dynamicLayoutVertexArray.length && 0 === this.opacityVertexArray.length;\n }\n upload(t2, e2, r2, n2) {\n this.isEmpty() || (r2 && (this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, sc.members), this.indexBuffer = t2.createIndexBuffer(this.indexArray, e2), this.dynamicLayoutVertexBuffer = t2.createVertexBuffer(this.dynamicLayoutVertexArray, oc.members, true), this.opacityVertexBuffer = t2.createVertexBuffer(this.opacityVertexArray, ih, true), this.opacityVertexBuffer.itemSize = 1), (r2 || n2) && this.programConfigurations.upload(t2));\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());\n }\n }\n us(\"SymbolBuffers\", lh);\n class uh {\n constructor(t2, e2, r2) {\n this.layoutVertexArray = new t2(), this.layoutAttributes = e2, this.indexArray = new r2(), this.segments = new ra(), this.collisionVertexArray = new Wo();\n }\n upload(t2) {\n this.layoutVertexBuffer = t2.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = t2.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = t2.createVertexBuffer(this.collisionVertexArray, ac.members, true);\n }\n destroy() {\n this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());\n }\n }\n us(\"CollisionBuffers\", uh);\n class ch {\n constructor(e2) {\n this.collisionBoxArray = e2.collisionBoxArray, this.zoom = e2.zoom, this.overscaling = e2.overscaling, this.layers = e2.layers, this.layerIds = this.layers.map(((t2) => t2.id)), this.index = e2.index, this.pixelRatio = e2.pixelRatio, this.sourceLayerIndex = e2.sourceLayerIndex, this.hasDependencies = false, this.hasRTLText = false, this.sortKeyRanges = [], this.collisionCircleArray = [];\n const r2 = this.layers[0]._unevaluatedLayout._values;\n this.textSizeData = rh(this.zoom, r2[\"text-size\"]), this.iconSizeData = rh(this.zoom, r2[\"icon-size\"]);\n const n2 = this.layers[0].layout, i2 = n2.get(\"symbol-sort-key\"), s2 = n2.get(\"symbol-z-order\");\n this.canOverlap = \"never\" !== nh(n2, \"text-overlap\", \"text-allow-overlap\") || \"never\" !== nh(n2, \"icon-overlap\", \"icon-allow-overlap\") || n2.get(\"text-ignore-placement\") || n2.get(\"icon-ignore-placement\"), this.sortFeaturesByKey = \"viewport-y\" !== s2 && !i2.isConstant(), this.sortFeaturesByY = (\"viewport-y\" === s2 || \"auto\" === s2 && !this.sortFeaturesByKey) && this.canOverlap, \"point\" === n2.get(\"symbol-placement\") && (this.writingModes = n2.get(\"text-writing-mode\").map(((e3) => t.aA[e3]))), this.stateDependentLayerIds = this.layers.filter(((t2) => t2.isStateDependent())).map(((t2) => t2.id)), this.sourceID = e2.sourceID;\n }\n createArrays() {\n this.text = new lh(new Pa(this.layers, this.zoom, ((t2) => /^text/.test(t2)))), this.icon = new lh(new Pa(this.layers, this.zoom, ((t2) => /^icon/.test(t2)))), this.glyphOffsetArray = new zo(), this.lineVertexArray = new Bo(), this.symbolInstances = new Po(), this.textAnchorOffsets = new Co();\n }\n calculateGlyphDependencies(t2, e2, r2, n2, i2) {\n for (const s2 of t2) if (e2[s2.codePointAt(0)] = true, (r2 || n2) && i2) {\n const t3 = pc[s2];\n t3 && (e2[t3.codePointAt(0)] = true);\n }\n }\n populate(e2, r2, n2) {\n const i2 = this.layers[0], s2 = i2.layout, o2 = s2.get(\"text-font\"), a2 = s2.get(\"text-field\"), l2 = s2.get(\"icon-image\"), u2 = (\"constant\" !== a2.value.kind || a2.value.value instanceof De && !a2.value.value.isEmpty() || a2.value.value.toString().length > 0) && (\"constant\" !== o2.value.kind || o2.value.value.length > 0), c2 = \"constant\" !== l2.value.kind || !!l2.value.value || Object.keys(l2.parameters).length > 0, h2 = s2.get(\"symbol-sort-key\");\n if (this.features = [], !u2 && !c2) return;\n const p2 = r2.iconDependencies, f2 = r2.glyphDependencies, d2 = r2.availableImages, y2 = new Fs(this.zoom);\n for (const { feature: r3, id: a3, index: l3, sourceLayerIndex: m2 } of e2) {\n const e3 = i2._featureFilter.needGeometry, g2 = Oa(r3, e3);\n if (!i2._featureFilter.filter(y2, g2, n2)) continue;\n let x2, v2;\n if (e3 || (g2.geometry = La(r3)), u2) {\n const t2 = i2.getValueAndResolveTokens(\"text-field\", g2, n2, d2), e4 = De.factory(t2), r4 = this.hasRTLText = this.hasRTLText || ah(e4);\n (!r4 || \"unavailable\" === Ms.getRTLTextPluginStatus() || r4 && Ms.isParsed()) && (x2 = cc(e4, i2, g2));\n }\n if (c2) {\n const t2 = i2.getValueAndResolveTokens(\"icon-image\", g2, n2, d2);\n v2 = t2 instanceof Oe ? t2 : Oe.fromString(t2);\n }\n if (!x2 && !v2) continue;\n const b2 = this.sortFeaturesByKey ? h2.evaluate(g2, {}, n2) : void 0;\n if (this.features.push({ id: a3, text: x2, icon: v2, index: l3, sourceLayerIndex: m2, geometry: g2.geometry, properties: r3.properties, type: Eu.types[r3.type], sortKey: b2 }), v2 && (p2[v2.name] = true), x2) {\n const e4 = o2.evaluate(g2, {}, n2).join(\",\"), r4 = \"viewport\" !== s2.get(\"text-rotation-alignment\") && \"point\" !== s2.get(\"symbol-placement\");\n this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(t.aA.vertical) >= 0;\n for (const t2 of x2.sections) if (t2.image) p2[t2.image.name] = true;\n else {\n const n3 = vs(x2.toString()), i3 = t2.fontStack || e4, s3 = f2[i3] = f2[i3] || {};\n this.calculateGlyphDependencies(t2.text, s3, r4, this.allowVerticalPlacement, n3);\n }\n }\n }\n \"line\" === s2.get(\"symbol-placement\") && (this.features = (function(t2) {\n const e3 = {}, r3 = {}, n3 = [];\n let i3 = 0;\n function s3(e4) {\n n3.push(t2[e4]), i3++;\n }\n function o3(t3, e4, i4) {\n const s4 = r3[t3];\n return delete r3[t3], r3[e4] = s4, n3[s4].geometry[0].pop(), n3[s4].geometry[0] = n3[s4].geometry[0].concat(i4[0]), s4;\n }\n function a3(t3, r4, i4) {\n const s4 = e3[r4];\n return delete e3[r4], e3[t3] = s4, n3[s4].geometry[0].shift(), n3[s4].geometry[0] = i4[0].concat(n3[s4].geometry[0]), s4;\n }\n function l3(t3, e4, r4) {\n const n4 = r4 ? e4[0][e4[0].length - 1] : e4[0][0];\n return `${t3}:${n4.x}:${n4.y}`;\n }\n for (let u3 = 0; u3 < t2.length; u3++) {\n const c3 = t2[u3], h3 = c3.geometry, p3 = c3.text ? c3.text.toString() : null;\n if (!p3) {\n s3(u3);\n continue;\n }\n const f3 = l3(p3, h3), d3 = l3(p3, h3, true);\n if (f3 in r3 && d3 in e3 && r3[f3] !== e3[d3]) {\n const t3 = a3(f3, d3, h3), i4 = o3(f3, d3, n3[t3].geometry);\n delete e3[f3], delete r3[d3], r3[l3(p3, n3[i4].geometry, true)] = i4, n3[t3].geometry = null;\n } else f3 in r3 ? o3(f3, d3, h3) : d3 in e3 ? a3(f3, d3, h3) : (s3(u3), e3[f3] = i3 - 1, r3[d3] = i3 - 1);\n }\n return n3.filter(((t3) => t3.geometry));\n })(this.features)), this.sortFeaturesByKey && this.features.sort(((t2, e3) => t2.sortKey - e3.sortKey));\n }\n update(t2, e2, r2) {\n this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(t2, e2, this.layers, { imagePositions: r2 }), this.icon.programConfigurations.updatePaintArrays(t2, e2, this.layers, { imagePositions: r2 }));\n }\n isEmpty() {\n return 0 === this.symbolInstances.length && !this.hasRTLText;\n }\n uploadPending() {\n return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;\n }\n upload(t2) {\n !this.uploaded && this.hasDebugData() && (this.textCollisionBox.upload(t2), this.iconCollisionBox.upload(t2)), this.text.upload(t2, this.sortFeaturesByY, !this.uploaded, this.text.programConfigurations.needsUpload), this.icon.upload(t2, this.sortFeaturesByY, !this.uploaded, this.icon.programConfigurations.needsUpload), this.uploaded = true;\n }\n destroyDebugData() {\n this.textCollisionBox.destroy(), this.iconCollisionBox.destroy();\n }\n destroy() {\n this.text.destroy(), this.icon.destroy(), this.hasDebugData() && this.destroyDebugData();\n }\n addToLineVertexArray(t2, e2) {\n const r2 = this.lineVertexArray.length;\n if (void 0 !== t2.segment) {\n let r3 = t2.dist(e2[t2.segment + 1]), n2 = t2.dist(e2[t2.segment]);\n const i2 = {};\n for (let n3 = t2.segment + 1; n3 < e2.length; n3++) i2[n3] = { x: e2[n3].x, y: e2[n3].y, tileUnitDistanceFromAnchor: r3 }, n3 < e2.length - 1 && (r3 += e2[n3 + 1].dist(e2[n3]));\n for (let r4 = t2.segment || 0; r4 >= 0; r4--) i2[r4] = { x: e2[r4].x, y: e2[r4].y, tileUnitDistanceFromAnchor: n2 }, r4 > 0 && (n2 += e2[r4 - 1].dist(e2[r4]));\n for (let t3 = 0; t3 < e2.length; t3++) {\n const e3 = i2[t3];\n this.lineVertexArray.emplaceBack(e3.x, e3.y, e3.tileUnitDistanceFromAnchor);\n }\n }\n return { lineStartIndex: r2, lineLength: this.lineVertexArray.length - r2 };\n }\n addSymbols(e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2) {\n const f2 = e2.indexArray, d2 = e2.layoutVertexArray, y2 = e2.segments.prepareSegment(4 * r2.length, d2, f2, this.canOverlap ? o2.sortKey : void 0), m2 = this.glyphOffsetArray.length, g2 = y2.vertexLength, x2 = this.allowVerticalPlacement && a2 === t.aA.vertical ? Math.PI / 2 : 0, v2 = o2.text && o2.text.sections;\n for (let t2 = 0; t2 < r2.length; t2++) {\n const { tl: i3, tr: s3, bl: a3, br: u3, tex: c3, pixelOffsetTL: h3, pixelOffsetBR: m3, minFontScaleX: g3, minFontScaleY: b2, glyphOffset: w2, isSDF: _2, sectionIndex: A2 } = r2[t2], S2 = y2.vertexLength, k2 = w2[1];\n sh(d2, l2.x, l2.y, i3.x, k2 + i3.y, c3.x, c3.y, n2, _2, h3.x, h3.y, g3, b2), sh(d2, l2.x, l2.y, s3.x, k2 + s3.y, c3.x + c3.w, c3.y, n2, _2, m3.x, h3.y, g3, b2), sh(d2, l2.x, l2.y, a3.x, k2 + a3.y, c3.x, c3.y + c3.h, n2, _2, h3.x, m3.y, g3, b2), sh(d2, l2.x, l2.y, u3.x, k2 + u3.y, c3.x + c3.w, c3.y + c3.h, n2, _2, m3.x, m3.y, g3, b2), oh(e2.dynamicLayoutVertexArray, l2, x2), f2.emplaceBack(S2, S2 + 2, S2 + 1), f2.emplaceBack(S2 + 1, S2 + 2, S2 + 3), y2.vertexLength += 4, y2.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(w2[0]), t2 !== r2.length - 1 && A2 === r2[t2 + 1].sectionIndex || e2.programConfigurations.populatePaintArrays(d2.length, o2, o2.index, { imagePositions: {}, canonical: p2, formattedSection: v2 && v2[A2] });\n }\n e2.placedSymbolArray.emplaceBack(l2.x, l2.y, m2, this.glyphOffsetArray.length - m2, g2, u2, c2, l2.segment, n2 ? n2[0] : 0, n2 ? n2[1] : 0, i2[0], i2[1], a2, 0, false, 0, h2);\n }\n _addCollisionDebugVertex(t2, e2, r2, n2, i2, s2) {\n return e2.emplaceBack(0, 0), t2.emplaceBack(r2.x, r2.y, n2, i2, Math.round(s2.x), Math.round(s2.y));\n }\n addCollisionDebugVertices(t2, e2, n2, i2, s2, o2, a2) {\n const l2 = s2.segments.prepareSegment(4, s2.layoutVertexArray, s2.indexArray), u2 = l2.vertexLength, c2 = s2.layoutVertexArray, h2 = s2.collisionVertexArray, p2 = a2.anchorX, f2 = a2.anchorY;\n this._addCollisionDebugVertex(c2, h2, o2, p2, f2, new r(t2, e2)), this._addCollisionDebugVertex(c2, h2, o2, p2, f2, new r(n2, e2)), this._addCollisionDebugVertex(c2, h2, o2, p2, f2, new r(n2, i2)), this._addCollisionDebugVertex(c2, h2, o2, p2, f2, new r(t2, i2)), l2.vertexLength += 4;\n const d2 = s2.indexArray;\n d2.emplaceBack(u2, u2 + 1), d2.emplaceBack(u2 + 1, u2 + 2), d2.emplaceBack(u2 + 2, u2 + 3), d2.emplaceBack(u2 + 3, u2), l2.primitiveLength += 4;\n }\n addDebugCollisionBoxes(t2, e2, r2, n2) {\n for (let i2 = t2; i2 < e2; i2++) {\n const t3 = this.collisionBoxArray.get(i2);\n this.addCollisionDebugVertices(t3.x1, t3.y1, t3.x2, t3.y2, n2 ? this.textCollisionBox : this.iconCollisionBox, t3.anchorPoint, r2);\n }\n }\n generateCollisionDebugBuffers() {\n this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new uh(Ko, lc.members, Qo), this.iconCollisionBox = new uh(Ko, lc.members, Qo);\n for (let t2 = 0; t2 < this.symbolInstances.length; t2++) {\n const e2 = this.symbolInstances.get(t2);\n this.addDebugCollisionBoxes(e2.textBoxStartIndex, e2.textBoxEndIndex, e2, true), this.addDebugCollisionBoxes(e2.verticalTextBoxStartIndex, e2.verticalTextBoxEndIndex, e2, true), this.addDebugCollisionBoxes(e2.iconBoxStartIndex, e2.iconBoxEndIndex, e2, false), this.addDebugCollisionBoxes(e2.verticalIconBoxStartIndex, e2.verticalIconBoxEndIndex, e2, false);\n }\n }\n _deserializeCollisionBoxesForSymbol(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = {};\n for (let n3 = e2; n3 < r2; n3++) {\n const e3 = t2.get(n3);\n u2.textBox = { x1: e3.x1, y1: e3.y1, x2: e3.x2, y2: e3.y2, anchorPointX: e3.anchorPointX, anchorPointY: e3.anchorPointY }, u2.textFeatureIndex = e3.featureIndex;\n break;\n }\n for (let e3 = n2; e3 < i2; e3++) {\n const r3 = t2.get(e3);\n u2.verticalTextBox = { x1: r3.x1, y1: r3.y1, x2: r3.x2, y2: r3.y2, anchorPointX: r3.anchorPointX, anchorPointY: r3.anchorPointY }, u2.verticalTextFeatureIndex = r3.featureIndex;\n break;\n }\n for (let e3 = s2; e3 < o2; e3++) {\n const r3 = t2.get(e3);\n u2.iconBox = { x1: r3.x1, y1: r3.y1, x2: r3.x2, y2: r3.y2, anchorPointX: r3.anchorPointX, anchorPointY: r3.anchorPointY }, u2.iconFeatureIndex = r3.featureIndex;\n break;\n }\n for (let e3 = a2; e3 < l2; e3++) {\n const r3 = t2.get(e3);\n u2.verticalIconBox = { x1: r3.x1, y1: r3.y1, x2: r3.x2, y2: r3.y2, anchorPointX: r3.anchorPointX, anchorPointY: r3.anchorPointY }, u2.verticalIconFeatureIndex = r3.featureIndex;\n break;\n }\n return u2;\n }\n deserializeCollisionBoxes(t2) {\n this.collisionArrays = [];\n for (let e2 = 0; e2 < this.symbolInstances.length; e2++) {\n const r2 = this.symbolInstances.get(e2);\n this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t2, r2.textBoxStartIndex, r2.textBoxEndIndex, r2.verticalTextBoxStartIndex, r2.verticalTextBoxEndIndex, r2.iconBoxStartIndex, r2.iconBoxEndIndex, r2.verticalIconBoxStartIndex, r2.verticalIconBoxEndIndex));\n }\n }\n hasTextData() {\n return this.text.segments.get().length > 0;\n }\n hasIconData() {\n return this.icon.segments.get().length > 0;\n }\n hasDebugData() {\n return this.textCollisionBox && this.iconCollisionBox;\n }\n hasTextCollisionBoxData() {\n return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;\n }\n hasIconCollisionBoxData() {\n return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;\n }\n addIndicesForPlacedSymbol(t2, e2) {\n const r2 = t2.placedSymbolArray.get(e2), n2 = r2.vertexStartIndex + 4 * r2.numGlyphs;\n for (let e3 = r2.vertexStartIndex; e3 < n2; e3 += 4) t2.indexArray.emplaceBack(e3, e3 + 2, e3 + 1), t2.indexArray.emplaceBack(e3 + 1, e3 + 2, e3 + 3);\n }\n getSortedSymbolIndexes(t2) {\n if (this.sortedAngle === t2 && void 0 !== this.symbolInstanceIndexes) return this.symbolInstanceIndexes;\n const e2 = Math.sin(t2), r2 = Math.cos(t2), n2 = [], i2 = [], s2 = [];\n for (let t3 = 0; t3 < this.symbolInstances.length; ++t3) {\n s2.push(t3);\n const o2 = this.symbolInstances.get(t3);\n n2.push(0 | Math.round(e2 * o2.anchorX + r2 * o2.anchorY)), i2.push(o2.featureIndex);\n }\n return s2.sort(((t3, e3) => n2[t3] - n2[e3] || i2[e3] - i2[t3])), s2;\n }\n addToSortKeyRanges(t2, e2) {\n const r2 = this.sortKeyRanges[this.sortKeyRanges.length - 1];\n r2 && r2.sortKey === e2 ? r2.symbolInstanceEnd = t2 + 1 : this.sortKeyRanges.push({ sortKey: e2, symbolInstanceStart: t2, symbolInstanceEnd: t2 + 1 });\n }\n sortFeatures(t2) {\n if (this.sortFeaturesByY && this.sortedAngle !== t2 && !(this.text.segments.get().length > 1 || this.icon.segments.get().length > 1)) {\n this.symbolInstanceIndexes = this.getSortedSymbolIndexes(t2), this.sortedAngle = t2, this.text.indexArray.clear(), this.icon.indexArray.clear(), this.featureSortOrder = [];\n for (const t3 of this.symbolInstanceIndexes) {\n const e2 = this.symbolInstances.get(t3);\n this.featureSortOrder.push(e2.featureIndex), [e2.rightJustifiedTextSymbolIndex, e2.centerJustifiedTextSymbolIndex, e2.leftJustifiedTextSymbolIndex].forEach(((t4, e3, r2) => {\n t4 >= 0 && r2.indexOf(t4) === e3 && this.addIndicesForPlacedSymbol(this.text, t4);\n })), e2.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, e2.verticalPlacedTextSymbolIndex), e2.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, e2.placedIconSymbolIndex), e2.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, e2.verticalPlacedIconSymbolIndex);\n }\n this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray);\n }\n }\n }\n let hh, ph;\n us(\"SymbolBucket\", ch, { omit: [\"layers\", \"collisionBoxArray\", \"features\", \"compareText\"] }), ch.MAX_GLYPHS = 65535, ch.addDynamicAttributes = oh;\n var fh = { get paint() {\n return ph = ph || new Xs({ \"icon-opacity\": new Us(vt.paint_symbol[\"icon-opacity\"]), \"icon-color\": new Us(vt.paint_symbol[\"icon-color\"]), \"icon-halo-color\": new Us(vt.paint_symbol[\"icon-halo-color\"]), \"icon-halo-width\": new Us(vt.paint_symbol[\"icon-halo-width\"]), \"icon-halo-blur\": new Us(vt.paint_symbol[\"icon-halo-blur\"]), \"icon-translate\": new $s(vt.paint_symbol[\"icon-translate\"]), \"icon-translate-anchor\": new $s(vt.paint_symbol[\"icon-translate-anchor\"]), \"text-opacity\": new Us(vt.paint_symbol[\"text-opacity\"]), \"text-color\": new Us(vt.paint_symbol[\"text-color\"], { runtimeType: Rt, getOverride: (t2) => t2.textColor, hasOverride: (t2) => !!t2.textColor }), \"text-halo-color\": new Us(vt.paint_symbol[\"text-halo-color\"]), \"text-halo-width\": new Us(vt.paint_symbol[\"text-halo-width\"]), \"text-halo-blur\": new Us(vt.paint_symbol[\"text-halo-blur\"]), \"text-translate\": new $s(vt.paint_symbol[\"text-translate\"]), \"text-translate-anchor\": new $s(vt.paint_symbol[\"text-translate-anchor\"]) });\n }, get layout() {\n return hh = hh || new Xs({ \"symbol-placement\": new $s(vt.layout_symbol[\"symbol-placement\"]), \"symbol-spacing\": new $s(vt.layout_symbol[\"symbol-spacing\"]), \"symbol-avoid-edges\": new $s(vt.layout_symbol[\"symbol-avoid-edges\"]), \"symbol-sort-key\": new Us(vt.layout_symbol[\"symbol-sort-key\"]), \"symbol-z-order\": new $s(vt.layout_symbol[\"symbol-z-order\"]), \"icon-allow-overlap\": new $s(vt.layout_symbol[\"icon-allow-overlap\"]), \"icon-overlap\": new $s(vt.layout_symbol[\"icon-overlap\"]), \"icon-ignore-placement\": new $s(vt.layout_symbol[\"icon-ignore-placement\"]), \"icon-optional\": new $s(vt.layout_symbol[\"icon-optional\"]), \"icon-rotation-alignment\": new $s(vt.layout_symbol[\"icon-rotation-alignment\"]), \"icon-size\": new Us(vt.layout_symbol[\"icon-size\"]), \"icon-text-fit\": new $s(vt.layout_symbol[\"icon-text-fit\"]), \"icon-text-fit-padding\": new $s(vt.layout_symbol[\"icon-text-fit-padding\"]), \"icon-image\": new Us(vt.layout_symbol[\"icon-image\"]), \"icon-rotate\": new Us(vt.layout_symbol[\"icon-rotate\"]), \"icon-padding\": new Us(vt.layout_symbol[\"icon-padding\"]), \"icon-keep-upright\": new $s(vt.layout_symbol[\"icon-keep-upright\"]), \"icon-offset\": new Us(vt.layout_symbol[\"icon-offset\"]), \"icon-anchor\": new Us(vt.layout_symbol[\"icon-anchor\"]), \"icon-pitch-alignment\": new $s(vt.layout_symbol[\"icon-pitch-alignment\"]), \"text-pitch-alignment\": new $s(vt.layout_symbol[\"text-pitch-alignment\"]), \"text-rotation-alignment\": new $s(vt.layout_symbol[\"text-rotation-alignment\"]), \"text-field\": new Us(vt.layout_symbol[\"text-field\"]), \"text-font\": new Us(vt.layout_symbol[\"text-font\"]), \"text-size\": new Us(vt.layout_symbol[\"text-size\"]), \"text-max-width\": new Us(vt.layout_symbol[\"text-max-width\"]), \"text-line-height\": new $s(vt.layout_symbol[\"text-line-height\"]), \"text-letter-spacing\": new Us(vt.layout_symbol[\"text-letter-spacing\"]), \"text-justify\": new Us(vt.layout_symbol[\"text-justify\"]), \"text-radial-offset\": new Us(vt.layout_symbol[\"text-radial-offset\"]), \"text-variable-anchor\": new $s(vt.layout_symbol[\"text-variable-anchor\"]), \"text-variable-anchor-offset\": new Us(vt.layout_symbol[\"text-variable-anchor-offset\"]), \"text-anchor\": new Us(vt.layout_symbol[\"text-anchor\"]), \"text-max-angle\": new $s(vt.layout_symbol[\"text-max-angle\"]), \"text-writing-mode\": new $s(vt.layout_symbol[\"text-writing-mode\"]), \"text-rotate\": new Us(vt.layout_symbol[\"text-rotate\"]), \"text-padding\": new $s(vt.layout_symbol[\"text-padding\"]), \"text-keep-upright\": new $s(vt.layout_symbol[\"text-keep-upright\"]), \"text-transform\": new Us(vt.layout_symbol[\"text-transform\"]), \"text-offset\": new Us(vt.layout_symbol[\"text-offset\"]), \"text-allow-overlap\": new $s(vt.layout_symbol[\"text-allow-overlap\"]), \"text-overlap\": new $s(vt.layout_symbol[\"text-overlap\"]), \"text-ignore-placement\": new $s(vt.layout_symbol[\"text-ignore-placement\"]), \"text-optional\": new $s(vt.layout_symbol[\"text-optional\"]) });\n } };\n class dh {\n constructor(t2) {\n if (void 0 === t2.property.overrides) throw new Error(\"overrides must be provided to instantiate FormatSectionOverride class\");\n this.type = t2.property.overrides ? t2.property.overrides.runtimeType : Vt, this.defaultValue = t2;\n }\n evaluate(t2) {\n if (t2.formattedSection) {\n const e2 = this.defaultValue.property.overrides;\n if (e2 && e2.hasOverride(t2.formattedSection)) return e2.getOverride(t2.formattedSection);\n }\n return t2.feature && t2.featureState ? this.defaultValue.evaluate(t2.feature, t2.featureState) : this.defaultValue.property.specification.default;\n }\n eachChild(t2) {\n this.defaultValue.isConstant() || t2(this.defaultValue.value._styleExpression.expression);\n }\n outputDefined() {\n return false;\n }\n serialize() {\n return null;\n }\n }\n us(\"FormatSectionOverride\", dh, { omit: [\"defaultValue\"] });\n class yh extends Ys {\n constructor(t2, e2) {\n super(t2, fh, e2);\n }\n recalculate(t2, e2) {\n if (super.recalculate(t2, e2), \"auto\" === this.layout.get(\"icon-rotation-alignment\") && (this.layout._values[\"icon-rotation-alignment\"] = \"point\" !== this.layout.get(\"symbol-placement\") ? \"map\" : \"viewport\"), \"auto\" === this.layout.get(\"text-rotation-alignment\") && (this.layout._values[\"text-rotation-alignment\"] = \"point\" !== this.layout.get(\"symbol-placement\") ? \"map\" : \"viewport\"), \"auto\" === this.layout.get(\"text-pitch-alignment\") && (this.layout._values[\"text-pitch-alignment\"] = \"map\" === this.layout.get(\"text-rotation-alignment\") ? \"map\" : \"viewport\"), \"auto\" === this.layout.get(\"icon-pitch-alignment\") && (this.layout._values[\"icon-pitch-alignment\"] = this.layout.get(\"icon-rotation-alignment\")), \"point\" === this.layout.get(\"symbol-placement\")) {\n const t3 = this.layout.get(\"text-writing-mode\");\n if (t3) {\n const e3 = [];\n for (const r2 of t3) e3.indexOf(r2) < 0 && e3.push(r2);\n this.layout._values[\"text-writing-mode\"] = e3;\n } else this.layout._values[\"text-writing-mode\"] = [\"horizontal\"];\n }\n this._setPaintOverrides();\n }\n getValueAndResolveTokens(t2, e2, r2, n2) {\n const i2 = this.layout.get(t2).evaluate(e2, {}, r2, n2), s2 = this._unevaluatedLayout._values[t2];\n return s2.isDataDriven() || ri(s2.value) || !i2 ? i2 : (function(t3, e3) {\n return e3.replace(/{([^{}]+)}/g, ((e4, r3) => t3 && r3 in t3 ? String(t3[r3]) : \"\"));\n })(e2.properties, i2);\n }\n createBucket(t2) {\n return new ch(t2);\n }\n queryRadius() {\n return 0;\n }\n queryIntersectsFeature() {\n throw new Error(\"Should take a different path in FeatureIndex\");\n }\n _setPaintOverrides() {\n for (const t2 of fh.paint.overridableProperties) {\n if (!yh.hasPaintOverride(this.layout, t2)) continue;\n const e2 = this.paint.get(t2), r2 = new dh(e2), n2 = new ei(r2, e2.property.specification);\n let i2 = null;\n i2 = \"constant\" === e2.value.kind || \"source\" === e2.value.kind ? new ii(\"source\", n2) : new si(\"composite\", n2, e2.value.zoomStops), this.paint._values[t2] = new Rs(e2.property, i2, e2.parameters);\n }\n }\n _handleOverridablePaintPropertyUpdate(t2, e2, r2) {\n return !(!this.layout || e2.isDataDriven() || r2.isDataDriven()) && yh.hasPaintOverride(this.layout, t2);\n }\n static hasPaintOverride(t2, e2) {\n const r2 = t2.get(\"text-field\"), n2 = fh.paint.properties[e2];\n let i2 = false;\n const s2 = (t3) => {\n for (const e3 of t3) if (n2.overrides && n2.overrides.hasOverride(e3)) return void (i2 = true);\n };\n if (\"constant\" === r2.value.kind && r2.value.value instanceof De) s2(r2.value.value.sections);\n else if (\"source\" === r2.value.kind || \"composite\" === r2.value.kind) {\n const t3 = (e4) => {\n i2 || (e4 instanceof je && Ue(e4.value) === jt ? s2(e4.value.sections) : e4 instanceof Ir ? s2(e4.sections) : e4.eachChild(t3));\n }, e3 = r2.value;\n e3._styleExpression && t3(e3._styleExpression.expression);\n }\n return i2;\n }\n }\n let mh;\n var gh = { get paint() {\n return mh = mh || new Xs({ \"background-color\": new $s(vt.paint_background[\"background-color\"]), \"background-pattern\": new js(vt.paint_background[\"background-pattern\"]), \"background-opacity\": new $s(vt.paint_background[\"background-opacity\"]) });\n } };\n class xh extends Ys {\n constructor(t2, e2) {\n super(t2, gh, e2);\n }\n }\n class vh extends Ys {\n constructor(t2, e2) {\n super(t2, {}, e2), this.onAdd = (t3) => {\n this.implementation.onAdd && this.implementation.onAdd(t3, t3.painter.context.gl);\n }, this.onRemove = (t3) => {\n this.implementation.onRemove && this.implementation.onRemove(t3, t3.painter.context.gl);\n }, this.implementation = t2;\n }\n is3D() {\n return \"3d\" === this.implementation.renderingMode;\n }\n hasOffscreenPass() {\n return void 0 !== this.implementation.prerender;\n }\n recalculate() {\n }\n updateTransitions() {\n }\n hasTransition() {\n return false;\n }\n serialize() {\n throw new Error(\"Custom layers cannot be serialized\");\n }\n }\n class bh {\n constructor(t2) {\n this._methodToThrottle = t2, this._triggered = false, \"undefined\" != typeof MessageChannel && (this._channel = new MessageChannel(), this._channel.port2.onmessage = () => {\n this._triggered = false, this._methodToThrottle();\n });\n }\n trigger() {\n this._triggered || (this._triggered = true, this._channel ? this._channel.port1.postMessage(true) : setTimeout((() => {\n this._triggered = false, this._methodToThrottle();\n }), 0));\n }\n remove() {\n delete this._channel, this._methodToThrottle = () => {\n };\n }\n }\n const wh = { once: true }, _h = 63710088e-1;\n class Ah {\n constructor(t2, e2) {\n if (isNaN(t2) || isNaN(e2)) throw new Error(`Invalid LngLat object: (${t2}, ${e2})`);\n if (this.lng = +t2, this.lat = +e2, this.lat > 90 || this.lat < -90) throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\");\n }\n wrap() {\n return new Ah(L(this.lng, -180, 180), this.lat);\n }\n toArray() {\n return [this.lng, this.lat];\n }\n toString() {\n return `LngLat(${this.lng}, ${this.lat})`;\n }\n distanceTo(t2) {\n const e2 = Math.PI / 180, r2 = this.lat * e2, n2 = t2.lat * e2, i2 = Math.sin(r2) * Math.sin(n2) + Math.cos(r2) * Math.cos(n2) * Math.cos((t2.lng - this.lng) * e2);\n return _h * Math.acos(Math.min(i2, 1));\n }\n static convert(t2) {\n if (t2 instanceof Ah) return t2;\n if (Array.isArray(t2) && (2 === t2.length || 3 === t2.length)) return new Ah(Number(t2[0]), Number(t2[1]));\n if (!Array.isArray(t2) && \"object\" == typeof t2 && null !== t2) return new Ah(Number(\"lng\" in t2 ? t2.lng : t2.lon), Number(t2.lat));\n throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\");\n }\n }\n const Sh = 2 * Math.PI * _h;\n function kh(t2) {\n return Sh * Math.cos(t2 * Math.PI / 180);\n }\n function Eh(t2) {\n return (180 + t2) / 360;\n }\n function Th(t2) {\n return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t2 * Math.PI / 360))) / 360;\n }\n function Ih(t2, e2) {\n return t2 / kh(e2);\n }\n function Mh(t2) {\n return 360 * t2 - 180;\n }\n function Fh(t2) {\n return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * t2) * Math.PI / 180)) - 90;\n }\n function Dh(t2, e2) {\n return t2 * kh(Fh(e2));\n }\n class Ph {\n constructor(t2, e2, r2 = 0) {\n this.x = +t2, this.y = +e2, this.z = +r2;\n }\n static fromLngLat(t2, e2 = 0) {\n const r2 = Ah.convert(t2);\n return new Ph(Eh(r2.lng), Th(r2.lat), Ih(e2, r2.lat));\n }\n toLngLat() {\n return new Ah(Mh(this.x), Fh(this.y));\n }\n toAltitude() {\n return Dh(this.z, this.y);\n }\n meterInMercatorCoordinateUnits() {\n return 1 / Sh * (t2 = Fh(this.y), 1 / Math.cos(t2 * Math.PI / 180));\n var t2;\n }\n }\n function zh(t2, e2, r2) {\n var n2 = 2 * Math.PI * 6378137 / 256 / Math.pow(2, r2);\n return [t2 * n2 - 2 * Math.PI * 6378137 / 2, e2 * n2 - 2 * Math.PI * 6378137 / 2];\n }\n class Bh {\n constructor(t2, e2, r2) {\n if (!(function(t3, e3, r3) {\n return !(t3 < 0 || t3 > 25 || r3 < 0 || r3 >= Math.pow(2, t3) || e3 < 0 || e3 >= Math.pow(2, t3));\n })(t2, e2, r2)) throw new Error(`x=${e2}, y=${r2}, z=${t2} outside of bounds. 0<=x<${Math.pow(2, t2)}, 0<=y<${Math.pow(2, t2)} 0<=z<=25 `);\n this.z = t2, this.x = e2, this.y = r2, this.key = Lh(0, t2, t2, e2, r2);\n }\n equals(t2) {\n return this.z === t2.z && this.x === t2.x && this.y === t2.y;\n }\n url(t2, e2, r2) {\n const n2 = (function(t3, e3, r3) {\n var n3 = zh(256 * t3, 256 * (e3 = Math.pow(2, r3) - e3 - 1), r3), i3 = zh(256 * (t3 + 1), 256 * (e3 + 1), r3);\n return n3[0] + \",\" + n3[1] + \",\" + i3[0] + \",\" + i3[1];\n })(this.x, this.y, this.z), i2 = (function(t3, e3, r3) {\n let n3, i3 = \"\";\n for (let s2 = t3; s2 > 0; s2--) n3 = 1 << s2 - 1, i3 += (e3 & n3 ? 1 : 0) + (r3 & n3 ? 2 : 0);\n return i3;\n })(this.z, this.x, this.y);\n return t2[(this.x + this.y) % t2.length].replace(/{prefix}/g, (this.x % 16).toString(16) + (this.y % 16).toString(16)).replace(/{z}/g, String(this.z)).replace(/{x}/g, String(this.x)).replace(/{y}/g, String(\"tms\" === r2 ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace(/{ratio}/g, e2 > 1 ? \"@2x\" : \"\").replace(/{quadkey}/g, i2).replace(/{bbox-epsg-3857}/g, n2);\n }\n isChildOf(t2) {\n const e2 = this.z - t2.z;\n return e2 > 0 && t2.x === this.x >> e2 && t2.y === this.y >> e2;\n }\n getTilePoint(t2) {\n const e2 = Math.pow(2, this.z);\n return new r((t2.x * e2 - this.x) * M, (t2.y * e2 - this.y) * M);\n }\n toString() {\n return `${this.z}/${this.x}/${this.y}`;\n }\n }\n class Vh {\n constructor(t2, e2) {\n this.wrap = t2, this.canonical = e2, this.key = Lh(t2, e2.z, e2.z, e2.x, e2.y);\n }\n }\n class Ch {\n constructor(t2, e2, r2, n2, i2) {\n if (this.terrainRttPosMatrix32f = null, t2 < r2) throw new Error(`overscaledZ should be >= z; overscaledZ = ${t2}; z = ${r2}`);\n this.overscaledZ = t2, this.wrap = e2, this.canonical = new Bh(r2, +n2, +i2), this.key = Lh(e2, t2, r2, n2, i2);\n }\n clone() {\n return new Ch(this.overscaledZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n equals(t2) {\n return this.overscaledZ === t2.overscaledZ && this.wrap === t2.wrap && this.canonical.equals(t2.canonical);\n }\n scaledTo(t2) {\n if (t2 > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${t2}; overscaledZ = ${this.overscaledZ}`);\n const e2 = this.canonical.z - t2;\n return t2 > this.canonical.z ? new Ch(t2, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new Ch(t2, this.wrap, t2, this.canonical.x >> e2, this.canonical.y >> e2);\n }\n isOverscaled() {\n return this.overscaledZ > this.canonical.z;\n }\n calculateScaledKey(t2, e2) {\n if (t2 > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${t2}; overscaledZ = ${this.overscaledZ}`);\n const r2 = this.canonical.z - t2;\n return t2 > this.canonical.z ? Lh(this.wrap * +e2, t2, this.canonical.z, this.canonical.x, this.canonical.y) : Lh(this.wrap * +e2, t2, t2, this.canonical.x >> r2, this.canonical.y >> r2);\n }\n isChildOf(t2) {\n if (t2.wrap !== this.wrap) return false;\n if (this.overscaledZ - t2.overscaledZ <= 0) return false;\n if (0 === t2.overscaledZ) return this.overscaledZ > 0;\n const e2 = this.canonical.z - t2.canonical.z;\n return !(e2 < 0) && t2.canonical.x === this.canonical.x >> e2 && t2.canonical.y === this.canonical.y >> e2;\n }\n children(t2) {\n if (this.overscaledZ >= t2) return [new Ch(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];\n const e2 = this.canonical.z + 1, r2 = 2 * this.canonical.x, n2 = 2 * this.canonical.y;\n return [new Ch(e2, this.wrap, e2, r2, n2), new Ch(e2, this.wrap, e2, r2 + 1, n2), new Ch(e2, this.wrap, e2, r2, n2 + 1), new Ch(e2, this.wrap, e2, r2 + 1, n2 + 1)];\n }\n isLessThan(t2) {\n return this.wrap < t2.wrap || !(this.wrap > t2.wrap) && (this.overscaledZ < t2.overscaledZ || !(this.overscaledZ > t2.overscaledZ) && (this.canonical.x < t2.canonical.x || !(this.canonical.x > t2.canonical.x) && this.canonical.y < t2.canonical.y));\n }\n wrapped() {\n return new Ch(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n unwrapTo(t2) {\n return new Ch(this.overscaledZ, t2, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n overscaleFactor() {\n return Math.pow(2, this.overscaledZ - this.canonical.z);\n }\n toUnwrapped() {\n return new Vh(this.wrap, this.canonical);\n }\n toString() {\n return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;\n }\n getTilePoint(t2) {\n return this.canonical.getTilePoint(new Ph(t2.x - this.wrap, t2.y));\n }\n }\n function Lh(t2, e2, r2, n2, i2) {\n (t2 *= 2) < 0 && (t2 = -1 * t2 - 1);\n const s2 = 1 << r2;\n return (s2 * s2 * t2 + s2 * i2 + n2).toString(36) + r2.toString(36) + e2.toString(36);\n }\n function Oh(t2, e2) {\n return e2 ? t2.properties[e2] : t2.id;\n }\n function Rh(t2, e2) {\n const r2 = { id: t2.id };\n if (e2.removeAllProperties && (delete t2.removeProperties, delete t2.addOrUpdateProperties, delete e2.removeProperties), e2.removeProperties) for (const r3 of e2.removeProperties) {\n const e3 = t2.addOrUpdateProperties.findIndex(((t3) => t3.key === r3));\n e3 > -1 && t2.addOrUpdateProperties.splice(e3, 1);\n }\n return (t2.removeAllProperties || e2.removeAllProperties) && (r2.removeAllProperties = true), (t2.removeProperties || e2.removeProperties) && (r2.removeProperties = [...t2.removeProperties || [], ...e2.removeProperties || []]), (t2.addOrUpdateProperties || e2.addOrUpdateProperties) && (r2.addOrUpdateProperties = [...t2.addOrUpdateProperties || [], ...e2.addOrUpdateProperties || []]), (t2.newGeometry || e2.newGeometry) && (r2.newGeometry = e2.newGeometry || t2.newGeometry), r2;\n }\n function Nh(t2) {\n var e2, r2;\n if (!t2) return {};\n const n2 = {};\n return n2.removeAll = t2.removeAll, n2.remove = new Set(t2.remove || []), n2.add = new Map(null === (e2 = t2.add) || void 0 === e2 ? void 0 : e2.map(((t3) => [t3.id, t3]))), n2.update = new Map(null === (r2 = t2.update) || void 0 === r2 ? void 0 : r2.map(((t3) => [t3.id, t3]))), n2;\n }\n us(\"CanonicalTileID\", Bh), us(\"OverscaledTileID\", Ch, { omit: [\"terrainRttPosMatrix32f\"] });\n class $h {\n constructor(t2) {\n this._stringToNumber = {}, this._numberToString = [];\n for (let e2 = 0; e2 < t2.length; e2++) {\n const r2 = t2[e2];\n this._stringToNumber[r2] = e2, this._numberToString[e2] = r2;\n }\n }\n encode(t2) {\n return this._stringToNumber[t2];\n }\n decode(t2) {\n if (t2 >= this._numberToString.length) throw new Error(`Out of bounds. Index requested n=${t2} can't be >= this._numberToString.length ${this._numberToString.length}`);\n return this._numberToString[t2];\n }\n }\n class Uh {\n constructor(t2, e2, r2, n2, i2) {\n this.type = \"Feature\", this._vectorTileFeature = t2, this._x = r2, this._y = n2, this._z = e2, this.properties = t2.properties, this.id = i2;\n }\n projectPoint(t2, e2, r2, n2) {\n return [360 * (t2.x + e2) / n2 - 180, 360 / Math.PI * Math.atan(Math.exp((1 - 2 * (t2.y + r2) / n2) * Math.PI)) - 90];\n }\n projectLine(t2, e2, r2, n2) {\n return t2.map(((t3) => this.projectPoint(t3, e2, r2, n2)));\n }\n get geometry() {\n if (this._geometry) return this._geometry;\n const t2 = this._vectorTileFeature, e2 = t2.extent * Math.pow(2, this._z), r2 = t2.extent * this._x, n2 = t2.extent * this._y, i2 = t2.loadGeometry();\n switch (t2.type) {\n case 1: {\n const t3 = [];\n for (const e3 of i2) t3.push(e3[0]);\n const s2 = this.projectLine(t3, r2, n2, e2);\n this._geometry = 1 === t3.length ? { type: \"Point\", coordinates: s2[0] } : { type: \"MultiPoint\", coordinates: s2 };\n break;\n }\n case 2: {\n const t3 = i2.map(((t4) => this.projectLine(t4, r2, n2, e2)));\n this._geometry = 1 === t3.length ? { type: \"LineString\", coordinates: t3[0] } : { type: \"MultiLineString\", coordinates: t3 };\n break;\n }\n case 3: {\n const t3 = Iu(i2), s2 = [];\n for (const i3 of t3) s2.push(i3.map(((t4) => this.projectLine(t4, r2, n2, e2))));\n this._geometry = 1 === s2.length ? { type: \"Polygon\", coordinates: s2[0] } : { type: \"MultiPolygon\", coordinates: s2 };\n break;\n }\n default:\n throw new Error(`unknown feature type: ${t2.type}`);\n }\n return this._geometry;\n }\n set geometry(t2) {\n this._geometry = t2;\n }\n toJSON() {\n const t2 = { geometry: this.geometry };\n for (const e2 in this) \"_geometry\" !== e2 && \"_vectorTileFeature\" !== e2 && \"_x\" !== e2 && \"_y\" !== e2 && \"_z\" !== e2 && (t2[e2] = this[e2]);\n return t2;\n }\n }\n class qh {\n _name;\n dataBuffer;\n nullabilityBuffer;\n _size;\n constructor(t2, e2, r2) {\n this._name = t2, this.dataBuffer = e2, \"number\" == typeof r2 ? this._size = r2 : (this.nullabilityBuffer = r2, this._size = r2.size());\n }\n getValue(t2) {\n return this.nullabilityBuffer && !this.nullabilityBuffer.get(t2) ? null : this.getValueFromBuffer(t2);\n }\n has(t2) {\n return this.nullabilityBuffer && this.nullabilityBuffer.get(t2) || !this.nullabilityBuffer;\n }\n get name() {\n return this._name;\n }\n get size() {\n return this._size;\n }\n }\n class jh extends qh {\n }\n class Gh extends jh {\n getValueFromBuffer(t2) {\n return this.dataBuffer[t2];\n }\n }\n class Xh extends jh {\n getValueFromBuffer(t2) {\n return this.dataBuffer[t2];\n }\n }\n class Yh extends qh {\n delta;\n constructor(t2, e2, r2, n2) {\n super(t2, e2, n2), this.delta = r2;\n }\n }\n class Zh extends Yh {\n constructor(t2, e2, r2, n2) {\n super(t2, Int32Array.of(e2), r2, n2);\n }\n getValueFromBuffer(t2) {\n return this.dataBuffer[0] + t2 * this.delta;\n }\n }\n class Hh extends qh {\n constructor(t2, e2, r2) {\n super(t2, Int32Array.of(e2), r2);\n }\n getValueFromBuffer(t2) {\n return this.dataBuffer[0];\n }\n }\n class Kh {\n _name;\n _geometryVector;\n _idVector;\n _propertyVectors;\n _extent;\n propertyVectorsMap;\n constructor(t2, e2, r2, n2, i2 = 4096) {\n this._name = t2, this._geometryVector = e2, this._idVector = r2, this._propertyVectors = n2, this._extent = i2;\n }\n get name() {\n return this._name;\n }\n get idVector() {\n return this._idVector;\n }\n get geometryVector() {\n return this._geometryVector;\n }\n get propertyVectors() {\n return this._propertyVectors;\n }\n getPropertyVector(t2) {\n return this.propertyVectorsMap || (this.propertyVectorsMap = new Map(this._propertyVectors.map(((t3) => [t3.name, t3])))), this.propertyVectorsMap.get(t2);\n }\n *[Symbol.iterator]() {\n const t2 = this.geometryVector[Symbol.iterator]();\n let e2 = 0;\n for (; e2 < this.numFeatures; ) {\n let r2;\n this.idVector && (r2 = this.containsMaxSaveIntegerValues(this.idVector) ? Number(this.idVector.getValue(e2)) : this.idVector.getValue(e2));\n const n2 = t2?.next().value, i2 = {};\n for (const t3 of this.propertyVectors) {\n if (!t3) continue;\n const r3 = t3.name, n3 = t3.getValue(e2);\n null !== n3 && (i2[r3] = n3);\n }\n e2++, yield { id: r2, geometry: n2, properties: i2 };\n }\n }\n get numFeatures() {\n return this.geometryVector.numGeometries;\n }\n get extent() {\n return this._extent;\n }\n getFeatures() {\n const t2 = [], e2 = this.geometryVector.getGeometries();\n for (let r2 = 0; r2 < this.numFeatures; r2++) {\n let n2;\n this.idVector && (n2 = this.containsMaxSaveIntegerValues(this.idVector) ? Number(this.idVector.getValue(r2)) : this.idVector.getValue(r2));\n const i2 = { coordinates: e2[r2], type: this.geometryVector.geometryType(r2) }, s2 = {};\n for (const t3 of this.propertyVectors) {\n if (!t3) continue;\n const e3 = t3.name, n3 = t3.getValue(r2);\n null !== n3 && (s2[e3] = n3);\n }\n t2.push({ id: n2, geometry: i2, properties: s2 });\n }\n return t2;\n }\n containsMaxSaveIntegerValues(t2) {\n return t2 instanceof Gh || t2 instanceof Hh && t2 instanceof Zh || t2 instanceof Xh;\n }\n }\n class Wh {\n value;\n constructor(t2) {\n this.value = t2;\n }\n get() {\n return this.value;\n }\n set(t2) {\n this.value = t2;\n }\n increment() {\n return this.value++;\n }\n add(t2) {\n this.value += t2;\n }\n }\n var Jh, Qh, tp, ep, rp, np, ip, sp, op, ap;\n function lp(t2, e2, r2) {\n const n2 = new Int32Array(r2);\n let i2 = 0, s2 = e2.get();\n for (let e3 = 0; e3 < n2.length; e3++) {\n let e4 = t2[s2++], r3 = 127 & e4;\n e4 < 128 || (e4 = t2[s2++], r3 |= (127 & e4) << 7, e4 < 128 || (e4 = t2[s2++], r3 |= (127 & e4) << 14, e4 < 128 || (e4 = t2[s2++], r3 |= (127 & e4) << 21, e4 < 128 || (e4 = t2[s2++], r3 |= (15 & e4) << 28)))), n2[i2++] = r3;\n }\n return e2.set(s2), n2;\n }\n function up(t2, e2, r2) {\n const n2 = new BigInt64Array(r2);\n for (let r3 = 0; r3 < n2.length; r3++) n2[r3] = dp(t2, e2);\n return n2;\n }\n function cp(t2, e2) {\n let r2, n2;\n return n2 = t2[e2.get()], e2.increment(), r2 = 127 & n2, n2 < 128 ? r2 : (n2 = t2[e2.get()], e2.increment(), r2 |= (127 & n2) << 7, n2 < 128 ? r2 : (n2 = t2[e2.get()], e2.increment(), r2 |= (127 & n2) << 14, n2 < 128 ? r2 : (n2 = t2[e2.get()], e2.increment(), r2 |= (127 & n2) << 21, n2 < 128 ? r2 : (n2 = t2[e2.get()], r2 |= (15 & n2) << 28, (function(t3, e3, r3) {\n let n3, i2;\n if (i2 = e3[r3.get()], r3.increment(), n3 = (112 & i2) >> 4, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n if (i2 = e3[r3.get()], r3.increment(), n3 |= (127 & i2) << 3, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n if (i2 = e3[r3.get()], r3.increment(), n3 |= (127 & i2) << 10, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n if (i2 = e3[r3.get()], r3.increment(), n3 |= (127 & i2) << 17, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n if (i2 = e3[r3.get()], r3.increment(), n3 |= (127 & i2) << 24, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n if (i2 = e3[r3.get()], r3.increment(), n3 |= (1 & i2) << 31, i2 < 128) return 4294967296 * n3 + (t3 >>> 0);\n throw new Error(\"Expected varint not more than 10 bytes\");\n })(r2, t2, e2)))));\n }\n function hp(t2, e2, r2, n2) {\n throw new Error(\"FastPFor is not implemented yet.\");\n }\n function pp(t2) {\n return t2 >>> 1 ^ -(1 & t2);\n }\n function fp(t2) {\n return t2 >> 1n ^ -(1n & t2);\n }\n function dp(t2, e2) {\n let r2 = 0n, n2 = 0, i2 = e2.get();\n for (; i2 < t2.length; ) {\n const e3 = t2[i2++];\n if (r2 |= BigInt(127 & e3) << BigInt(n2), !(128 & e3)) break;\n if (n2 += 7, n2 >= 64) throw new Error(\"Varint too long\");\n }\n return e2.set(i2), r2;\n }\n function yp(t2, e2, r2) {\n const n2 = new Int32Array(r2);\n let i2 = 0;\n for (let r3 = 0; r3 < e2; r3++) {\n const s2 = t2[r3];\n n2.fill(t2[r3 + e2], i2, i2 + s2), i2 += s2;\n }\n return n2;\n }\n function mp(t2, e2, r2) {\n const n2 = new BigInt64Array(r2);\n let i2 = 0;\n for (let r3 = 0; r3 < e2; r3++) {\n const s2 = Number(t2[r3]);\n n2.fill(t2[r3 + e2], i2, i2 + s2), i2 += s2;\n }\n return n2;\n }\n function gp(t2, e2, r2) {\n const n2 = new Float64Array(r2);\n let i2 = 0;\n for (let r3 = 0; r3 < e2; r3++) {\n const s2 = t2[r3];\n n2.fill(t2[r3 + e2], i2, i2 + s2), i2 += s2;\n }\n return n2;\n }\n function xp(t2) {\n const e2 = t2.length / 4 * 4;\n let r2 = 1;\n if (e2 >= 4) for (let n2 = t2[0]; r2 < e2 - 4; r2 += 4) n2 = t2[r2] += n2, n2 = t2[r2 + 1] += n2, n2 = t2[r2 + 2] += n2, n2 = t2[r2 + 3] += n2;\n for (; r2 != t2.length; ) t2[r2] += t2[r2 - 1], ++r2;\n }\n function vp(t2) {\n t2[0] = t2[0] >>> 1 ^ -(1 & t2[0]), t2[1] = t2[1] >>> 1 ^ -(1 & t2[1]);\n const e2 = t2.length / 4 * 4;\n let r2 = 2;\n if (e2 >= 4) for (; r2 < e2 - 4; r2 += 4) {\n const e3 = t2[r2], n2 = t2[r2 + 1], i2 = t2[r2 + 2], s2 = t2[r2 + 3];\n t2[r2] = (e3 >>> 1 ^ -(1 & e3)) + t2[r2 - 2], t2[r2 + 1] = (n2 >>> 1 ^ -(1 & n2)) + t2[r2 - 1], t2[r2 + 2] = (i2 >>> 1 ^ -(1 & i2)) + t2[r2], t2[r2 + 3] = (s2 >>> 1 ^ -(1 & s2)) + t2[r2 + 1];\n }\n for (; r2 != t2.length; r2 += 2) t2[r2] = (t2[r2] >>> 1 ^ -(1 & t2[r2])) + t2[r2 - 2], t2[r2 + 1] = (t2[r2 + 1] >>> 1 ^ -(1 & t2[r2 + 1])) + t2[r2 - 1];\n }\n !(function(t2) {\n t2.NONE = \"NONE\", t2.DELTA = \"DELTA\", t2.COMPONENTWISE_DELTA = \"COMPONENTWISE_DELTA\", t2.RLE = \"RLE\", t2.MORTON = \"MORTON\", t2.PDE = \"PDE\";\n })(Jh || (Jh = {})), (function(t2) {\n t2.NONE = \"NONE\", t2.FAST_PFOR = \"FAST_PFOR\", t2.VARINT = \"VARINT\", t2.ALP = \"ALP\";\n })(Qh || (Qh = {})), (function(t2) {\n t2.PRESENT = \"PRESENT\", t2.DATA = \"DATA\", t2.OFFSET = \"OFFSET\", t2.LENGTH = \"LENGTH\";\n })(tp || (tp = {}));\n class bp {\n _dictionaryType;\n _offsetType;\n _lengthType;\n constructor(t2, e2, r2) {\n this._dictionaryType = t2, this._offsetType = e2, this._lengthType = r2;\n }\n get dictionaryType() {\n return this._dictionaryType;\n }\n get offsetType() {\n return this._offsetType;\n }\n get lengthType() {\n return this._lengthType;\n }\n }\n function wp(t2, e2) {\n const r2 = (function(t3, e3) {\n const r3 = t3[e3.get()], n2 = Object.values(tp)[r3 >> 4];\n let i2 = null;\n switch (n2) {\n case tp.DATA:\n i2 = new bp(Object.values(ep)[15 & r3]);\n break;\n case tp.OFFSET:\n i2 = new bp(null, Object.values(rp)[15 & r3]);\n break;\n case tp.LENGTH:\n i2 = new bp(null, null, Object.values(np)[15 & r3]);\n }\n e3.increment();\n const s2 = t3[e3.get()], o2 = Object.values(Jh)[s2 >> 5], a2 = Object.values(Jh)[s2 >> 2 & 7], l2 = Object.values(Qh)[3 & s2];\n e3.increment();\n const u2 = lp(t3, e3, 2), c2 = u2[0];\n return { physicalStreamType: n2, logicalStreamType: i2, logicalLevelTechnique1: o2, logicalLevelTechnique2: a2, physicalLevelTechnique: l2, numValues: c2, byteLength: u2[1], decompressedCount: c2 };\n })(t2, e2);\n return r2.logicalLevelTechnique1 === Jh.MORTON ? (function(t3, e3, r3) {\n const n2 = lp(e3, r3, 2);\n return { physicalStreamType: t3.physicalStreamType, logicalStreamType: t3.logicalStreamType, logicalLevelTechnique1: t3.logicalLevelTechnique1, logicalLevelTechnique2: t3.logicalLevelTechnique2, physicalLevelTechnique: t3.physicalLevelTechnique, numValues: t3.numValues, byteLength: t3.byteLength, decompressedCount: t3.decompressedCount, numBits: n2[0], coordinateShift: n2[1] };\n })(r2, t2, e2) : Jh.RLE !== r2.logicalLevelTechnique1 && Jh.RLE !== r2.logicalLevelTechnique2 || Qh.NONE === r2.physicalLevelTechnique ? r2 : (function(t3, e3, r3) {\n const n2 = lp(e3, r3, 2);\n return { physicalStreamType: t3.physicalStreamType, logicalStreamType: t3.logicalStreamType, logicalLevelTechnique1: t3.logicalLevelTechnique1, logicalLevelTechnique2: t3.logicalLevelTechnique2, physicalLevelTechnique: t3.physicalLevelTechnique, numValues: t3.numValues, byteLength: t3.byteLength, decompressedCount: n2[1], runs: n2[0], numRleValues: n2[1] };\n })(r2, t2, e2);\n }\n !(function(t2) {\n t2.NONE = \"NONE\", t2.SINGLE = \"SINGLE\", t2.SHARED = \"SHARED\", t2.VERTEX = \"VERTEX\", t2.MORTON = \"MORTON\", t2.FSST = \"FSST\";\n })(ep || (ep = {})), (function(t2) {\n t2.VERTEX = \"VERTEX\", t2.INDEX = \"INDEX\", t2.STRING = \"STRING\", t2.KEY = \"KEY\";\n })(rp || (rp = {})), (function(t2) {\n t2.VAR_BINARY = \"VAR_BINARY\", t2.GEOMETRIES = \"GEOMETRIES\", t2.PARTS = \"PARTS\", t2.RINGS = \"RINGS\", t2.TRIANGLES = \"TRIANGLES\", t2.SYMBOL = \"SYMBOL\", t2.DICTIONARY = \"DICTIONARY\";\n })(np || (np = {})), (function(t2) {\n t2[t2.FLAT = 0] = \"FLAT\", t2[t2.CONST = 1] = \"CONST\", t2[t2.SEQUENCE = 2] = \"SEQUENCE\", t2[t2.DICTIONARY = 3] = \"DICTIONARY\", t2[t2.FSST_DICTIONARY = 4] = \"FSST_DICTIONARY\";\n })(ip || (ip = {}));\n class _p {\n values;\n _size;\n constructor(t2, e2) {\n this.values = t2, this._size = e2;\n }\n get(t2) {\n const e2 = Math.floor(t2 / 8);\n return 1 == (this.values[e2] >> t2 % 8 & 1);\n }\n set(t2, e2) {\n const r2 = Math.floor(t2 / 8);\n this.values[r2] = this.values[r2] | (e2 ? 1 : 0) << t2 % 8;\n }\n getInt(t2) {\n const e2 = Math.floor(t2 / 8);\n return this.values[e2] >> t2 % 8 & 1;\n }\n size() {\n return this._size;\n }\n getBuffer() {\n return this.values;\n }\n }\n function Ap(t2, e2, r2, n2, i2) {\n return (function(t3, e3, r3) {\n switch (e3.logicalLevelTechnique1) {\n case Jh.DELTA:\n return e3.logicalLevelTechnique2 === Jh.RLE ? (function(t4, e4, r4) {\n const n3 = new Int32Array(r4);\n let i3 = 0, s2 = 0;\n for (let r5 = 0; r5 < e4; r5++) {\n const o2 = t4[r5], a2 = pp(t4[r5 + e4]);\n for (let t5 = 0; t5 < o2; t5++) s2 += a2, n3[i3++] = s2;\n }\n return n3;\n })(t3, e3.runs, e3.numRleValues) : ((function(t4) {\n t4[0] = t4[0] >>> 1 ^ -(1 & t4[0]);\n const e4 = t4.length / 4 * 4;\n let r4 = 1;\n if (e4 >= 4) for (; r4 < e4 - 4; r4 += 4) {\n const e5 = t4[r4], n3 = t4[r4 + 1], i3 = t4[r4 + 2], s2 = t4[r4 + 3];\n t4[r4] = (e5 >>> 1 ^ -(1 & e5)) + t4[r4 - 1], t4[r4 + 1] = (n3 >>> 1 ^ -(1 & n3)) + t4[r4], t4[r4 + 2] = (i3 >>> 1 ^ -(1 & i3)) + t4[r4 + 1], t4[r4 + 3] = (s2 >>> 1 ^ -(1 & s2)) + t4[r4 + 2];\n }\n for (; r4 != t4.length; ++r4) t4[r4] = (t4[r4] >>> 1 ^ -(1 & t4[r4])) + t4[r4 - 1];\n })(t3), t3);\n case Jh.RLE:\n return (function(t4, e4, r4) {\n return r4 ? (function(t5, e5, r5) {\n const n3 = new Int32Array(r5);\n let i3 = 0;\n for (let r6 = 0; r6 < e5; r6++) {\n const s2 = t5[r6];\n let o2 = t5[r6 + e5];\n o2 = o2 >>> 1 ^ -(1 & o2), n3.fill(o2, i3, i3 + s2), i3 += s2;\n }\n return n3;\n })(t4, e4.runs, e4.numRleValues) : yp(t4, e4.runs, e4.numRleValues);\n })(t3, e3, r3);\n case Jh.MORTON:\n return xp(t3), t3;\n case Jh.COMPONENTWISE_DELTA:\n return vp(t3), t3;\n case Jh.NONE:\n return r3 && (function(t4) {\n for (let e4 = 0; e4 < t4.length; e4++) {\n const r4 = t4[e4];\n t4[e4] = r4 >>> 1 ^ -(1 & r4);\n }\n })(t3), t3;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${e3.logicalLevelTechnique1}`);\n }\n })(kp(t2, e2, r2), r2, n2);\n }\n function Sp(t2, e2, r2) {\n return (function(t3, e3) {\n if (e3.logicalLevelTechnique1 === Jh.DELTA && e3.logicalLevelTechnique2 === Jh.NONE) {\n const e4 = (function(t4) {\n const e5 = new Int32Array(t4.length + 1);\n e5[0] = 0, e5[1] = pp(t4[0]);\n let r3 = e5[1], n2 = 2;\n for (; n2 != e5.length; ++n2) {\n const i2 = t4[n2 - 1];\n r3 += i2 >>> 1 ^ -(1 & i2), e5[n2] = e5[n2 - 1] + r3;\n }\n return e5;\n })(t3);\n return e4;\n }\n if (e3.logicalLevelTechnique1 === Jh.RLE && e3.logicalLevelTechnique2 === Jh.NONE) {\n const r3 = (function(t4, e4, r4) {\n const n2 = new Int32Array(r4 + 1);\n n2[0] = 0;\n let i2 = 1, s2 = n2[0];\n for (let r5 = 0; r5 < e4; r5++) {\n const o2 = t4[r5], a2 = t4[r5 + e4];\n for (let t5 = i2; t5 < i2 + o2; t5++) n2[t5] = a2 + s2, s2 = n2[t5];\n i2 += o2;\n }\n return n2;\n })(t3, e3.runs, e3.numRleValues);\n return r3;\n }\n if (e3.logicalLevelTechnique1 === Jh.NONE && e3.logicalLevelTechnique2 === Jh.NONE) {\n !(function(t4) {\n let e4 = 0;\n for (let r4 = 0; r4 < t4.length; r4++) t4[r4] += e4, e4 = t4[r4];\n })(t3);\n const r3 = new Int32Array(e3.numValues + 1);\n return r3[0] = 0, r3.set(t3, 1), r3;\n }\n if (e3.logicalLevelTechnique1 === Jh.DELTA && e3.logicalLevelTechnique2 === Jh.RLE) {\n const r3 = (function(t4, e4, r4) {\n const n2 = new Int32Array(r4 + 1);\n n2[0] = 0;\n let i2 = 1, s2 = n2[0];\n for (let r5 = 0; r5 < e4; r5++) {\n const o2 = t4[r5];\n let a2 = t4[r5 + e4];\n a2 = a2 >>> 1 ^ -(1 & a2);\n for (let t5 = i2; t5 < i2 + o2; t5++) n2[t5] = a2 + s2, s2 = n2[t5];\n i2 += o2;\n }\n return n2;\n })(t3, e3.runs, e3.numRleValues);\n return xp(r3), r3;\n }\n throw new Error(\"Only delta encoding is supported for transforming length to offset streams yet.\");\n })(kp(t2, e2, r2), r2);\n }\n function kp(t2, e2, r2) {\n const n2 = r2.physicalLevelTechnique;\n if (n2 === Qh.FAST_PFOR) return hp();\n if (n2 === Qh.VARINT) return lp(t2, e2, r2.numValues);\n if (n2 === Qh.NONE) {\n const n3 = e2.get();\n e2.add(r2.byteLength);\n const i2 = t2.subarray(n3, e2.get());\n return new Int32Array(i2);\n }\n throw new Error(\"Specified physicalLevelTechnique is not supported (yet).\");\n }\n function Ep(t2, e2, r2, n2) {\n const i2 = kp(t2, e2, r2);\n if (1 === i2.length) {\n const t3 = i2[0];\n return n2 ? pp(t3) : t3;\n }\n return n2 ? (function(t3) {\n return pp(t3[1]);\n })(i2) : (function(t3) {\n return t3[1];\n })(i2);\n }\n function Tp(t2, e2, r2) {\n return (function(t3) {\n if (2 == t3.length) {\n const e3 = pp(t3[1]);\n return [e3, e3];\n }\n return [pp(t3[2]), pp(t3[3])];\n })(kp(t2, e2, r2));\n }\n function Ip(t2, e2, r2) {\n return (function(t3) {\n if (2 == t3.length) {\n const e3 = fp(t3[1]);\n return [e3, e3];\n }\n return [fp(t3[2]), fp(t3[3])];\n })(up(t2, e2, r2.numValues));\n }\n function Mp(t2, e2, r2, n2) {\n return (function(t3, e3, r3) {\n switch (e3.logicalLevelTechnique1) {\n case Jh.DELTA:\n return e3.logicalLevelTechnique2 === Jh.RLE ? (function(t4, e4, r4) {\n const n3 = new BigInt64Array(r4);\n let i2 = 0, s2 = 0n;\n for (let r5 = 0; r5 < e4; r5++) {\n const o2 = Number(t4[r5]), a2 = fp(t4[r5 + e4]);\n for (let t5 = 0; t5 < o2; t5++) s2 += a2, n3[i2++] = s2;\n }\n return n3;\n })(t3, e3.runs, e3.numRleValues) : ((function(t4) {\n t4[0] = t4[0] >> 1n ^ -(1n & t4[0]);\n const e4 = t4.length / 4 * 4;\n let r4 = 1;\n if (e4 >= 4) for (; r4 < e4 - 4; r4 += 4) {\n const e5 = t4[r4], n3 = t4[r4 + 1], i2 = t4[r4 + 2], s2 = t4[r4 + 3];\n t4[r4] = (e5 >> 1n ^ -(1n & e5)) + t4[r4 - 1], t4[r4 + 1] = (n3 >> 1n ^ -(1n & n3)) + t4[r4], t4[r4 + 2] = (i2 >> 1n ^ -(1n & i2)) + t4[r4 + 1], t4[r4 + 3] = (s2 >> 1n ^ -(1n & s2)) + t4[r4 + 2];\n }\n for (; r4 != t4.length; ++r4) t4[r4] = (t4[r4] >> 1n ^ -(1n & t4[r4])) + t4[r4 - 1];\n })(t3), t3);\n case Jh.RLE:\n return (function(t4, e4, r4) {\n return r4 ? (function(t5, e5, r5) {\n const n3 = new BigInt64Array(r5);\n let i2 = 0;\n for (let r6 = 0; r6 < e5; r6++) {\n const s2 = Number(t5[r6]);\n let o2 = t5[r6 + e5];\n o2 = o2 >> 1n ^ -(1n & o2), n3.fill(o2, i2, i2 + s2), i2 += s2;\n }\n return n3;\n })(t4, e4.runs, e4.numRleValues) : mp(t4, e4.runs, e4.numRleValues);\n })(t3, e3, r3);\n case Jh.NONE:\n return r3 && (function(t4) {\n for (let e4 = 0; e4 < t4.length; e4++) {\n const r4 = t4[e4];\n t4[e4] = r4 >> 1n ^ -(1n & r4);\n }\n })(t3), t3;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${e3.logicalLevelTechnique1}`);\n }\n })(up(t2, e2, r2.numValues), r2, n2);\n }\n function Fp(t2, e2, r2, n2) {\n const i2 = up(t2, e2, r2.numValues);\n if (1 === i2.length) {\n const t3 = i2[0];\n return n2 ? fp(t3) : t3;\n }\n return n2 ? (function(t3) {\n return fp(t3[1]);\n })(i2) : (function(t3) {\n return t3[1];\n })(i2);\n }\n function Dp(t2, e2, r2, n2, i2) {\n return (function(t3, e3, r3, n3) {\n switch (e3.logicalLevelTechnique1) {\n case Jh.DELTA:\n return e3.logicalLevelTechnique2 === Jh.RLE && (t3 = yp(t3, e3.runs, e3.numRleValues)), (function(t4, e4) {\n const r4 = new Int32Array(t4.size());\n let n4 = 0;\n t4.get(0) ? (r4[0] = t4.get(0) ? e4[0] >>> 1 ^ -(1 & e4[0]) : 0, n4 = 1) : r4[0] = 0;\n let i3 = 1;\n for (; i3 != r4.length; ++i3) r4[i3] = t4.get(i3) ? r4[i3 - 1] + (e4[n4] >>> 1 ^ -(1 & e4[n4++])) : r4[i3 - 1];\n return r4;\n })(n3, t3);\n case Jh.RLE:\n return (function(t4, e4, r4, n4) {\n const i3 = e4;\n return r4 ? (function(t5, e5, r5) {\n const n5 = new Int32Array(t5.size());\n let i4 = 0;\n for (let s2 = 0; s2 < r5; s2++) {\n const o2 = e5[s2];\n let a2 = e5[s2 + r5];\n a2 = a2 >>> 1 ^ -(1 & a2);\n for (let e6 = i4; e6 < i4 + o2; e6++) t5.get(e6) ? n5[e6] = a2 : (n5[e6] = 0, i4++);\n i4 += o2;\n }\n return n5;\n })(n4, t4, i3.runs) : (function(t5, e5, r5) {\n const n5 = new Int32Array(t5.size());\n let i4 = 0;\n for (let s2 = 0; s2 < r5; s2++) {\n const o2 = e5[s2], a2 = e5[s2 + r5];\n for (let e6 = i4; e6 < i4 + o2; e6++) t5.get(e6) ? n5[e6] = a2 : (n5[e6] = 0, i4++);\n i4 += o2;\n }\n return n5;\n })(n4, t4, i3.runs);\n })(t3, e3, r3, n3);\n case Jh.MORTON:\n return xp(t3), t3;\n case Jh.COMPONENTWISE_DELTA:\n return vp(t3), t3;\n case Jh.NONE:\n return t3 = r3 ? (function(t4, e4) {\n const r4 = new Int32Array(t4.size());\n let n4 = 0, i3 = 0;\n for (; i3 != r4.length; ++i3) if (t4.get(i3)) {\n const t5 = e4[n4++];\n r4[i3] = t5 >>> 1 ^ -(1 & t5);\n } else r4[i3] = 0;\n return r4;\n })(n3, t3) : (function(t4, e4) {\n const r4 = new Int32Array(t4.size());\n let n4 = 0, i3 = 0;\n for (; i3 != r4.length; ++i3) r4[i3] = t4.get(i3) ? e4[n4++] : 0;\n return r4;\n })(n3, t3), t3;\n default:\n throw new Error(\"The specified Logical level technique is not supported\");\n }\n })(r2.physicalLevelTechnique === Qh.FAST_PFOR ? hp() : lp(t2, e2, r2.numValues), r2, n2, i2);\n }\n function Pp(t2, e2, r2, n2) {\n const i2 = t2.logicalLevelTechnique1;\n if (i2 === Jh.RLE) return 1 === t2.runs ? ip.CONST : ip.FLAT;\n const s2 = e2 instanceof _p ? e2.size() : e2;\n if (i2 === Jh.DELTA && t2.logicalLevelTechnique2 === Jh.RLE) {\n const e3 = t2.runs, i3 = 2;\n if (t2.numRleValues !== s2) return ip.FLAT;\n if (1 === e3) return ip.SEQUENCE;\n if (2 === e3) {\n const e4 = n2.get();\n let s3;\n if (t2.physicalLevelTechnique === Qh.VARINT) s3 = lp(r2, n2, 4);\n else {\n const t3 = n2.get();\n s3 = new Int32Array(r2.buffer, r2.byteOffset + t3, 4);\n }\n if (n2.set(e4), s3[2] === i3 && s3[3] === i3) return ip.SEQUENCE;\n }\n }\n return 1 === t2.numValues ? ip.CONST : ip.FLAT;\n }\n class zp extends jh {\n getValueFromBuffer(t2) {\n return this.dataBuffer[t2];\n }\n }\n class Bp extends Yh {\n constructor(t2, e2, r2, n2) {\n super(t2, BigInt64Array.of(e2), r2, n2);\n }\n getValueFromBuffer(t2) {\n return this.dataBuffer[0] + BigInt(t2) * this.delta;\n }\n }\n class Vp {\n _geometryOffsets;\n _partOffsets;\n _ringOffsets;\n constructor(t2, e2, r2) {\n this._geometryOffsets = t2, this._partOffsets = e2, this._ringOffsets = r2;\n }\n get geometryOffsets() {\n return this._geometryOffsets;\n }\n get partOffsets() {\n return this._partOffsets;\n }\n get ringOffsets() {\n return this._ringOffsets;\n }\n }\n function Cp(t2, e2, r2) {\n return { x: Lp(t2, e2) - r2, y: Lp(t2 >> 1, e2) - r2 };\n }\n function Lp(t2, e2) {\n let r2 = 0;\n for (let n2 = 0; n2 < e2; n2++) r2 |= (t2 & 1 << 2 * n2) >> n2;\n return r2;\n }\n !(function(t2) {\n t2[t2.POINT = 0] = \"POINT\", t2[t2.LINESTRING = 1] = \"LINESTRING\", t2[t2.POLYGON = 2] = \"POLYGON\", t2[t2.MULTIPOINT = 3] = \"MULTIPOINT\", t2[t2.MULTILINESTRING = 4] = \"MULTILINESTRING\", t2[t2.MULTIPOLYGON = 5] = \"MULTIPOLYGON\";\n })(sp || (sp = {})), (function(t2) {\n t2[t2.POINT = 0] = \"POINT\", t2[t2.LINESTRING = 1] = \"LINESTRING\", t2[t2.POLYGON = 2] = \"POLYGON\";\n })(op || (op = {})), (function(t2) {\n t2[t2.MORTON = 0] = \"MORTON\", t2[t2.VEC_2 = 1] = \"VEC_2\", t2[t2.VEC_3 = 2] = \"VEC_3\";\n })(ap || (ap = {}));\n class Op {\n createPoint(t2) {\n return [[t2]];\n }\n createMultiPoint(t2) {\n return t2.map(((t3) => [t3]));\n }\n createLineString(t2) {\n return [t2];\n }\n createMultiLineString(t2) {\n return t2;\n }\n createPolygon(t2, e2) {\n return [t2].concat(e2);\n }\n createMultiPolygon(t2) {\n return t2.flat();\n }\n }\n function Rp(t2) {\n const e2 = new Array(t2.numGeometries);\n let n2 = 1, i2 = 1, s2 = 1, o2 = 0;\n const a2 = new Op();\n let l2 = 0, u2 = 0;\n const c2 = t2.mortonSettings, h2 = t2.topologyVector, p2 = h2.geometryOffsets, f2 = h2.partOffsets, d2 = h2.ringOffsets, y2 = t2.vertexOffsets, m2 = t2.containsPolygonGeometry(), g2 = t2.vertexBuffer;\n for (let h3 = 0; h3 < t2.numGeometries; h3++) {\n const x2 = t2.geometryType(h3);\n if (x2 === sp.POINT) {\n if (y2 && 0 !== y2.length) if (t2.vertexBufferType === ap.VEC_2) {\n const t3 = 2 * y2[u2++], n3 = new r(g2[t3], g2[t3 + 1]);\n e2[o2++] = a2.createPoint(n3);\n } else {\n const t3 = Cp(g2[y2[u2++]], c2.numBits, c2.coordinateShift), n3 = new r(t3.x, t3.y);\n e2[o2++] = a2.createPoint(n3);\n }\n else {\n const t3 = new r(g2[l2++], g2[l2++]);\n e2[o2++] = a2.createPoint(t3);\n }\n p2 && s2++, f2 && n2++, d2 && i2++;\n } else if (x2 === sp.MULTIPOINT) {\n const t3 = p2[s2] - p2[s2 - 1];\n s2++;\n const n3 = new Array(t3);\n if (y2 && 0 !== y2.length) {\n for (let e3 = 0; e3 < t3; e3++) {\n const t4 = 2 * y2[u2++];\n n3[e3] = new r(g2[t4], g2[t4 + 1]);\n }\n e2[o2++] = a2.createMultiPoint(n3);\n } else {\n for (let e3 = 0; e3 < t3; e3++) {\n const t4 = g2[l2++], i3 = g2[l2++];\n n3[e3] = new r(t4, i3);\n }\n e2[o2++] = a2.createMultiPoint(n3);\n }\n } else if (x2 === sp.LINESTRING) {\n let r2, h4 = 0;\n m2 ? (h4 = d2[i2] - d2[i2 - 1], i2++) : h4 = f2[n2] - f2[n2 - 1], n2++, y2 && 0 !== y2.length ? (r2 = t2.vertexBufferType === ap.VEC_2 ? jp(g2, y2, u2, h4, false) : Gp(g2, y2, u2, h4, false, c2), u2 += h4) : (r2 = qp(g2, l2, h4, false), l2 += 2 * h4), e2[o2++] = a2.createLineString(r2), p2 && s2++;\n } else if (x2 === sp.POLYGON) {\n const r2 = f2[n2] - f2[n2 - 1];\n n2++;\n const h4 = new Array(r2 - 1);\n let m3 = d2[i2] - d2[i2 - 1];\n if (i2++, y2 && 0 !== y2.length) {\n const r3 = t2.vertexBufferType === ap.VEC_2 ? $p(g2, y2, u2, m3) : Up(g2, y2, u2, m3, 0, c2);\n u2 += m3;\n for (let e3 = 0; e3 < h4.length; e3++) m3 = d2[i2] - d2[i2 - 1], i2++, h4[e3] = t2.vertexBufferType === ap.VEC_2 ? $p(g2, y2, u2, m3) : Up(g2, y2, u2, m3, 0, c2), u2 += m3;\n e2[o2++] = a2.createPolygon(r3, h4);\n } else {\n const t3 = Np(g2, l2, m3);\n l2 += 2 * m3;\n for (let t4 = 0; t4 < h4.length; t4++) m3 = d2[i2] - d2[i2 - 1], i2++, h4[t4] = Np(g2, l2, m3), l2 += 2 * m3;\n e2[o2++] = a2.createPolygon(t3, h4);\n }\n p2 && s2++;\n } else if (x2 === sp.MULTILINESTRING) {\n const r2 = p2[s2] - p2[s2 - 1];\n s2++;\n const h4 = new Array(r2);\n if (y2 && 0 !== y2.length) {\n for (let e3 = 0; e3 < r2; e3++) {\n let r3 = 0;\n m2 ? (r3 = d2[i2] - d2[i2 - 1], i2++) : r3 = f2[n2] - f2[n2 - 1], n2++;\n const s3 = t2.vertexBufferType === ap.VEC_2 ? jp(g2, y2, u2, r3, false) : Gp(g2, y2, u2, r3, false, c2);\n h4[e3] = s3, u2 += r3;\n }\n e2[o2++] = a2.createMultiLineString(h4);\n } else {\n for (let t3 = 0; t3 < r2; t3++) {\n let e3 = 0;\n m2 ? (e3 = d2[i2] - d2[i2 - 1], i2++) : e3 = f2[n2] - f2[n2 - 1], n2++, h4[t3] = qp(g2, l2, e3, false), l2 += 2 * e3;\n }\n e2[o2++] = a2.createMultiLineString(h4);\n }\n } else {\n if (x2 !== sp.MULTIPOLYGON) throw new Error(\"The specified geometry type is currently not supported.\");\n {\n const r2 = p2[s2] - p2[s2 - 1];\n s2++;\n const h4 = new Array(r2);\n let m3 = 0;\n if (y2 && 0 !== y2.length) {\n for (let e3 = 0; e3 < r2; e3++) {\n const r3 = f2[n2] - f2[n2 - 1];\n n2++;\n const s3 = new Array(r3 - 1);\n m3 = d2[i2] - d2[i2 - 1], i2++;\n const o3 = t2.vertexBufferType === ap.VEC_2 ? $p(g2, y2, u2, m3) : Up(g2, y2, u2, m3, 0, c2);\n u2 += m3;\n for (let e4 = 0; e4 < s3.length; e4++) m3 = d2[i2] - d2[i2 - 1], i2++, s3[e4] = t2.vertexBufferType === ap.VEC_2 ? $p(g2, y2, u2, m3) : Up(g2, y2, u2, m3, 0, c2), u2 += m3;\n h4[e3] = a2.createPolygon(o3, s3);\n }\n e2[o2++] = a2.createMultiPolygon(h4);\n } else {\n for (let t3 = 0; t3 < r2; t3++) {\n const e3 = f2[n2] - f2[n2 - 1];\n n2++;\n const r3 = new Array(e3 - 1);\n m3 = d2[i2] - d2[i2 - 1], i2++;\n const s3 = Np(g2, l2, m3);\n l2 += 2 * m3;\n for (let t4 = 0; t4 < r3.length; t4++) {\n const e4 = d2[i2] - d2[i2 - 1];\n i2++, r3[t4] = Np(g2, l2, e4), l2 += 2 * e4;\n }\n h4[t3] = a2.createPolygon(s3, r3);\n }\n e2[o2++] = a2.createMultiPolygon(h4);\n }\n }\n }\n }\n return e2;\n }\n function Np(t2, e2, r2) {\n return qp(t2, e2, r2, true);\n }\n function $p(t2, e2, r2, n2) {\n return jp(t2, e2, r2, n2, true);\n }\n function Up(t2, e2, r2, n2, i2, s2) {\n return Gp(t2, e2, r2, n2, true, s2);\n }\n function qp(t2, e2, n2, i2) {\n const s2 = new Array(i2 ? n2 + 1 : n2);\n for (let i3 = 0; i3 < 2 * n2; i3 += 2) s2[i3 / 2] = new r(t2[e2 + i3], t2[e2 + i3 + 1]);\n return i2 && (s2[s2.length - 1] = s2[0]), s2;\n }\n function jp(t2, e2, n2, i2, s2) {\n const o2 = new Array(s2 ? i2 + 1 : i2);\n for (let s3 = 0; s3 < 2 * i2; s3 += 2) {\n const i3 = 2 * e2[n2 + s3 / 2];\n o2[s3 / 2] = new r(t2[i3], t2[i3 + 1]);\n }\n return s2 && (o2[o2.length - 1] = o2[0]), o2;\n }\n function Gp(t2, e2, n2, i2, s2, o2) {\n const a2 = new Array(s2 ? i2 + 1 : i2);\n for (let s3 = 0; s3 < i2; s3++) {\n const i3 = Cp(t2[e2[n2 + s3]], o2.numBits, o2.coordinateShift);\n a2[s3] = new r(i3.x, i3.y);\n }\n return s2 && (a2[a2.length - 1] = a2[0]), a2;\n }\n class Xp {\n _vertexBufferType;\n _topologyVector;\n _vertexOffsets;\n _vertexBuffer;\n _mortonSettings;\n constructor(t2, e2, r2, n2, i2) {\n this._vertexBufferType = t2, this._topologyVector = e2, this._vertexOffsets = r2, this._vertexBuffer = n2, this._mortonSettings = i2;\n }\n get vertexBufferType() {\n return this._vertexBufferType;\n }\n get topologyVector() {\n return this._topologyVector;\n }\n get vertexOffsets() {\n return this._vertexOffsets;\n }\n get vertexBuffer() {\n return this._vertexBuffer;\n }\n *[Symbol.iterator]() {\n const t2 = Rp(this);\n let e2 = 0;\n for (; e2 < this.numGeometries; ) yield { coordinates: t2[e2], type: this.geometryType(e2) }, e2++;\n }\n getSimpleEncodedVertex(t2) {\n const e2 = this.vertexOffsets ? 2 * this.vertexOffsets[t2] : 2 * t2;\n return [this.vertexBuffer[e2], this.vertexBuffer[e2 + 1]];\n }\n getVertex(t2) {\n if (this.vertexOffsets && this.mortonSettings) {\n const e3 = Cp(this.vertexBuffer[this.vertexOffsets[t2]], this.mortonSettings.numBits, this.mortonSettings.coordinateShift);\n return [e3.x, e3.y];\n }\n const e2 = this.vertexOffsets ? 2 * this.vertexOffsets[t2] : 2 * t2;\n return [this.vertexBuffer[e2], this.vertexBuffer[e2 + 1]];\n }\n getGeometries() {\n return Rp(this);\n }\n get mortonSettings() {\n return this._mortonSettings;\n }\n }\n class Yp extends Xp {\n _numGeometries;\n _geometryType;\n constructor(t2, e2, r2, n2, i2, s2, o2) {\n super(r2, n2, i2, s2, o2), this._numGeometries = t2, this._geometryType = e2;\n }\n geometryType(t2) {\n return this._geometryType;\n }\n get numGeometries() {\n return this._numGeometries;\n }\n containsPolygonGeometry() {\n return this._geometryType === sp.POLYGON || this._geometryType === sp.MULTIPOLYGON;\n }\n containsSingleGeometryType() {\n return true;\n }\n }\n class Zp extends Xp {\n _geometryTypes;\n constructor(t2, e2, r2, n2, i2, s2) {\n super(t2, r2, n2, i2, s2), this._geometryTypes = e2;\n }\n geometryType(t2) {\n return this._geometryTypes[t2];\n }\n get numGeometries() {\n return this._geometryTypes.length;\n }\n containsPolygonGeometry() {\n for (let t2 = 0; t2 < this.numGeometries; t2++) if (this.geometryType(t2) === sp.POLYGON || this.geometryType(t2) === sp.MULTIPOLYGON) return true;\n return false;\n }\n containsSingleGeometryType() {\n return false;\n }\n }\n class Hp {\n _triangleOffsets;\n _indexBuffer;\n _vertexBuffer;\n _topologyVector;\n constructor(t2, e2, r2, n2) {\n this._triangleOffsets = t2, this._indexBuffer = e2, this._vertexBuffer = r2, this._topologyVector = n2;\n }\n get triangleOffsets() {\n return this._triangleOffsets;\n }\n get indexBuffer() {\n return this._indexBuffer;\n }\n get vertexBuffer() {\n return this._vertexBuffer;\n }\n get topologyVector() {\n return this._topologyVector;\n }\n getGeometries() {\n if (!this._topologyVector) throw new Error(\"Cannot convert GpuVector to coordinates without topology information\");\n const t2 = new Array(this.numGeometries), e2 = this._topologyVector, n2 = e2.partOffsets, i2 = e2.ringOffsets, s2 = e2.geometryOffsets;\n let o2 = 0, a2 = 1, l2 = 1, u2 = 1;\n for (let e3 = 0; e3 < this.numGeometries; e3++) switch (this.geometryType(e3)) {\n case sp.POLYGON:\n {\n const c2 = n2[a2] - n2[a2 - 1];\n a2++;\n const h2 = [];\n for (let t3 = 0; t3 < c2; t3++) {\n const t4 = i2[l2] - i2[l2 - 1];\n l2++;\n const e4 = [];\n for (let n3 = 0; n3 < t4; n3++) {\n const t5 = this._vertexBuffer[o2++], n4 = this._vertexBuffer[o2++];\n e4.push(new r(t5, n4));\n }\n e4.length > 0 && e4.push(e4[0]), h2.push(e4);\n }\n t2[e3] = h2, s2 && u2++;\n }\n break;\n case sp.MULTIPOLYGON: {\n const c2 = s2[u2] - s2[u2 - 1];\n u2++;\n const h2 = [];\n for (let t3 = 0; t3 < c2; t3++) {\n const t4 = n2[a2] - n2[a2 - 1];\n a2++;\n for (let e4 = 0; e4 < t4; e4++) {\n const t5 = i2[l2] - i2[l2 - 1];\n l2++;\n const e5 = [];\n for (let n3 = 0; n3 < t5; n3++) {\n const t6 = this._vertexBuffer[o2++], n4 = this._vertexBuffer[o2++];\n e5.push(new r(t6, n4));\n }\n e5.length > 0 && e5.push(e5[0]), h2.push(e5);\n }\n }\n t2[e3] = h2;\n }\n }\n return t2;\n }\n [Symbol.iterator]() {\n return null;\n }\n }\n function Kp(t2, e2, r2, n2, i2, s2) {\n return new Wp(t2, e2, r2, n2, i2, s2);\n }\n class Wp extends Hp {\n _numGeometries;\n _geometryType;\n constructor(t2, e2, r2, n2, i2, s2) {\n super(r2, n2, i2, s2), this._numGeometries = t2, this._geometryType = e2;\n }\n geometryType(t2) {\n return this._geometryType;\n }\n get numGeometries() {\n return this._numGeometries;\n }\n containsSingleGeometryType() {\n return true;\n }\n }\n function Jp(t2, e2, r2, n2, i2) {\n return new Qp(t2, e2, r2, n2, i2);\n }\n class Qp extends Hp {\n _geometryTypes;\n constructor(t2, e2, r2, n2, i2) {\n super(e2, r2, n2, i2), this._geometryTypes = t2;\n }\n geometryType(t2) {\n return this._geometryTypes[t2];\n }\n get numGeometries() {\n return this._geometryTypes.length;\n }\n containsSingleGeometryType() {\n return false;\n }\n }\n function tf(t2, e2, r2, n2, i2) {\n const s2 = wp(t2, r2);\n let o2 = null, a2 = null, l2 = null, u2 = null, c2 = null, h2 = null, p2 = null, f2 = null;\n if (Pp(s2, n2, t2, r2) === ip.CONST) {\n const i3 = Ep(t2, r2, s2, false);\n for (let n3 = 0; n3 < e2 - 1; n3++) {\n const e3 = wp(t2, r2);\n switch (e3.physicalStreamType) {\n case tp.LENGTH:\n switch (e3.logicalStreamType.lengthType) {\n case np.GEOMETRIES:\n o2 = Sp(t2, r2, e3);\n break;\n case np.PARTS:\n a2 = Sp(t2, r2, e3);\n break;\n case np.RINGS:\n l2 = Sp(t2, r2, e3);\n break;\n case np.TRIANGLES:\n p2 = Sp(t2, r2, e3);\n }\n break;\n case tp.OFFSET:\n switch (e3.logicalStreamType.offsetType) {\n case rp.VERTEX:\n u2 = Ap(t2, r2, e3, false);\n break;\n case rp.INDEX:\n f2 = Ap(t2, r2, e3, false);\n }\n break;\n case tp.DATA:\n ep.VERTEX === e3.logicalStreamType.dictionaryType ? c2 = Ap(t2, r2, e3, true) : (h2 = { numBits: e3.numBits, coordinateShift: e3.coordinateShift }, c2 = Ap(t2, r2, e3, false));\n }\n }\n return null !== f2 ? null != o2 || null != a2 ? Kp(n2, i3, p2, f2, c2, new Vp(o2, a2, l2)) : Kp(n2, i3, p2, f2, c2) : null === h2 ? (function(t3, e3, r3, n3, i4) {\n return new Yp(t3, e3, ap.VEC_2, r3, n3, i4);\n })(n2, i3, new Vp(o2, a2, l2), u2, c2) : (function(t3, e3, r3, n3, i4, s3) {\n return new Yp(t3, e3, ap.MORTON, r3, n3, i4, s3);\n })(n2, i3, new Vp(o2, a2, l2), u2, c2, h2);\n }\n const d2 = Ap(t2, r2, s2, false);\n for (let n3 = 0; n3 < e2 - 1; n3++) {\n const e3 = wp(t2, r2);\n switch (e3.physicalStreamType) {\n case tp.LENGTH:\n switch (e3.logicalStreamType.lengthType) {\n case np.GEOMETRIES:\n o2 = Ap(t2, r2, e3, false);\n break;\n case np.PARTS:\n a2 = Ap(t2, r2, e3, false);\n break;\n case np.RINGS:\n l2 = Ap(t2, r2, e3, false);\n break;\n case np.TRIANGLES:\n p2 = Sp(t2, r2, e3);\n }\n break;\n case tp.OFFSET:\n switch (e3.logicalStreamType.offsetType) {\n case rp.VERTEX:\n u2 = Ap(t2, r2, e3, false);\n break;\n case rp.INDEX:\n f2 = Ap(t2, r2, e3, false);\n }\n break;\n case tp.DATA:\n ep.VERTEX === e3.logicalStreamType.dictionaryType ? c2 = Ap(t2, r2, e3, true) : (h2 = { numBits: e3.numBits, coordinateShift: e3.coordinateShift }, c2 = Ap(t2, r2, e3, false));\n }\n }\n return null !== f2 && null === a2 ? Jp(d2, p2, f2, c2) : (null !== o2 ? (o2 = ef(d2, o2, 2), null !== a2 && null !== l2 ? (a2 = rf(d2, o2, a2, false), l2 = (function(t3, e3, r3, n3) {\n const i3 = new Int32Array(r3[r3.length - 1] + 1);\n let s3 = 0;\n i3[0] = s3;\n let o3 = 1, a3 = 1, l3 = 0;\n for (let u3 = 0; u3 < t3.length; u3++) {\n const c3 = t3[u3], h3 = e3[u3 + 1] - e3[u3];\n if (0 !== c3 && 3 !== c3) for (let t4 = 0; t4 < h3; t4++) {\n const t5 = r3[o3] - r3[o3 - 1];\n o3++;\n for (let e4 = 0; e4 < t5; e4++) s3 = i3[a3++] = s3 + n3[l3++];\n }\n else for (let t4 = 0; t4 < h3; t4++) i3[a3++] = ++s3, o3++;\n }\n return i3;\n })(d2, o2, a2, l2)) : null !== a2 && (a2 = (function(t3, e3, r3) {\n const n3 = new Int32Array(e3[e3.length - 1] + 1);\n let i3 = 0;\n n3[0] = i3;\n let s3 = 1, o3 = 0;\n for (let a3 = 0; a3 < t3.length; a3++) {\n const l3 = t3[a3], u3 = e3[a3 + 1] - e3[a3];\n if (4 === l3 || 1 === l3) for (let t4 = 0; t4 < u3; t4++) i3 = n3[s3++] = i3 + r3[o3++];\n else for (let t4 = 0; t4 < u3; t4++) n3[s3++] = ++i3;\n }\n return n3;\n })(d2, o2, a2))) : null !== a2 && null !== l2 ? (a2 = ef(d2, a2, 1), l2 = rf(d2, a2, l2, true)) : null !== a2 && (a2 = ef(d2, a2, 0)), null !== f2 ? Jp(d2, p2, f2, c2, new Vp(o2, a2, l2)) : null === h2 ? (function(t3, e3, r3, n3) {\n return new Zp(ap.VEC_2, t3, e3, r3, n3);\n })(d2, new Vp(o2, a2, l2), u2, c2) : (function(t3, e3, r3, n3, i3) {\n return new Zp(ap.MORTON, t3, e3, r3, n3, i3);\n })(d2, new Vp(o2, a2, l2), u2, c2, h2));\n }\n function ef(t2, e2, r2) {\n const n2 = new Int32Array(t2.length + 1);\n let i2 = 0;\n n2[0] = i2;\n let s2 = 0;\n for (let o2 = 0; o2 < t2.length; o2++) i2 = n2[o2 + 1] = i2 + (t2[o2] > r2 ? e2[s2++] : 1);\n return n2;\n }\n function rf(t2, e2, r2, n2) {\n const i2 = new Int32Array(e2[e2.length - 1] + 1);\n let s2 = 0;\n i2[0] = s2;\n let o2 = 1, a2 = 0;\n for (let l2 = 0; l2 < t2.length; l2++) {\n const u2 = t2[l2], c2 = e2[l2 + 1] - e2[l2];\n if (5 === u2 || 2 === u2 || n2 && (4 === u2 || 1 === u2)) for (let t3 = 0; t3 < c2; t3++) s2 = i2[o2++] = s2 + r2[a2++];\n else for (let t3 = 0; t3 < c2; t3++) i2[o2++] = ++s2;\n }\n return i2;\n }\n class nf extends qh {\n dataVector;\n constructor(t2, e2, r2) {\n super(t2, e2.getBuffer(), r2), this.dataVector = e2;\n }\n getValueFromBuffer(t2) {\n return this.dataVector.get(t2);\n }\n }\n class sf extends jh {\n getValueFromBuffer(t2) {\n return this.dataBuffer[t2];\n }\n }\n class of extends qh {\n constructor(t2, e2, r2) {\n super(t2, BigInt64Array.of(e2), r2);\n }\n getValueFromBuffer(t2) {\n return this.dataBuffer[0];\n }\n }\n function af(t2, e2, r2) {\n return lf(t2, Math.ceil(e2 / 8), r2);\n }\n function lf(t2, e2, r2) {\n const n2 = new Uint8Array(e2);\n let i2 = 0;\n for (; i2 < e2; ) {\n const e3 = t2[r2.increment()];\n if (e3 <= 127) {\n const s2 = e3 + 3, o2 = t2[r2.increment()], a2 = i2 + s2;\n n2.fill(o2, i2, a2), i2 = a2;\n } else {\n const s2 = 256 - e3;\n for (let e4 = 0; e4 < s2; e4++) n2[i2++] = t2[r2.increment()];\n }\n }\n return n2;\n }\n const uf = new TextDecoder();\n function cf(t2, e2, r2) {\n return r2 - e2 >= 12 ? uf.decode(t2.subarray(e2, r2)) : (function(t3, e3, r3) {\n let n2 = \"\", i2 = e3;\n for (; i2 < r3; ) {\n const e4 = t3[i2];\n let s2, o2, a2, l2 = null, u2 = e4 > 239 ? 4 : e4 > 223 ? 3 : e4 > 191 ? 2 : 1;\n if (i2 + u2 > r3) break;\n 1 === u2 ? e4 < 128 && (l2 = e4) : 2 === u2 ? (s2 = t3[i2 + 1], 128 == (192 & s2) && (l2 = (31 & e4) << 6 | 63 & s2, l2 <= 127 && (l2 = null))) : 3 === u2 ? (s2 = t3[i2 + 1], o2 = t3[i2 + 2], 128 == (192 & s2) && 128 == (192 & o2) && (l2 = (15 & e4) << 12 | (63 & s2) << 6 | 63 & o2, (l2 <= 2047 || l2 >= 55296 && l2 <= 57343) && (l2 = null))) : 4 === u2 && (s2 = t3[i2 + 1], o2 = t3[i2 + 2], a2 = t3[i2 + 3], 128 == (192 & s2) && 128 == (192 & o2) && 128 == (192 & a2) && (l2 = (15 & e4) << 18 | (63 & s2) << 12 | (63 & o2) << 6 | 63 & a2, (l2 <= 65535 || l2 >= 1114112) && (l2 = null))), null === l2 ? (l2 = 65533, u2 = 1) : l2 > 65535 && (l2 -= 65536, n2 += String.fromCharCode(l2 >>> 10 & 1023 | 55296), l2 = 56320 | 1023 & l2), n2 += String.fromCharCode(l2), i2 += u2;\n }\n return n2;\n })(t2, e2, r2);\n }\n class hf extends qh {\n offsetBuffer;\n constructor(t2, e2, r2, n2) {\n super(t2, r2, n2), this.offsetBuffer = e2;\n }\n }\n class pf extends hf {\n textEncoder;\n constructor(t2, e2, r2, n2) {\n super(t2, e2, r2, n2 ?? e2.length - 1), this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(t2) {\n return cf(this.dataBuffer, this.offsetBuffer[t2], this.offsetBuffer[t2 + 1]);\n }\n }\n class ff extends hf {\n indexBuffer;\n textEncoder;\n constructor(t2, e2, r2, n2, i2) {\n super(t2, r2, n2, i2 ?? e2.length), this.indexBuffer = e2, this.indexBuffer = e2, this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(t2) {\n const e2 = this.indexBuffer[t2];\n return cf(this.dataBuffer, this.offsetBuffer[e2], this.offsetBuffer[e2 + 1]);\n }\n }\n class df extends hf {\n indexBuffer;\n symbolOffsetBuffer;\n symbolTableBuffer;\n textEncoder;\n symbolLengthBuffer;\n lengthBuffer;\n decodedDictionary;\n constructor(t2, e2, r2, n2, i2, s2, o2) {\n super(t2, r2, n2, o2), this.indexBuffer = e2, this.symbolOffsetBuffer = i2, this.symbolTableBuffer = s2, this.textEncoder = new TextEncoder();\n }\n getValueFromBuffer(t2) {\n null == this.decodedDictionary && (null == this.symbolLengthBuffer && (this.symbolLengthBuffer = this.offsetToLengthBuffer(this.symbolOffsetBuffer), this.lengthBuffer = this.offsetToLengthBuffer(this.offsetBuffer)), this.decodedDictionary = (function(t3, e3, r2) {\n const n2 = [], i2 = new Array(e3.length).fill(0);\n for (let t4 = 1; t4 < e3.length; t4++) i2[t4] = i2[t4 - 1] + e3[t4 - 1];\n for (let s2 = 0; s2 < r2.length; s2++) if (255 === r2[s2]) n2.push(r2[++s2]);\n else {\n const o2 = e3[r2[s2]], a2 = i2[r2[s2]];\n for (let e4 = 0; e4 < o2; e4++) n2.push(t3[a2 + e4]);\n }\n return new Uint8Array(n2);\n })(this.symbolTableBuffer, this.symbolLengthBuffer, this.dataBuffer));\n const e2 = this.indexBuffer[t2];\n return cf(this.decodedDictionary, this.offsetBuffer[e2], this.offsetBuffer[e2 + 1]);\n }\n offsetToLengthBuffer(t2) {\n const e2 = new Uint32Array(t2.length - 1);\n let r2 = t2[0];\n for (let n2 = 1; n2 < t2.length; n2++) {\n const i2 = t2[n2];\n e2[n2 - 1] = i2 - r2, r2 = i2;\n }\n return e2;\n }\n }\n function yf(t2, e2, r2, n2, i2, s2) {\n return \"scalarType\" === r2.type ? (function(t3, e3, r3, n3, i3, s3) {\n let o2 = null, a2 = 0;\n if (0 === t3) return null;\n if (s3.nullable) {\n const t4 = wp(e3, r3);\n a2 = t4.numValues;\n const n4 = r3.get(), i4 = af(e3, a2, r3);\n r3.set(n4 + t4.byteLength), o2 = new _p(i4, t4.numValues);\n }\n const l2 = o2 ?? n3;\n switch (i3.physicalType) {\n case 4:\n case 3:\n return (function(t4, e4, r4, n4, i4) {\n const s4 = wp(t4, e4), o3 = Pp(s4, i4, t4, e4), a3 = 3 === n4.physicalType;\n if (o3 === ip.FLAT) {\n const n5 = mf(i4) ? Dp(t4, e4, s4, a3, i4) : Ap(t4, e4, s4, a3);\n return new Gh(r4.name, n5, i4);\n }\n if (o3 === ip.SEQUENCE) {\n const n5 = Tp(t4, e4, s4);\n return new Zh(r4.name, n5[0], n5[1], s4.numRleValues);\n }\n {\n const n5 = Ep(t4, e4, s4, a3);\n return new Hh(r4.name, n5, i4);\n }\n })(e3, r3, s3, i3, l2);\n case 9:\n return (function(t4, e4, r4, n4, i4) {\n let s4 = null, o3 = null, a3 = null, l3 = null, u2 = null, c2 = null, h2 = null, p2 = null;\n for (let t5 = 0; t5 < n4; t5++) {\n const t6 = wp(e4, r4);\n if (0 !== t6.byteLength) switch (t6.physicalStreamType) {\n case tp.PRESENT: {\n const n5 = af(e4, t6.numValues, r4);\n c2 = new _p(n5, t6.numValues);\n break;\n }\n case tp.OFFSET:\n o3 = null != i4 || null != c2 ? Dp(e4, r4, t6, false, i4 ?? c2) : Ap(e4, r4, t6, false);\n break;\n case tp.LENGTH: {\n const n5 = Sp(e4, r4, t6);\n np.DICTIONARY === t6.logicalStreamType.lengthType ? s4 = n5 : np.SYMBOL === t6.logicalStreamType.lengthType ? l3 = n5 : h2 = n5;\n break;\n }\n case tp.DATA: {\n const n5 = e4.subarray(r4.get(), r4.get() + t6.byteLength);\n r4.add(t6.byteLength);\n const i5 = t6.logicalStreamType.dictionaryType;\n ep.FSST === i5 ? u2 = n5 : ep.SINGLE === i5 || ep.SHARED === i5 ? a3 = n5 : ep.NONE === i5 && (p2 = n5);\n break;\n }\n }\n }\n return (function(t5, e5, r5, n5, i5, s5, o4) {\n return e5 ? new df(t5, r5, n5, i5, s5, e5, o4) : null;\n })(t4, u2, o3, s4, a3, l3, i4 ?? c2) ?? (function(t5, e5, r5, n5, i5) {\n return e5 ? i5 ? new ff(t5, r5, n5, e5, i5) : new ff(t5, r5, n5, e5) : null;\n })(t4, a3, o3, s4, i4 ?? c2) ?? (function(t5, e5, r5, n5, i5) {\n if (!e5 || !r5) return null;\n if (n5) return i5 ? new ff(t5, n5, e5, r5, i5) : new ff(t5, n5, e5, r5);\n if (i5 && i5.size() !== e5.length - 1) {\n const n6 = new Int32Array(i5.size());\n let s5 = 0;\n for (let t6 = 0; t6 < i5.size(); t6++) n6[t6] = i5.get(t6) ? s5++ : 0;\n return new ff(t5, n6, e5, r5, i5);\n }\n return i5 ? new pf(t5, e5, r5, i5) : new pf(t5, e5, r5);\n })(t4, h2, p2, o3, i4 ?? c2);\n })(s3.name, e3, r3, s3.nullable ? t3 - 1 : t3, o2);\n case 0:\n return (function(t4, e4, r4, n4, i4) {\n const s4 = wp(t4, e4), o3 = s4.numValues, a3 = e4.get(), l3 = mf(i4) ? (function(t5, e5, r5, n5) {\n const i5 = lf(t5, Math.ceil(e5 / 8), r5), s5 = new _p(i5, e5), o4 = n5.size(), a4 = new _p(new Uint8Array(o4), o4);\n let l4 = 0;\n for (let t6 = 0; t6 < n5.size(); t6++) {\n const e6 = !!n5.get(t6) && s5.get(l4++);\n a4.set(t6, e6);\n }\n return a4.getBuffer();\n })(t4, o3, e4, i4) : af(t4, o3, e4);\n e4.set(a3 + s4.byteLength);\n const u2 = new _p(l3, o3);\n return new nf(r4.name, u2, i4);\n })(e3, r3, s3, 0, l2);\n case 6:\n case 5:\n return (function(t4, e4, r4, n4, i4) {\n const s4 = wp(t4, e4), o3 = Pp(s4, n4, t4, e4), a3 = 5 === i4.physicalType;\n if (o3 === ip.FLAT) {\n const i5 = mf(n4) ? (function(t5, e5, r5, n5, i6) {\n return (function(t6, e6, r6, n6) {\n switch (e6.logicalLevelTechnique1) {\n case Jh.DELTA:\n return e6.logicalLevelTechnique2 === Jh.RLE && (t6 = mp(t6, e6.runs, e6.numRleValues)), (function(t7, e7) {\n const r7 = new BigInt64Array(t7.size());\n let n7 = 0;\n t7.get(0) ? (r7[0] = t7.get(0) ? e7[0] >> 1n ^ -(1n & e7[0]) : 0n, n7 = 1) : r7[0] = 0n;\n let i7 = 1;\n for (; i7 != r7.length; ++i7) r7[i7] = t7.get(i7) ? r7[i7 - 1] + (e7[n7] >> 1n ^ -(1n & e7[n7++])) : r7[i7 - 1];\n return r7;\n })(n6, t6);\n case Jh.RLE:\n return (function(t7, e7, r7, n7) {\n const i7 = e7;\n return r7 ? (function(t8, e8, r8) {\n const n8 = new BigInt64Array(t8.size());\n let i8 = 0;\n for (let s5 = 0; s5 < r8; s5++) {\n const o4 = Number(e8[s5]);\n let a4 = e8[s5 + r8];\n a4 = a4 >> 1n ^ -(1n & a4);\n for (let e9 = i8; e9 < i8 + o4; e9++) t8.get(e9) ? n8[e9] = a4 : (n8[e9] = 0n, i8++);\n i8 += o4;\n }\n return n8;\n })(n7, t7, i7.runs) : (function(t8, e8, r8) {\n const n8 = new BigInt64Array(t8.size());\n let i8 = 0;\n for (let s5 = 0; s5 < r8; s5++) {\n const o4 = Number(e8[s5]), a4 = e8[s5 + r8];\n for (let e9 = i8; e9 < i8 + o4; e9++) t8.get(e9) ? n8[e9] = a4 : (n8[e9] = 0n, i8++);\n i8 += o4;\n }\n return n8;\n })(n7, t7, i7.runs);\n })(t6, e6, r6, n6);\n case Jh.NONE:\n return t6 = r6 ? (function(t7, e7) {\n const r7 = new BigInt64Array(t7.size());\n let n7 = 0, i7 = 0;\n for (; i7 != r7.length; ++i7) if (t7.get(i7)) {\n const t8 = e7[n7++];\n r7[i7] = t8 >> 1n ^ -(1n & t8);\n } else r7[i7] = 0n;\n return r7;\n })(n6, t6) : (function(t7, e7) {\n const r7 = new BigInt64Array(t7.size());\n let n7 = 0, i7 = 0;\n for (; i7 != r7.length; ++i7) r7[i7] = t7.get(i7) ? e7[n7++] : 0n;\n return r7;\n })(n6, t6), t6;\n default:\n throw new Error(\"The specified Logical level technique is not supported\");\n }\n })(up(t5, e5, r5.numValues), r5, n5, i6);\n })(t4, e4, s4, a3, n4) : Mp(t4, e4, s4, a3);\n return new zp(r4.name, i5, n4);\n }\n if (o3 === ip.SEQUENCE) {\n const n5 = Ip(t4, e4, s4);\n return new Bp(r4.name, n5[0], n5[1], s4.numRleValues);\n }\n {\n const i5 = Fp(t4, e4, s4, a3);\n return new of(r4.name, i5, n4);\n }\n })(e3, r3, s3, l2, i3);\n case 7:\n return (function(t4, e4, r4, n4) {\n const i4 = wp(t4, e4), s4 = mf(n4) ? (function(t5, e5, r5, n5) {\n const i5 = e5.get(), s5 = i5 + n5 * Float32Array.BYTES_PER_ELEMENT, o3 = new Uint8Array(t5.subarray(i5, s5)).buffer, a3 = new Float32Array(o3);\n e5.set(s5);\n const l3 = r5.size(), u2 = new Float32Array(l3);\n let c2 = 0;\n for (let t6 = 0; t6 < l3; t6++) u2[t6] = r5.get(t6) ? a3[c2++] : 0;\n return u2;\n })(t4, e4, n4, i4.numValues) : (function(t5, e5, r5) {\n const n5 = e5.get(), i5 = n5 + r5 * Float32Array.BYTES_PER_ELEMENT, s5 = new Uint8Array(t5.subarray(n5, i5)).buffer, o3 = new Float32Array(s5);\n return e5.set(i5), o3;\n })(t4, e4, i4.numValues);\n return new sf(r4.name, s4, n4);\n })(e3, r3, s3, l2);\n case 8:\n return (function(t4, e4, r4, n4) {\n const i4 = wp(t4, e4), s4 = mf(n4) ? (function(t5, e5, r5, n5) {\n const i5 = e5.get(), s5 = i5 + n5 * Float64Array.BYTES_PER_ELEMENT, o3 = new Uint8Array(t5.subarray(i5, s5)).buffer, a3 = new Float64Array(o3);\n e5.set(s5);\n const l3 = r5.size(), u2 = new Float64Array(l3);\n let c2 = 0;\n for (let t6 = 0; t6 < l3; t6++) u2[t6] = r5.get(t6) ? a3[c2++] : 0;\n return u2;\n })(t4, e4, n4, i4.numValues) : (function(t5, e5, r5) {\n const n5 = e5.get(), i5 = n5 + r5 * Float64Array.BYTES_PER_ELEMENT, s5 = new Uint8Array(t5.subarray(n5, i5)).buffer, o3 = new Float64Array(s5);\n return e5.set(i5), o3;\n })(t4, e4, i4.numValues);\n return new Xh(r4.name, s4, n4);\n })(e3, r3, s3, l2);\n default:\n throw new Error(`The specified data type for the field is currently not supported: ${i3}`);\n }\n })(n2, t2, e2, i2, r2.scalarType, r2) : 1 != n2 ? null : (function(t3, e3, r3, n3) {\n let i3 = null, s3 = null, o2 = null, a2 = null, l2 = false;\n for (; !l2; ) {\n const r4 = wp(t3, e3);\n switch (r4.physicalStreamType) {\n case tp.LENGTH:\n np.DICTIONARY === r4.logicalStreamType.lengthType ? i3 = Sp(t3, e3, r4) : o2 = Sp(t3, e3, r4);\n break;\n case tp.DATA:\n ep.SINGLE === r4.logicalStreamType.dictionaryType || ep.SHARED === r4.logicalStreamType.dictionaryType ? (s3 = t3.subarray(e3.get(), e3.get() + r4.byteLength), l2 = true) : a2 = t3.subarray(e3.get(), e3.get() + r4.byteLength), e3.add(r4.byteLength);\n }\n }\n const u2 = r3.complexType.children, c2 = [];\n let h2 = 0;\n for (const l3 of u2) {\n const u3 = lp(t3, e3, 1)[0];\n if (0 == u3) continue;\n const p2 = `${r3.name}${\"default\" === l3.name ? \"\" : \":\" + l3.name}`;\n if (2 !== u3 || \"scalarField\" !== l3.type || 9 !== l3.scalarField.physicalType) throw new Error(\"Currently only optional string fields are implemented for a struct.\");\n const f2 = wp(t3, e3), d2 = af(t3, f2.numValues, e3), y2 = wp(t3, e3), m2 = y2.decompressedCount !== n3 ? Dp(t3, e3, y2, false, new _p(d2, f2.numValues)) : Ap(t3, e3, y2, false);\n c2[h2++] = a2 ? new df(p2, m2, i3, s3, o2, a2, new _p(d2, f2.numValues)) : new ff(p2, m2, i3, s3, new _p(d2, f2.numValues));\n }\n return c2;\n })(t2, e2, r2, i2);\n }\n function mf(t2) {\n return t2 instanceof _p;\n }\n function gf(t2) {\n if (\"id\" === t2.name) return false;\n if (\"scalarType\" === t2.type) {\n const e2 = t2.scalarType;\n if (\"physicalType\" === e2.type) switch (e2.physicalType) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n default:\n return false;\n case 9:\n return true;\n }\n else if (\"logicalType\" === e2.type) return false;\n } else if (\"complexType\" === t2.type) {\n const e2 = t2.complexType;\n if (\"physicalType\" === e2.type) switch (e2.physicalType) {\n case 0:\n case 1:\n return true;\n default:\n return false;\n }\n }\n return console.warn(\"Unexpected column type in hasStreamCount\", t2), false;\n }\n const xf = new TextDecoder();\n function vf(t2, e2) {\n const r2 = lp(t2, e2, 1)[0];\n if (0 === r2) return \"\";\n const n2 = e2.get(), i2 = t2.subarray(n2, n2 + r2);\n return e2.add(r2), xf.decode(i2);\n }\n function bf(t2, e2) {\n const r2 = lp(t2, e2, 1)[0] >>> 0, n2 = !!(4 & r2), i2 = !!(2 & r2), s2 = lp(t2, e2, 1)[0] >>> 0, o2 = {};\n if (1 & r2 && (o2.nullable = true), i2) {\n const i3 = {};\n if (n2 ? (i3.type = \"logicalType\", i3.logicalType = s2) : (i3.type = \"physicalType\", i3.physicalType = s2), 8 & r2) {\n const r3 = lp(t2, e2, 1)[0] >>> 0;\n i3.children = new Array(r3);\n for (let n3 = 0; n3 < r3; n3++) i3.children[n3] = bf(t2, e2);\n }\n o2.type = \"complexField\", o2.complexField = i3;\n } else {\n const t3 = {};\n n2 ? (t3.type = \"logicalType\", t3.logicalType = s2) : (t3.type = \"physicalType\", t3.physicalType = s2), o2.type = \"scalarField\", o2.scalarField = t3;\n }\n return o2;\n }\n function wf(t2, e2) {\n const r2 = lp(t2, e2, 1)[0] >>> 0, n2 = (function(t3) {\n switch (t3) {\n case 0:\n case 1:\n case 2:\n case 3: {\n const e3 = {};\n e3.nullable = !!(1 & t3), e3.columnScope = 0;\n const r3 = {};\n return r3.physicalType = t3 > 1 ? 6 : 4, r3.type = \"physicalType\", e3.scalarType = r3, e3.type = \"scalarType\", e3;\n }\n case 4: {\n const t4 = { nullable: false, columnScope: 0 }, e3 = { type: \"physicalType\", physicalType: 0 };\n return t4.type = \"complexType\", t4.complexType = e3, t4;\n }\n case 30: {\n const t4 = { nullable: false, columnScope: 0 }, e3 = { type: \"physicalType\", physicalType: 1 };\n return t4.type = \"complexType\", t4.complexType = e3, t4;\n }\n default:\n return (function(t4) {\n let e3 = null;\n switch (t4) {\n case 10:\n case 11:\n e3 = 0;\n break;\n case 12:\n case 13:\n e3 = 1;\n break;\n case 14:\n case 15:\n e3 = 2;\n break;\n case 16:\n case 17:\n e3 = 3;\n break;\n case 18:\n case 19:\n e3 = 4;\n break;\n case 20:\n case 21:\n e3 = 5;\n break;\n case 22:\n case 23:\n e3 = 6;\n break;\n case 24:\n case 25:\n e3 = 7;\n break;\n case 26:\n case 27:\n e3 = 8;\n break;\n case 28:\n case 29:\n e3 = 9;\n break;\n default:\n return null;\n }\n const r3 = {};\n r3.nullable = !!(1 & t4), r3.columnScope = 0;\n const n3 = { type: \"physicalType\" };\n return n3.physicalType = e3, r3.type = \"scalarType\", r3.scalarType = n3, r3;\n })(t3);\n }\n })(r2);\n if (!n2) throw new Error(`Unsupported column type code: ${r2}`);\n if ((function(t3) {\n return t3 >= 10;\n })(r2) ? n2.name = vf(t2, e2) : r2 >= 0 && r2 <= 3 ? n2.name = \"id\" : 4 === r2 && (n2.name = \"geometry\"), /* @__PURE__ */ (function(t3) {\n return 30 === t3;\n })(r2)) {\n const r3 = lp(t2, e2, 1)[0] >>> 0, i2 = n2.complexType;\n i2.children = new Array(r3);\n for (let n3 = 0; n3 < r3; n3++) i2.children[n3] = bf(t2, e2);\n }\n return n2;\n }\n function _f(t2, e2) {\n const r2 = { featureTables: [] }, n2 = {};\n n2.name = vf(t2, e2);\n const i2 = lp(t2, e2, 1)[0] >>> 0, s2 = lp(t2, e2, 1)[0] >>> 0;\n n2.columns = new Array(s2);\n for (let r3 = 0; r3 < s2; r3++) n2.columns[r3] = wf(t2, e2);\n return r2.featureTables.push(n2), [r2, i2];\n }\n function Af(t2, e2, r2, n2, i2, s2, o2 = false) {\n const a2 = e2.scalarType.physicalType, l2 = Pp(i2, s2, t2, r2);\n if (4 === a2) switch (l2) {\n case ip.FLAT: {\n const e3 = Ap(t2, r2, i2, false);\n return new Gh(n2, e3, s2);\n }\n case ip.SEQUENCE: {\n const e3 = Tp(t2, r2, i2);\n return new Zh(n2, e3[0], e3[1], i2.numRleValues);\n }\n case ip.CONST: {\n const e3 = Ep(t2, r2, i2, false);\n return new Hh(n2, e3, s2);\n }\n }\n else switch (l2) {\n case ip.FLAT: {\n if (o2) {\n const e4 = (function(t3, e5, r3, n3) {\n const i3 = (function(t4, e6, r4) {\n const n4 = new Float64Array(e6);\n for (let i4 = 0; i4 < e6; i4++) n4[i4] = cp(t4, r4);\n return n4;\n })(t3, r3.numValues, e5);\n return (function(t4, e6, r4) {\n switch (e6.logicalLevelTechnique1) {\n case Jh.DELTA:\n return e6.logicalLevelTechnique2 === Jh.RLE && (t4 = gp(t4, e6.runs, e6.numRleValues)), (function(t5) {\n t5[0] = t5[0] % 2 == 1 ? (t5[0] + 1) / -2 : t5[0] / 2;\n const e7 = t5.length / 4 * 4;\n let r5 = 1;\n if (e7 >= 4) for (; r5 < e7 - 4; r5 += 4) {\n const e8 = t5[r5], n4 = t5[r5 + 1], i4 = t5[r5 + 2], s3 = t5[r5 + 3];\n t5[r5] = (e8 % 2 == 1 ? (e8 + 1) / -2 : e8 / 2) + t5[r5 - 1], t5[r5 + 1] = (n4 % 2 == 1 ? (n4 + 1) / -2 : n4 / 2) + t5[r5], t5[r5 + 2] = (i4 % 2 == 1 ? (i4 + 1) / -2 : i4 / 2) + t5[r5 + 1], t5[r5 + 3] = (s3 % 2 == 1 ? (s3 + 1) / -2 : s3 / 2) + t5[r5 + 2];\n }\n for (; r5 != t5.length; ++r5) t5[r5] = (t5[r5] % 2 == 1 ? (t5[r5] + 1) / -2 : t5[r5] / 2) + t5[r5 - 1];\n })(t4), t4;\n case Jh.RLE:\n return (function(t5, e7, r5) {\n return r5 ? (function(t6, e8, r6) {\n const n4 = new Float64Array(r6);\n let i4 = 0;\n for (let r7 = 0; r7 < e8; r7++) {\n const s3 = t6[r7];\n let o3 = t6[r7 + e8];\n o3 = o3 % 2 == 1 ? (o3 + 1) / -2 : o3 / 2, n4.fill(o3, i4, i4 + s3), i4 += s3;\n }\n return n4;\n })(t5, e7.runs, e7.numRleValues) : gp(t5, e7.runs, e7.numRleValues);\n })(t4, e6, r4);\n case Jh.NONE:\n return t4;\n default:\n throw new Error(`The specified Logical level technique is not supported: ${e6.logicalLevelTechnique1}`);\n }\n })(i3, r3, n3);\n })(t2, r2, i2, false);\n return new Xh(n2, e4, s2);\n }\n const e3 = Mp(t2, r2, i2, false);\n return new zp(n2, e3, s2);\n }\n case ip.SEQUENCE: {\n const e3 = Ip(t2, r2, i2);\n return new Bp(n2, e3[0], e3[1], i2.numRleValues);\n }\n case ip.CONST: {\n const e3 = Fp(t2, r2, i2, false);\n return new of(n2, e3, s2);\n }\n }\n throw new Error(\"Vector type not supported for id column.\");\n }\n class Sf {\n constructor(t2, e2) {\n var r2;\n switch (this._featureData = t2, this.properties = this._featureData.properties || {}, null === (r2 = this._featureData.geometry) || void 0 === r2 ? void 0 : r2.type) {\n case sp.POINT:\n case sp.MULTIPOINT:\n this.type = 1;\n break;\n case sp.LINESTRING:\n case sp.MULTILINESTRING:\n this.type = 2;\n break;\n case sp.POLYGON:\n case sp.MULTIPOLYGON:\n this.type = 3;\n break;\n default:\n this.type = 0;\n }\n this.extent = e2, this.id = Number(this._featureData.id);\n }\n loadGeometry() {\n const t2 = [];\n for (const e2 of this._featureData.geometry.coordinates) {\n const n2 = [];\n for (const t3 of e2) n2.push(new r(t3.x, t3.y));\n t2.push(n2);\n }\n return t2;\n }\n }\n class kf {\n constructor(t2) {\n this.features = [], this.featureTable = t2, this.name = t2.name, this.extent = t2.extent, this.version = 2, this.features = t2.getFeatures(), this.length = this.features.length;\n }\n feature(t2) {\n return new Sf(this.features[t2], this.extent);\n }\n }\n class Ef {\n constructor(t2) {\n this.layers = {};\n const e2 = (function(t3, e3, r2 = true) {\n const n2 = new Wh(0), i2 = [];\n for (; n2.get() < t3.length; ) {\n const e4 = lp(t3, n2, 1)[0] >>> 0, s2 = n2.get() + e4;\n if (s2 > t3.length) throw new Error(`Block overruns tile: ${s2} > ${t3.length}`);\n if (1 != lp(t3, n2, 1)[0] >>> 0) {\n n2.set(s2);\n continue;\n }\n const o2 = _f(t3, n2), a2 = o2[1], l2 = o2[0].featureTables[0];\n let u2 = null, c2 = null;\n const h2 = [];\n let p2 = 0;\n for (const e5 of l2.columns) {\n const i3 = e5.name;\n if (\"id\" === i3) {\n let s3 = null;\n if (e5.nullable) {\n const e6 = wp(t3, n2), r3 = n2.get(), i4 = af(t3, e6.numValues, n2);\n n2.set(r3 + e6.byteLength), s3 = new _p(i4, e6.numValues);\n }\n const o3 = wp(t3, n2);\n p2 = o3.decompressedCount, u2 = Af(t3, e5, n2, i3, o3, s3 ?? p2, r2);\n } else if (\"geometry\" === i3) {\n const e6 = lp(t3, n2, 1)[0];\n if (0 === p2) {\n const e7 = n2.get();\n p2 = wp(t3, n2).decompressedCount, n2.set(e7);\n }\n c2 = tf(t3, e6, n2, p2);\n } else {\n const r3 = gf(e5) ? lp(t3, n2, 1)[0] : 1;\n if (0 === r3 && \"scalarType\" === e5.type) continue;\n const i4 = yf(t3, n2, e5, r3, p2);\n if (i4) if (Array.isArray(i4)) for (const t4 of i4) h2.push(t4);\n else h2.push(i4);\n }\n }\n const f2 = new Kh(l2.name, c2, u2, h2, a2);\n i2.push(f2), n2.set(s2);\n }\n return i2;\n })(new Uint8Array(t2));\n this.layers = e2.reduce(((t3, e3) => Object.assign(Object.assign({}, t3), { [e3.name]: new kf(e3) })), {});\n }\n }\n class Tf {\n constructor() {\n this.minX = 1 / 0, this.maxX = -1 / 0, this.minY = 1 / 0, this.maxY = -1 / 0;\n }\n extend(t2) {\n return this.minX = Math.min(this.minX, t2.x), this.minY = Math.min(this.minY, t2.y), this.maxX = Math.max(this.maxX, t2.x), this.maxY = Math.max(this.maxY, t2.y), this;\n }\n expandBy(t2) {\n return this.minX -= t2, this.minY -= t2, this.maxX += t2, this.maxY += t2, (this.minX > this.maxX || this.minY > this.maxY) && (this.minX = 1 / 0, this.maxX = -1 / 0, this.minY = 1 / 0, this.maxY = -1 / 0), this;\n }\n shrinkBy(t2) {\n return this.expandBy(-t2);\n }\n map(t2) {\n const e2 = new Tf();\n return e2.extend(t2(new r(this.minX, this.minY))), e2.extend(t2(new r(this.maxX, this.minY))), e2.extend(t2(new r(this.minX, this.maxY))), e2.extend(t2(new r(this.maxX, this.maxY))), e2;\n }\n static fromPoints(t2) {\n const e2 = new Tf();\n for (const r2 of t2) e2.extend(r2);\n return e2;\n }\n contains(t2) {\n return t2.x >= this.minX && t2.x <= this.maxX && t2.y >= this.minY && t2.y <= this.maxY;\n }\n empty() {\n return this.minX > this.maxX;\n }\n width() {\n return this.maxX - this.minX;\n }\n height() {\n return this.maxY - this.minY;\n }\n covers(t2) {\n return !this.empty() && !t2.empty() && t2.minX >= this.minX && t2.maxX <= this.maxX && t2.minY >= this.minY && t2.maxY <= this.maxY;\n }\n intersects(t2) {\n return !this.empty() && !t2.empty() && t2.minX <= this.maxX && t2.maxX >= this.minX && t2.minY <= this.maxY && t2.maxY >= this.minY;\n }\n }\n class If {\n constructor(t2, e2) {\n this.feature = t2, this.type = t2.type, this.properties = t2.tags ? t2.tags : {}, this.extent = e2, \"id\" in t2 && (\"string\" == typeof t2.id ? this.id = parseInt(t2.id, 10) : \"number\" != typeof t2.id || isNaN(t2.id) || (this.id = t2.id));\n }\n loadGeometry() {\n const t2 = [], e2 = 1 === this.feature.type ? [this.feature.geometry] : this.feature.geometry;\n for (const n2 of e2) {\n const e3 = [];\n for (const t3 of n2) e3.push(new r(t3[0], t3[1]));\n t2.push(e3);\n }\n return t2;\n }\n }\n const Mf = \"_geojsonTileLayer\";\n function Ff(t2, e2) {\n e2.writeVarintField(15, t2.version || 1), e2.writeStringField(1, t2.name || \"\"), e2.writeVarintField(5, t2.extent || 4096);\n const r2 = { keys: [], values: [], keycache: {}, valuecache: {} };\n for (let n3 = 0; n3 < t2.length; n3++) r2.feature = t2.feature(n3), e2.writeMessage(2, Df, r2);\n const n2 = r2.keys;\n for (const t3 of n2) e2.writeStringField(3, t3);\n const i2 = r2.values;\n for (const t3 of i2) e2.writeMessage(4, Cf, t3);\n }\n function Df(t2, e2) {\n if (!t2.feature) return;\n const r2 = t2.feature;\n void 0 !== r2.id && e2.writeVarintField(1, r2.id), e2.writeMessage(2, Pf, t2), e2.writeVarintField(3, r2.type), e2.writeMessage(4, Vf, r2);\n }\n function Pf(t2, e2) {\n for (const r2 in t2.feature?.properties) {\n let n2 = t2.feature.properties[r2], i2 = t2.keycache[r2];\n if (null === n2) continue;\n void 0 === i2 && (t2.keys.push(r2), i2 = t2.keys.length - 1, t2.keycache[r2] = i2), e2.writeVarint(i2), \"string\" != typeof n2 && \"boolean\" != typeof n2 && \"number\" != typeof n2 && (n2 = JSON.stringify(n2));\n const s2 = typeof n2 + \":\" + n2;\n let o2 = t2.valuecache[s2];\n void 0 === o2 && (t2.values.push(n2), o2 = t2.values.length - 1, t2.valuecache[s2] = o2), e2.writeVarint(o2);\n }\n }\n function zf(t2, e2) {\n return (e2 << 3) + (7 & t2);\n }\n function Bf(t2) {\n return t2 << 1 ^ t2 >> 31;\n }\n function Vf(t2, e2) {\n const r2 = t2.loadGeometry(), n2 = t2.type;\n let i2 = 0, s2 = 0;\n for (const o2 of r2) {\n let r3 = 1;\n 1 === n2 && (r3 = o2.length), e2.writeVarint(zf(1, r3));\n const a2 = 3 === n2 ? o2.length - 1 : o2.length;\n for (let t3 = 0; t3 < a2; t3++) {\n 1 === t3 && 1 !== n2 && e2.writeVarint(zf(2, a2 - 1));\n const r4 = o2[t3].x - i2, l2 = o2[t3].y - s2;\n e2.writeVarint(Bf(r4)), e2.writeVarint(Bf(l2)), i2 += r4, s2 += l2;\n }\n 3 === t2.type && e2.writeVarint(zf(7, 1));\n }\n }\n function Cf(t2, e2) {\n const r2 = typeof t2;\n \"string\" === r2 ? e2.writeStringField(1, t2) : \"boolean\" === r2 ? e2.writeBooleanField(7, t2) : \"number\" === r2 && (t2 % 1 != 0 ? e2.writeDoubleField(3, t2) : t2 < 0 ? e2.writeSVarintField(6, t2) : e2.writeVarintField(5, t2));\n }\n class Lf {\n constructor(t2, e2) {\n this.tileID = t2, this.x = t2.canonical.x, this.y = t2.canonical.y, this.z = t2.canonical.z, this.grid = new as(M, 16, 0), this.grid3D = new as(M, 16, 0), this.featureIndexArray = new Oo(), this.promoteId = e2;\n }\n insert(t2, e2, r2, n2, i2, s2) {\n const o2 = this.featureIndexArray.length;\n this.featureIndexArray.emplaceBack(r2, n2, i2);\n const a2 = s2 ? this.grid3D : this.grid;\n for (let t3 = 0; t3 < e2.length; t3++) {\n const r3 = e2[t3], n3 = [1 / 0, 1 / 0, -1 / 0, -1 / 0];\n for (let t4 = 0; t4 < r3.length; t4++) {\n const e3 = r3[t4];\n n3[0] = Math.min(n3[0], e3.x), n3[1] = Math.min(n3[1], e3.y), n3[2] = Math.max(n3[2], e3.x), n3[3] = Math.max(n3[3], e3.y);\n }\n n3[0] < M && n3[1] < M && n3[2] >= 0 && n3[3] >= 0 && a2.insert(o2, n3[0], n3[1], n3[2], n3[3]);\n }\n }\n loadVTLayers() {\n return this.vtLayers || (this.vtLayers = \"mlt\" !== this.encoding ? new Pu(new Sc(this.rawTileData)).layers : new Ef(this.rawTileData).layers, this.sourceLayerCoder = new $h(this.vtLayers ? Object.keys(this.vtLayers).sort() : [Mf])), this.vtLayers;\n }\n query(t2, e2, n2, i2) {\n this.loadVTLayers();\n const s2 = t2.params, o2 = M / t2.tileSize / t2.scale, a2 = fi(s2.filter, s2.globalState), l2 = t2.queryGeometry, u2 = t2.queryPadding * o2, c2 = Tf.fromPoints(l2), h2 = this.grid.query(c2.minX - u2, c2.minY - u2, c2.maxX + u2, c2.maxY + u2), p2 = Tf.fromPoints(t2.cameraQueryGeometry).expandBy(u2), f2 = this.grid3D.query(p2.minX, p2.minY, p2.maxX, p2.maxY, ((e3, n3, i3, s3) => (function(t3, e4, n4, i4, s4) {\n for (const r2 of t3) if (e4 <= r2.x && n4 <= r2.y && i4 >= r2.x && s4 >= r2.y) return true;\n const o3 = [new r(e4, n4), new r(e4, s4), new r(i4, s4), new r(i4, n4)];\n if (t3.length > 2) {\n for (const e5 of o3) if (Wa(t3, e5)) return true;\n }\n for (let e5 = 0; e5 < t3.length - 1; e5++) if (Ja(t3[e5], t3[e5 + 1], o3)) return true;\n return false;\n })(t2.cameraQueryGeometry, e3 - u2, n3 - u2, i3 + u2, s3 + u2)));\n for (const t3 of f2) h2.push(t3);\n h2.sort(Rf);\n const d2 = {};\n let y2;\n for (let r2 = 0; r2 < h2.length; r2++) {\n const u3 = h2[r2];\n if (u3 === y2) continue;\n y2 = u3;\n const c3 = this.featureIndexArray.get(u3);\n let p3 = null;\n this.loadMatchingFeature(d2, c3.bucketIndex, c3.sourceLayerIndex, c3.featureIndex, a2, s2.layers, s2.availableImages, e2, n2, i2, ((e3, r3, n3) => (p3 || (p3 = La(e3)), r3.queryIntersectsFeature({ queryGeometry: l2, feature: e3, featureState: n3, geometry: p3, zoom: this.z, transform: t2.transform, pixelsToTileUnits: o2, pixelPosMatrix: t2.pixelPosMatrix, unwrappedTileID: this.tileID.toUnwrapped(), getElevation: t2.getElevation }))));\n }\n return d2;\n }\n loadMatchingFeature(t2, e2, r2, n2, i2, s2, o2, a2, l2, u2, c2) {\n const h2 = this.bucketLayerIDs[e2];\n if (s2 && !h2.some(((t3) => s2.has(t3)))) return;\n const p2 = this.sourceLayerCoder.decode(r2), f2 = this.vtLayers[p2].feature(n2);\n if (i2.needGeometry) {\n const t3 = Oa(f2, true);\n if (!i2.filter(new Fs(this.tileID.overscaledZ), t3, this.tileID.canonical)) return;\n } else if (!i2.filter(new Fs(this.tileID.overscaledZ), f2)) return;\n const d2 = this.getId(f2, p2);\n for (let e3 = 0; e3 < h2.length; e3++) {\n const r3 = h2[e3];\n if (s2 && !s2.has(r3)) continue;\n const i3 = a2[r3];\n if (!i3) continue;\n let p3 = {};\n d2 && u2 && (p3 = u2.getState(i3.sourceLayer || Mf, d2));\n const y2 = O({}, l2[r3]);\n y2.paint = Of(y2.paint, i3.paint, f2, p3, o2), y2.layout = Of(y2.layout, i3.layout, f2, p3, o2);\n const m2 = !c2 || c2(f2, i3, p3);\n if (!m2) continue;\n const g2 = new Uh(f2, this.z, this.x, this.y, d2);\n g2.layer = y2;\n let x2 = t2[r3];\n void 0 === x2 && (x2 = t2[r3] = []), x2.push({ featureIndex: n2, feature: g2, intersectionZ: m2 });\n }\n }\n lookupSymbolFeatures(t2, e2, r2, n2, i2, s2, o2, a2) {\n const l2 = {};\n this.loadVTLayers();\n const u2 = fi(i2.filterSpec, i2.globalState);\n for (const i3 of t2) this.loadMatchingFeature(l2, r2, n2, i3, u2, s2, o2, a2, e2);\n return l2;\n }\n hasLayer(t2) {\n for (const e2 of this.bucketLayerIDs) for (const r2 of e2) if (t2 === r2) return true;\n return false;\n }\n getId(t2, e2) {\n var r2;\n let n2 = t2.id;\n return this.promoteId && (n2 = t2.properties[\"string\" == typeof this.promoteId ? this.promoteId : this.promoteId[e2]], \"boolean\" == typeof n2 && (n2 = Number(n2)), void 0 === n2 && (null === (r2 = t2.properties) || void 0 === r2 ? void 0 : r2.cluster) && this.promoteId && (n2 = Number(t2.properties.cluster_id))), n2;\n }\n }\n function Of(t2, e2, r2, n2, i2) {\n return N(t2, ((t3, s2) => {\n const o2 = e2 instanceof Ns ? e2.get(s2) : null;\n return o2 && o2.evaluate ? o2.evaluate(r2, n2, i2) : o2;\n }));\n }\n function Rf(t2, e2) {\n return e2 - t2;\n }\n function Nf(t2, e2, n2, i2, s2) {\n const o2 = [];\n for (let a2 = 0; a2 < t2.length; a2++) {\n const l2 = t2[a2];\n let u2;\n for (let t3 = 0; t3 < l2.length - 1; t3++) {\n let a3 = l2[t3], c2 = l2[t3 + 1];\n a3.x < e2 && c2.x < e2 || (a3.x < e2 ? a3 = new r(e2, a3.y + (e2 - a3.x) / (c2.x - a3.x) * (c2.y - a3.y))._round() : c2.x < e2 && (c2 = new r(e2, a3.y + (e2 - a3.x) / (c2.x - a3.x) * (c2.y - a3.y))._round()), a3.y < n2 && c2.y < n2 || (a3.y < n2 ? a3 = new r(a3.x + (n2 - a3.y) / (c2.y - a3.y) * (c2.x - a3.x), n2)._round() : c2.y < n2 && (c2 = new r(a3.x + (n2 - a3.y) / (c2.y - a3.y) * (c2.x - a3.x), n2)._round()), a3.x >= i2 && c2.x >= i2 || (a3.x >= i2 ? a3 = new r(i2, a3.y + (i2 - a3.x) / (c2.x - a3.x) * (c2.y - a3.y))._round() : c2.x >= i2 && (c2 = new r(i2, a3.y + (i2 - a3.x) / (c2.x - a3.x) * (c2.y - a3.y))._round()), a3.y >= s2 && c2.y >= s2 || (a3.y >= s2 ? a3 = new r(a3.x + (s2 - a3.y) / (c2.y - a3.y) * (c2.x - a3.x), s2)._round() : c2.y >= s2 && (c2 = new r(a3.x + (s2 - a3.y) / (c2.y - a3.y) * (c2.x - a3.x), s2)._round()), u2 && a3.equals(u2[u2.length - 1]) || (u2 = [a3], o2.push(u2)), u2.push(c2)))));\n }\n }\n return o2;\n }\n function $f(t2, e2, r2, n2, i2) {\n switch (e2) {\n case 1:\n return (function(t3, e3, r3, n3) {\n const i3 = [];\n for (const s2 of t3) for (const t4 of s2) {\n const s3 = 0 === n3 ? t4.x : t4.y;\n s3 >= e3 && s3 <= r3 && i3.push([t4]);\n }\n return i3;\n })(t2, r2, n2, i2);\n case 2:\n return qf(t2, r2, n2, i2, false);\n case 3:\n return qf(t2, r2, n2, i2, true);\n }\n return [];\n }\n function Uf(t2, e2, n2, i2, s2) {\n const o2 = 0 === i2 ? jf : Gf;\n let a2 = [];\n const l2 = [];\n for (let r2 = 0; r2 < t2.length - 1; r2++) {\n const u3 = t2[r2], c3 = t2[r2 + 1], h2 = 0 === i2 ? u3.x : u3.y, p2 = 0 === i2 ? c3.x : c3.y;\n let f2 = false;\n h2 < e2 ? p2 > e2 && a2.push(o2(u3, c3, e2)) : h2 > n2 ? p2 < n2 && a2.push(o2(u3, c3, n2)) : a2.push(u3), p2 < e2 && h2 >= e2 && (a2.push(o2(u3, c3, e2)), f2 = true), p2 > n2 && h2 <= n2 && (a2.push(o2(u3, c3, n2)), f2 = true), !s2 && f2 && (l2.push(a2), a2 = []);\n }\n const u2 = t2.length - 1, c2 = 0 === i2 ? t2[u2].x : t2[u2].y;\n return c2 >= e2 && c2 <= n2 && a2.push(t2[u2]), s2 && a2.length > 0 && !a2[0].equals(a2[a2.length - 1]) && a2.push(new r(a2[0].x, a2[0].y)), a2.length > 0 && l2.push(a2), l2;\n }\n function qf(t2, e2, r2, n2, i2) {\n const s2 = [];\n for (const o2 of t2) {\n const t3 = Uf(o2, e2, r2, n2, i2);\n t3.length > 0 && s2.push(...t3);\n }\n return s2;\n }\n function jf(t2, e2, n2) {\n return new r(n2, t2.y + (n2 - t2.x) / (e2.x - t2.x) * (e2.y - t2.y));\n }\n function Gf(t2, e2, n2) {\n return new r(t2.x + (n2 - t2.y) / (e2.y - t2.y) * (e2.x - t2.x), n2);\n }\n us(\"FeatureIndex\", Lf, { omit: [\"rawTileData\", \"sourceLayerCoder\"] });\n class Xf extends r {\n constructor(t2, e2, r2, n2) {\n super(t2, e2), this.angle = r2, void 0 !== n2 && (this.segment = n2);\n }\n clone() {\n return new Xf(this.x, this.y, this.angle, this.segment);\n }\n }\n function Yf(t2, e2, r2, n2, i2) {\n if (void 0 === e2.segment || 0 === r2) return true;\n let s2 = e2, o2 = e2.segment + 1, a2 = 0;\n for (; a2 > -r2 / 2; ) {\n if (o2--, o2 < 0) return false;\n a2 -= t2[o2].dist(s2), s2 = t2[o2];\n }\n a2 += t2[o2].dist(t2[o2 + 1]), o2++;\n const l2 = [];\n let u2 = 0;\n for (; a2 < r2 / 2; ) {\n const e3 = t2[o2], r3 = t2[o2 + 1];\n if (!r3) return false;\n let s3 = t2[o2 - 1].angleTo(e3) - e3.angleTo(r3);\n for (s3 = Math.abs((s3 + 3 * Math.PI) % (2 * Math.PI) - Math.PI), l2.push({ distance: a2, angleDelta: s3 }), u2 += s3; a2 - l2[0].distance > n2; ) u2 -= l2.shift().angleDelta;\n if (u2 > i2) return false;\n o2++, a2 += e3.dist(r3);\n }\n return true;\n }\n function Zf(t2) {\n let e2 = 0;\n for (let r2 = 0; r2 < t2.length - 1; r2++) e2 += t2[r2].dist(t2[r2 + 1]);\n return e2;\n }\n function Hf(t2, e2, r2) {\n return t2 ? 0.6 * e2 * r2 : 0;\n }\n function Kf(t2, e2) {\n return Math.max(t2 ? t2.right - t2.left : 0, e2 ? e2.right - e2.left : 0);\n }\n function Wf(t2, e2, r2, n2, i2, s2) {\n const o2 = Hf(r2, i2, s2), a2 = Kf(r2, n2) * s2;\n let l2 = 0;\n const u2 = Zf(t2) / 2;\n for (let r3 = 0; r3 < t2.length - 1; r3++) {\n const n3 = t2[r3], i3 = t2[r3 + 1], s3 = n3.dist(i3);\n if (l2 + s3 > u2) {\n const c2 = (u2 - l2) / s3, h2 = yr.number(n3.x, i3.x, c2), p2 = yr.number(n3.y, i3.y, c2), f2 = new Xf(h2, p2, i3.angleTo(n3), r3);\n return f2._round(), !o2 || Yf(t2, f2, a2, o2, e2) ? f2 : void 0;\n }\n l2 += s3;\n }\n }\n function Jf(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = Hf(n2, s2, o2), c2 = Kf(n2, i2), h2 = c2 * o2, p2 = 0 === t2[0].x || t2[0].x === l2 || 0 === t2[0].y || t2[0].y === l2;\n return e2 - h2 < e2 / 4 && (e2 = h2 + e2 / 4), Qf(t2, p2 ? e2 / 2 * a2 % e2 : (c2 / 2 + 2 * s2) * o2 * a2 % e2, e2, u2, r2, h2, p2, false, l2);\n }\n function Qf(t2, e2, r2, n2, i2, s2, o2, a2, l2) {\n const u2 = s2 / 2, c2 = Zf(t2);\n let h2 = 0, p2 = e2 - r2, f2 = [];\n for (let e3 = 0; e3 < t2.length - 1; e3++) {\n const o3 = t2[e3], a3 = t2[e3 + 1], d2 = o3.dist(a3), y2 = a3.angleTo(o3);\n for (; p2 + r2 < h2 + d2; ) {\n p2 += r2;\n const m2 = (p2 - h2) / d2, g2 = yr.number(o3.x, a3.x, m2), x2 = yr.number(o3.y, a3.y, m2);\n if (g2 >= 0 && g2 < l2 && x2 >= 0 && x2 < l2 && p2 - u2 >= 0 && p2 + u2 <= c2) {\n const r3 = new Xf(g2, x2, y2, e3);\n r3._round(), n2 && !Yf(t2, r3, s2, n2, i2) || f2.push(r3);\n }\n }\n h2 += d2;\n }\n return a2 || f2.length || o2 || (f2 = Qf(t2, h2 / 2, r2, n2, i2, s2, o2, true, l2)), f2;\n }\n function td(t2, e2, n2, i2) {\n const s2 = [], o2 = t2.image, a2 = o2.pixelRatio, l2 = o2.paddedRect.w - 2, u2 = o2.paddedRect.h - 2;\n let c2 = { x1: t2.left, y1: t2.top, x2: t2.right, y2: t2.bottom };\n const h2 = o2.stretchX || [[0, l2]], p2 = o2.stretchY || [[0, u2]], f2 = (t3, e3) => t3 + e3[1] - e3[0], d2 = h2.reduce(f2, 0), y2 = p2.reduce(f2, 0), m2 = l2 - d2, g2 = u2 - y2;\n let x2 = 0, v2 = d2, b2 = 0, w2 = y2, _2 = 0, A2 = m2, S2 = 0, k2 = g2;\n if (o2.content && i2) {\n const e3 = o2.content, r2 = e3[2] - e3[0], n3 = e3[3] - e3[1];\n (o2.textFitWidth || o2.textFitHeight) && (c2 = Jc(t2)), x2 = ed(h2, 0, e3[0]), b2 = ed(p2, 0, e3[1]), v2 = ed(h2, e3[0], e3[2]), w2 = ed(p2, e3[1], e3[3]), _2 = e3[0] - x2, S2 = e3[1] - b2, A2 = r2 - v2, k2 = n3 - w2;\n }\n const E2 = c2.x1, T2 = c2.y1, I2 = c2.x2 - E2, M2 = c2.y2 - T2, F2 = (t3, i3, s3, l3) => {\n const u3 = nd(t3.stretch - x2, v2, I2, E2), c3 = id(t3.fixed - _2, A2, t3.stretch, d2), h3 = nd(i3.stretch - b2, w2, M2, T2), p3 = id(i3.fixed - S2, k2, i3.stretch, y2), f3 = nd(s3.stretch - x2, v2, I2, E2), m3 = id(s3.fixed - _2, A2, s3.stretch, d2), g3 = nd(l3.stretch - b2, w2, M2, T2), F3 = id(l3.fixed - S2, k2, l3.stretch, y2), D2 = new r(u3, h3), P2 = new r(f3, h3), z2 = new r(f3, g3), B2 = new r(u3, g3), V2 = new r(c3 / a2, p3 / a2), C2 = new r(m3 / a2, F3 / a2), L2 = e2 * Math.PI / 180;\n if (L2) {\n const t4 = Math.sin(L2), e3 = Math.cos(L2), r2 = [e3, -t4, t4, e3];\n D2._matMult(r2), P2._matMult(r2), B2._matMult(r2), z2._matMult(r2);\n }\n const O2 = t3.stretch + t3.fixed, R2 = i3.stretch + i3.fixed;\n return { tl: D2, tr: P2, bl: B2, br: z2, tex: { x: o2.paddedRect.x + 1 + O2, y: o2.paddedRect.y + 1 + R2, w: s3.stretch + s3.fixed - O2, h: l3.stretch + l3.fixed - R2 }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: V2, pixelOffsetBR: C2, minFontScaleX: A2 / a2 / I2, minFontScaleY: k2 / a2 / M2, isSDF: n2 };\n };\n if (i2 && (o2.stretchX || o2.stretchY)) {\n const t3 = rd(h2, m2, d2), e3 = rd(p2, g2, y2);\n for (let r2 = 0; r2 < t3.length - 1; r2++) {\n const n3 = t3[r2], i3 = t3[r2 + 1];\n for (let t4 = 0; t4 < e3.length - 1; t4++) s2.push(F2(n3, e3[t4], i3, e3[t4 + 1]));\n }\n } else s2.push(F2({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: l2 + 1 }, { fixed: 0, stretch: u2 + 1 }));\n return s2;\n }\n function ed(t2, e2, r2) {\n let n2 = 0;\n for (const i2 of t2) n2 += Math.max(e2, Math.min(r2, i2[1])) - Math.max(e2, Math.min(r2, i2[0]));\n return n2;\n }\n function rd(t2, e2, r2) {\n const n2 = [{ fixed: -1, stretch: 0 }];\n for (const [e3, r3] of t2) {\n const t3 = n2[n2.length - 1];\n n2.push({ fixed: e3 - t3.stretch, stretch: t3.stretch }), n2.push({ fixed: e3 - t3.stretch, stretch: t3.stretch + (r3 - e3) });\n }\n return n2.push({ fixed: e2 + 1, stretch: r2 }), n2;\n }\n function nd(t2, e2, r2, n2) {\n return t2 / e2 * r2 + n2;\n }\n function id(t2, e2, r2, n2) {\n return t2 - e2 * r2 / n2;\n }\n us(\"Anchor\", Xf);\n class sd {\n constructor(t2, e2, n2, i2, s2, o2, a2, l2, u2, c2) {\n var h2;\n if (this.boxStartIndex = t2.length, u2) {\n let t3 = o2.top, e3 = o2.bottom;\n const r2 = o2.collisionPadding;\n r2 && (t3 -= r2[1], e3 += r2[3]);\n let n3 = e3 - t3;\n n3 > 0 && (n3 = Math.max(10, n3), this.circleDiameter = n3);\n } else {\n const u3 = (null === (h2 = o2.image) || void 0 === h2 ? void 0 : h2.content) && (o2.image.textFitWidth || o2.image.textFitHeight) ? Jc(o2) : { x1: o2.left, y1: o2.top, x2: o2.right, y2: o2.bottom };\n u3.y1 = u3.y1 * a2 - l2[0], u3.y2 = u3.y2 * a2 + l2[2], u3.x1 = u3.x1 * a2 - l2[3], u3.x2 = u3.x2 * a2 + l2[1];\n const p2 = o2.collisionPadding;\n if (p2 && (u3.x1 -= p2[0] * a2, u3.y1 -= p2[1] * a2, u3.x2 += p2[2] * a2, u3.y2 += p2[3] * a2), c2) {\n const t3 = new r(u3.x1, u3.y1), e3 = new r(u3.x2, u3.y1), n3 = new r(u3.x1, u3.y2), i3 = new r(u3.x2, u3.y2), s3 = c2 * Math.PI / 180;\n t3._rotate(s3), e3._rotate(s3), n3._rotate(s3), i3._rotate(s3), u3.x1 = Math.min(t3.x, e3.x, n3.x, i3.x), u3.x2 = Math.max(t3.x, e3.x, n3.x, i3.x), u3.y1 = Math.min(t3.y, e3.y, n3.y, i3.y), u3.y2 = Math.max(t3.y, e3.y, n3.y, i3.y);\n }\n t2.emplaceBack(e2.x, e2.y, u3.x1, u3.y1, u3.x2, u3.y2, n2, i2, s2);\n }\n this.boxEndIndex = t2.length;\n }\n }\n class od {\n constructor(t2 = [], e2 = (t3, e3) => t3 < e3 ? -1 : t3 > e3 ? 1 : 0) {\n if (this.data = t2, this.length = this.data.length, this.compare = e2, this.length > 0) for (let t3 = (this.length >> 1) - 1; t3 >= 0; t3--) this._down(t3);\n }\n push(t2) {\n this.data.push(t2), this._up(this.length++);\n }\n pop() {\n if (0 === this.length) return;\n const t2 = this.data[0], e2 = this.data.pop();\n return --this.length > 0 && (this.data[0] = e2, this._down(0)), t2;\n }\n peek() {\n return this.data[0];\n }\n _up(t2) {\n const { data: e2, compare: r2 } = this, n2 = e2[t2];\n for (; t2 > 0; ) {\n const i2 = t2 - 1 >> 1, s2 = e2[i2];\n if (r2(n2, s2) >= 0) break;\n e2[t2] = s2, t2 = i2;\n }\n e2[t2] = n2;\n }\n _down(t2) {\n const { data: e2, compare: r2 } = this, n2 = this.length >> 1, i2 = e2[t2];\n for (; t2 < n2; ) {\n let n3 = 1 + (t2 << 1);\n const s2 = n3 + 1;\n if (s2 < this.length && r2(e2[s2], e2[n3]) < 0 && (n3 = s2), r2(e2[n3], i2) >= 0) break;\n e2[t2] = e2[n3], t2 = n3;\n }\n e2[t2] = i2;\n }\n }\n function ad(t2, e2 = 1, n2 = false) {\n const i2 = Tf.fromPoints(t2[0]), s2 = Math.min(i2.width(), i2.height());\n let o2 = s2 / 2;\n const a2 = new od([], ld), { minX: l2, minY: u2, maxX: c2, maxY: h2 } = i2;\n if (0 === s2) return new r(l2, u2);\n for (let e3 = l2; e3 < c2; e3 += s2) for (let r2 = u2; r2 < h2; r2 += s2) a2.push(new ud(e3 + o2, r2 + o2, o2, t2));\n let p2 = (function(t3) {\n let e3 = 0, r2 = 0, n3 = 0;\n const i3 = t3[0];\n for (let t4 = 0, s3 = i3.length, o3 = s3 - 1; t4 < s3; o3 = t4++) {\n const s4 = i3[t4], a3 = i3[o3], l3 = s4.x * a3.y - a3.x * s4.y;\n r2 += (s4.x + a3.x) * l3, n3 += (s4.y + a3.y) * l3, e3 += 3 * l3;\n }\n return new ud(r2 / e3, n3 / e3, 0, t3);\n })(t2), f2 = a2.length;\n for (; a2.length; ) {\n const r2 = a2.pop();\n (r2.d > p2.d || !p2.d) && (p2 = r2, n2 && console.log(\"found best %d after %d probes\", Math.round(1e4 * r2.d) / 1e4, f2)), r2.max - p2.d <= e2 || (o2 = r2.h / 2, a2.push(new ud(r2.p.x - o2, r2.p.y - o2, o2, t2)), a2.push(new ud(r2.p.x + o2, r2.p.y - o2, o2, t2)), a2.push(new ud(r2.p.x - o2, r2.p.y + o2, o2, t2)), a2.push(new ud(r2.p.x + o2, r2.p.y + o2, o2, t2)), f2 += 4);\n }\n return n2 && (console.log(`num probes: ${f2}`), console.log(`best distance: ${p2.d}`)), p2.p;\n }\n function ld(t2, e2) {\n return e2.max - t2.max;\n }\n function ud(t2, e2, n2, i2) {\n this.p = new r(t2, e2), this.h = n2, this.d = (function(t3, e3) {\n let r2 = false, n3 = 1 / 0;\n for (let i3 = 0; i3 < e3.length; i3++) {\n const s2 = e3[i3];\n for (let e4 = 0, i4 = s2.length, o2 = i4 - 1; e4 < i4; o2 = e4++) {\n const i5 = s2[e4], a2 = s2[o2];\n i5.y > t3.y != a2.y > t3.y && t3.x < (a2.x - i5.x) * (t3.y - i5.y) / (a2.y - i5.y) + i5.x && (r2 = !r2), n3 = Math.min(n3, Ha(t3, i5, a2));\n }\n }\n return (r2 ? 1 : -1) * Math.sqrt(n3);\n })(this.p, i2), this.max = this.d + this.h * Math.SQRT2;\n }\n var cd;\n t.aQ = void 0, (cd = t.aQ || (t.aQ = {}))[cd.center = 1] = \"center\", cd[cd.left = 2] = \"left\", cd[cd.right = 3] = \"right\", cd[cd.top = 4] = \"top\", cd[cd.bottom = 5] = \"bottom\", cd[cd[\"top-left\"] = 6] = \"top-left\", cd[cd[\"top-right\"] = 7] = \"top-right\", cd[cd[\"bottom-left\"] = 8] = \"bottom-left\", cd[cd[\"bottom-right\"] = 9] = \"bottom-right\";\n const hd = Number.POSITIVE_INFINITY;\n function pd(t2, e2) {\n return e2[1] !== hd ? (function(t3, e3, r2) {\n let n2 = 0, i2 = 0;\n switch (e3 = Math.abs(e3), r2 = Math.abs(r2), t3) {\n case \"top-right\":\n case \"top-left\":\n case \"top\":\n i2 = r2 - 7;\n break;\n case \"bottom-right\":\n case \"bottom-left\":\n case \"bottom\":\n i2 = 7 - r2;\n }\n switch (t3) {\n case \"top-right\":\n case \"bottom-right\":\n case \"right\":\n n2 = -e3;\n break;\n case \"top-left\":\n case \"bottom-left\":\n case \"left\":\n n2 = e3;\n }\n return [n2, i2];\n })(t2, e2[0], e2[1]) : (function(t3, e3) {\n let r2 = 0, n2 = 0;\n e3 < 0 && (e3 = 0);\n const i2 = e3 / Math.SQRT2;\n switch (t3) {\n case \"top-right\":\n case \"top-left\":\n n2 = i2 - 7;\n break;\n case \"bottom-right\":\n case \"bottom-left\":\n n2 = 7 - i2;\n break;\n case \"bottom\":\n n2 = 7 - e3;\n break;\n case \"top\":\n n2 = e3 - 7;\n }\n switch (t3) {\n case \"top-right\":\n case \"bottom-right\":\n r2 = -i2;\n break;\n case \"top-left\":\n case \"bottom-left\":\n r2 = i2;\n break;\n case \"left\":\n r2 = e3;\n break;\n case \"right\":\n r2 = -e3;\n }\n return [r2, n2];\n })(t2, e2[0]);\n }\n function fd(t2, e2, r2) {\n var n2;\n const i2 = t2.layout, s2 = null === (n2 = i2.get(\"text-variable-anchor-offset\")) || void 0 === n2 ? void 0 : n2.evaluate(e2, {}, r2);\n if (s2) {\n const t3 = s2.values, e3 = [];\n for (let r3 = 0; r3 < t3.length; r3 += 2) {\n const n3 = e3[r3] = t3[r3], i3 = t3[r3 + 1].map(((t4) => t4 * hc));\n n3.startsWith(\"top\") ? i3[1] -= 7 : n3.startsWith(\"bottom\") && (i3[1] += 7), e3[r3 + 1] = i3;\n }\n return new Le(e3);\n }\n const o2 = i2.get(\"text-variable-anchor\");\n if (o2) {\n let n3;\n n3 = void 0 !== t2._unevaluatedLayout.getValue(\"text-radial-offset\") ? [i2.get(\"text-radial-offset\").evaluate(e2, {}, r2) * hc, hd] : i2.get(\"text-offset\").evaluate(e2, {}, r2).map(((t3) => t3 * hc));\n const s3 = [];\n for (const t3 of o2) s3.push(t3, pd(t3, n3));\n return new Le(s3);\n }\n return null;\n }\n function dd(t2) {\n switch (t2) {\n case \"right\":\n case \"top-right\":\n case \"bottom-right\":\n return \"right\";\n case \"left\":\n case \"top-left\":\n case \"bottom-left\":\n return \"left\";\n }\n return \"center\";\n }\n function yd(e2, r2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2) {\n let f2 = o2.textMaxSize.evaluate(r2, {});\n void 0 === f2 && (f2 = a2);\n const d2 = e2.layers[0].layout, y2 = d2.get(\"icon-offset\").evaluate(r2, {}, h2), m2 = gd(n2.horizontal), g2 = a2 / 24, x2 = e2.tilePixelRatio * g2, v2 = e2.tilePixelRatio * f2 / 24, b2 = e2.tilePixelRatio * l2, w2 = e2.tilePixelRatio * d2.get(\"symbol-spacing\"), _2 = d2.get(\"text-padding\") * e2.tilePixelRatio, A2 = (function(t2, e3, r3, n3 = 1) {\n const i3 = t2.get(\"icon-padding\").evaluate(e3, {}, r3), s3 = i3 && i3.values;\n return [s3[0] * n3, s3[1] * n3, s3[2] * n3, s3[3] * n3];\n })(d2, r2, h2, e2.tilePixelRatio), S2 = d2.get(\"text-max-angle\") / 180 * Math.PI, k2 = \"viewport\" !== d2.get(\"text-rotation-alignment\") && \"point\" !== d2.get(\"symbol-placement\"), E2 = \"map\" === d2.get(\"icon-rotation-alignment\") && \"point\" !== d2.get(\"symbol-placement\"), T2 = d2.get(\"symbol-placement\"), I2 = w2 / 2, F2 = d2.get(\"icon-text-fit\");\n let D2;\n i2 && \"none\" !== F2 && (e2.allowVerticalPlacement && n2.vertical && (D2 = Qc(i2, n2.vertical, F2, d2.get(\"icon-text-fit-padding\"), y2, g2)), m2 && (i2 = Qc(i2, m2, F2, d2.get(\"icon-text-fit-padding\"), y2, g2)));\n const P2 = h2 ? p2.line.getGranularityForZoomLevel(h2.z) : 1, z2 = (l3, p3) => {\n p3.x < 0 || p3.x >= M || p3.y < 0 || p3.y >= M || (function(e3, r3, n3, i3, s3, o3, a3, l4, u3, c3, h3, p4, f3, d3, y3, m3, g3, x3, v3, b3, w3, _3, A3, S3, k3) {\n const E3 = e3.addToLineVertexArray(r3, n3);\n let T3, I3, M2, F3, D3 = 0, P3 = 0, z3 = 0, B2 = 0, V2 = -1, C2 = -1;\n const L2 = {};\n let O2 = fa(\"\");\n if (e3.allowVerticalPlacement && i3.vertical) {\n const t2 = l4.layout.get(\"text-rotate\").evaluate(w3, {}, S3) + 90;\n M2 = new sd(u3, r3, c3, h3, p4, i3.vertical, f3, d3, y3, t2), a3 && (F3 = new sd(u3, r3, c3, h3, p4, a3, g3, x3, y3, t2));\n }\n if (s3) {\n const n4 = l4.layout.get(\"icon-rotate\").evaluate(w3, {}), i4 = \"none\" !== l4.layout.get(\"icon-text-fit\"), o4 = td(s3, n4, A3, i4), f4 = a3 ? td(a3, n4, A3, i4) : void 0;\n I3 = new sd(u3, r3, c3, h3, p4, s3, g3, x3, false, n4), D3 = 4 * o4.length;\n const d4 = e3.iconSizeData;\n let y4 = null;\n \"source\" === d4.kind ? (y4 = [th * l4.layout.get(\"icon-size\").evaluate(w3, {})], y4[0] > eh && j(`${e3.layerIds[0]}: Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".`)) : \"composite\" === d4.kind && (y4 = [th * _3.compositeIconSizes[0].evaluate(w3, {}, S3), th * _3.compositeIconSizes[1].evaluate(w3, {}, S3)], (y4[0] > eh || y4[1] > eh) && j(`${e3.layerIds[0]}: Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".`)), e3.addSymbols(e3.icon, o4, y4, b3, v3, w3, t.aA.none, r3, E3.lineStartIndex, E3.lineLength, -1, S3), V2 = e3.icon.placedSymbolArray.length - 1, f4 && (P3 = 4 * f4.length, e3.addSymbols(e3.icon, f4, y4, b3, v3, w3, t.aA.vertical, r3, E3.lineStartIndex, E3.lineLength, -1, S3), C2 = e3.icon.placedSymbolArray.length - 1);\n }\n const R2 = Object.keys(i3.horizontal);\n for (const n4 of R2) {\n const s4 = i3.horizontal[n4];\n if (!T3) {\n O2 = fa(s4.text);\n const t2 = l4.layout.get(\"text-rotate\").evaluate(w3, {}, S3);\n T3 = new sd(u3, r3, c3, h3, p4, s4, f3, d3, y3, t2);\n }\n const a4 = 1 === s4.positionedLines.length;\n if (z3 += md(e3, r3, s4, o3, l4, y3, w3, m3, E3, i3.vertical ? t.aA.horizontal : t.aA.horizontalOnly, a4 ? R2 : [n4], L2, V2, _3, S3), a4) break;\n }\n i3.vertical && (B2 += md(e3, r3, i3.vertical, o3, l4, y3, w3, m3, E3, t.aA.vertical, [\"vertical\"], L2, C2, _3, S3));\n const N2 = T3 ? T3.boxStartIndex : e3.collisionBoxArray.length, $2 = T3 ? T3.boxEndIndex : e3.collisionBoxArray.length, U2 = M2 ? M2.boxStartIndex : e3.collisionBoxArray.length, q2 = M2 ? M2.boxEndIndex : e3.collisionBoxArray.length, G2 = I3 ? I3.boxStartIndex : e3.collisionBoxArray.length, X2 = I3 ? I3.boxEndIndex : e3.collisionBoxArray.length, Y2 = F3 ? F3.boxStartIndex : e3.collisionBoxArray.length, Z2 = F3 ? F3.boxEndIndex : e3.collisionBoxArray.length;\n let H2 = -1;\n const K2 = (t2, e4) => t2 && t2.circleDiameter ? Math.max(t2.circleDiameter, e4) : e4;\n H2 = K2(T3, H2), H2 = K2(M2, H2), H2 = K2(I3, H2), H2 = K2(F3, H2);\n const W2 = H2 > -1 ? 1 : 0;\n W2 && (H2 *= k3 / hc), e3.glyphOffsetArray.length >= ch.MAX_GLYPHS && j(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"), void 0 !== w3.sortKey && e3.addToSortKeyRanges(e3.symbolInstances.length, w3.sortKey);\n const J2 = fd(l4, w3, S3), [Q2, tt2] = (function(e4, r4) {\n const n4 = e4.length, i4 = null == r4 ? void 0 : r4.values;\n if ((null == i4 ? void 0 : i4.length) > 0) for (let r5 = 0; r5 < i4.length; r5 += 2) {\n const n5 = i4[r5 + 1];\n e4.emplaceBack(t.aQ[i4[r5]], n5[0], n5[1]);\n }\n return [n4, e4.length];\n })(e3.textAnchorOffsets, J2);\n e3.symbolInstances.emplaceBack(r3.x, r3.y, L2.right >= 0 ? L2.right : -1, L2.center >= 0 ? L2.center : -1, L2.left >= 0 ? L2.left : -1, L2.vertical || -1, V2, C2, O2, N2, $2, U2, q2, G2, X2, Y2, Z2, c3, z3, B2, D3, P3, W2, 0, f3, H2, Q2, tt2);\n })(e2, p3, l3, n2, i2, s2, D2, e2.layers[0], e2.collisionBoxArray, r2.index, r2.sourceLayerIndex, e2.index, x2, [_2, _2, _2, _2], k2, u2, b2, A2, E2, y2, r2, o2, c2, h2, a2);\n };\n if (\"line\" === T2) for (const t2 of Nf(r2.geometry, 0, 0, M, M)) {\n const r3 = du(t2, P2), s3 = Jf(r3, w2, S2, n2.vertical || m2, i2, 24, v2, e2.overscaling, M);\n for (const t3 of s3) m2 && xd(e2, m2.text, I2, t3) || z2(r3, t3);\n }\n else if (\"line-center\" === T2) {\n for (const t2 of r2.geometry) if (t2.length > 1) {\n const e3 = du(t2, P2), r3 = Wf(e3, S2, n2.vertical || m2, i2, 24, v2);\n r3 && z2(e3, r3);\n }\n } else if (\"Polygon\" === r2.type) for (const t2 of tn(r2.geometry, 0)) {\n const e3 = ad(t2, 16);\n z2(du(t2[0], P2, true), new Xf(e3.x, e3.y, 0));\n }\n else if (\"LineString\" === r2.type) for (const t2 of r2.geometry) {\n const e3 = du(t2, P2);\n z2(e3, new Xf(e3[0].x, e3[0].y, 0));\n }\n else if (\"Point\" === r2.type) for (const t2 of r2.geometry) for (const e3 of t2) z2([e3], new Xf(e3.x, e3.y, 0));\n }\n function md(t2, e2, n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2) {\n const m2 = (function(t3, e3, n3, i3, s3, o3, a3, l3) {\n const u3 = i3.layout.get(\"text-rotate\").evaluate(o3, {}) * Math.PI / 180, c3 = [];\n for (const t4 of e3.positionedLines) for (const i4 of t4.positionedGlyphs) {\n if (!i4.rect) continue;\n const o4 = i4.rect || {};\n let h3 = 4, p3 = true, f3 = 1, d3 = 0;\n const y3 = (s3 || l3) && i4.vertical, m3 = i4.metrics.advance * i4.scale / 2;\n if (l3 && e3.verticalizable && (d3 = t4.lineOffset / 2 - (i4.imageName ? -(hc - i4.metrics.width * i4.scale) / 2 : (i4.scale - 1) * hc)), i4.imageName) {\n const t5 = a3[i4.imageName];\n p3 = t5.sdf, f3 = t5.pixelRatio, h3 = 1 / f3;\n }\n const g3 = s3 ? [i4.x + m3, i4.y] : [0, 0];\n let x3 = s3 ? [0, 0] : [i4.x + m3 + n3[0], i4.y + n3[1] - d3], v2 = [0, 0];\n y3 && (v2 = x3, x3 = [0, 0]);\n const b2 = i4.metrics.isDoubleResolution ? 2 : 1, w2 = (i4.metrics.left - h3) * i4.scale - m3 + x3[0], _2 = (-i4.metrics.top - h3) * i4.scale + x3[1], A2 = w2 + o4.w / b2 * i4.scale / f3, S2 = _2 + o4.h / b2 * i4.scale / f3, k2 = new r(w2, _2), E2 = new r(A2, _2), T2 = new r(w2, S2), I2 = new r(A2, S2);\n if (y3) {\n const t5 = new r(-m3, m3 - -17), e4 = -Math.PI / 2, n4 = 12 - m3, s4 = new r(22 - n4, -(i4.imageName ? n4 : 0)), o5 = new r(...v2);\n k2._rotateAround(e4, t5)._add(s4)._add(o5), E2._rotateAround(e4, t5)._add(s4)._add(o5), T2._rotateAround(e4, t5)._add(s4)._add(o5), I2._rotateAround(e4, t5)._add(s4)._add(o5);\n }\n if (u3) {\n const t5 = Math.sin(u3), e4 = Math.cos(u3), r2 = [e4, -t5, t5, e4];\n k2._matMult(r2), E2._matMult(r2), T2._matMult(r2), I2._matMult(r2);\n }\n const M2 = new r(0, 0), F2 = new r(0, 0);\n c3.push({ tl: k2, tr: E2, bl: T2, br: I2, tex: o4, writingMode: e3.writingMode, glyphOffset: g3, sectionIndex: i4.sectionIndex, isSDF: p3, pixelOffsetTL: M2, pixelOffsetBR: F2, minFontScaleX: 0, minFontScaleY: 0 });\n }\n return c3;\n })(0, n2, l2, s2, o2, a2, i2, t2.allowVerticalPlacement), g2 = t2.textSizeData;\n let x2 = null;\n \"source\" === g2.kind ? (x2 = [th * s2.layout.get(\"text-size\").evaluate(a2, {})], x2[0] > eh && j(`${t2.layerIds[0]}: Value for \"text-size\" is >= 255. Reduce your \"text-size\".`)) : \"composite\" === g2.kind && (x2 = [th * d2.compositeTextSizes[0].evaluate(a2, {}, y2), th * d2.compositeTextSizes[1].evaluate(a2, {}, y2)], (x2[0] > eh || x2[1] > eh) && j(`${t2.layerIds[0]}: Value for \"text-size\" is >= 255. Reduce your \"text-size\".`)), t2.addSymbols(t2.text, m2, x2, l2, o2, a2, c2, e2, u2.lineStartIndex, u2.lineLength, f2, y2);\n for (const e3 of h2) p2[e3] = t2.text.placedSymbolArray.length - 1;\n return 4 * m2.length;\n }\n function gd(t2) {\n for (const e2 in t2) return t2[e2];\n return null;\n }\n function xd(t2, e2, r2, n2) {\n const i2 = t2.compareText;\n if (e2 in i2) {\n const t3 = i2[e2];\n for (let e3 = t3.length - 1; e3 >= 0; e3--) if (n2.dist(t3[e3]) < r2) return true;\n } else i2[e2] = [];\n return i2[e2].push(n2), false;\n }\n const vd = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];\n class bd {\n static from(t2) {\n if (!(t2 instanceof ArrayBuffer)) throw new Error(\"Data must be an instance of ArrayBuffer.\");\n const [e2, r2] = new Uint8Array(t2, 0, 2);\n if (219 !== e2) throw new Error(\"Data does not appear to be in a KDBush format.\");\n const n2 = r2 >> 4;\n if (1 !== n2) throw new Error(`Got v${n2} data when expected v1.`);\n const i2 = vd[15 & r2];\n if (!i2) throw new Error(\"Unrecognized array type.\");\n const [s2] = new Uint16Array(t2, 2, 1), [o2] = new Uint32Array(t2, 4, 1);\n return new bd(o2, s2, i2, t2);\n }\n constructor(t2, e2 = 64, r2 = Float64Array, n2) {\n if (isNaN(t2) || t2 < 0) throw new Error(`Unpexpected numItems value: ${t2}.`);\n this.numItems = +t2, this.nodeSize = Math.min(Math.max(+e2, 2), 65535), this.ArrayType = r2, this.IndexArrayType = t2 < 65536 ? Uint16Array : Uint32Array;\n const i2 = vd.indexOf(this.ArrayType), s2 = 2 * t2 * this.ArrayType.BYTES_PER_ELEMENT, o2 = t2 * this.IndexArrayType.BYTES_PER_ELEMENT, a2 = (8 - o2 % 8) % 8;\n if (i2 < 0) throw new Error(`Unexpected typed array class: ${r2}.`);\n n2 && n2 instanceof ArrayBuffer ? (this.data = n2, this.ids = new this.IndexArrayType(this.data, 8, t2), this.coords = new this.ArrayType(this.data, 8 + o2 + a2, 2 * t2), this._pos = 2 * t2, this._finished = true) : (this.data = new ArrayBuffer(8 + s2 + o2 + a2), this.ids = new this.IndexArrayType(this.data, 8, t2), this.coords = new this.ArrayType(this.data, 8 + o2 + a2, 2 * t2), this._pos = 0, this._finished = false, new Uint8Array(this.data, 0, 2).set([219, 16 + i2]), new Uint16Array(this.data, 2, 1)[0] = e2, new Uint32Array(this.data, 4, 1)[0] = t2);\n }\n add(t2, e2) {\n const r2 = this._pos >> 1;\n return this.ids[r2] = r2, this.coords[this._pos++] = t2, this.coords[this._pos++] = e2, r2;\n }\n finish() {\n const t2 = this._pos >> 1;\n if (t2 !== this.numItems) throw new Error(`Added ${t2} items when expected ${this.numItems}.`);\n return wd(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = true, this;\n }\n range(t2, e2, r2, n2) {\n if (!this._finished) throw new Error(\"Data not yet indexed - call index.finish().\");\n const { ids: i2, coords: s2, nodeSize: o2 } = this, a2 = [0, i2.length - 1, 0], l2 = [];\n for (; a2.length; ) {\n const u2 = a2.pop() || 0, c2 = a2.pop() || 0, h2 = a2.pop() || 0;\n if (c2 - h2 <= o2) {\n for (let o3 = h2; o3 <= c2; o3++) {\n const a3 = s2[2 * o3], u3 = s2[2 * o3 + 1];\n a3 >= t2 && a3 <= r2 && u3 >= e2 && u3 <= n2 && l2.push(i2[o3]);\n }\n continue;\n }\n const p2 = h2 + c2 >> 1, f2 = s2[2 * p2], d2 = s2[2 * p2 + 1];\n f2 >= t2 && f2 <= r2 && d2 >= e2 && d2 <= n2 && l2.push(i2[p2]), (0 === u2 ? t2 <= f2 : e2 <= d2) && (a2.push(h2), a2.push(p2 - 1), a2.push(1 - u2)), (0 === u2 ? r2 >= f2 : n2 >= d2) && (a2.push(p2 + 1), a2.push(c2), a2.push(1 - u2));\n }\n return l2;\n }\n within(t2, e2, r2) {\n if (!this._finished) throw new Error(\"Data not yet indexed - call index.finish().\");\n const { ids: n2, coords: i2, nodeSize: s2 } = this, o2 = [0, n2.length - 1, 0], a2 = [], l2 = r2 * r2;\n for (; o2.length; ) {\n const u2 = o2.pop() || 0, c2 = o2.pop() || 0, h2 = o2.pop() || 0;\n if (c2 - h2 <= s2) {\n for (let r3 = h2; r3 <= c2; r3++) kd(i2[2 * r3], i2[2 * r3 + 1], t2, e2) <= l2 && a2.push(n2[r3]);\n continue;\n }\n const p2 = h2 + c2 >> 1, f2 = i2[2 * p2], d2 = i2[2 * p2 + 1];\n kd(f2, d2, t2, e2) <= l2 && a2.push(n2[p2]), (0 === u2 ? t2 - r2 <= f2 : e2 - r2 <= d2) && (o2.push(h2), o2.push(p2 - 1), o2.push(1 - u2)), (0 === u2 ? t2 + r2 >= f2 : e2 + r2 >= d2) && (o2.push(p2 + 1), o2.push(c2), o2.push(1 - u2));\n }\n return a2;\n }\n }\n function wd(t2, e2, r2, n2, i2, s2) {\n if (i2 - n2 <= r2) return;\n const o2 = n2 + i2 >> 1;\n _d(t2, e2, o2, n2, i2, s2), wd(t2, e2, r2, n2, o2 - 1, 1 - s2), wd(t2, e2, r2, o2 + 1, i2, 1 - s2);\n }\n function _d(t2, e2, r2, n2, i2, s2) {\n for (; i2 > n2; ) {\n if (i2 - n2 > 600) {\n const o3 = i2 - n2 + 1, a3 = r2 - n2 + 1, l3 = Math.log(o3), u2 = 0.5 * Math.exp(2 * l3 / 3), c2 = 0.5 * Math.sqrt(l3 * u2 * (o3 - u2) / o3) * (a3 - o3 / 2 < 0 ? -1 : 1);\n _d(t2, e2, r2, Math.max(n2, Math.floor(r2 - a3 * u2 / o3 + c2)), Math.min(i2, Math.floor(r2 + (o3 - a3) * u2 / o3 + c2)), s2);\n }\n const o2 = e2[2 * r2 + s2];\n let a2 = n2, l2 = i2;\n for (Ad(t2, e2, n2, r2), e2[2 * i2 + s2] > o2 && Ad(t2, e2, n2, i2); a2 < l2; ) {\n for (Ad(t2, e2, a2, l2), a2++, l2--; e2[2 * a2 + s2] < o2; ) a2++;\n for (; e2[2 * l2 + s2] > o2; ) l2--;\n }\n e2[2 * n2 + s2] === o2 ? Ad(t2, e2, n2, l2) : (l2++, Ad(t2, e2, l2, i2)), l2 <= r2 && (n2 = l2 + 1), r2 <= l2 && (i2 = l2 - 1);\n }\n }\n function Ad(t2, e2, r2, n2) {\n Sd(t2, r2, n2), Sd(e2, 2 * r2, 2 * n2), Sd(e2, 2 * r2 + 1, 2 * n2 + 1);\n }\n function Sd(t2, e2, r2) {\n const n2 = t2[e2];\n t2[e2] = t2[r2], t2[r2] = n2;\n }\n function kd(t2, e2, r2, n2) {\n const i2 = t2 - r2, s2 = e2 - n2;\n return i2 * i2 + s2 * s2;\n }\n var Ed;\n t.cI = void 0, (Ed = t.cI || (t.cI = {})).create = \"create\", Ed.load = \"load\", Ed.fullLoad = \"fullLoad\";\n let Td = null, Id = [];\n const Md = 1e3 / 60, Fd = \"loadTime\", Dd = \"fullLoadTime\", Pd = { mark(t2) {\n performance.mark(t2);\n }, frame(t2) {\n const e2 = t2;\n null != Td && Id.push(e2 - Td), Td = e2;\n }, clearMetrics() {\n Td = null, Id = [], performance.clearMeasures(Fd), performance.clearMeasures(Dd);\n for (const e2 in t.cI) performance.clearMarks(t.cI[e2]);\n }, getPerformanceMetrics() {\n performance.measure(Fd, t.cI.create, t.cI.load), performance.measure(Dd, t.cI.create, t.cI.fullLoad);\n const e2 = performance.getEntriesByName(Fd)[0].duration, r2 = performance.getEntriesByName(Dd)[0].duration, n2 = Id.length, i2 = 1 / (Id.reduce(((t2, e3) => t2 + e3), 0) / n2 / 1e3), s2 = Id.filter(((t2) => t2 > Md)).reduce(((t2, e3) => t2 + (e3 - Md) / Md), 0);\n return { loadTime: e2, fullLoadTime: r2, fps: i2, percentDroppedFrames: s2 / (n2 + s2) * 100, totalFrames: n2 };\n } };\n t.$ = c, t.A = f, t.B = os, t.C = es, t.D = $s, t.E = xt, t.F = function([t2, e2, r2]) {\n return e2 += 90, e2 *= Math.PI / 180, r2 *= Math.PI / 180, { x: t2 * Math.cos(e2) * Math.sin(r2), y: t2 * Math.sin(e2) * Math.sin(r2), z: t2 * Math.cos(r2) };\n }, t.G = yr, t.H = Fs, t.I = Nc, t.J = ns, t.K = function(t2) {\n if (null == Y) {\n const e2 = t2.navigator ? t2.navigator.userAgent : null;\n Y = !!t2.safari || !(!e2 || !(/\\b(iPad|iPhone|iPod)\\b/.test(e2) || e2.match(\"Safari\") && !e2.match(\"Chrome\")));\n }\n return Y;\n }, t.L = class {\n constructor(t2, e2) {\n this.target = t2, this.mapId = e2, this.resolveRejects = {}, this.tasks = {}, this.taskQueue = [], this.abortControllers = {}, this.messageHandlers = {}, this.invoker = new bh((() => this.process())), this.subscription = Q(this.target, \"message\", ((t3) => this.receive(t3)), false), this.globalScope = X(self) ? t2 : window;\n }\n registerMessageHandler(t2, e2) {\n this.messageHandlers[t2] = e2;\n }\n unregisterMessageHandler(t2) {\n delete this.messageHandlers[t2];\n }\n sendAsync(t2, e2) {\n return new Promise(((r2, n2) => {\n const i2 = Math.round(1e18 * Math.random()).toString(36).substring(0, 10), s2 = e2 ? Q(e2.signal, \"abort\", (() => {\n null == s2 || s2.unsubscribe(), delete this.resolveRejects[i2];\n const e3 = { id: i2, type: \"<cancel>\", origin: location.origin, targetMapId: t2.targetMapId, sourceMapId: this.mapId };\n this.target.postMessage(e3);\n }), wh) : null;\n this.resolveRejects[i2] = { resolve: (t3) => {\n null == s2 || s2.unsubscribe(), r2(t3);\n }, reject: (t3) => {\n null == s2 || s2.unsubscribe(), n2(t3);\n } };\n const o2 = [], a2 = Object.assign(Object.assign({}, t2), { id: i2, sourceMapId: this.mapId, origin: location.origin, data: fs(t2.data, o2) });\n this.target.postMessage(a2, { transfer: o2 });\n }));\n }\n receive(t2) {\n const e2 = t2.data, r2 = e2.id;\n if (!(\"file://\" !== e2.origin && \"file://\" !== location.origin && \"resource://android\" !== e2.origin && \"resource://android\" !== location.origin && e2.origin !== location.origin || e2.targetMapId && this.mapId !== e2.targetMapId)) {\n if (\"<cancel>\" === e2.type) {\n delete this.tasks[r2];\n const t3 = this.abortControllers[r2];\n return delete this.abortControllers[r2], void (t3 && t3.abort());\n }\n if (X(self) || e2.mustQueue) return this.tasks[r2] = e2, this.taskQueue.push(r2), void this.invoker.trigger();\n this.processTask(r2, e2);\n }\n }\n process() {\n if (0 === this.taskQueue.length) return;\n const t2 = this.taskQueue.shift(), e2 = this.tasks[t2];\n delete this.tasks[t2], this.taskQueue.length > 0 && this.invoker.trigger(), e2 && this.processTask(t2, e2);\n }\n processTask(t2, r2) {\n return e(this, void 0, void 0, (function* () {\n if (\"<response>\" === r2.type) {\n const e3 = this.resolveRejects[t2];\n if (delete this.resolveRejects[t2], !e3) return;\n return void (r2.error ? e3.reject(ds(r2.error)) : e3.resolve(ds(r2.data)));\n }\n if (!this.messageHandlers[r2.type]) return void this.completeTask(t2, new Error(`Could not find a registered handler for ${r2.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(\", \")}`));\n const e2 = ds(r2.data), n2 = new AbortController();\n this.abortControllers[t2] = n2;\n try {\n const i2 = yield this.messageHandlers[r2.type](r2.sourceMapId, e2, n2);\n this.completeTask(t2, null, i2);\n } catch (e3) {\n this.completeTask(t2, e3);\n }\n }));\n }\n completeTask(t2, e2, r2) {\n const n2 = [];\n delete this.abortControllers[t2];\n const i2 = { id: t2, type: \"<response>\", sourceMapId: this.mapId, origin: location.origin, error: e2 ? fs(e2) : null, data: fs(r2, n2) };\n this.target.postMessage(i2, { transfer: n2 });\n }\n remove() {\n this.invoker.remove(), this.subscription.unsubscribe();\n }\n }, t.M = ut, t.N = function() {\n var t2 = new f(16);\n return f != Float32Array && (t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[4] = 0, t2[6] = 0, t2[7] = 0, t2[8] = 0, t2[9] = 0, t2[11] = 0, t2[12] = 0, t2[13] = 0, t2[14] = 0), t2[0] = 1, t2[5] = 1, t2[10] = 1, t2[15] = 1, t2;\n }, t.O = function(t2, e2, r2) {\n var n2, i2, s2, o2, a2, l2, u2, c2, h2, p2, f2, d2, y2 = r2[0], m2 = r2[1], g2 = r2[2];\n return e2 === t2 ? (t2[12] = e2[0] * y2 + e2[4] * m2 + e2[8] * g2 + e2[12], t2[13] = e2[1] * y2 + e2[5] * m2 + e2[9] * g2 + e2[13], t2[14] = e2[2] * y2 + e2[6] * m2 + e2[10] * g2 + e2[14], t2[15] = e2[3] * y2 + e2[7] * m2 + e2[11] * g2 + e2[15]) : (i2 = e2[1], s2 = e2[2], o2 = e2[3], a2 = e2[4], l2 = e2[5], u2 = e2[6], c2 = e2[7], h2 = e2[8], p2 = e2[9], f2 = e2[10], d2 = e2[11], t2[0] = n2 = e2[0], t2[1] = i2, t2[2] = s2, t2[3] = o2, t2[4] = a2, t2[5] = l2, t2[6] = u2, t2[7] = c2, t2[8] = h2, t2[9] = p2, t2[10] = f2, t2[11] = d2, t2[12] = n2 * y2 + a2 * m2 + h2 * g2 + e2[12], t2[13] = i2 * y2 + l2 * m2 + p2 * g2 + e2[13], t2[14] = s2 * y2 + u2 * m2 + f2 * g2 + e2[14], t2[15] = o2 * y2 + c2 * m2 + d2 * g2 + e2[15]), t2;\n }, t.P = r, t.Q = function(t2, e2, r2) {\n var n2 = r2[0], i2 = r2[1], s2 = r2[2];\n return t2[0] = e2[0] * n2, t2[1] = e2[1] * n2, t2[2] = e2[2] * n2, t2[3] = e2[3] * n2, t2[4] = e2[4] * i2, t2[5] = e2[5] * i2, t2[6] = e2[6] * i2, t2[7] = e2[7] * i2, t2[8] = e2[8] * s2, t2[9] = e2[9] * s2, t2[10] = e2[10] * s2, t2[11] = e2[11] * s2, t2[12] = e2[12], t2[13] = e2[13], t2[14] = e2[14], t2[15] = e2[15], t2;\n }, t.R = bl, t.S = function(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1], s2 = e2[2], o2 = e2[3], a2 = e2[4], l2 = e2[5], u2 = e2[6], c2 = e2[7], h2 = e2[8], p2 = e2[9], f2 = e2[10], d2 = e2[11], y2 = e2[12], m2 = e2[13], g2 = e2[14], x2 = e2[15], v2 = r2[0], b2 = r2[1], w2 = r2[2], _2 = r2[3];\n return t2[0] = v2 * n2 + b2 * a2 + w2 * h2 + _2 * y2, t2[1] = v2 * i2 + b2 * l2 + w2 * p2 + _2 * m2, t2[2] = v2 * s2 + b2 * u2 + w2 * f2 + _2 * g2, t2[3] = v2 * o2 + b2 * c2 + w2 * d2 + _2 * x2, t2[4] = (v2 = r2[4]) * n2 + (b2 = r2[5]) * a2 + (w2 = r2[6]) * h2 + (_2 = r2[7]) * y2, t2[5] = v2 * i2 + b2 * l2 + w2 * p2 + _2 * m2, t2[6] = v2 * s2 + b2 * u2 + w2 * f2 + _2 * g2, t2[7] = v2 * o2 + b2 * c2 + w2 * d2 + _2 * x2, t2[8] = (v2 = r2[8]) * n2 + (b2 = r2[9]) * a2 + (w2 = r2[10]) * h2 + (_2 = r2[11]) * y2, t2[9] = v2 * i2 + b2 * l2 + w2 * p2 + _2 * m2, t2[10] = v2 * s2 + b2 * u2 + w2 * f2 + _2 * g2, t2[11] = v2 * o2 + b2 * c2 + w2 * d2 + _2 * x2, t2[12] = (v2 = r2[12]) * n2 + (b2 = r2[13]) * a2 + (w2 = r2[14]) * h2 + (_2 = r2[15]) * y2, t2[13] = v2 * i2 + b2 * l2 + w2 * p2 + _2 * m2, t2[14] = v2 * s2 + b2 * u2 + w2 * f2 + _2 * g2, t2[15] = v2 * o2 + b2 * c2 + w2 * d2 + _2 * x2, t2;\n }, t.T = Ml, t.U = function(t2, e2) {\n const r2 = {};\n for (let n2 = 0; n2 < e2.length; n2++) {\n const i2 = e2[n2];\n i2 in t2 && (r2[i2] = t2[i2]);\n }\n return r2;\n }, t.V = Ah, t.W = L, t.X = Th, t.Y = Eh, t.Z = ot, t._ = e, t.a = st, t.a$ = Dh, t.a0 = h, t.a1 = K, t.a2 = Ch, t.a3 = Mh, t.a4 = Fh, t.a5 = M, t.a6 = function(t2, e2, r2) {\n if (!t2) return e2 || {};\n if (!e2) return t2 || {};\n const n2 = Nh(t2), i2 = Nh(e2);\n !(function(t3, e3) {\n e3.removeAll && (t3.add.clear(), t3.update.clear(), t3.remove.clear(), e3.remove.clear());\n for (const r3 of e3.remove) t3.add.delete(r3), t3.update.delete(r3);\n for (const [r3, n3] of e3.update) {\n const i3 = t3.update.get(r3);\n i3 && (e3.update.set(r3, Rh(i3, n3)), t3.update.delete(r3));\n }\n })(n2, i2);\n const s2 = {};\n if ((n2.removeAll || i2.removeAll) && (s2.removeAll = true), s2.remove = /* @__PURE__ */ new Set([...n2.remove, ...i2.remove]), s2.add = new Map([...n2.add, ...i2.add]), s2.update = new Map([...n2.update, ...i2.update]), s2.remove.size && s2.add.size) for (const t3 of s2.add.keys()) s2.remove.delete(t3);\n return (function(t3) {\n const e3 = {};\n return t3.removeAll && (e3.removeAll = t3.removeAll), t3.remove && (e3.remove = Array.from(t3.remove)), t3.add && (e3.add = Array.from(t3.add.values())), t3.update && (e3.update = Array.from(t3.update.values())), e3;\n })(s2);\n }, t.a7 = function(t2, e2) {\n if (null == t2) return true;\n if (null == t2.type) return true;\n if (\"Feature\" === t2.type) return null != Oh(t2, e2);\n if (\"FeatureCollection\" === t2.type) {\n const r2 = /* @__PURE__ */ new Set();\n for (const n2 of t2.features) {\n const t3 = Oh(n2, e2);\n if (null == t3) return false;\n if (r2.has(t3)) return false;\n r2.add(t3);\n }\n return true;\n }\n return false;\n }, t.a8 = function(t2, e2) {\n const r2 = /* @__PURE__ */ new Map();\n if (null == t2 || null == t2.type) ;\n else if (\"Feature\" === t2.type) r2.set(Oh(t2, e2), t2);\n else for (const n2 of t2.features) r2.set(Oh(n2, e2), n2);\n return r2;\n }, t.a9 = function(t2, e2, r2) {\n var n2, i2;\n if (e2.removeAll) t2.clear();\n else if (e2.remove) for (const r3 of e2.remove) t2.delete(r3);\n if (e2.add) for (const n3 of e2.add) {\n const e3 = Oh(n3, r2);\n null != e3 && t2.set(e3, n3);\n }\n if (e2.update) for (const r3 of e2.update) {\n let e3 = t2.get(r3.id);\n if (!e3) continue;\n const s2 = !!r3.newGeometry, o2 = r3.removeAllProperties || (null === (n2 = r3.removeProperties) || void 0 === n2 ? void 0 : n2.length) > 0 || (null === (i2 = r3.addOrUpdateProperties) || void 0 === i2 ? void 0 : i2.length) > 0;\n if ((s2 || o2) && (e3 = Object.assign({}, e3), t2.set(r3.id, e3), s2 && (e3.geometry = r3.newGeometry), o2)) {\n if (e3.properties = r3.removeAllProperties ? {} : Object.assign({}, e3.properties || {}), r3.removeProperties) for (const t3 of r3.removeProperties) delete e3.properties[t3];\n if (r3.addOrUpdateProperties) for (const { key: t3, value: n3 } of r3.addOrUpdateProperties) e3.properties[t3] = n3;\n }\n }\n }, t.aB = function(t2, { uSize: e2, uSizeT: r2 }, { lowerSize: n2, upperSize: i2 }) {\n return \"source\" === t2.kind ? n2 / th : \"composite\" === t2.kind ? yr.number(n2 / th, i2 / th, r2) : e2;\n }, t.aC = function(t2, e2) {\n var r2 = e2[0], n2 = e2[1], i2 = e2[2], s2 = e2[3], o2 = e2[4], a2 = e2[5], l2 = e2[6], u2 = e2[7], c2 = e2[8], h2 = e2[9], p2 = e2[10], f2 = e2[11], d2 = e2[12], y2 = e2[13], m2 = e2[14], g2 = e2[15], x2 = r2 * a2 - n2 * o2, v2 = r2 * l2 - i2 * o2, b2 = r2 * u2 - s2 * o2, w2 = n2 * l2 - i2 * a2, _2 = n2 * u2 - s2 * a2, A2 = i2 * u2 - s2 * l2, S2 = c2 * y2 - h2 * d2, k2 = c2 * m2 - p2 * d2, E2 = c2 * g2 - f2 * d2, T2 = h2 * m2 - p2 * y2, I2 = h2 * g2 - f2 * y2, M2 = p2 * g2 - f2 * m2, F2 = x2 * M2 - v2 * I2 + b2 * T2 + w2 * E2 - _2 * k2 + A2 * S2;\n return F2 ? (t2[0] = (a2 * M2 - l2 * I2 + u2 * T2) * (F2 = 1 / F2), t2[1] = (i2 * I2 - n2 * M2 - s2 * T2) * F2, t2[2] = (y2 * A2 - m2 * _2 + g2 * w2) * F2, t2[3] = (p2 * _2 - h2 * A2 - f2 * w2) * F2, t2[4] = (l2 * E2 - o2 * M2 - u2 * k2) * F2, t2[5] = (r2 * M2 - i2 * E2 + s2 * k2) * F2, t2[6] = (m2 * b2 - d2 * A2 - g2 * v2) * F2, t2[7] = (c2 * A2 - p2 * b2 + f2 * v2) * F2, t2[8] = (o2 * I2 - a2 * E2 + u2 * S2) * F2, t2[9] = (n2 * E2 - r2 * I2 - s2 * S2) * F2, t2[10] = (d2 * _2 - y2 * b2 + g2 * x2) * F2, t2[11] = (h2 * b2 - c2 * _2 - f2 * x2) * F2, t2[12] = (a2 * k2 - o2 * T2 - l2 * S2) * F2, t2[13] = (r2 * T2 - n2 * k2 + i2 * S2) * F2, t2[14] = (y2 * v2 - d2 * w2 - m2 * x2) * F2, t2[15] = (c2 * w2 - h2 * v2 + p2 * x2) * F2, t2) : null;\n }, t.aD = T, t.aE = function(t2) {\n var e2 = t2[0], r2 = t2[1];\n return Math.sqrt(e2 * e2 + r2 * r2);\n }, t.aF = function(t2) {\n return t2[0] = 0, t2[1] = 0, t2;\n }, t.aG = function(t2, e2, r2) {\n return t2[0] = e2[0] * r2, t2[1] = e2[1] * r2, t2;\n }, t.aH = oh, t.aI = S, t.aJ = function(t2, e2, n2, i2) {\n const s2 = e2.y - t2.y, o2 = e2.x - t2.x, a2 = i2.y - n2.y, l2 = i2.x - n2.x, u2 = a2 * o2 - l2 * s2;\n if (0 === u2) return null;\n const c2 = (l2 * (t2.y - n2.y) - a2 * (t2.x - n2.x)) / u2;\n return new r(t2.x + c2 * o2, t2.y + c2 * s2);\n }, t.aK = Nf, t.aL = Ua, t.aM = function(t2) {\n let e2 = 1 / 0, r2 = 1 / 0, n2 = -1 / 0, i2 = -1 / 0;\n for (const s2 of t2) e2 = Math.min(e2, s2.x), r2 = Math.min(r2, s2.y), n2 = Math.max(n2, s2.x), i2 = Math.max(i2, s2.y);\n return [e2, r2, n2, i2];\n }, t.aN = hc, t.aO = F, t.aP = function(t2, e2, r2, n2, i2 = false) {\n if (!r2[0] && !r2[1]) return [0, 0];\n const s2 = i2 ? \"map\" === n2 ? -t2.bearingInRadians : 0 : \"viewport\" === n2 ? t2.bearingInRadians : 0;\n if (s2) {\n const t3 = Math.sin(s2), e3 = Math.cos(s2);\n r2 = [r2[0] * e3 - r2[1] * t3, r2[0] * t3 + r2[1] * e3];\n }\n return [i2 ? r2[0] : F(e2, r2[0], t2.zoom), i2 ? r2[1] : F(e2, r2[1], t2.zoom)];\n }, t.aR = nh, t.aS = dd, t.aT = jc, t.aU = bd, t.aV = to, t.aW = uu, t.aX = Ro, t.aY = ra, t.aZ = Jo, t.a_ = et, t.aa = Mf, t.ab = Ph, t.ac = Tf, t.ad = 25, t.ae = Bh, t.af = (t2) => {\n const e2 = window.document.createElement(\"video\");\n return e2.muted = true, new Promise(((r2) => {\n e2.onloadstart = () => {\n r2(e2);\n };\n for (const r3 of t2) {\n const t3 = window.document.createElement(\"source\");\n ft(r3) || (e2.crossOrigin = \"Anonymous\"), t3.src = r3, e2.appendChild(t3);\n }\n }));\n }, t.ag = Dt, t.ah = function() {\n return R++;\n }, t.ai = Io, t.aj = ch, t.ak = fi, t.al = Oa, t.am = Uh, t.an = function(t2) {\n const e2 = {};\n if (t2.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g, ((t3, r2, n2, i2) => {\n const s2 = n2 || i2;\n return e2[r2] = !s2 || s2.toLowerCase(), \"\";\n })), e2[\"max-age\"]) {\n const t3 = parseInt(e2[\"max-age\"], 10);\n isNaN(t3) ? delete e2[\"max-age\"] : e2[\"max-age\"] = t3;\n }\n return e2;\n }, t.ao = C, t.ap = 85.051129, t.aq = tt, t.ar = function(t2) {\n return Math.pow(2, t2);\n }, t.as = y, t.at = Ih, t.au = function(t2) {\n return Math.log(t2) / Math.LN2;\n }, t.av = function(t2) {\n var e2 = t2[0], r2 = t2[1];\n return e2 * e2 + r2 * r2;\n }, t.aw = function(t2) {\n if (!t2.length) return /* @__PURE__ */ new Set();\n const e2 = Math.max(...t2.map(((t3) => t3.canonical.z)));\n let r2 = 1 / 0, n2 = -1 / 0, i2 = 1 / 0, s2 = -1 / 0;\n const o2 = [];\n for (const a3 of t2) {\n const { x: t3, y: l2, z: u2 } = a3.canonical, c2 = Math.pow(2, e2 - u2), h2 = t3 * c2, p2 = l2 * c2;\n o2.push({ id: a3, x: h2, y: p2 }), h2 < r2 && (r2 = h2), h2 > n2 && (n2 = h2), p2 < i2 && (i2 = p2), p2 > s2 && (s2 = p2);\n }\n const a2 = /* @__PURE__ */ new Set();\n for (const t3 of o2) t3.x !== r2 && t3.x !== n2 && t3.y !== i2 && t3.y !== s2 || a2.add(t3.id);\n return a2;\n }, t.ax = function(t2, e2) {\n const r2 = Math.abs(2 * t2.wrap) - +(t2.wrap < 0), n2 = Math.abs(2 * e2.wrap) - +(e2.wrap < 0);\n return t2.overscaledZ - e2.overscaledZ || n2 - r2 || e2.canonical.y - t2.canonical.y || e2.canonical.x - t2.canonical.x;\n }, t.ay = class {\n constructor(t2, e2) {\n this.max = t2, this.onRemove = e2, this.reset();\n }\n reset() {\n for (const t2 in this.data) for (const e2 of this.data[t2]) e2.timeout && clearTimeout(e2.timeout), this.onRemove(e2.value);\n return this.data = {}, this.order = [], this;\n }\n add(t2, e2, r2) {\n const n2 = t2.wrapped().key;\n void 0 === this.data[n2] && (this.data[n2] = []);\n const i2 = { value: e2, timeout: void 0 };\n if (void 0 !== r2 && (i2.timeout = setTimeout((() => {\n this.remove(t2, i2);\n }), r2)), this.data[n2].push(i2), this.order.push(n2), this.order.length > this.max) {\n const t3 = this._getAndRemoveByKey(this.order[0]);\n t3 && this.onRemove(t3);\n }\n return this;\n }\n has(t2) {\n return t2.wrapped().key in this.data;\n }\n getAndRemove(t2) {\n return this.has(t2) ? this._getAndRemoveByKey(t2.wrapped().key) : null;\n }\n _getAndRemoveByKey(t2) {\n const e2 = this.data[t2].shift();\n return e2.timeout && clearTimeout(e2.timeout), 0 === this.data[t2].length && delete this.data[t2], this.order.splice(this.order.indexOf(t2), 1), e2.value;\n }\n getByKey(t2) {\n const e2 = this.data[t2];\n return e2 ? e2[0].value : null;\n }\n get(t2) {\n return this.has(t2) ? this.data[t2.wrapped().key][0].value : null;\n }\n remove(t2, e2) {\n if (!this.has(t2)) return this;\n const r2 = t2.wrapped().key, n2 = void 0 === e2 ? 0 : this.data[r2].indexOf(e2), i2 = this.data[r2][n2];\n return this.data[r2].splice(n2, 1), i2.timeout && clearTimeout(i2.timeout), 0 === this.data[r2].length && delete this.data[r2], this.onRemove(i2.value), this.order.splice(this.order.indexOf(r2), 1), this;\n }\n setMaxSize(t2) {\n for (this.max = t2; this.order.length > this.max; ) {\n const t3 = this._getAndRemoveByKey(this.order[0]);\n t3 && this.onRemove(t3);\n }\n return this;\n }\n filter(t2) {\n const e2 = [];\n for (const r2 in this.data) for (const n2 of this.data[r2]) t2(n2.value) || e2.push(n2);\n for (const t3 of e2) this.remove(t3.value.tileID, t3);\n }\n }, t.az = function(t2, e2) {\n let r2 = 0, n2 = 0;\n if (\"constant\" === t2.kind) n2 = t2.layoutSize;\n else if (\"source\" !== t2.kind) {\n const { interpolationType: i2, minZoom: s2, maxZoom: o2 } = t2, a2 = i2 ? C(fr.interpolationFactor(i2, e2, s2, o2), 0, 1) : 0;\n \"camera\" === t2.kind ? n2 = yr.number(t2.minSize, t2.maxSize, a2) : r2 = a2;\n }\n return { uSizeT: r2, uSize: n2 };\n }, t.b = Z, t.b$ = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = 0;\n }\n set(t2) {\n this.current !== t2 && (this.current = t2, this.gl.uniform1i(this.location, t2));\n }\n }, t.b0 = b, t.b1 = v, t.b2 = function(t2) {\n var e2 = new f(3);\n return e2[0] = t2[0], e2[1] = t2[1], e2[2] = t2[2], e2;\n }, t.b3 = function(t2, e2, r2) {\n return t2[0] = e2[0] - r2[0], t2[1] = e2[1] - r2[1], t2[2] = e2[2] - r2[2], t2;\n }, t.b4 = function(t2, e2) {\n var r2 = e2[0], n2 = e2[1], i2 = e2[2], s2 = r2 * r2 + n2 * n2 + i2 * i2;\n return s2 > 0 && (s2 = 1 / Math.sqrt(s2)), t2[0] = e2[0] * s2, t2[1] = e2[1] * s2, t2[2] = e2[2] * s2, t2;\n }, t.b5 = w, t.b6 = function(t2, e2) {\n return t2[0] * e2[0] + t2[1] * e2[1] + t2[2] * e2[2];\n }, t.b7 = function(t2, e2, r2) {\n return t2[0] = e2[0] * r2[0], t2[1] = e2[1] * r2[1], t2[2] = e2[2] * r2[2], t2[3] = e2[3] * r2[3], t2;\n }, t.b8 = g, t.b9 = function(t2, e2, r2) {\n const n2 = e2[0] * r2[0] + e2[1] * r2[1] + e2[2] * r2[2];\n return 0 === n2 ? null : (-(t2[0] * r2[0] + t2[1] * r2[1] + t2[2] * r2[2]) - r2[3]) / n2;\n }, t.bA = function() {\n return new Float64Array(3);\n }, t.bB = function(t2, e2, r2, n2) {\n return t2[0] = e2[0] + r2[0] * n2, t2[1] = e2[1] + r2[1] * n2, t2[2] = e2[2] + r2[2] * n2, t2;\n }, t.bC = E, t.bD = function(t2, e2, r2) {\n var n2 = r2[0], i2 = r2[1], s2 = r2[2], o2 = r2[3], a2 = e2[0], l2 = e2[1], u2 = e2[2], c2 = i2 * u2 - s2 * l2, h2 = s2 * a2 - n2 * u2, p2 = n2 * l2 - i2 * a2;\n return t2[0] = a2 + o2 * (c2 += c2) + i2 * (p2 += p2) - s2 * (h2 += h2), t2[1] = l2 + o2 * h2 + s2 * c2 - n2 * p2, t2[2] = u2 + o2 * p2 + n2 * h2 - i2 * c2, t2;\n }, t.bE = function(t2, e2, r2) {\n const n2 = (function(t3) {\n var e3 = t3[3], r3 = t3[4], n3 = t3[5], i3 = t3[6], s3 = t3[7], o3 = t3[8];\n return t3[0] * (o3 * r3 - n3 * s3) + t3[1] * (-o3 * e3 + n3 * i3) + t3[2] * (s3 * e3 - r3 * i3);\n })([t2[0], t2[1], t2[2], e2[0], e2[1], e2[2], r2[0], r2[1], r2[2]]);\n if (0 === n2) return null;\n const i2 = w([], [e2[0], e2[1], e2[2]], [r2[0], r2[1], r2[2]]), s2 = w([], [r2[0], r2[1], r2[2]], [t2[0], t2[1], t2[2]]), o2 = w([], [t2[0], t2[1], t2[2]], [e2[0], e2[1], e2[2]]), a2 = b([], i2, -t2[3]);\n return v(a2, a2, b([], s2, -e2[3])), v(a2, a2, b([], o2, -r2[3])), b(a2, a2, 1 / n2), a2;\n }, t.bF = _h, t.bG = function() {\n return new Float64Array(4);\n }, t.bH = function(t2, e2, r2, n2) {\n var i2 = [], s2 = [];\n return i2[0] = e2[0] - r2[0], i2[1] = e2[1] - r2[1], i2[2] = e2[2] - r2[2], s2[0] = i2[0] * Math.cos(n2) - i2[1] * Math.sin(n2), s2[1] = i2[0] * Math.sin(n2) + i2[1] * Math.cos(n2), s2[2] = i2[2], t2[0] = s2[0] + r2[0], t2[1] = s2[1] + r2[1], t2[2] = s2[2] + r2[2], t2;\n }, t.bI = function(t2, e2, r2, n2) {\n var i2 = [], s2 = [];\n return i2[0] = e2[0] - r2[0], i2[1] = e2[1] - r2[1], i2[2] = e2[2] - r2[2], s2[0] = i2[0], s2[1] = i2[1] * Math.cos(n2) - i2[2] * Math.sin(n2), s2[2] = i2[1] * Math.sin(n2) + i2[2] * Math.cos(n2), t2[0] = s2[0] + r2[0], t2[1] = s2[1] + r2[1], t2[2] = s2[2] + r2[2], t2;\n }, t.bJ = function(t2, e2, r2, n2) {\n var i2 = [], s2 = [];\n return i2[0] = e2[0] - r2[0], i2[1] = e2[1] - r2[1], i2[2] = e2[2] - r2[2], s2[0] = i2[2] * Math.sin(n2) + i2[0] * Math.cos(n2), s2[1] = i2[1], s2[2] = i2[2] * Math.cos(n2) - i2[0] * Math.sin(n2), t2[0] = s2[0] + r2[0], t2[1] = s2[1] + r2[1], t2[2] = s2[2] + r2[2], t2;\n }, t.bK = function(t2, e2, r2) {\n var n2 = Math.sin(r2), i2 = Math.cos(r2), s2 = e2[0], o2 = e2[1], a2 = e2[2], l2 = e2[3], u2 = e2[8], c2 = e2[9], h2 = e2[10], p2 = e2[11];\n return e2 !== t2 && (t2[4] = e2[4], t2[5] = e2[5], t2[6] = e2[6], t2[7] = e2[7], t2[12] = e2[12], t2[13] = e2[13], t2[14] = e2[14], t2[15] = e2[15]), t2[0] = s2 * i2 - u2 * n2, t2[1] = o2 * i2 - c2 * n2, t2[2] = a2 * i2 - h2 * n2, t2[3] = l2 * i2 - p2 * n2, t2[8] = s2 * n2 + u2 * i2, t2[9] = o2 * n2 + c2 * i2, t2[10] = a2 * n2 + h2 * i2, t2[11] = l2 * n2 + p2 * i2, t2;\n }, t.bL = function(t2, e2) {\n const r2 = D(t2, 360), n2 = D(e2, 360), i2 = n2 - r2, s2 = n2 > r2 ? i2 - 360 : i2 + 360;\n return Math.abs(i2) < Math.abs(s2) ? i2 : s2;\n }, t.bM = function(t2) {\n return t2[0] = 0, t2[1] = 0, t2[2] = 0, t2;\n }, t.bN = function(t2, e2, r2, n2) {\n const i2 = Math.sqrt(t2 * t2 + e2 * e2), s2 = Math.sqrt(r2 * r2 + n2 * n2);\n t2 /= i2, e2 /= i2, r2 /= s2, n2 /= s2;\n const o2 = Math.acos(t2 * r2 + e2 * n2);\n return -e2 * r2 + t2 * n2 > 0 ? o2 : -o2;\n }, t.bO = function(t2, e2) {\n const r2 = D(t2, 2 * Math.PI), n2 = D(e2, 2 * Math.PI);\n return Math.min(Math.abs(r2 - n2), Math.abs(r2 - n2 + 2 * Math.PI), Math.abs(r2 - n2 - 2 * Math.PI));\n }, t.bP = function() {\n const t2 = {}, e2 = vt.$version;\n for (const r2 in vt.$root) {\n const n2 = vt.$root[r2];\n if (n2.required) {\n let i2 = null;\n i2 = \"version\" === r2 ? e2 : \"array\" === n2.type ? [] : {}, null != i2 && (t2[r2] = i2);\n }\n }\n return t2;\n }, t.bQ = ht, t.bR = ys, t.bS = function t2(e2, r2) {\n if (Array.isArray(e2)) {\n if (!Array.isArray(r2) || e2.length !== r2.length) return false;\n for (let n2 = 0; n2 < e2.length; n2++) if (!t2(e2[n2], r2[n2])) return false;\n return true;\n }\n if (\"object\" == typeof e2 && null !== e2 && null !== r2) {\n if (\"object\" != typeof r2) return false;\n if (Object.keys(e2).length !== Object.keys(r2).length) return false;\n for (const n2 in e2) if (!t2(e2[n2], r2[n2])) return false;\n return true;\n }\n return e2 === r2;\n }, t.bT = function(t2) {\n t2 = t2.slice();\n const e2 = /* @__PURE__ */ Object.create(null);\n for (let r2 = 0; r2 < t2.length; r2++) e2[t2[r2].id] = t2[r2];\n for (let r2 = 0; r2 < t2.length; r2++) \"ref\" in t2[r2] && (t2[r2] = wt(t2[r2], e2[t2[r2].ref]));\n return t2;\n }, t.bU = function(t2, e2) {\n if (\"custom\" === t2.type) return new vh(t2, e2);\n switch (t2.type) {\n case \"background\":\n return new xh(t2, e2);\n case \"circle\":\n return new pl(t2, e2);\n case \"color-relief\":\n return new Pl(t2, e2);\n case \"fill\":\n return new _u(t2, e2);\n case \"fill-extrusion\":\n return new Uu(t2, e2);\n case \"heatmap\":\n return new Al(t2, e2);\n case \"hillshade\":\n return new El(t2, e2);\n case \"line\":\n return new nc(t2, e2);\n case \"raster\":\n return new Ks(t2, e2);\n case \"symbol\":\n return new yh(t2, e2);\n }\n }, t.bV = (t2) => \"raster\" === t2.type, t.bW = U, t.bX = function(t2, e2) {\n if (!t2) return [{ command: \"setStyle\", args: [e2] }];\n let r2 = [];\n try {\n if (!_t(t2.version, e2.version)) return [{ command: \"setStyle\", args: [e2] }];\n _t(t2.center, e2.center) || r2.push({ command: \"setCenter\", args: [e2.center] }), _t(t2.state, e2.state) || r2.push({ command: \"setGlobalState\", args: [e2.state] }), _t(t2.centerAltitude, e2.centerAltitude) || r2.push({ command: \"setCenterAltitude\", args: [e2.centerAltitude] }), _t(t2.zoom, e2.zoom) || r2.push({ command: \"setZoom\", args: [e2.zoom] }), _t(t2.bearing, e2.bearing) || r2.push({ command: \"setBearing\", args: [e2.bearing] }), _t(t2.pitch, e2.pitch) || r2.push({ command: \"setPitch\", args: [e2.pitch] }), _t(t2.roll, e2.roll) || r2.push({ command: \"setRoll\", args: [e2.roll] }), _t(t2.sprite, e2.sprite) || r2.push({ command: \"setSprite\", args: [e2.sprite] }), _t(t2.glyphs, e2.glyphs) || r2.push({ command: \"setGlyphs\", args: [e2.glyphs] }), _t(t2.transition, e2.transition) || r2.push({ command: \"setTransition\", args: [e2.transition] }), _t(t2.light, e2.light) || r2.push({ command: \"setLight\", args: [e2.light] }), _t(t2.terrain, e2.terrain) || r2.push({ command: \"setTerrain\", args: [e2.terrain] }), _t(t2.sky, e2.sky) || r2.push({ command: \"setSky\", args: [e2.sky] }), _t(t2.projection, e2.projection) || r2.push({ command: \"setProjection\", args: [e2.projection] });\n const n2 = {}, i2 = [];\n !(function(t3, e3, r3, n3) {\n let i3;\n for (i3 in e3 = e3 || {}, t3 = t3 || {}) Object.prototype.hasOwnProperty.call(t3, i3) && (Object.prototype.hasOwnProperty.call(e3, i3) || kt(i3, r3, n3));\n for (i3 in e3) Object.prototype.hasOwnProperty.call(e3, i3) && (Object.prototype.hasOwnProperty.call(t3, i3) ? _t(t3[i3], e3[i3]) || (\"geojson\" === t3[i3].type && \"geojson\" === e3[i3].type && Tt(t3, e3, i3) ? At(r3, { command: \"setGeoJSONSourceData\", args: [i3, e3[i3].data] }) : Et(i3, e3, r3, n3)) : St(i3, e3, r3));\n })(t2.sources, e2.sources, i2, n2);\n const s2 = [];\n t2.layers && t2.layers.forEach(((t3) => {\n \"source\" in t3 && n2[t3.source] ? r2.push({ command: \"removeLayer\", args: [t3.id] }) : s2.push(t3);\n })), r2 = r2.concat(i2), (function(t3, e3, r3) {\n e3 = e3 || [];\n const n3 = (t3 = t3 || []).map(Mt), i3 = e3.map(Mt), s3 = t3.reduce(Ft, {}), o2 = e3.reduce(Ft, {}), a2 = n3.slice(), l2 = /* @__PURE__ */ Object.create(null);\n let u2, c2, h2, p2, f2;\n for (let t4 = 0, e4 = 0; t4 < n3.length; t4++) u2 = n3[t4], Object.prototype.hasOwnProperty.call(o2, u2) ? e4++ : (At(r3, { command: \"removeLayer\", args: [u2] }), a2.splice(a2.indexOf(u2, e4), 1));\n for (let t4 = 0, e4 = 0; t4 < i3.length; t4++) u2 = i3[i3.length - 1 - t4], a2[a2.length - 1 - t4] !== u2 && (Object.prototype.hasOwnProperty.call(s3, u2) ? (At(r3, { command: \"removeLayer\", args: [u2] }), a2.splice(a2.lastIndexOf(u2, a2.length - e4), 1)) : e4++, p2 = a2[a2.length - t4], At(r3, { command: \"addLayer\", args: [o2[u2], p2] }), a2.splice(a2.length - t4, 0, u2), l2[u2] = true);\n for (let t4 = 0; t4 < i3.length; t4++) if (u2 = i3[t4], c2 = s3[u2], h2 = o2[u2], !l2[u2] && !_t(c2, h2)) if (_t(c2.source, h2.source) && _t(c2[\"source-layer\"], h2[\"source-layer\"]) && _t(c2.type, h2.type)) {\n for (f2 in It(c2.layout, h2.layout, r3, u2, null, \"setLayoutProperty\"), It(c2.paint, h2.paint, r3, u2, null, \"setPaintProperty\"), _t(c2.filter, h2.filter) || At(r3, { command: \"setFilter\", args: [u2, h2.filter] }), _t(c2.minzoom, h2.minzoom) && _t(c2.maxzoom, h2.maxzoom) || At(r3, { command: \"setLayerZoomRange\", args: [u2, h2.minzoom, h2.maxzoom] }), c2) Object.prototype.hasOwnProperty.call(c2, f2) && \"layout\" !== f2 && \"paint\" !== f2 && \"filter\" !== f2 && \"metadata\" !== f2 && \"minzoom\" !== f2 && \"maxzoom\" !== f2 && (0 === f2.indexOf(\"paint.\") ? It(c2[f2], h2[f2], r3, u2, f2.slice(6), \"setPaintProperty\") : _t(c2[f2], h2[f2]) || At(r3, { command: \"setLayerProperty\", args: [u2, f2, h2[f2]] }));\n for (f2 in h2) Object.prototype.hasOwnProperty.call(h2, f2) && !Object.prototype.hasOwnProperty.call(c2, f2) && \"layout\" !== f2 && \"paint\" !== f2 && \"filter\" !== f2 && \"metadata\" !== f2 && \"minzoom\" !== f2 && \"maxzoom\" !== f2 && (0 === f2.indexOf(\"paint.\") ? It(c2[f2], h2[f2], r3, u2, f2.slice(6), \"setPaintProperty\") : _t(c2[f2], h2[f2]) || At(r3, { command: \"setLayerProperty\", args: [u2, f2, h2[f2]] }));\n } else At(r3, { command: \"removeLayer\", args: [u2] }), p2 = a2[a2.lastIndexOf(u2) + 1], At(r3, { command: \"addLayer\", args: [h2, p2] });\n })(s2, e2.layers, r2);\n } catch (t3) {\n console.warn(\"Unable to compute style diff:\", t3), r2 = [{ command: \"setStyle\", args: [e2] }];\n }\n return r2;\n }, t.bY = function(t2) {\n const e2 = [], r2 = t2.id;\n return void 0 === r2 && e2.push({ message: `layers.${r2}: missing required property \"id\"` }), void 0 === t2.render && e2.push({ message: `layers.${r2}: missing required method \"render\"` }), t2.renderingMode && \"2d\" !== t2.renderingMode && \"3d\" !== t2.renderingMode && e2.push({ message: `layers.${r2}: property \"renderingMode\" must be either \"2d\" or \"3d\"` }), e2;\n }, t.bZ = N, t.b_ = $, t.ba = A, t.bb = function(t2, e2, r2) {\n return t2[0] = e2[0] * r2, t2[1] = e2[1] * r2, t2[2] = e2[2] * r2, t2[3] = e2[3] * r2, t2;\n }, t.bc = function(t2, e2) {\n return t2[0] * e2[0] + t2[1] * e2[1] + t2[2] * e2[2] + t2[3];\n }, t.bd = Vh, t.be = Lh, t.bf = function(t2, e2, r2, n2, i2) {\n var s2 = 1 / Math.tan(e2 / 2);\n if (t2[0] = s2 / r2, t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[4] = 0, t2[5] = s2, t2[6] = 0, t2[7] = 0, t2[8] = 0, t2[9] = 0, t2[11] = -1, t2[12] = 0, t2[13] = 0, t2[15] = 0, null != i2 && i2 !== 1 / 0) {\n var o2 = 1 / (n2 - i2);\n t2[10] = (i2 + n2) * o2, t2[14] = 2 * i2 * n2 * o2;\n } else t2[10] = -1, t2[14] = -2 * n2;\n return t2;\n }, t.bg = function(t2) {\n var e2 = new f(16);\n return e2[0] = t2[0], e2[1] = t2[1], e2[2] = t2[2], e2[3] = t2[3], e2[4] = t2[4], e2[5] = t2[5], e2[6] = t2[6], e2[7] = t2[7], e2[8] = t2[8], e2[9] = t2[9], e2[10] = t2[10], e2[11] = t2[11], e2[12] = t2[12], e2[13] = t2[13], e2[14] = t2[14], e2[15] = t2[15], e2;\n }, t.bh = function(t2, e2, r2) {\n var n2 = Math.sin(r2), i2 = Math.cos(r2), s2 = e2[0], o2 = e2[1], a2 = e2[2], l2 = e2[3], u2 = e2[4], c2 = e2[5], h2 = e2[6], p2 = e2[7];\n return e2 !== t2 && (t2[8] = e2[8], t2[9] = e2[9], t2[10] = e2[10], t2[11] = e2[11], t2[12] = e2[12], t2[13] = e2[13], t2[14] = e2[14], t2[15] = e2[15]), t2[0] = s2 * i2 + u2 * n2, t2[1] = o2 * i2 + c2 * n2, t2[2] = a2 * i2 + h2 * n2, t2[3] = l2 * i2 + p2 * n2, t2[4] = u2 * i2 - s2 * n2, t2[5] = c2 * i2 - o2 * n2, t2[6] = h2 * i2 - a2 * n2, t2[7] = p2 * i2 - l2 * n2, t2;\n }, t.bi = function(t2, e2, r2) {\n var n2 = Math.sin(r2), i2 = Math.cos(r2), s2 = e2[4], o2 = e2[5], a2 = e2[6], l2 = e2[7], u2 = e2[8], c2 = e2[9], h2 = e2[10], p2 = e2[11];\n return e2 !== t2 && (t2[0] = e2[0], t2[1] = e2[1], t2[2] = e2[2], t2[3] = e2[3], t2[12] = e2[12], t2[13] = e2[13], t2[14] = e2[14], t2[15] = e2[15]), t2[4] = s2 * i2 + u2 * n2, t2[5] = o2 * i2 + c2 * n2, t2[6] = a2 * i2 + h2 * n2, t2[7] = l2 * i2 + p2 * n2, t2[8] = u2 * i2 - s2 * n2, t2[9] = c2 * i2 - o2 * n2, t2[10] = h2 * i2 - a2 * n2, t2[11] = p2 * i2 - l2 * n2, t2;\n }, t.bj = function() {\n const t2 = new Float32Array(16);\n return y(t2), t2;\n }, t.bk = function() {\n const t2 = new Float64Array(16);\n return y(t2), t2;\n }, t.bl = function() {\n return new Float64Array(16);\n }, t.bm = function(t2, e2, r2) {\n const n2 = new Float64Array(4);\n return E(n2, t2, e2 - 90, r2), n2;\n }, t.bn = function(t2, e2, r2, n2) {\n var i2, s2, o2, a2, l2, u2 = e2[0], c2 = e2[1], h2 = e2[2], f2 = e2[3], d2 = r2[0], y2 = r2[1], m2 = r2[2], g2 = r2[3];\n return (s2 = u2 * d2 + c2 * y2 + h2 * m2 + f2 * g2) < 0 && (s2 = -s2, d2 = -d2, y2 = -y2, m2 = -m2, g2 = -g2), 1 - s2 > p ? (i2 = Math.acos(s2), o2 = Math.sin(i2), a2 = Math.sin((1 - n2) * i2) / o2, l2 = Math.sin(n2 * i2) / o2) : (a2 = 1 - n2, l2 = n2), t2[0] = a2 * u2 + l2 * d2, t2[1] = a2 * c2 + l2 * y2, t2[2] = a2 * h2 + l2 * m2, t2[3] = a2 * f2 + l2 * g2, t2;\n }, t.bo = function(t2) {\n const e2 = new Float64Array(9);\n !(function(t3, e3) {\n var r3 = e3[0], n3 = e3[1], i3 = e3[2], s2 = e3[3], o2 = r3 + r3, a2 = n3 + n3, l2 = i3 + i3, u2 = r3 * o2, c2 = n3 * o2, h2 = n3 * a2, p2 = i3 * o2, f2 = i3 * a2, d2 = i3 * l2, y2 = s2 * o2, m2 = s2 * a2, g2 = s2 * l2;\n t3[0] = 1 - h2 - d2, t3[3] = c2 - g2, t3[6] = p2 + m2, t3[1] = c2 + g2, t3[4] = 1 - u2 - d2, t3[7] = f2 - y2, t3[2] = p2 - m2, t3[5] = f2 + y2, t3[8] = 1 - u2 - h2;\n })(e2, t2);\n const r2 = et(-Math.asin(C(e2[2], -1, 1)));\n let n2, i2;\n return Math.hypot(e2[5], e2[8]) < 1e-3 ? (n2 = 0, i2 = -et(Math.atan2(e2[3], e2[4]))) : (n2 = et(0 === e2[5] && 0 === e2[8] ? 0 : Math.atan2(e2[5], e2[8])), i2 = et(0 === e2[1] && 0 === e2[0] ? 0 : Math.atan2(e2[1], e2[0]))), { roll: n2, pitch: r2 + 90, bearing: i2 };\n }, t.bp = function(t2, e2) {\n return t2.roll == e2.roll && t2.pitch == e2.pitch && t2.bearing == e2.bearing;\n }, t.bq = Te, t.br = va, t.bs = cu, t.bt = hu, t.bu = lu, t.bv = P, t.bw = z, t.bx = Re, t.by = function(t2, e2, r2, n2, i2) {\n return P(n2, i2, C((t2 - e2) / (r2 - e2), 0, 1));\n }, t.bz = D, t.c = at, t.c$ = class {\n constructor(t2) {\n this._marks = { start: [t2.url, \"start\"].join(\"#\"), end: [t2.url, \"end\"].join(\"#\"), measure: t2.url.toString() }, performance.mark(this._marks.start);\n }\n finish() {\n performance.mark(this._marks.end);\n let t2 = performance.getEntriesByName(this._marks.measure);\n return 0 === t2.length && (performance.measure(this._marks.measure, this._marks.start, this._marks.end), t2 = performance.getEntriesByName(this._marks.measure), performance.clearMarks(this._marks.start), performance.clearMarks(this._marks.end), performance.clearMeasures(this._marks.measure)), t2;\n }\n }, t.c0 = wa, t.c1 = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = _a;\n }\n set(t2) {\n if (t2[12] !== this.current[12] || t2[0] !== this.current[0]) return this.current = t2, void this.gl.uniformMatrix4fv(this.location, false, t2);\n for (let e2 = 1; e2 < 16; e2++) if (t2[e2] !== this.current[e2]) {\n this.current = t2, this.gl.uniformMatrix4fv(this.location, false, t2);\n break;\n }\n }\n }, t.c2 = ba, t.c3 = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = [0, 0, 0];\n }\n set(t2) {\n t2[0] === this.current[0] && t2[1] === this.current[1] && t2[2] === this.current[2] || (this.current = t2, this.gl.uniform3f(this.location, t2[0], t2[1], t2[2]));\n }\n }, t.c4 = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = [0, 0];\n }\n set(t2) {\n t2[0] === this.current[0] && t2[1] === this.current[1] || (this.current = t2, this.gl.uniform2f(this.location, t2[0], t2[1]));\n }\n }, t.c5 = d, t.c6 = function(t2, e2) {\n var r2 = Math.sin(e2), n2 = Math.cos(e2);\n return t2[0] = n2, t2[1] = r2, t2[2] = 0, t2[3] = -r2, t2[4] = n2, t2[5] = 0, t2[6] = 0, t2[7] = 0, t2[8] = 1, t2;\n }, t.c7 = function(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1], s2 = e2[2];\n return t2[0] = n2 * r2[0] + i2 * r2[3] + s2 * r2[6], t2[1] = n2 * r2[1] + i2 * r2[4] + s2 * r2[7], t2[2] = n2 * r2[2] + i2 * r2[5] + s2 * r2[8], t2;\n }, t.c8 = function(t2, e2, r2, n2, i2, s2, o2) {\n var a2 = 1 / (e2 - r2), l2 = 1 / (n2 - i2), u2 = 1 / (s2 - o2);\n return t2[0] = -2 * a2, t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[4] = 0, t2[5] = -2 * l2, t2[6] = 0, t2[7] = 0, t2[8] = 0, t2[9] = 0, t2[10] = 2 * u2, t2[11] = 0, t2[12] = (e2 + r2) * a2, t2[13] = (i2 + n2) * l2, t2[14] = (o2 + s2) * u2, t2[15] = 1, t2;\n }, t.c9 = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = new Array();\n }\n set(t2) {\n if (t2 != this.current) {\n this.current = t2;\n const e2 = new Float32Array(4 * t2.length);\n for (let r2 = 0; r2 < t2.length; r2++) e2[4 * r2] = t2[r2].r, e2[4 * r2 + 1] = t2[r2].g, e2[4 * r2 + 2] = t2[r2].b, e2[4 * r2 + 3] = t2[r2].a;\n this.gl.uniform4fv(this.location, e2);\n }\n }\n }, t.cA = function(t2, e2) {\n return nt[e2] && (t2 instanceof MouseEvent || t2 instanceof WheelEvent);\n }, t.cB = function(t2, e2) {\n return rt[e2] && \"touches\" in t2;\n }, t.cC = function(t2) {\n return rt[t2] || nt[t2];\n }, t.cD = function(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1];\n return t2[0] = r2[0] * n2 + r2[4] * i2 + r2[12], t2[1] = r2[1] * n2 + r2[5] * i2 + r2[13], t2;\n }, t.cE = function(t2, e2) {\n const { x: r2, y: n2 } = Ph.fromLngLat(e2);\n return !(t2 < 0 || t2 > 25 || n2 < 0 || n2 >= 1 || r2 < 0 || r2 >= 1);\n }, t.cF = function(t2, e2) {\n return t2[0] = e2[0], t2[1] = 0, t2[2] = 0, t2[3] = 0, t2[4] = 0, t2[5] = e2[1], t2[6] = 0, t2[7] = 0, t2[8] = 0, t2[9] = 0, t2[10] = e2[2], t2[11] = 0, t2[12] = 0, t2[13] = 0, t2[14] = 0, t2[15] = 1, t2;\n }, t.cG = class extends no {\n }, t.cH = Pd, t.cJ = ct, t.cK = function(t2, e2) {\n at.REGISTERED_PROTOCOLS[t2] = e2;\n }, t.cL = function(t2) {\n delete at.REGISTERED_PROTOCOLS[t2];\n }, t.cM = function(t2, e2) {\n const r2 = {};\n for (let n3 = 0; n3 < t2.length; n3++) {\n const i2 = e2 && e2[t2[n3].id] || _i(t2[n3]);\n e2 && (e2[t2[n3].id] = i2);\n let s2 = r2[i2];\n s2 || (s2 = r2[i2] = []), s2.push(t2[n3]);\n }\n const n2 = [];\n for (const t3 in r2) n2.push(r2[t3]);\n return n2;\n }, t.cN = us, t.cO = $h, t.cP = Lf, t.cQ = $c, t.cR = function(e2) {\n e2.bucket.createArrays(), e2.bucket.tilePixelRatio = M / (512 * e2.bucket.overscaling), e2.bucket.compareText = {}, e2.bucket.iconsNeedLinear = false;\n const r2 = e2.bucket.layers[0], n2 = r2.layout, i2 = r2._unevaluatedLayout._values, s2 = { layoutIconSize: i2[\"icon-size\"].possiblyEvaluate(new Fs(e2.bucket.zoom + 1), e2.canonical), layoutTextSize: i2[\"text-size\"].possiblyEvaluate(new Fs(e2.bucket.zoom + 1), e2.canonical), textMaxSize: i2[\"text-size\"].possiblyEvaluate(new Fs(18)) };\n if (\"composite\" === e2.bucket.textSizeData.kind) {\n const { minZoom: t2, maxZoom: r3 } = e2.bucket.textSizeData;\n s2.compositeTextSizes = [i2[\"text-size\"].possiblyEvaluate(new Fs(t2), e2.canonical), i2[\"text-size\"].possiblyEvaluate(new Fs(r3), e2.canonical)];\n }\n if (\"composite\" === e2.bucket.iconSizeData.kind) {\n const { minZoom: t2, maxZoom: r3 } = e2.bucket.iconSizeData;\n s2.compositeIconSizes = [i2[\"icon-size\"].possiblyEvaluate(new Fs(t2), e2.canonical), i2[\"icon-size\"].possiblyEvaluate(new Fs(r3), e2.canonical)];\n }\n const o2 = n2.get(\"text-line-height\") * hc, a2 = \"viewport\" !== n2.get(\"text-rotation-alignment\") && \"point\" !== n2.get(\"symbol-placement\"), l2 = n2.get(\"text-keep-upright\"), u2 = n2.get(\"text-size\");\n for (const i3 of e2.bucket.features) {\n const c2 = n2.get(\"text-font\").evaluate(i3, {}, e2.canonical).join(\",\"), h2 = u2.evaluate(i3, {}, e2.canonical), p2 = s2.layoutTextSize.evaluate(i3, {}, e2.canonical), f2 = s2.layoutIconSize.evaluate(i3, {}, e2.canonical), d2 = { horizontal: {}, vertical: void 0 }, y2 = i3.text;\n let m2, g2 = [0, 0];\n if (y2) {\n const s3 = y2.toString(), u3 = n2.get(\"text-letter-spacing\").evaluate(i3, {}, e2.canonical) * hc, f3 = bs(s3) ? u3 : 0, m3 = n2.get(\"text-anchor\").evaluate(i3, {}, e2.canonical), x3 = fd(r2, i3, e2.canonical);\n if (!x3) {\n const t2 = n2.get(\"text-radial-offset\").evaluate(i3, {}, e2.canonical);\n g2 = t2 ? pd(m3, [t2 * hc, hd]) : n2.get(\"text-offset\").evaluate(i3, {}, e2.canonical).map(((t3) => t3 * hc));\n }\n let v3 = a2 ? \"center\" : n2.get(\"text-justify\").evaluate(i3, {}, e2.canonical);\n const b2 = \"point\" === n2.get(\"symbol-placement\") ? n2.get(\"text-max-width\").evaluate(i3, {}, e2.canonical) * hc : 1 / 0, w2 = () => {\n e2.bucket.allowVerticalPlacement && vs(s3) && (d2.vertical = qc(y2, e2.glyphMap, e2.glyphPositions, e2.imagePositions, c2, b2, o2, m3, \"left\", f3, g2, t.aA.vertical, true, p2, h2));\n };\n if (!a2 && x3) {\n const r3 = /* @__PURE__ */ new Set();\n if (\"auto\" === v3) for (let t2 = 0; t2 < x3.values.length; t2 += 2) r3.add(dd(x3.values[t2]));\n else r3.add(v3);\n let n3 = false;\n for (const i4 of r3) if (!d2.horizontal[i4]) if (n3) d2.horizontal[i4] = d2.horizontal[0];\n else {\n const r4 = qc(y2, e2.glyphMap, e2.glyphPositions, e2.imagePositions, c2, b2, o2, \"center\", i4, f3, g2, t.aA.horizontal, false, p2, h2);\n r4 && (d2.horizontal[i4] = r4, n3 = 1 === r4.positionedLines.length);\n }\n w2();\n } else {\n \"auto\" === v3 && (v3 = dd(m3));\n const r3 = qc(y2, e2.glyphMap, e2.glyphPositions, e2.imagePositions, c2, b2, o2, m3, v3, f3, g2, t.aA.horizontal, false, p2, h2);\n r3 && (d2.horizontal[v3] = r3), w2(), vs(s3) && a2 && l2 && (d2.vertical = qc(y2, e2.glyphMap, e2.glyphPositions, e2.imagePositions, c2, b2, o2, m3, v3, f3, g2, t.aA.vertical, false, p2, h2));\n }\n }\n let x2 = false;\n if (i3.icon && i3.icon.name) {\n const t2 = e2.imageMap[i3.icon.name];\n t2 && (m2 = Wc(e2.imagePositions[i3.icon.name], n2.get(\"icon-offset\").evaluate(i3, {}, e2.canonical), n2.get(\"icon-anchor\").evaluate(i3, {}, e2.canonical)), x2 = !!t2.sdf, void 0 === e2.bucket.sdfIcons ? e2.bucket.sdfIcons = x2 : e2.bucket.sdfIcons !== x2 && j(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"), (t2.pixelRatio !== e2.bucket.pixelRatio || 0 !== n2.get(\"icon-rotate\").constantOr(1)) && (e2.bucket.iconsNeedLinear = true));\n }\n const v2 = gd(d2.horizontal) || d2.vertical;\n e2.bucket.iconsInText = !!v2 && v2.iconsInText, (v2 || m2) && yd(e2.bucket, i3, d2, m2, e2.imageMap, s2, p2, f2, g2, x2, e2.canonical, e2.subdivisionGranularity);\n }\n e2.showCollisionBoxes && e2.bucket.generateCollisionDebugBuffers();\n }, t.cS = xu, t.cT = Cu, t.cU = Wu, t.cV = function(t2) {\n const e2 = new Sc();\n return (function(t3, e3) {\n for (const r2 in t3.layers) e3.writeMessage(3, Ff, t3.layers[r2]);\n })(t2, e2), e2.finish();\n }, t.cW = function(t2, e2, r2, n2, i2, s2) {\n let o2 = $f(t2, e2, r2, i2, 0);\n return o2 = $f(o2, e2, n2, s2, 1), o2;\n }, t.cX = class {\n constructor(t2) {\n this.maxEntries = t2, this.map = /* @__PURE__ */ new Map();\n }\n get(t2) {\n const e2 = this.map.get(t2);\n return void 0 !== e2 && (this.map.delete(t2), this.map.set(t2, e2)), e2;\n }\n set(t2, e2) {\n if (this.map.has(t2)) this.map.delete(t2);\n else if (this.map.size >= this.maxEntries) {\n const t3 = this.map.keys().next().value;\n this.map.delete(t3);\n }\n this.map.set(t2, e2);\n }\n clear() {\n this.map.clear();\n }\n }, t.cY = Pu, t.cZ = Sc, t.c_ = Ef, t.ca = class extends xa {\n constructor(t2, e2) {\n super(t2, e2), this.current = new Array();\n }\n set(t2) {\n if (t2 != this.current) {\n this.current = t2;\n const e2 = new Float32Array(t2);\n this.gl.uniform1fv(this.location, e2);\n }\n }\n }, t.cb = class extends mo {\n }, t.cc = uc, t.cd = class extends xo {\n }, t.ce = _l, t.cf = function(t2) {\n return t2 <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(t2) / Math.LN2));\n }, t.cg = wl, t.ch = function(t2, e2, r2) {\n var n2 = e2[0], i2 = e2[1], s2 = e2[2], o2 = r2[3] * n2 + r2[7] * i2 + r2[11] * s2 + r2[15];\n return t2[0] = (r2[0] * n2 + r2[4] * i2 + r2[8] * s2 + r2[12]) / (o2 = o2 || 1), t2[1] = (r2[1] * n2 + r2[5] * i2 + r2[9] * s2 + r2[13]) / o2, t2[2] = (r2[2] * n2 + r2[6] * i2 + r2[10] * s2 + r2[14]) / o2, t2;\n }, t.ci = class extends io {\n }, t.cj = class extends ko {\n }, t.ck = function(t2, e2) {\n return t2[0] === e2[0] && t2[1] === e2[1] && t2[2] === e2[2] && t2[3] === e2[3] && t2[4] === e2[4] && t2[5] === e2[5] && t2[6] === e2[6] && t2[7] === e2[7] && t2[8] === e2[8] && t2[9] === e2[9] && t2[10] === e2[10] && t2[11] === e2[11] && t2[12] === e2[12] && t2[13] === e2[13] && t2[14] === e2[14] && t2[15] === e2[15];\n }, t.cl = function(t2, e2) {\n var r2 = t2[0], n2 = t2[1], i2 = t2[2], s2 = t2[3], o2 = t2[4], a2 = t2[5], l2 = t2[6], u2 = t2[7], c2 = t2[8], h2 = t2[9], f2 = t2[10], d2 = t2[11], y2 = t2[12], m2 = t2[13], g2 = t2[14], x2 = t2[15], v2 = e2[0], b2 = e2[1], w2 = e2[2], _2 = e2[3], A2 = e2[4], S2 = e2[5], k2 = e2[6], E2 = e2[7], T2 = e2[8], I2 = e2[9], M2 = e2[10], F2 = e2[11], D2 = e2[12], P2 = e2[13], z2 = e2[14], B2 = e2[15];\n return Math.abs(r2 - v2) <= p * Math.max(1, Math.abs(r2), Math.abs(v2)) && Math.abs(n2 - b2) <= p * Math.max(1, Math.abs(n2), Math.abs(b2)) && Math.abs(i2 - w2) <= p * Math.max(1, Math.abs(i2), Math.abs(w2)) && Math.abs(s2 - _2) <= p * Math.max(1, Math.abs(s2), Math.abs(_2)) && Math.abs(o2 - A2) <= p * Math.max(1, Math.abs(o2), Math.abs(A2)) && Math.abs(a2 - S2) <= p * Math.max(1, Math.abs(a2), Math.abs(S2)) && Math.abs(l2 - k2) <= p * Math.max(1, Math.abs(l2), Math.abs(k2)) && Math.abs(u2 - E2) <= p * Math.max(1, Math.abs(u2), Math.abs(E2)) && Math.abs(c2 - T2) <= p * Math.max(1, Math.abs(c2), Math.abs(T2)) && Math.abs(h2 - I2) <= p * Math.max(1, Math.abs(h2), Math.abs(I2)) && Math.abs(f2 - M2) <= p * Math.max(1, Math.abs(f2), Math.abs(M2)) && Math.abs(d2 - F2) <= p * Math.max(1, Math.abs(d2), Math.abs(F2)) && Math.abs(y2 - D2) <= p * Math.max(1, Math.abs(y2), Math.abs(D2)) && Math.abs(m2 - P2) <= p * Math.max(1, Math.abs(m2), Math.abs(P2)) && Math.abs(g2 - z2) <= p * Math.max(1, Math.abs(g2), Math.abs(z2)) && Math.abs(x2 - B2) <= p * Math.max(1, Math.abs(x2), Math.abs(B2));\n }, t.cm = function(t2, e2) {\n return t2[0] = e2[0], t2[1] = e2[1], t2[2] = e2[2], t2[3] = e2[3], t2[4] = e2[4], t2[5] = e2[5], t2[6] = e2[6], t2[7] = e2[7], t2[8] = e2[8], t2[9] = e2[9], t2[10] = e2[10], t2[11] = e2[11], t2[12] = e2[12], t2[13] = e2[13], t2[14] = e2[14], t2[15] = e2[15], t2;\n }, t.cn = (t2) => \"symbol\" === t2.type, t.co = (t2) => \"circle\" === t2.type, t.cp = (t2) => \"heatmap\" === t2.type, t.cq = (t2) => \"line\" === t2.type, t.cr = (t2) => \"fill\" === t2.type, t.cs = (t2) => \"fill-extrusion\" === t2.type, t.ct = (t2) => \"hillshade\" === t2.type, t.cu = (t2) => \"color-relief\" === t2.type, t.cv = (t2) => \"background\" === t2.type, t.cw = (t2) => \"custom\" === t2.type, t.cx = B, t.cy = function(t2, e2, r2) {\n const n2 = I(e2.x - r2.x, e2.y - r2.y), i2 = I(t2.x - r2.x, t2.y - r2.y), s2 = Math.atan2(n2[0] * i2[1] - n2[1] * i2[0], (function(t3, e3) {\n return t3[0] * e3[0] + t3[1] * e3[1];\n })(n2, i2));\n return et(s2);\n }, t.cz = V, t.d = ft, t.d0 = function(t2, r2, n2, i2, s2) {\n return e(this, void 0, void 0, (function* () {\n if (h()) try {\n return yield K(t2, r2, n2, i2, s2);\n } catch (t3) {\n }\n return (function(t3, e2, r3, n3, i3) {\n const s3 = t3.width, o2 = t3.height;\n W && J || (W = new OffscreenCanvas(s3, o2), J = W.getContext(\"2d\", { willReadFrequently: true })), W.width = s3, W.height = o2, J.drawImage(t3, 0, 0, s3, o2);\n const a2 = J.getImageData(e2, r3, n3, i3);\n return J.clearRect(0, 0, s3, o2), a2.data;\n })(t2, r2, n2, i2, s2);\n }));\n }, t.d1 = Fl, t.d2 = n, t.d3 = class {\n constructor(t2, e2) {\n this.layers = { [Mf]: this }, this.name = Mf, this.version = e2 ? e2.version : 1, this.extent = e2 ? e2.extent : 4096, this.length = t2.length, this.features = t2;\n }\n feature(t2) {\n return new If(this.features[t2], this.extent);\n }\n }, t.d4 = ni, t.d5 = Ms, t.e = O, t.f = (t2) => e(void 0, void 0, void 0, (function* () {\n if (0 === t2.byteLength) return createImageBitmap(new ImageData(1, 1));\n const e2 = new Blob([new Uint8Array(t2)], { type: \"image/png\" });\n try {\n return createImageBitmap(e2);\n } catch (t3) {\n throw new Error(`Could not load image because of ${t3.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`);\n }\n })), t.g = lt, t.h = (t2) => new Promise(((e2, r2) => {\n const n2 = new Image();\n n2.onload = () => {\n e2(n2), URL.revokeObjectURL(n2.src), n2.onload = null, window.requestAnimationFrame((() => {\n n2.src = H;\n }));\n }, n2.onerror = () => r2(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"));\n const i2 = new Blob([new Uint8Array(t2)], { type: \"image/png\" });\n n2.src = t2.byteLength ? URL.createObjectURL(i2) : H;\n })), t.i = X, t.j = (t2, e2) => pt(O(t2, { type: \"json\" }), e2), t.k = gt, t.l = mt, t.m = pt, t.n = (t2, e2) => pt(O(t2, { type: \"arrayBuffer\" }), e2), t.o = function(t2) {\n return new Sc(t2).readFields(Cc, []);\n }, t.p = Rc, t.q = function(t2) {\n return /[\\u02EA\\u02EB\\u1100-\\u11FF\\u2E80-\\u2FDF\\u3000-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t2));\n }, t.r = vl, t.s = Q, t.t = Xs, t.u = vt, t.v = ts, t.w = j, t.x = Vs, t.y = rs, t.z = Ps;\n }));\n define2(\"worker\", [\"./shared\"], (function(e) {\n \"use strict\";\n class t {\n constructor(e2, t2) {\n this.keyCache = {}, e2 && this.replace(e2, t2);\n }\n replace(e2, t2) {\n this._layerConfigs = {}, this._layers = {}, this.update(e2, [], t2);\n }\n update(t2, o2, i2) {\n for (const o3 of t2) {\n this._layerConfigs[o3.id] = o3;\n const t3 = this._layers[o3.id] = e.bU(o3, i2);\n t3._featureFilter = e.ak(t3.filter, i2), this.keyCache[o3.id] && delete this.keyCache[o3.id];\n }\n for (const e2 of o2) delete this.keyCache[e2], delete this._layerConfigs[e2], delete this._layers[e2];\n this.familiesBySource = {};\n const s2 = e.cM(Object.values(this._layerConfigs), this.keyCache);\n for (const t3 of s2) {\n const o3 = t3.map(((e2) => this._layers[e2.id])), i3 = o3[0];\n if (\"none\" === i3.visibility) continue;\n const s3 = i3.source || \"\";\n let n2 = this.familiesBySource[s3];\n n2 || (n2 = this.familiesBySource[s3] = {});\n const r2 = i3.sourceLayer || e.aa;\n let a2 = n2[r2];\n a2 || (a2 = n2[r2] = []), a2.push(o3);\n }\n }\n }\n class o {\n constructor(t2) {\n const o2 = {}, i2 = [];\n for (const e2 in t2) {\n const s3 = t2[e2], n3 = o2[e2] = {};\n for (const e3 in s3) {\n const t3 = s3[+e3];\n if (!t3 || 0 === t3.bitmap.width || 0 === t3.bitmap.height) continue;\n const o3 = { x: 0, y: 0, w: t3.bitmap.width + 2, h: t3.bitmap.height + 2 };\n i2.push(o3), n3[e3] = { rect: o3, metrics: t3.metrics };\n }\n }\n const { w: s2, h: n2 } = e.p(i2), r2 = new e.r({ width: s2 || 1, height: n2 || 1 });\n for (const i3 in t2) {\n const s3 = t2[i3];\n for (const t3 in s3) {\n const n3 = s3[+t3];\n if (!n3 || 0 === n3.bitmap.width || 0 === n3.bitmap.height) continue;\n const a2 = o2[i3][t3].rect;\n e.r.copy(n3.bitmap, r2, { x: 0, y: 0 }, { x: a2.x + 1, y: a2.y + 1 }, n3.bitmap);\n }\n }\n this.image = r2, this.positions = o2;\n }\n }\n e.cN(\"GlyphAtlas\", o);\n class i {\n constructor(t2) {\n this.tileID = new e.a2(t2.tileID.overscaledZ, t2.tileID.wrap, t2.tileID.canonical.z, t2.tileID.canonical.x, t2.tileID.canonical.y), this.uid = t2.uid, this.zoom = t2.zoom, this.pixelRatio = t2.pixelRatio, this.tileSize = t2.tileSize, this.source = t2.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = t2.showCollisionBoxes, this.collectResourceTiming = !!t2.collectResourceTiming, this.returnDependencies = !!t2.returnDependencies, this.promoteId = t2.promoteId, this.inFlightDependencies = [];\n }\n parse(t2, i2, n2, r2, a2) {\n return e._(this, void 0, void 0, (function* () {\n this.status = \"parsing\", this.data = t2, this.collisionBoxArray = new e.ai();\n const l2 = new e.cO(Object.keys(t2.layers).sort()), c2 = new e.cP(this.tileID, this.promoteId);\n c2.bucketLayerIDs = [];\n const h2 = {}, u2 = { featureIndex: c2, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, dashDependencies: {}, availableImages: n2, subdivisionGranularity: a2 }, d2 = i2.familiesBySource[this.source];\n for (const o2 in d2) {\n const i3 = t2.layers[o2];\n if (!i3) continue;\n 1 === i3.version && e.w(`Vector tile source \"${this.source}\" layer \"${o2}\" does not use vector tile spec v2 and therefore may have some rendering errors.`);\n const r3 = l2.encode(o2), a3 = [];\n for (let e2 = 0; e2 < i3.length; e2++) {\n const t3 = i3.feature(e2), s2 = c2.getId(t3, o2);\n a3.push({ feature: t3, id: s2, index: e2, sourceLayerIndex: r3 });\n }\n for (const t3 of d2[o2]) {\n const o3 = t3[0];\n o3.source !== this.source && e.w(`layer.source = ${o3.source} does not equal this.source = ${this.source}`), o3.isHidden(this.zoom, true) || (s(t3, this.zoom, n2), (h2[o3.id] = o3.createBucket({ index: c2.bucketLayerIDs.length, layers: t3, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: r3, sourceID: this.source })).populate(a3, u2, this.tileID.canonical), c2.bucketLayerIDs.push(t3.map(((e2) => e2.id))));\n }\n }\n const g2 = e.bZ(u2.glyphDependencies, ((e2) => Object.keys(e2).map(Number)));\n this.inFlightDependencies.forEach(((e2) => null == e2 ? void 0 : e2.abort())), this.inFlightDependencies = [];\n let f2 = Promise.resolve({});\n if (Object.keys(g2).length) {\n const e2 = new AbortController();\n this.inFlightDependencies.push(e2), f2 = r2.sendAsync({ type: \"GG\", data: { stacks: g2, source: this.source, tileID: this.tileID, type: \"glyphs\" } }, e2);\n }\n const p2 = Object.keys(u2.iconDependencies);\n let m2 = Promise.resolve({});\n if (p2.length) {\n const e2 = new AbortController();\n this.inFlightDependencies.push(e2), m2 = r2.sendAsync({ type: \"GI\", data: { icons: p2, source: this.source, tileID: this.tileID, type: \"icons\" } }, e2);\n }\n const y2 = Object.keys(u2.patternDependencies);\n let v2 = Promise.resolve({});\n if (y2.length) {\n const e2 = new AbortController();\n this.inFlightDependencies.push(e2), v2 = r2.sendAsync({ type: \"GI\", data: { icons: y2, source: this.source, tileID: this.tileID, type: \"patterns\" } }, e2);\n }\n const x2 = u2.dashDependencies;\n let _2 = Promise.resolve({});\n if (Object.keys(x2).length) {\n const e2 = new AbortController();\n this.inFlightDependencies.push(e2), _2 = r2.sendAsync({ type: \"GDA\", data: { dashes: x2 } }, e2);\n }\n const [w2, S2, b2, M2] = yield Promise.all([f2, m2, v2, _2]), I2 = new o(w2), P2 = new e.cQ(S2, b2);\n for (const t3 in h2) {\n const o2 = h2[t3];\n o2 instanceof e.aj ? (s(o2.layers, this.zoom, n2), e.cR({ bucket: o2, glyphMap: w2, glyphPositions: I2.positions, imageMap: S2, imagePositions: P2.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical, subdivisionGranularity: u2.subdivisionGranularity })) : o2.hasDependencies && (o2 instanceof e.cS || o2 instanceof e.cT || o2 instanceof e.cU) && (s(o2.layers, this.zoom, n2), o2.addFeatures(u2, this.tileID.canonical, P2.patternPositions, M2));\n }\n return this.status = \"done\", { buckets: Object.values(h2).filter(((e2) => !e2.isEmpty())), featureIndex: c2, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: I2.image, imageAtlas: P2, dashPositions: M2, glyphMap: this.returnDependencies ? w2 : null, iconMap: this.returnDependencies ? S2 : null, glyphPositions: this.returnDependencies ? I2.positions : null };\n }));\n }\n }\n function s(t2, o2, i2) {\n const s2 = new e.H(o2);\n for (const e2 of t2) e2.recalculate(s2, i2);\n }\n class n {\n constructor(e2, t2, o2, i2, s2) {\n this.type = e2, this.properties = o2 || {}, this.extent = s2, this.pointsArray = t2, this.id = i2;\n }\n loadGeometry() {\n return this.pointsArray.map(((t2) => t2.map(((t3) => new e.P(t3.x, t3.y)))));\n }\n }\n class r {\n constructor(e2, t2, o2) {\n this.version = 2, this._myFeatures = e2, this.name = t2, this.length = e2.length, this.extent = o2;\n }\n feature(e2) {\n return this._myFeatures[e2];\n }\n }\n class a {\n constructor() {\n this.layers = {};\n }\n addLayer(e2) {\n this.layers[e2.name] = e2;\n }\n }\n function l(t2) {\n let o2 = e.cV(t2);\n return 0 === o2.byteOffset && o2.byteLength === o2.buffer.byteLength || (o2 = new Uint8Array(o2)), { vectorTile: t2, rawData: o2.buffer };\n }\n function c(t2, o2, i2) {\n const { extent: s2 } = t2, a2 = Math.pow(2, i2.z - o2.z), l2 = (i2.x - o2.x * a2) * s2, c2 = (i2.y - o2.y * a2) * s2, h2 = [];\n for (let o3 = 0; o3 < t2.length; o3++) {\n const i3 = t2.feature(o3);\n let r2 = i3.loadGeometry();\n for (const e2 of r2) for (const t3 of e2) t3.x = t3.x * a2 - l2, t3.y = t3.y * a2 - c2;\n const u2 = 128;\n r2 = e.cW(r2, i3.type, -u2, -u2, s2 + u2, s2 + u2), 0 !== r2.length && h2.push(new n(i3.type, r2, i3.properties, i3.id, s2));\n }\n return new r(h2, t2.name, s2);\n }\n class h {\n constructor(t2, o2, i2) {\n this.actor = t2, this.layerIndex = o2, this.availableImages = i2, this.fetching = {}, this.loading = {}, this.loaded = {}, this.overzoomedTileResultCache = new e.cX(1e3);\n }\n loadVectorTile(t2, o2) {\n return e._(this, void 0, void 0, (function* () {\n const i2 = yield e.n(t2.request, o2);\n try {\n return { vectorTile: \"mlt\" !== t2.encoding ? new e.cY(new e.cZ(i2.data)) : new e.c_(i2.data), rawData: i2.data, cacheControl: i2.cacheControl, expires: i2.expires };\n } catch (e2) {\n const o3 = new Uint8Array(i2.data);\n let s2 = `Unable to parse the tile at ${t2.request.url}, `;\n throw s2 += 31 === o3[0] && 139 === o3[1] ? \"please make sure the data is not gzipped and that you have configured the relevant header in the server\" : `got error: ${e2.message}`, new Error(s2);\n }\n }));\n }\n loadTile(t2) {\n return e._(this, void 0, void 0, (function* () {\n const { uid: o2, overzoomParameters: s2 } = t2;\n s2 && (t2.request = s2.overzoomRequest);\n const n2 = !!(t2 && t2.request && t2.request.collectResourceTiming) && new e.c$(t2.request), r2 = new i(t2);\n this.loading[o2] = r2;\n const a2 = new AbortController();\n r2.abort = a2;\n try {\n const i2 = yield this.loadVectorTile(t2, a2);\n if (delete this.loading[o2], !i2) return null;\n if (s2) {\n const e2 = this._getOverzoomTile(t2, i2.vectorTile);\n i2.rawData = e2.rawData, i2.vectorTile = e2.vectorTile;\n }\n const l2 = i2.rawData, c2 = {};\n i2.expires && (c2.expires = i2.expires), i2.cacheControl && (c2.cacheControl = i2.cacheControl);\n const h2 = {};\n if (n2) {\n const e2 = n2.finish();\n e2 && (h2.resourceTiming = JSON.parse(JSON.stringify(e2)));\n }\n r2.vectorTile = i2.vectorTile;\n const u2 = r2.parse(i2.vectorTile, this.layerIndex, this.availableImages, this.actor, t2.subdivisionGranularity);\n this.loaded[o2] = r2, this.fetching[o2] = { rawTileData: l2, cacheControl: c2, resourceTiming: h2 };\n try {\n const o3 = yield u2;\n return e.e({ rawTileData: l2.slice(0), encoding: t2.encoding }, o3, c2, h2);\n } finally {\n delete this.fetching[o2];\n }\n } catch (e2) {\n throw delete this.loading[o2], r2.status = \"done\", this.loaded[o2] = r2, e2;\n }\n }));\n }\n _getOverzoomTile(e2, t2) {\n const { tileID: o2, source: i2, overzoomParameters: s2 } = e2, { maxZoomTileID: n2 } = s2, r2 = `${n2.key}_${o2.key}`, h2 = this.overzoomedTileResultCache.get(r2);\n if (h2) return h2;\n const u2 = new a(), d2 = this.layerIndex.familiesBySource[i2];\n for (const e3 in d2) {\n const i3 = t2.layers[e3];\n if (!i3) continue;\n const s3 = c(i3, n2, o2.canonical);\n s3.length > 0 && u2.addLayer(s3);\n }\n const g2 = l(u2);\n return this.overzoomedTileResultCache.set(r2, g2), g2;\n }\n reloadTile(t2) {\n return e._(this, void 0, void 0, (function* () {\n const o2 = t2.uid;\n if (!this.loaded || !this.loaded[o2]) throw new Error(\"Should not be trying to reload a tile that was never loaded or has been removed\");\n const i2 = this.loaded[o2];\n if (i2.showCollisionBoxes = t2.showCollisionBoxes, \"parsing\" === i2.status) {\n const s2 = yield i2.parse(i2.vectorTile, this.layerIndex, this.availableImages, this.actor, t2.subdivisionGranularity);\n let n2;\n if (this.fetching[o2]) {\n const { rawTileData: i3, cacheControl: r2, resourceTiming: a2 } = this.fetching[o2];\n delete this.fetching[o2], n2 = e.e({ rawTileData: i3.slice(0), encoding: t2.encoding }, s2, r2, a2);\n } else n2 = s2;\n return n2;\n }\n if (\"done\" === i2.status && i2.vectorTile) return i2.parse(i2.vectorTile, this.layerIndex, this.availableImages, this.actor, t2.subdivisionGranularity);\n }));\n }\n abortTile(t2) {\n return e._(this, void 0, void 0, (function* () {\n const e2 = this.loading, o2 = t2.uid;\n e2 && e2[o2] && e2[o2].abort && (e2[o2].abort.abort(), delete e2[o2]);\n }));\n }\n removeTile(t2) {\n return e._(this, void 0, void 0, (function* () {\n this.loaded && this.loaded[t2.uid] && delete this.loaded[t2.uid];\n }));\n }\n }\n class u {\n constructor() {\n this.loaded = {};\n }\n loadTile(t2) {\n return e._(this, void 0, void 0, (function* () {\n const { uid: o2, encoding: i2, rawImageData: s2, redFactor: n2, greenFactor: r2, blueFactor: a2, baseShift: l2 } = t2, c2 = s2.width + 2, h2 = s2.height + 2, u2 = e.b(s2) ? new e.R({ width: c2, height: h2 }, yield e.d0(s2, -1, -1, c2, h2)) : s2, d2 = new e.d1(o2, u2, i2, n2, r2, a2, l2);\n return this.loaded = this.loaded || {}, this.loaded[o2] = d2, d2;\n }));\n }\n removeTile(e2) {\n const t2 = this.loaded, o2 = e2.uid;\n t2 && t2[o2] && delete t2[o2];\n }\n }\n var d, g, f = (function() {\n if (g) return d;\n function e2(e3, o2) {\n if (0 !== e3.length) {\n t2(e3[0], o2);\n for (var i2 = 1; i2 < e3.length; i2++) t2(e3[i2], !o2);\n }\n }\n function t2(e3, t3) {\n for (var o2 = 0, i2 = 0, s2 = 0, n2 = e3.length, r2 = n2 - 1; s2 < n2; r2 = s2++) {\n var a2 = (e3[s2][0] - e3[r2][0]) * (e3[r2][1] + e3[s2][1]), l2 = o2 + a2;\n i2 += Math.abs(o2) >= Math.abs(a2) ? o2 - l2 + a2 : a2 - l2 + o2, o2 = l2;\n }\n o2 + i2 >= 0 != !!t3 && e3.reverse();\n }\n return g = 1, d = function t3(o2, i2) {\n var s2, n2 = o2 && o2.type;\n if (\"FeatureCollection\" === n2) for (s2 = 0; s2 < o2.features.length; s2++) t3(o2.features[s2], i2);\n else if (\"GeometryCollection\" === n2) for (s2 = 0; s2 < o2.geometries.length; s2++) t3(o2.geometries[s2], i2);\n else if (\"Feature\" === n2) t3(o2.geometry, i2);\n else if (\"Polygon\" === n2) e2(o2.coordinates, i2);\n else if (\"MultiPolygon\" === n2) for (s2 = 0; s2 < o2.coordinates.length; s2++) e2(o2.coordinates[s2], i2);\n return o2;\n };\n })(), p = e.d2(f);\n const m = { minZoom: 0, maxZoom: 16, minPoints: 2, radius: 40, extent: 512, nodeSize: 64, log: false, generateId: false, reduce: null, map: (e2) => e2 }, y = Math.fround || (v = new Float32Array(1), (e2) => (v[0] = +e2, v[0]));\n var v;\n class x {\n constructor(e2) {\n this.options = Object.assign(Object.create(m), e2), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];\n }\n load(e2) {\n const { log: t2, minZoom: o2, maxZoom: i2 } = this.options;\n t2 && console.time(\"total time\");\n const s2 = `prepare ${e2.length} points`;\n t2 && console.time(s2), this.points = e2;\n const n2 = [];\n for (let t3 = 0; t3 < e2.length; t3++) {\n const o3 = e2[t3];\n if (!o3.geometry) continue;\n const [i3, s3] = o3.geometry.coordinates, r3 = y(S(i3)), a2 = y(b(s3));\n n2.push(r3, a2, 1 / 0, t3, -1, 1), this.options.reduce && n2.push(0);\n }\n let r2 = this.trees[i2 + 1] = this._createTree(n2);\n t2 && console.timeEnd(s2);\n for (let e3 = i2; e3 >= o2; e3--) {\n const o3 = +Date.now();\n r2 = this.trees[e3] = this._createTree(this._cluster(r2, e3)), t2 && console.log(\"z%d: %d clusters in %dms\", e3, r2.numItems, +Date.now() - o3);\n }\n return t2 && console.timeEnd(\"total time\"), this;\n }\n getClusters(e2, t2) {\n let o2 = ((e2[0] + 180) % 360 + 360) % 360 - 180;\n const i2 = Math.max(-90, Math.min(90, e2[1]));\n let s2 = 180 === e2[2] ? 180 : ((e2[2] + 180) % 360 + 360) % 360 - 180;\n const n2 = Math.max(-90, Math.min(90, e2[3]));\n if (e2[2] - e2[0] >= 360) o2 = -180, s2 = 180;\n else if (o2 > s2) {\n const e3 = this.getClusters([o2, i2, 180, n2], t2), r3 = this.getClusters([-180, i2, s2, n2], t2);\n return e3.concat(r3);\n }\n const r2 = this.trees[this._limitZoom(t2)], a2 = r2.range(S(o2), b(n2), S(s2), b(i2)), l2 = r2.data, c2 = [];\n for (const e3 of a2) {\n const t3 = this.stride * e3;\n c2.push(l2[t3 + 5] > 1 ? _(l2, t3, this.clusterProps) : this.points[l2[t3 + 3]]);\n }\n return c2;\n }\n getChildren(e2) {\n const t2 = this._getOriginId(e2), o2 = this._getOriginZoom(e2), i2 = \"No cluster with the specified id.\", s2 = this.trees[o2];\n if (!s2) throw new Error(i2);\n const n2 = s2.data;\n if (t2 * this.stride >= n2.length) throw new Error(i2);\n const r2 = this.options.radius / (this.options.extent * Math.pow(2, o2 - 1)), a2 = s2.within(n2[t2 * this.stride], n2[t2 * this.stride + 1], r2), l2 = [];\n for (const t3 of a2) {\n const o3 = t3 * this.stride;\n n2[o3 + 4] === e2 && l2.push(n2[o3 + 5] > 1 ? _(n2, o3, this.clusterProps) : this.points[n2[o3 + 3]]);\n }\n if (0 === l2.length) throw new Error(i2);\n return l2;\n }\n getLeaves(e2, t2, o2) {\n const i2 = [];\n return this._appendLeaves(i2, e2, t2 = t2 || 10, o2 = o2 || 0, 0), i2;\n }\n getTile(e2, t2, o2) {\n const i2 = this.trees[this._limitZoom(e2)], s2 = Math.pow(2, e2), { extent: n2, radius: r2 } = this.options, a2 = r2 / n2, l2 = (o2 - a2) / s2, c2 = (o2 + 1 + a2) / s2, h2 = { features: [] };\n return this._addTileFeatures(i2.range((t2 - a2) / s2, l2, (t2 + 1 + a2) / s2, c2), i2.data, t2, o2, s2, h2), 0 === t2 && this._addTileFeatures(i2.range(1 - a2 / s2, l2, 1, c2), i2.data, s2, o2, s2, h2), t2 === s2 - 1 && this._addTileFeatures(i2.range(0, l2, a2 / s2, c2), i2.data, -1, o2, s2, h2), h2.features.length ? h2 : null;\n }\n getClusterExpansionZoom(e2) {\n let t2 = this._getOriginZoom(e2) - 1;\n for (; t2 <= this.options.maxZoom; ) {\n const o2 = this.getChildren(e2);\n if (t2++, 1 !== o2.length) break;\n e2 = o2[0].properties.cluster_id;\n }\n return t2;\n }\n _appendLeaves(e2, t2, o2, i2, s2) {\n const n2 = this.getChildren(t2);\n for (const t3 of n2) {\n const n3 = t3.properties;\n if (n3 && n3.cluster ? s2 + n3.point_count <= i2 ? s2 += n3.point_count : s2 = this._appendLeaves(e2, n3.cluster_id, o2, i2, s2) : s2 < i2 ? s2++ : e2.push(t3), e2.length === o2) break;\n }\n return s2;\n }\n _createTree(t2) {\n const o2 = new e.aU(t2.length / this.stride | 0, this.options.nodeSize, Float32Array);\n for (let e2 = 0; e2 < t2.length; e2 += this.stride) o2.add(t2[e2], t2[e2 + 1]);\n return o2.finish(), o2.data = t2, o2;\n }\n _addTileFeatures(e2, t2, o2, i2, s2, n2) {\n for (const r2 of e2) {\n const e3 = r2 * this.stride, a2 = t2[e3 + 5] > 1;\n let l2, c2, h2;\n if (a2) l2 = w(t2, e3, this.clusterProps), c2 = t2[e3], h2 = t2[e3 + 1];\n else {\n const o3 = this.points[t2[e3 + 3]];\n l2 = o3.properties;\n const [i3, s3] = o3.geometry.coordinates;\n c2 = S(i3), h2 = b(s3);\n }\n const u2 = { type: 1, geometry: [[Math.round(this.options.extent * (c2 * s2 - o2)), Math.round(this.options.extent * (h2 * s2 - i2))]], tags: l2 };\n let d2;\n d2 = a2 || this.options.generateId ? t2[e3 + 3] : this.points[t2[e3 + 3]].id, void 0 !== d2 && (u2.id = d2), n2.features.push(u2);\n }\n }\n _limitZoom(e2) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+e2), this.options.maxZoom + 1));\n }\n _cluster(e2, t2) {\n const { radius: o2, extent: i2, reduce: s2, minPoints: n2 } = this.options, r2 = o2 / (i2 * Math.pow(2, t2)), a2 = e2.data, l2 = [], c2 = this.stride;\n for (let o3 = 0; o3 < a2.length; o3 += c2) {\n if (a2[o3 + 2] <= t2) continue;\n a2[o3 + 2] = t2;\n const i3 = a2[o3], h2 = a2[o3 + 1], u2 = e2.within(a2[o3], a2[o3 + 1], r2), d2 = a2[o3 + 5];\n let g2 = d2;\n for (const e3 of u2) {\n const o4 = e3 * c2;\n a2[o4 + 2] > t2 && (g2 += a2[o4 + 5]);\n }\n if (g2 > d2 && g2 >= n2) {\n let e3, n3 = i3 * d2, r3 = h2 * d2, f2 = -1;\n const p2 = (o3 / c2 << 5) + (t2 + 1) + this.points.length;\n for (const i4 of u2) {\n const l3 = i4 * c2;\n if (a2[l3 + 2] <= t2) continue;\n a2[l3 + 2] = t2;\n const h3 = a2[l3 + 5];\n n3 += a2[l3] * h3, r3 += a2[l3 + 1] * h3, a2[l3 + 4] = p2, s2 && (e3 || (e3 = this._map(a2, o3, true), f2 = this.clusterProps.length, this.clusterProps.push(e3)), s2(e3, this._map(a2, l3)));\n }\n a2[o3 + 4] = p2, l2.push(n3 / g2, r3 / g2, 1 / 0, p2, -1, g2), s2 && l2.push(f2);\n } else {\n for (let e3 = 0; e3 < c2; e3++) l2.push(a2[o3 + e3]);\n if (g2 > 1) for (const e3 of u2) {\n const o4 = e3 * c2;\n if (!(a2[o4 + 2] <= t2)) {\n a2[o4 + 2] = t2;\n for (let e4 = 0; e4 < c2; e4++) l2.push(a2[o4 + e4]);\n }\n }\n }\n }\n return l2;\n }\n _getOriginId(e2) {\n return e2 - this.points.length >> 5;\n }\n _getOriginZoom(e2) {\n return (e2 - this.points.length) % 32;\n }\n _map(e2, t2, o2) {\n if (e2[t2 + 5] > 1) {\n const i3 = this.clusterProps[e2[t2 + 6]];\n return o2 ? Object.assign({}, i3) : i3;\n }\n const i2 = this.points[e2[t2 + 3]].properties, s2 = this.options.map(i2);\n return o2 && s2 === i2 ? Object.assign({}, s2) : s2;\n }\n }\n function _(e2, t2, o2) {\n return { type: \"Feature\", id: e2[t2 + 3], properties: w(e2, t2, o2), geometry: { type: \"Point\", coordinates: [(i2 = e2[t2], 360 * (i2 - 0.5)), M(e2[t2 + 1])] } };\n var i2;\n }\n function w(e2, t2, o2) {\n const i2 = e2[t2 + 5], s2 = i2 >= 1e4 ? `${Math.round(i2 / 1e3)}k` : i2 >= 1e3 ? Math.round(i2 / 100) / 10 + \"k\" : i2, n2 = e2[t2 + 6], r2 = -1 === n2 ? {} : Object.assign({}, o2[n2]);\n return Object.assign(r2, { cluster: true, cluster_id: e2[t2 + 3], point_count: i2, point_count_abbreviated: s2 });\n }\n function S(e2) {\n return e2 / 360 + 0.5;\n }\n function b(e2) {\n const t2 = Math.sin(e2 * Math.PI / 180), o2 = 0.5 - 0.25 * Math.log((1 + t2) / (1 - t2)) / Math.PI;\n return o2 < 0 ? 0 : o2 > 1 ? 1 : o2;\n }\n function M(e2) {\n const t2 = (180 - 360 * e2) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(t2)) / Math.PI - 90;\n }\n function I(e2, t2, o2, i2) {\n let s2 = i2;\n const n2 = t2 + (o2 - t2 >> 1);\n let r2, a2 = o2 - t2;\n const l2 = e2[t2], c2 = e2[t2 + 1], h2 = e2[o2], u2 = e2[o2 + 1];\n for (let i3 = t2 + 3; i3 < o2; i3 += 3) {\n const t3 = P(e2[i3], e2[i3 + 1], l2, c2, h2, u2);\n if (t3 > s2) r2 = i3, s2 = t3;\n else if (t3 === s2) {\n const e3 = Math.abs(i3 - n2);\n e3 < a2 && (r2 = i3, a2 = e3);\n }\n }\n s2 > i2 && (r2 - t2 > 3 && I(e2, t2, r2, i2), e2[r2 + 2] = s2, o2 - r2 > 3 && I(e2, r2, o2, i2));\n }\n function P(e2, t2, o2, i2, s2, n2) {\n let r2 = s2 - o2, a2 = n2 - i2;\n if (0 !== r2 || 0 !== a2) {\n const l2 = ((e2 - o2) * r2 + (t2 - i2) * a2) / (r2 * r2 + a2 * a2);\n l2 > 1 ? (o2 = s2, i2 = n2) : l2 > 0 && (o2 += r2 * l2, i2 += a2 * l2);\n }\n return r2 = e2 - o2, a2 = t2 - i2, r2 * r2 + a2 * a2;\n }\n function D(e2, t2, o2, i2) {\n const s2 = { id: null == e2 ? null : e2, type: t2, geometry: o2, tags: i2, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };\n if (\"Point\" === t2 || \"MultiPoint\" === t2 || \"LineString\" === t2) k(s2, o2);\n else if (\"Polygon\" === t2) k(s2, o2[0]);\n else if (\"MultiLineString\" === t2) for (const e3 of o2) k(s2, e3);\n else if (\"MultiPolygon\" === t2) for (const e3 of o2) k(s2, e3[0]);\n return s2;\n }\n function k(e2, t2) {\n for (let o2 = 0; o2 < t2.length; o2 += 3) e2.minX = Math.min(e2.minX, t2[o2]), e2.minY = Math.min(e2.minY, t2[o2 + 1]), e2.maxX = Math.max(e2.maxX, t2[o2]), e2.maxY = Math.max(e2.maxY, t2[o2 + 1]);\n }\n function T(e2, t2, o2, i2) {\n if (!t2.geometry) return;\n const s2 = t2.geometry.coordinates;\n if (s2 && 0 === s2.length) return;\n const n2 = t2.geometry.type, r2 = Math.pow(o2.tolerance / ((1 << o2.maxZoom) * o2.extent), 2);\n let a2 = [], l2 = t2.id;\n if (o2.promoteId ? l2 = t2.properties[o2.promoteId] : o2.generateId && (l2 = i2 || 0), \"Point\" === n2) C(s2, a2);\n else if (\"MultiPoint\" === n2) for (const e3 of s2) C(e3, a2);\n else if (\"LineString\" === n2) O(s2, a2, r2, false);\n else if (\"MultiLineString\" === n2) {\n if (o2.lineMetrics) {\n for (const o3 of s2) a2 = [], O(o3, a2, r2, false), e2.push(D(l2, \"LineString\", a2, t2.properties));\n return;\n }\n L(s2, a2, r2, false);\n } else if (\"Polygon\" === n2) L(s2, a2, r2, true);\n else {\n if (\"MultiPolygon\" !== n2) {\n if (\"GeometryCollection\" === n2) {\n for (const s3 of t2.geometry.geometries) T(e2, { id: l2, geometry: s3, properties: t2.properties }, o2, i2);\n return;\n }\n throw new Error(\"Input data is not a valid GeoJSON object.\");\n }\n for (const e3 of s2) {\n const t3 = [];\n L(e3, t3, r2, true), a2.push(t3);\n }\n }\n e2.push(D(l2, n2, a2, t2.properties));\n }\n function C(e2, t2) {\n t2.push(z(e2[0]), F(e2[1]), 0);\n }\n function O(e2, t2, o2, i2) {\n let s2, n2, r2 = 0;\n for (let o3 = 0; o3 < e2.length; o3++) {\n const a3 = z(e2[o3][0]), l2 = F(e2[o3][1]);\n t2.push(a3, l2, 0), o3 > 0 && (r2 += i2 ? (s2 * l2 - a3 * n2) / 2 : Math.sqrt(Math.pow(a3 - s2, 2) + Math.pow(l2 - n2, 2))), s2 = a3, n2 = l2;\n }\n const a2 = t2.length - 3;\n t2[2] = 1, I(t2, 0, a2, o2), t2[a2 + 2] = 1, t2.size = Math.abs(r2), t2.start = 0, t2.end = t2.size;\n }\n function L(e2, t2, o2, i2) {\n for (let s2 = 0; s2 < e2.length; s2++) {\n const n2 = [];\n O(e2[s2], n2, o2, i2), t2.push(n2);\n }\n }\n function z(e2) {\n return e2 / 360 + 0.5;\n }\n function F(e2) {\n const t2 = Math.sin(e2 * Math.PI / 180), o2 = 0.5 - 0.25 * Math.log((1 + t2) / (1 - t2)) / Math.PI;\n return o2 < 0 ? 0 : o2 > 1 ? 1 : o2;\n }\n function G(e2, t2, o2, i2, s2, n2, r2, a2) {\n if (i2 /= t2, n2 >= (o2 /= t2) && r2 < i2) return e2;\n if (r2 < o2 || n2 >= i2) return null;\n const l2 = [];\n for (const t3 of e2) {\n const e3 = t3.geometry;\n let n3 = t3.type;\n const r3 = 0 === s2 ? t3.minX : t3.minY, c2 = 0 === s2 ? t3.maxX : t3.maxY;\n if (r3 >= o2 && c2 < i2) {\n l2.push(t3);\n continue;\n }\n if (c2 < o2 || r3 >= i2) continue;\n let h2 = [];\n if (\"Point\" === n3 || \"MultiPoint\" === n3) A(e3, h2, o2, i2, s2);\n else if (\"LineString\" === n3) Z(e3, h2, o2, i2, s2, false, a2.lineMetrics);\n else if (\"MultiLineString\" === n3) E(e3, h2, o2, i2, s2, false);\n else if (\"Polygon\" === n3) E(e3, h2, o2, i2, s2, true);\n else if (\"MultiPolygon\" === n3) for (const t4 of e3) {\n const e4 = [];\n E(t4, e4, o2, i2, s2, true), e4.length && h2.push(e4);\n }\n if (h2.length) {\n if (a2.lineMetrics && \"LineString\" === n3) {\n for (const e4 of h2) l2.push(D(t3.id, n3, e4, t3.tags));\n continue;\n }\n \"LineString\" !== n3 && \"MultiLineString\" !== n3 || (1 === h2.length ? (n3 = \"LineString\", h2 = h2[0]) : n3 = \"MultiLineString\"), \"Point\" !== n3 && \"MultiPoint\" !== n3 || (n3 = 3 === h2.length ? \"Point\" : \"MultiPoint\"), l2.push(D(t3.id, n3, h2, t3.tags));\n }\n }\n return l2.length ? l2 : null;\n }\n function A(e2, t2, o2, i2, s2) {\n for (let n2 = 0; n2 < e2.length; n2 += 3) {\n const r2 = e2[n2 + s2];\n r2 >= o2 && r2 <= i2 && j(t2, e2[n2], e2[n2 + 1], e2[n2 + 2]);\n }\n }\n function Z(e2, t2, o2, i2, s2, n2, r2) {\n let a2 = R(e2);\n const l2 = 0 === s2 ? N : W;\n let c2, h2, u2 = e2.start;\n for (let d3 = 0; d3 < e2.length - 3; d3 += 3) {\n const g3 = e2[d3], f3 = e2[d3 + 1], p3 = e2[d3 + 2], m2 = e2[d3 + 3], y2 = e2[d3 + 4], v2 = 0 === s2 ? g3 : f3, x2 = 0 === s2 ? m2 : y2;\n let _2 = false;\n r2 && (c2 = Math.sqrt(Math.pow(g3 - m2, 2) + Math.pow(f3 - y2, 2))), v2 < o2 ? x2 > o2 && (h2 = l2(a2, g3, f3, m2, y2, o2), r2 && (a2.start = u2 + c2 * h2)) : v2 > i2 ? x2 < i2 && (h2 = l2(a2, g3, f3, m2, y2, i2), r2 && (a2.start = u2 + c2 * h2)) : j(a2, g3, f3, p3), x2 < o2 && v2 >= o2 && (h2 = l2(a2, g3, f3, m2, y2, o2), _2 = true), x2 > i2 && v2 <= i2 && (h2 = l2(a2, g3, f3, m2, y2, i2), _2 = true), !n2 && _2 && (r2 && (a2.end = u2 + c2 * h2), t2.push(a2), a2 = R(e2)), r2 && (u2 += c2);\n }\n let d2 = e2.length - 3;\n const g2 = e2[d2], f2 = e2[d2 + 1], p2 = 0 === s2 ? g2 : f2;\n p2 >= o2 && p2 <= i2 && j(a2, g2, f2, e2[d2 + 2]), d2 = a2.length - 3, n2 && d2 >= 3 && (a2[d2] !== a2[0] || a2[d2 + 1] !== a2[1]) && j(a2, a2[0], a2[1], a2[2]), a2.length && t2.push(a2);\n }\n function R(e2) {\n const t2 = [];\n return t2.size = e2.size, t2.start = e2.start, t2.end = e2.end, t2;\n }\n function E(e2, t2, o2, i2, s2, n2) {\n for (const r2 of e2) Z(r2, t2, o2, i2, s2, n2, false);\n }\n function j(e2, t2, o2, i2) {\n e2.push(t2, o2, i2);\n }\n function N(e2, t2, o2, i2, s2, n2) {\n const r2 = (n2 - t2) / (i2 - t2);\n return j(e2, n2, o2 + (s2 - o2) * r2, 1), r2;\n }\n function W(e2, t2, o2, i2, s2, n2) {\n const r2 = (n2 - o2) / (s2 - o2);\n return j(e2, t2 + (i2 - t2) * r2, n2, 1), r2;\n }\n function J(e2, t2) {\n const o2 = [];\n for (let i2 = 0; i2 < e2.length; i2++) {\n const s2 = e2[i2], n2 = s2.type;\n let r2;\n if (\"Point\" === n2 || \"MultiPoint\" === n2 || \"LineString\" === n2) r2 = Y(s2.geometry, t2);\n else if (\"MultiLineString\" === n2 || \"Polygon\" === n2) {\n r2 = [];\n for (const e3 of s2.geometry) r2.push(Y(e3, t2));\n } else if (\"MultiPolygon\" === n2) {\n r2 = [];\n for (const e3 of s2.geometry) {\n const o3 = [];\n for (const i3 of e3) o3.push(Y(i3, t2));\n r2.push(o3);\n }\n }\n o2.push(D(s2.id, n2, r2, s2.tags));\n }\n return o2;\n }\n function Y(e2, t2) {\n const o2 = [];\n o2.size = e2.size, void 0 !== e2.start && (o2.start = e2.start, o2.end = e2.end);\n for (let i2 = 0; i2 < e2.length; i2 += 3) o2.push(e2[i2] + t2, e2[i2 + 1], e2[i2 + 2]);\n return o2;\n }\n function q(e2, t2) {\n if (e2.transformed) return e2;\n const o2 = 1 << e2.z, i2 = e2.x, s2 = e2.y;\n for (const n2 of e2.features) {\n const e3 = n2.geometry, r2 = n2.type;\n if (n2.geometry = [], 1 === r2) for (let r3 = 0; r3 < e3.length; r3 += 2) n2.geometry.push(H(e3[r3], e3[r3 + 1], t2, o2, i2, s2));\n else for (let r3 = 0; r3 < e3.length; r3++) {\n const a2 = [];\n for (let n3 = 0; n3 < e3[r3].length; n3 += 2) a2.push(H(e3[r3][n3], e3[r3][n3 + 1], t2, o2, i2, s2));\n n2.geometry.push(a2);\n }\n }\n return e2.transformed = true, e2;\n }\n function H(e2, t2, o2, i2, s2, n2) {\n return [Math.round(o2 * (e2 * i2 - s2)), Math.round(o2 * (t2 * i2 - n2))];\n }\n function X(e2, t2, o2, i2, s2) {\n const n2 = t2 === s2.maxZoom ? 0 : s2.tolerance / ((1 << t2) * s2.extent), r2 = { features: [], numPoints: 0, numSimplified: 0, numFeatures: e2.length, source: null, x: o2, y: i2, z: t2, transformed: false, minX: 2, minY: 1, maxX: -1, maxY: 0 };\n for (const t3 of e2) $(r2, t3, n2, s2);\n return r2;\n }\n function $(e2, t2, o2, i2) {\n const s2 = t2.geometry, n2 = t2.type, r2 = [];\n if (e2.minX = Math.min(e2.minX, t2.minX), e2.minY = Math.min(e2.minY, t2.minY), e2.maxX = Math.max(e2.maxX, t2.maxX), e2.maxY = Math.max(e2.maxY, t2.maxY), \"Point\" === n2 || \"MultiPoint\" === n2) for (let t3 = 0; t3 < s2.length; t3 += 3) r2.push(s2[t3], s2[t3 + 1]), e2.numPoints++, e2.numSimplified++;\n else if (\"LineString\" === n2) B(r2, s2, e2, o2, false, false);\n else if (\"MultiLineString\" === n2 || \"Polygon\" === n2) for (let t3 = 0; t3 < s2.length; t3++) B(r2, s2[t3], e2, o2, \"Polygon\" === n2, 0 === t3);\n else if (\"MultiPolygon\" === n2) for (let t3 = 0; t3 < s2.length; t3++) {\n const i3 = s2[t3];\n for (let t4 = 0; t4 < i3.length; t4++) B(r2, i3[t4], e2, o2, true, 0 === t4);\n }\n if (r2.length) {\n let o3 = t2.tags || null;\n if (\"LineString\" === n2 && i2.lineMetrics) {\n o3 = {};\n for (const e3 in t2.tags) o3[e3] = t2.tags[e3];\n o3.mapbox_clip_start = s2.start / s2.size, o3.mapbox_clip_end = s2.end / s2.size;\n }\n const a2 = { geometry: r2, type: \"Polygon\" === n2 || \"MultiPolygon\" === n2 ? 3 : \"LineString\" === n2 || \"MultiLineString\" === n2 ? 2 : 1, tags: o3 };\n null !== t2.id && (a2.id = t2.id), e2.features.push(a2);\n }\n }\n function B(e2, t2, o2, i2, s2, n2) {\n const r2 = i2 * i2;\n if (i2 > 0 && t2.size < (s2 ? r2 : i2)) return void (o2.numPoints += t2.length / 3);\n const a2 = [];\n for (let e3 = 0; e3 < t2.length; e3 += 3) (0 === i2 || t2[e3 + 2] > r2) && (o2.numSimplified++, a2.push(t2[e3], t2[e3 + 1])), o2.numPoints++;\n s2 && (function(e3, t3) {\n let o3 = 0;\n for (let t4 = 0, i3 = e3.length, s3 = i3 - 2; t4 < i3; s3 = t4, t4 += 2) o3 += (e3[t4] - e3[s3]) * (e3[t4 + 1] + e3[s3 + 1]);\n if (o3 > 0 === t3) for (let t4 = 0, o4 = e3.length; t4 < o4 / 2; t4 += 2) {\n const i3 = e3[t4], s3 = e3[t4 + 1];\n e3[t4] = e3[o4 - 2 - t4], e3[t4 + 1] = e3[o4 - 1 - t4], e3[o4 - 2 - t4] = i3, e3[o4 - 1 - t4] = s3;\n }\n })(a2, n2), e2.push(a2);\n }\n const U = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: false, promoteId: null, generateId: false, debug: 0 };\n class V {\n constructor(e2, t2) {\n const o2 = (t2 = this.options = (function(e3, t3) {\n for (const o3 in t3) e3[o3] = t3[o3];\n return e3;\n })(Object.create(U), t2)).debug;\n if (o2 && console.time(\"preprocess data\"), t2.maxZoom < 0 || t2.maxZoom > 24) throw new Error(\"maxZoom should be in the 0-24 range\");\n if (t2.promoteId && t2.generateId) throw new Error(\"promoteId and generateId cannot be used together.\");\n let i2 = (function(e3, t3) {\n const o3 = [];\n if (\"FeatureCollection\" === e3.type) for (let i3 = 0; i3 < e3.features.length; i3++) T(o3, e3.features[i3], t3, i3);\n else T(o3, \"Feature\" === e3.type ? e3 : { geometry: e3 }, t3);\n return o3;\n })(e2, t2);\n this.tiles = {}, this.tileCoords = [], o2 && (console.timeEnd(\"preprocess data\"), console.log(\"index: maxZoom: %d, maxPoints: %d\", t2.indexMaxZoom, t2.indexMaxPoints), console.time(\"generate tiles\"), this.stats = {}, this.total = 0), i2 = (function(e3, t3) {\n const o3 = t3.buffer / t3.extent;\n let i3 = e3;\n const s2 = G(e3, 1, -1 - o3, o3, 0, -1, 2, t3), n2 = G(e3, 1, 1 - o3, 2 + o3, 0, -1, 2, t3);\n return (s2 || n2) && (i3 = G(e3, 1, -o3, 1 + o3, 0, -1, 2, t3) || [], s2 && (i3 = J(s2, 1).concat(i3)), n2 && (i3 = i3.concat(J(n2, -1)))), i3;\n })(i2, t2), i2.length && this.splitTile(i2, 0, 0, 0), o2 && (i2.length && console.log(\"features: %d, points: %d\", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd(\"generate tiles\"), console.log(\"tiles generated:\", this.total, JSON.stringify(this.stats)));\n }\n splitTile(e2, t2, o2, i2, s2, n2, r2) {\n const a2 = [e2, t2, o2, i2], l2 = this.options, c2 = l2.debug;\n for (; a2.length; ) {\n i2 = a2.pop(), o2 = a2.pop(), t2 = a2.pop(), e2 = a2.pop();\n const h2 = 1 << t2, u2 = K(t2, o2, i2);\n let d2 = this.tiles[u2];\n if (!d2 && (c2 > 1 && console.time(\"creation\"), d2 = this.tiles[u2] = X(e2, t2, o2, i2, l2), this.tileCoords.push({ z: t2, x: o2, y: i2 }), c2)) {\n c2 > 1 && (console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\", t2, o2, i2, d2.numFeatures, d2.numPoints, d2.numSimplified), console.timeEnd(\"creation\"));\n const e3 = `z${t2}`;\n this.stats[e3] = (this.stats[e3] || 0) + 1, this.total++;\n }\n if (d2.source = e2, null == s2) {\n if (t2 === l2.indexMaxZoom || d2.numPoints <= l2.indexMaxPoints) continue;\n } else {\n if (t2 === l2.maxZoom || t2 === s2) continue;\n if (null != s2) {\n const e3 = s2 - t2;\n if (o2 !== n2 >> e3 || i2 !== r2 >> e3) continue;\n }\n }\n if (d2.source = null, 0 === e2.length) continue;\n c2 > 1 && console.time(\"clipping\");\n const g2 = 0.5 * l2.buffer / l2.extent, f2 = 0.5 - g2, p2 = 0.5 + g2, m2 = 1 + g2;\n let y2 = null, v2 = null, x2 = null, _2 = null, w2 = G(e2, h2, o2 - g2, o2 + p2, 0, d2.minX, d2.maxX, l2), S2 = G(e2, h2, o2 + f2, o2 + m2, 0, d2.minX, d2.maxX, l2);\n e2 = null, w2 && (y2 = G(w2, h2, i2 - g2, i2 + p2, 1, d2.minY, d2.maxY, l2), v2 = G(w2, h2, i2 + f2, i2 + m2, 1, d2.minY, d2.maxY, l2), w2 = null), S2 && (x2 = G(S2, h2, i2 - g2, i2 + p2, 1, d2.minY, d2.maxY, l2), _2 = G(S2, h2, i2 + f2, i2 + m2, 1, d2.minY, d2.maxY, l2), S2 = null), c2 > 1 && console.timeEnd(\"clipping\"), a2.push(y2 || [], t2 + 1, 2 * o2, 2 * i2), a2.push(v2 || [], t2 + 1, 2 * o2, 2 * i2 + 1), a2.push(x2 || [], t2 + 1, 2 * o2 + 1, 2 * i2), a2.push(_2 || [], t2 + 1, 2 * o2 + 1, 2 * i2 + 1);\n }\n }\n getTile(e2, t2, o2) {\n e2 = +e2, t2 = +t2, o2 = +o2;\n const i2 = this.options, { extent: s2, debug: n2 } = i2;\n if (e2 < 0 || e2 > 24) return null;\n const r2 = 1 << e2, a2 = K(e2, t2 = t2 + r2 & r2 - 1, o2);\n if (this.tiles[a2]) return q(this.tiles[a2], s2);\n n2 > 1 && console.log(\"drilling down to z%d-%d-%d\", e2, t2, o2);\n let l2, c2 = e2, h2 = t2, u2 = o2;\n for (; !l2 && c2 > 0; ) c2--, h2 >>= 1, u2 >>= 1, l2 = this.tiles[K(c2, h2, u2)];\n return l2 && l2.source ? (n2 > 1 && (console.log(\"found parent tile z%d-%d-%d\", c2, h2, u2), console.time(\"drilling down\")), this.splitTile(l2.source, c2, h2, u2, e2, t2, o2), n2 > 1 && console.timeEnd(\"drilling down\"), this.tiles[a2] ? q(this.tiles[a2], s2) : null) : null;\n }\n }\n function K(e2, t2, o2) {\n return 32 * ((1 << e2) * o2 + t2) + e2;\n }\n class Q extends h {\n constructor(e2, t2, o2, i2 = ee) {\n super(e2, t2, o2), this._dataUpdateable = /* @__PURE__ */ new Map(), this._createGeoJSONIndex = i2;\n }\n loadVectorTile(t2, o2) {\n return e._(this, void 0, void 0, (function* () {\n const o3 = t2.tileID.canonical;\n if (!this._geoJSONIndex) throw new Error(\"Unable to parse the data into a cluster or geojson\");\n const i2 = this._geoJSONIndex.getTile(o3.z, o3.x, o3.y);\n return i2 ? l(new e.d3(i2.features, { version: 2, extent: e.a5 })) : null;\n }));\n }\n loadData(t2) {\n return e._(this, void 0, void 0, (function* () {\n var o2;\n null === (o2 = this._pendingRequest) || void 0 === o2 || o2.abort();\n const i2 = this._startPerformance(t2);\n this._pendingRequest = new AbortController();\n try {\n (!this._pendingData || t2.request || t2.data || t2.dataDiff) && (this._pendingData = this.loadAndProcessGeoJSON(t2, this._pendingRequest));\n const e2 = yield this._pendingData;\n this._geoJSONIndex = this._createGeoJSONIndex(e2, t2), this.loaded = {};\n const o3 = {};\n return this._finishPerformance(i2, t2, o3), o3;\n } catch (t3) {\n if (delete this._pendingRequest, e.Z(t3)) return { abandoned: true };\n throw t3;\n }\n }));\n }\n _startPerformance(t2) {\n var o2;\n if (null === (o2 = null == t2 ? void 0 : t2.request) || void 0 === o2 ? void 0 : o2.collectResourceTiming) return new e.c$(t2.request);\n }\n _finishPerformance(e2, t2, o2) {\n if (!e2) return;\n const i2 = e2.finish();\n i2 && (o2.resourceTiming = {}, o2.resourceTiming[t2.source] = JSON.parse(JSON.stringify(i2)));\n }\n getData() {\n return e._(this, void 0, void 0, (function* () {\n return this._pendingData;\n }));\n }\n reloadTile(e2) {\n const t2 = this.loaded;\n return t2 && t2[e2.uid] ? super.reloadTile(e2) : this.loadTile(e2);\n }\n loadAndProcessGeoJSON(t2, o2) {\n return e._(this, void 0, void 0, (function* () {\n let e2;\n if (t2.request ? e2 = yield this.loadGeoJSONFromUrl(t2.request, t2.promoteId, o2) : t2.data ? e2 = this._loadGeoJSONFromObject(t2.data, t2.promoteId) : t2.dataDiff && (e2 = this._loadGeoJSONFromDiff(t2.dataDiff, t2.promoteId, t2.source)), delete this._pendingRequest, \"object\" != typeof e2) throw new Error(`Input data given to '${t2.source}' is not a valid GeoJSON object.`);\n return p(e2, true), t2.filter && (e2 = this._filterGeoJSON(e2, t2.filter)), e2;\n }));\n }\n loadGeoJSONFromUrl(t2, o2, i2) {\n return e._(this, void 0, void 0, (function* () {\n const s2 = yield e.j(t2, i2);\n return this._dataUpdateable = e.a7(s2.data, o2) ? e.a8(s2.data, o2) : void 0, s2.data;\n }));\n }\n _loadGeoJSONFromObject(t2, o2) {\n return this._dataUpdateable = e.a7(t2, o2) ? e.a8(t2, o2) : void 0, t2;\n }\n _loadGeoJSONFromDiff(t2, o2, i2) {\n if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${i2}`);\n e.a9(this._dataUpdateable, t2, o2);\n const s2 = Array.from(this._dataUpdateable.values());\n return this._toFeatureCollection(s2);\n }\n _filterGeoJSON(t2, o2) {\n const i2 = e.d4(o2, { type: \"boolean\", \"property-type\": \"data-driven\", overridable: false, transition: false });\n if (\"error\" === i2.result) throw new Error(i2.value.map(((e2) => `${e2.key}: ${e2.message}`)).join(\", \"));\n const s2 = t2.features.filter(((e2) => i2.value.evaluate({ zoom: 0 }, e2)));\n return this._toFeatureCollection(s2);\n }\n _toFeatureCollection(e2) {\n return { type: \"FeatureCollection\", features: e2 };\n }\n removeSource(t2) {\n return e._(this, void 0, void 0, (function* () {\n this._pendingRequest && this._pendingRequest.abort();\n }));\n }\n getClusterExpansionZoom(e2) {\n return this._geoJSONIndex.getClusterExpansionZoom(e2.clusterId);\n }\n getClusterChildren(e2) {\n return this._geoJSONIndex.getChildren(e2.clusterId);\n }\n getClusterLeaves(e2) {\n return this._geoJSONIndex.getLeaves(e2.clusterId, e2.limit, e2.offset);\n }\n }\n function ee(t2, o2) {\n return o2.cluster ? new x((function({ superclusterOptions: t3, clusterProperties: o3 }) {\n if (!o3 || !t3) return t3;\n const i2 = {}, s2 = {}, n2 = { accumulated: null, zoom: 0 }, r2 = { properties: null }, a2 = Object.keys(o3);\n for (const t4 of a2) {\n const [n3, r3] = o3[t4], a3 = e.d4(r3), l2 = e.d4(\"string\" == typeof n3 ? [n3, [\"accumulated\"], [\"get\", t4]] : n3);\n i2[t4] = a3.value, s2[t4] = l2.value;\n }\n return t3.map = (e2) => {\n r2.properties = e2;\n const t4 = {};\n for (const e3 of a2) t4[e3] = i2[e3].evaluate(n2, r2);\n return t4;\n }, t3.reduce = (e2, t4) => {\n r2.properties = t4;\n for (const t5 of a2) n2.accumulated = e2[t5], e2[t5] = s2[t5].evaluate(n2, r2);\n }, t3;\n })(o2)).load(t2.features) : (function(e2, t3) {\n return new V(e2, t3);\n })(t2, o2.geojsonVtOptions);\n }\n class te {\n constructor(t2) {\n this.self = t2, this.actor = new e.L(t2), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.globalStates = /* @__PURE__ */ new Map(), this.self.registerWorkerSource = (e2, t3) => {\n if (this.externalWorkerSourceTypes[e2]) throw new Error(`Worker source with name \"${e2}\" already registered.`);\n this.externalWorkerSourceTypes[e2] = t3;\n }, this.self.addProtocol = e.cK, this.self.removeProtocol = e.cL, this.self.registerRTLTextPlugin = (t3) => {\n e.d5.setMethods(t3);\n }, this.actor.registerMessageHandler(\"LDT\", ((e2, t3) => this._getDEMWorkerSource(e2, t3.source).loadTile(t3))), this.actor.registerMessageHandler(\"RDT\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n this._getDEMWorkerSource(t3, o2.source).removeTile(o2);\n })))), this.actor.registerMessageHandler(\"GCEZ\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n return this._getWorkerSource(t3, o2.type, o2.source).getClusterExpansionZoom(o2);\n })))), this.actor.registerMessageHandler(\"GCC\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n return this._getWorkerSource(t3, o2.type, o2.source).getClusterChildren(o2);\n })))), this.actor.registerMessageHandler(\"GCL\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n return this._getWorkerSource(t3, o2.type, o2.source).getClusterLeaves(o2);\n })))), this.actor.registerMessageHandler(\"LD\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).loadData(t3))), this.actor.registerMessageHandler(\"GD\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).getData())), this.actor.registerMessageHandler(\"LT\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).loadTile(t3))), this.actor.registerMessageHandler(\"RT\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).reloadTile(t3))), this.actor.registerMessageHandler(\"AT\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).abortTile(t3))), this.actor.registerMessageHandler(\"RMT\", ((e2, t3) => this._getWorkerSource(e2, t3.type, t3.source).removeTile(t3))), this.actor.registerMessageHandler(\"RS\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n if (!this.workerSources[t3] || !this.workerSources[t3][o2.type] || !this.workerSources[t3][o2.type][o2.source]) return;\n const e2 = this.workerSources[t3][o2.type][o2.source];\n delete this.workerSources[t3][o2.type][o2.source], void 0 !== e2.removeSource && e2.removeSource(o2);\n })))), this.actor.registerMessageHandler(\"RM\", ((t3) => e._(this, void 0, void 0, (function* () {\n delete this.layerIndexes[t3], delete this.availableImages[t3], delete this.workerSources[t3], delete this.demWorkerSources[t3], this.globalStates.delete(t3);\n })))), this.actor.registerMessageHandler(\"SR\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n this.referrer = o2;\n })))), this.actor.registerMessageHandler(\"SRPS\", ((e2, t3) => this._syncRTLPluginState(e2, t3))), this.actor.registerMessageHandler(\"IS\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n this.self.importScripts(o2);\n })))), this.actor.registerMessageHandler(\"SI\", ((e2, t3) => this._setImages(e2, t3))), this.actor.registerMessageHandler(\"UL\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n this._getLayerIndex(t3).update(o2.layers, o2.removedIds, this._getGlobalState(t3));\n })))), this.actor.registerMessageHandler(\"UGS\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n const e2 = this._getGlobalState(t3);\n for (const t4 in o2) e2[t4] = o2[t4];\n })))), this.actor.registerMessageHandler(\"SL\", ((t3, o2) => e._(this, void 0, void 0, (function* () {\n this._getLayerIndex(t3).replace(o2, this._getGlobalState(t3));\n }))));\n }\n _getGlobalState(e2) {\n let t2 = this.globalStates.get(e2);\n return t2 || (t2 = {}, this.globalStates.set(e2, t2)), t2;\n }\n _setImages(t2, o2) {\n return e._(this, void 0, void 0, (function* () {\n this.availableImages[t2] = o2;\n for (const e2 in this.workerSources[t2]) {\n const i2 = this.workerSources[t2][e2];\n for (const e3 in i2) i2[e3].availableImages = o2;\n }\n }));\n }\n _syncRTLPluginState(t2, o2) {\n return e._(this, void 0, void 0, (function* () {\n return yield e.d5.syncState(o2, this.self.importScripts);\n }));\n }\n _getAvailableImages(e2) {\n let t2 = this.availableImages[e2];\n return t2 || (t2 = []), t2;\n }\n _getLayerIndex(e2) {\n let o2 = this.layerIndexes[e2];\n return o2 || (o2 = this.layerIndexes[e2] = new t()), o2;\n }\n _getWorkerSource(e2, t2, o2) {\n if (this.workerSources[e2] || (this.workerSources[e2] = {}), this.workerSources[e2][t2] || (this.workerSources[e2][t2] = {}), !this.workerSources[e2][t2][o2]) {\n const i2 = { sendAsync: (t3, o3) => (t3.targetMapId = e2, this.actor.sendAsync(t3, o3)) };\n switch (t2) {\n case \"vector\":\n this.workerSources[e2][t2][o2] = new h(i2, this._getLayerIndex(e2), this._getAvailableImages(e2));\n break;\n case \"geojson\":\n this.workerSources[e2][t2][o2] = new Q(i2, this._getLayerIndex(e2), this._getAvailableImages(e2));\n break;\n default:\n this.workerSources[e2][t2][o2] = new this.externalWorkerSourceTypes[t2](i2, this._getLayerIndex(e2), this._getAvailableImages(e2));\n }\n }\n return this.workerSources[e2][t2][o2];\n }\n _getDEMWorkerSource(e2, t2) {\n return this.demWorkerSources[e2] || (this.demWorkerSources[e2] = {}), this.demWorkerSources[e2][t2] || (this.demWorkerSources[e2][t2] = new u()), this.demWorkerSources[e2][t2];\n }\n }\n return e.i(self) && (self.worker = new te(self)), te;\n }));\n define2(\"index\", [\"exports\", \"./shared\"], (function(e, t) {\n \"use strict\";\n var i = \"5.14.0\";\n function a() {\n var e2 = new t.A(4);\n return t.A != Float32Array && (e2[1] = 0, e2[2] = 0), e2[0] = 1, e2[3] = 1, e2;\n }\n let r, o, s;\n const n = { frame(e2, i2, a2) {\n const r2 = requestAnimationFrame(((e3) => {\n o2(), i2(e3);\n })), { unsubscribe: o2 } = t.s(e2.signal, \"abort\", (() => {\n o2(), cancelAnimationFrame(r2), a2(new t.a(e2.signal.reason));\n }), false);\n }, frameAsync(e2) {\n return new Promise(((t2, i2) => {\n this.frame(e2, t2, i2);\n }));\n }, getImageData(e2, t2 = 0) {\n return this.getImageCanvasContext(e2).getImageData(-t2, -t2, e2.width + 2 * t2, e2.height + 2 * t2);\n }, getImageCanvasContext(e2) {\n const t2 = window.document.createElement(\"canvas\"), i2 = t2.getContext(\"2d\", { willReadFrequently: true });\n if (!i2) throw new Error(\"failed to create canvas 2d context\");\n return t2.width = e2.width, t2.height = e2.height, i2.drawImage(e2, 0, 0, e2.width, e2.height), i2;\n }, resolveURL: (e2) => (r || (r = document.createElement(\"a\")), r.href = e2, r.href), hardwareConcurrency: \"undefined\" != typeof navigator && navigator.hardwareConcurrency || 4, get prefersReducedMotion() {\n return void 0 !== s ? s : !!matchMedia && (null == o && (o = matchMedia(\"(prefers-reduced-motion: reduce)\")), o.matches);\n }, set prefersReducedMotion(e2) {\n s = e2;\n } }, l = new class {\n constructor() {\n this._realTime = \"undefined\" != typeof performance && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), this._frozenAt = null;\n }\n getCurrentTime() {\n return null !== this._frozenAt ? this._frozenAt : this._realTime();\n }\n setNow(e2) {\n this._frozenAt = e2;\n }\n restoreNow() {\n this._frozenAt = null;\n }\n isFrozen() {\n return null !== this._frozenAt;\n }\n }();\n function c() {\n return l.getCurrentTime();\n }\n class h {\n static testProp(e2) {\n if (!h.docStyle) return e2[0];\n for (let t2 = 0; t2 < e2.length; t2++) if (e2[t2] in h.docStyle) return e2[t2];\n return e2[0];\n }\n static create(e2, t2, i2) {\n const a2 = window.document.createElement(e2);\n return void 0 !== t2 && (a2.className = t2), i2 && i2.appendChild(a2), a2;\n }\n static createNS(e2, t2) {\n return window.document.createElementNS(e2, t2);\n }\n static disableDrag() {\n h.docStyle && h.selectProp && (h.userSelect = h.docStyle[h.selectProp], h.docStyle[h.selectProp] = \"none\");\n }\n static enableDrag() {\n h.docStyle && h.selectProp && (h.docStyle[h.selectProp] = h.userSelect);\n }\n static setTransform(e2, t2) {\n e2.style[h.transformProp] = t2;\n }\n static addEventListener(e2, t2, i2, a2 = {}) {\n e2.addEventListener(t2, i2, \"passive\" in a2 ? a2 : a2.capture);\n }\n static removeEventListener(e2, t2, i2, a2 = {}) {\n e2.removeEventListener(t2, i2, \"passive\" in a2 ? a2 : a2.capture);\n }\n static suppressClickInternal(e2) {\n e2.preventDefault(), e2.stopPropagation(), window.removeEventListener(\"click\", h.suppressClickInternal, true);\n }\n static suppressClick() {\n window.addEventListener(\"click\", h.suppressClickInternal, true), window.setTimeout((() => {\n window.removeEventListener(\"click\", h.suppressClickInternal, true);\n }), 0);\n }\n static getScale(e2) {\n const t2 = e2.getBoundingClientRect();\n return { x: t2.width / e2.offsetWidth || 1, y: t2.height / e2.offsetHeight || 1, boundingClientRect: t2 };\n }\n static getPoint(e2, i2, a2) {\n const r2 = i2.boundingClientRect;\n return new t.P((a2.clientX - r2.left) / i2.x - e2.clientLeft, (a2.clientY - r2.top) / i2.y - e2.clientTop);\n }\n static mousePos(e2, t2) {\n const i2 = h.getScale(e2);\n return h.getPoint(e2, i2, t2);\n }\n static touchPos(e2, t2) {\n const i2 = [], a2 = h.getScale(e2);\n for (let r2 = 0; r2 < t2.length; r2++) i2.push(h.getPoint(e2, a2, t2[r2]));\n return i2;\n }\n static mouseButton(e2) {\n return e2.button;\n }\n static remove(e2) {\n e2.parentNode && e2.parentNode.removeChild(e2);\n }\n static sanitize(e2) {\n const t2 = new DOMParser().parseFromString(e2, \"text/html\").body || document.createElement(\"body\"), i2 = t2.querySelectorAll(\"script\");\n for (const e3 of i2) e3.remove();\n return h.clean(t2), t2.innerHTML;\n }\n static isPossiblyDangerous(e2, t2) {\n const i2 = t2.replace(/\\s+/g, \"\").toLowerCase();\n return !(![\"src\", \"href\", \"xlink:href\"].includes(e2) || !i2.includes(\"javascript:\") && !i2.includes(\"data:\")) || !!e2.startsWith(\"on\") || void 0;\n }\n static clean(e2) {\n const t2 = e2.children;\n for (const e3 of t2) h.removeAttributes(e3), h.clean(e3);\n }\n static removeAttributes(e2) {\n for (const { name: t2, value: i2 } of e2.attributes) h.isPossiblyDangerous(t2, i2) && e2.removeAttribute(t2);\n }\n }\n h.docStyle = \"undefined\" != typeof window && window.document && window.document.documentElement.style, h.selectProp = h.testProp([\"userSelect\", \"MozUserSelect\", \"WebkitUserSelect\", \"msUserSelect\"]), h.transformProp = h.testProp([\"transform\", \"WebkitTransform\"]);\n const u = { supported: false, testSupport: function(e2) {\n !p && _ && (m ? f(e2) : d = e2);\n } };\n let d, _, p = false, m = false;\n function f(e2) {\n const t2 = e2.createTexture();\n e2.bindTexture(e2.TEXTURE_2D, t2);\n try {\n if (e2.texImage2D(e2.TEXTURE_2D, 0, e2.RGBA, e2.RGBA, e2.UNSIGNED_BYTE, _), e2.isContextLost()) return;\n u.supported = true;\n } catch (e3) {\n }\n e2.deleteTexture(t2), p = true;\n }\n var g;\n \"undefined\" != typeof document && (_ = document.createElement(\"img\"), _.onload = () => {\n d && f(d), d = null, m = true;\n }, _.onerror = () => {\n p = true, d = null;\n }, _.src = \"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\"), (function(e2) {\n let i2, a2, r2, o2;\n e2.resetRequestQueue = () => {\n i2 = [], a2 = 0, r2 = 0, o2 = {};\n }, e2.addThrottleControl = (e3) => {\n const t2 = r2++;\n return o2[t2] = e3, t2;\n }, e2.removeThrottleControl = (e3) => {\n delete o2[e3], n2();\n }, e2.getImage = (e3, a3, r3 = true) => new Promise(((o3, s3) => {\n u.supported && (e3.headers || (e3.headers = {}), e3.headers.accept = \"image/webp,*/*\"), t.e(e3, { type: \"image\" }), i2.push({ abortController: a3, requestParameters: e3, supportImageRefresh: r3, state: \"queued\", onError: (e4) => {\n s3(e4);\n }, onSuccess: (e4) => {\n o3(e4);\n } }), n2();\n }));\n const s2 = (e3) => t._(this, void 0, void 0, (function* () {\n e3.state = \"running\";\n const { requestParameters: i3, supportImageRefresh: r3, onError: o3, onSuccess: s3, abortController: c2 } = e3, h2 = false === r3 && !t.i(self) && !t.g(i3.url) && (!i3.headers || Object.keys(i3.headers).reduce(((e4, t2) => e4 && \"accept\" === t2), true));\n a2++;\n const u2 = h2 ? l2(i3, c2) : t.m(i3, c2);\n try {\n const i4 = yield u2;\n delete e3.abortController, e3.state = \"completed\", i4.data instanceof HTMLImageElement || t.b(i4.data) ? s3(i4) : i4.data && s3({ data: yield (d2 = i4.data, \"function\" == typeof createImageBitmap ? t.f(d2) : t.h(d2)), cacheControl: i4.cacheControl, expires: i4.expires });\n } catch (t2) {\n delete e3.abortController, o3(t2);\n } finally {\n a2--, n2();\n }\n var d2;\n })), n2 = () => {\n const e3 = (() => {\n for (const e4 of Object.keys(o2)) if (o2[e4]()) return true;\n return false;\n })() ? t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : t.c.MAX_PARALLEL_IMAGE_REQUESTS;\n for (let t2 = a2; t2 < e3 && i2.length > 0; t2++) {\n const e4 = i2.shift();\n e4.abortController.signal.aborted ? t2-- : s2(e4);\n }\n }, l2 = (e3, i3) => new Promise(((a3, r3) => {\n const o3 = new Image(), s3 = e3.url, n3 = e3.credentials;\n n3 && \"include\" === n3 ? o3.crossOrigin = \"use-credentials\" : (n3 && \"same-origin\" === n3 || !t.d(s3)) && (o3.crossOrigin = \"anonymous\"), i3.signal.addEventListener(\"abort\", (() => {\n o3.src = \"\", r3(new t.a(i3.signal.reason));\n })), o3.fetchPriority = \"high\", o3.onload = () => {\n o3.onerror = o3.onload = null, a3({ data: o3 });\n }, o3.onerror = () => {\n o3.onerror = o3.onload = null, i3.signal.aborted || r3(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"));\n }, o3.src = s3;\n }));\n })(g || (g = {})), g.resetRequestQueue();\n class v {\n constructor(e2) {\n this._transformRequestFn = null != e2 ? e2 : null;\n }\n transformRequest(e2, t2) {\n return this._transformRequestFn && this._transformRequestFn(e2, t2) || { url: e2 };\n }\n setTransformRequest(e2) {\n this._transformRequestFn = e2;\n }\n }\n function x(e2) {\n const t2 = [];\n if (\"string\" == typeof e2) t2.push({ id: \"default\", url: e2 });\n else if (e2 && e2.length > 0) {\n const i2 = [];\n for (const { id: a2, url: r2 } of e2) {\n const e3 = `${a2}${r2}`;\n -1 === i2.indexOf(e3) && (i2.push(e3), t2.push({ id: a2, url: r2 }));\n }\n }\n return t2;\n }\n function b(e2, t2, i2) {\n try {\n const a2 = new URL(e2);\n return a2.pathname += `${t2}${i2}`, a2.toString();\n } catch (t3) {\n throw new Error(`Invalid sprite URL \"${e2}\", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`);\n }\n }\n function y(e2) {\n const { userImage: t2 } = e2;\n return !!(t2 && t2.render && t2.render()) && (e2.data.replace(new Uint8Array(t2.data.buffer)), true);\n }\n class w extends t.E {\n constructor() {\n super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = false, this.requestors = [], this.patterns = {}, this.atlasImage = new t.R({ width: 1, height: 1 }), this.dirty = true;\n }\n destroy() {\n this.atlasTexture && (this.atlasTexture.destroy(), this.atlasTexture = null);\n for (const e2 of Object.keys(this.images)) this.removeImage(e2);\n this.patterns = {}, this.atlasImage = new t.R({ width: 1, height: 1 }), this.dirty = true;\n }\n isLoaded() {\n return this.loaded;\n }\n setLoaded(e2) {\n if (this.loaded !== e2 && (this.loaded = e2, e2)) {\n for (const { ids: e3, promiseResolve: t2 } of this.requestors) t2(this._getImagesForIds(e3));\n this.requestors = [];\n }\n }\n getImage(e2) {\n const i2 = this.images[e2];\n if (i2 && !i2.data && i2.spriteData) {\n const e3 = i2.spriteData;\n i2.data = new t.R({ width: e3.width, height: e3.height }, e3.context.getImageData(e3.x, e3.y, e3.width, e3.height).data), i2.spriteData = null;\n }\n return i2;\n }\n addImage(e2, t2) {\n if (this.images[e2]) throw new Error(`Image id ${e2} already exist, use updateImage instead`);\n this._validate(e2, t2) && (this.images[e2] = t2);\n }\n _validate(e2, i2) {\n let a2 = true;\n const r2 = i2.data || i2.spriteData;\n return this._validateStretch(i2.stretchX, r2 && r2.width) || (this.fire(new t.k(new Error(`Image \"${e2}\" has invalid \"stretchX\" value`))), a2 = false), this._validateStretch(i2.stretchY, r2 && r2.height) || (this.fire(new t.k(new Error(`Image \"${e2}\" has invalid \"stretchY\" value`))), a2 = false), this._validateContent(i2.content, i2) || (this.fire(new t.k(new Error(`Image \"${e2}\" has invalid \"content\" value`))), a2 = false), a2;\n }\n _validateStretch(e2, t2) {\n if (!e2) return true;\n let i2 = 0;\n for (const a2 of e2) {\n if (a2[0] < i2 || a2[1] < a2[0] || t2 < a2[1]) return false;\n i2 = a2[1];\n }\n return true;\n }\n _validateContent(e2, t2) {\n if (!e2) return true;\n if (4 !== e2.length) return false;\n const i2 = t2.spriteData, a2 = i2 && i2.width || t2.data.width, r2 = i2 && i2.height || t2.data.height;\n return !(e2[0] < 0 || a2 < e2[0] || e2[1] < 0 || r2 < e2[1] || e2[2] < 0 || a2 < e2[2] || e2[3] < 0 || r2 < e2[3] || e2[2] < e2[0] || e2[3] < e2[1]);\n }\n updateImage(e2, t2, i2 = true) {\n const a2 = this.getImage(e2);\n if (i2 && (a2.data.width !== t2.data.width || a2.data.height !== t2.data.height)) throw new Error(`size mismatch between old image (${a2.data.width}x${a2.data.height}) and new image (${t2.data.width}x${t2.data.height}).`);\n t2.version = a2.version + 1, this.images[e2] = t2, this.updatedImages[e2] = true;\n }\n removeImage(e2) {\n const t2 = this.images[e2];\n delete this.images[e2], delete this.patterns[e2], t2.userImage && t2.userImage.onRemove && t2.userImage.onRemove();\n }\n listImages() {\n return Object.keys(this.images);\n }\n getImages(e2) {\n return new Promise(((t2, i2) => {\n let a2 = true;\n if (!this.isLoaded()) for (const t3 of e2) this.images[t3] || (a2 = false);\n this.isLoaded() || a2 ? t2(this._getImagesForIds(e2)) : this.requestors.push({ ids: e2, promiseResolve: t2 });\n }));\n }\n _getImagesForIds(e2) {\n const i2 = {};\n for (const a2 of e2) {\n let e3 = this.getImage(a2);\n e3 || (this.fire(new t.l(\"styleimagemissing\", { id: a2 })), e3 = this.getImage(a2)), e3 ? i2[a2] = { data: e3.data.clone(), pixelRatio: e3.pixelRatio, sdf: e3.sdf, version: e3.version, stretchX: e3.stretchX, stretchY: e3.stretchY, content: e3.content, textFitWidth: e3.textFitWidth, textFitHeight: e3.textFitHeight, hasRenderCallback: Boolean(e3.userImage && e3.userImage.render) } : t.w(`Image \"${a2}\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.`);\n }\n return i2;\n }\n getPixelSize() {\n const { width: e2, height: t2 } = this.atlasImage;\n return { width: e2, height: t2 };\n }\n getPattern(e2) {\n const i2 = this.patterns[e2], a2 = this.getImage(e2);\n if (!a2) return null;\n if (i2 && i2.position.version === a2.version) return i2.position;\n if (i2) i2.position.version = a2.version;\n else {\n const i3 = { w: a2.data.width + 2, h: a2.data.height + 2, x: 0, y: 0 }, r2 = new t.I(i3, a2);\n this.patterns[e2] = { bin: i3, position: r2 };\n }\n return this._updatePatternAtlas(), this.patterns[e2].position;\n }\n bind(e2) {\n const i2 = e2.gl;\n this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = false) : this.atlasTexture = new t.T(e2, this.atlasImage, i2.RGBA), this.atlasTexture.bind(i2.LINEAR, i2.CLAMP_TO_EDGE);\n }\n _updatePatternAtlas() {\n const e2 = [];\n for (const t2 in this.patterns) e2.push(this.patterns[t2].bin);\n const { w: i2, h: a2 } = t.p(e2), r2 = this.atlasImage;\n r2.resize({ width: i2 || 1, height: a2 || 1 });\n for (const e3 in this.patterns) {\n const { bin: i3 } = this.patterns[e3], a3 = i3.x + 1, o2 = i3.y + 1, s2 = this.getImage(e3).data, n2 = s2.width, l2 = s2.height;\n t.R.copy(s2, r2, { x: 0, y: 0 }, { x: a3, y: o2 }, { width: n2, height: l2 }), t.R.copy(s2, r2, { x: 0, y: l2 - 1 }, { x: a3, y: o2 - 1 }, { width: n2, height: 1 }), t.R.copy(s2, r2, { x: 0, y: 0 }, { x: a3, y: o2 + l2 }, { width: n2, height: 1 }), t.R.copy(s2, r2, { x: n2 - 1, y: 0 }, { x: a3 - 1, y: o2 }, { width: 1, height: l2 }), t.R.copy(s2, r2, { x: 0, y: 0 }, { x: a3 + n2, y: o2 }, { width: 1, height: l2 });\n }\n this.dirty = true;\n }\n beginFrame() {\n this.callbackDispatchedThisFrame = {};\n }\n dispatchRenderCallbacks(e2) {\n for (const i2 of e2) {\n if (this.callbackDispatchedThisFrame[i2]) continue;\n this.callbackDispatchedThisFrame[i2] = true;\n const e3 = this.getImage(i2);\n e3 || t.w(`Image with ID: \"${i2}\" was not found`), y(e3) && this.updateImage(i2, e3);\n }\n }\n cloneImages() {\n const e2 = {};\n for (const t2 in this.images) {\n const i2 = this.images[t2];\n e2[t2] = Object.assign(Object.assign({}, i2), { data: i2.data ? i2.data.clone() : null });\n }\n return e2;\n }\n }\n const T = 1e20;\n function P(e2, t2, i2, a2, r2, o2, s2, n2, l2) {\n for (let c2 = t2; c2 < t2 + a2; c2++) I(e2, i2 * o2 + c2, o2, r2, s2, n2, l2);\n for (let c2 = i2; c2 < i2 + r2; c2++) I(e2, c2 * o2 + t2, 1, a2, s2, n2, l2);\n }\n function I(e2, t2, i2, a2, r2, o2, s2) {\n o2[0] = 0, s2[0] = -T, s2[1] = T, r2[0] = e2[t2];\n for (let n2 = 1, l2 = 0, c2 = 0; n2 < a2; n2++) {\n r2[n2] = e2[t2 + n2 * i2];\n const a3 = n2 * n2;\n do {\n const e3 = o2[l2];\n c2 = (r2[n2] - r2[e3] + a3 - e3 * e3) / (n2 - e3) / 2;\n } while (c2 <= s2[l2] && --l2 > -1);\n l2++, o2[l2] = n2, s2[l2] = c2, s2[l2 + 1] = T;\n }\n for (let n2 = 0, l2 = 0; n2 < a2; n2++) {\n for (; s2[l2 + 1] < n2; ) l2++;\n const a3 = o2[l2], c2 = n2 - a3;\n e2[t2 + n2 * i2] = r2[a3] + c2 * c2;\n }\n }\n const C = t.v.layout_symbol[\"text-font\"].default.join(\",\");\n class M {\n constructor(e2, t2, i2) {\n this.requestManager = e2, this.localIdeographFontFamily = t2, this.entries = {}, this.lang = i2;\n }\n setURL(e2) {\n this.url = e2;\n }\n getGlyphs(e2) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = [];\n for (const i3 in e2) for (const a3 of e2[i3]) t2.push(this._getAndCacheGlyphsPromise(i3, a3));\n const i2 = yield Promise.all(t2), a2 = {};\n for (const { stack: e3, id: t3, glyph: r2 } of i2) a2[e3] || (a2[e3] = {}), a2[e3][t3] = r2 && { id: r2.id, bitmap: r2.bitmap.clone(), metrics: r2.metrics };\n return a2;\n }));\n }\n _getAndCacheGlyphsPromise(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n let t2 = this.entries[e2];\n t2 || (t2 = this.entries[e2] = { glyphs: {}, requests: {}, ranges: {} });\n let a2 = t2.glyphs[i2];\n return void 0 !== a2 ? { stack: e2, id: i2, glyph: a2 } : !this.url || this._charUsesLocalIdeographFontFamily(i2) ? (a2 = t2.glyphs[i2] = this._drawGlyph(t2, e2, i2), { stack: e2, id: i2, glyph: a2 }) : yield this._downloadAndCacheRangePromise(e2, i2);\n }));\n }\n _downloadAndCacheRangePromise(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = this.entries[e2], a2 = Math.floor(i2 / 256);\n if (t2.ranges[a2]) return { stack: e2, id: i2, glyph: null };\n if (!t2.requests[a2]) {\n const i3 = M.loadGlyphRange(e2, a2, this.url, this.requestManager);\n t2.requests[a2] = i3;\n }\n try {\n const r2 = yield t2.requests[a2];\n for (const e3 in r2) t2.glyphs[+e3] = r2[+e3];\n return t2.ranges[a2] = true, { stack: e2, id: i2, glyph: r2[i2] || null };\n } catch (r2) {\n const o2 = t2.glyphs[i2] = this._drawGlyph(t2, e2, i2);\n return this._warnOnMissingGlyphRange(o2, a2, i2, r2), { stack: e2, id: i2, glyph: o2 };\n }\n }));\n }\n _warnOnMissingGlyphRange(e2, i2, a2, r2) {\n const o2 = 256 * i2, s2 = o2 + 255, n2 = a2.toString(16).padStart(4, \"0\").toUpperCase();\n t.w(`Unable to load glyph range ${i2}, ${o2}-${s2}. Rendering codepoint U+${n2} locally instead. ${r2}`);\n }\n _charUsesLocalIdeographFontFamily(e2) {\n return !!this.localIdeographFontFamily && t.q(e2);\n }\n _drawGlyph(e2, i2, a2) {\n const r2 = i2 === C && \"\" !== this.localIdeographFontFamily && this._charUsesLocalIdeographFontFamily(a2), o2 = r2 ? \"ideographTinySDF\" : \"tinySDF\";\n e2[o2] || (e2[o2] = this._createTinySDF(r2 ? this.localIdeographFontFamily : i2));\n const s2 = e2[o2].draw(String.fromCodePoint(a2));\n return { id: a2, bitmap: new t.r({ width: s2.width || 60, height: s2.height || 60 }, s2.data), metrics: { width: s2.glyphWidth / 2 || 24, height: s2.glyphHeight / 2 || 24, left: s2.glyphLeft / 2 + 0.5 || 0, top: s2.glyphTop / 2 - 27.5 || -8, advance: s2.glyphAdvance / 2 || 24, isDoubleResolution: true } };\n }\n _createTinySDF(e2) {\n const t2 = e2 ? e2.split(\",\") : [];\n t2.push(\"sans-serif\");\n const i2 = t2.map(((e3) => /[-\\w]+/.test(e3) ? e3 : `'${CSS.escape(e3)}'`)).join(\",\");\n return new M.TinySDF({ fontSize: 48, buffer: 6, radius: 16, cutoff: 0.25, fontFamily: i2, fontWeight: this._fontWeight(t2[0]), fontStyle: this._fontStyle(t2[0]), lang: this.lang });\n }\n _fontStyle(e2) {\n return /italic/i.test(e2) ? \"italic\" : /oblique/i.test(e2) ? \"oblique\" : \"normal\";\n }\n _fontWeight(e2) {\n const t2 = { thin: 100, hairline: 100, \"extra light\": 200, \"ultra light\": 200, light: 300, normal: 400, regular: 400, medium: 500, semibold: 600, demibold: 600, bold: 700, \"extra bold\": 800, \"ultra bold\": 800, black: 900, heavy: 900, \"extra black\": 950, \"ultra black\": 950 };\n let i2;\n for (const [a2, r2] of Object.entries(t2)) new RegExp(`\\\\b${a2}\\\\b`, \"i\").test(e2) && (i2 = `${r2}`);\n return i2;\n }\n destroy() {\n for (const e2 in this.entries) {\n const t2 = this.entries[e2];\n t2.tinySDF && (t2.tinySDF = null), t2.ideographTinySDF && (t2.ideographTinySDF = null), t2.glyphs = {}, t2.requests = {}, t2.ranges = {};\n }\n this.entries = {};\n }\n }\n M.loadGlyphRange = function(e2, i2, a2, r2) {\n return t._(this, void 0, void 0, (function* () {\n const o2 = 256 * i2, s2 = o2 + 255, n2 = r2.transformRequest(a2.replace(\"{fontstack}\", e2).replace(\"{range}\", `${o2}-${s2}`), \"Glyphs\"), l2 = yield t.n(n2, new AbortController());\n if (!l2 || !l2.data) throw new Error(`Could not load glyph range. range: ${i2}, ${o2}-${s2}`);\n const c2 = {};\n for (const e3 of t.o(l2.data)) c2[e3.id] = e3;\n return c2;\n }));\n }, M.TinySDF = class {\n constructor({ fontSize: e2 = 24, buffer: t2 = 3, radius: i2 = 8, cutoff: a2 = 0.25, fontFamily: r2 = \"sans-serif\", fontWeight: o2 = \"normal\", fontStyle: s2 = \"normal\", lang: n2 = null } = {}) {\n this.buffer = t2, this.cutoff = a2, this.radius = i2, this.lang = n2;\n const l2 = this.size = e2 + 4 * t2, c2 = this._createCanvas(l2), h2 = this.ctx = c2.getContext(\"2d\", { willReadFrequently: true });\n h2.font = `${s2} ${o2} ${e2}px ${r2}`, h2.textBaseline = \"alphabetic\", h2.textAlign = \"left\", h2.fillStyle = \"black\", this.gridOuter = new Float64Array(l2 * l2), this.gridInner = new Float64Array(l2 * l2), this.f = new Float64Array(l2), this.z = new Float64Array(l2 + 1), this.v = new Uint16Array(l2);\n }\n _createCanvas(e2) {\n const t2 = document.createElement(\"canvas\");\n return t2.width = t2.height = e2, t2;\n }\n draw(e2) {\n const { width: t2, actualBoundingBoxAscent: i2, actualBoundingBoxDescent: a2, actualBoundingBoxLeft: r2, actualBoundingBoxRight: o2 } = this.ctx.measureText(e2), s2 = Math.ceil(i2), n2 = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(o2 - r2))), l2 = Math.min(this.size - this.buffer, s2 + Math.ceil(a2)), c2 = n2 + 2 * this.buffer, h2 = l2 + 2 * this.buffer, u2 = Math.max(c2 * h2, 0), d2 = new Uint8ClampedArray(u2), _2 = { data: d2, width: c2, height: h2, glyphWidth: n2, glyphHeight: l2, glyphTop: s2, glyphLeft: 0, glyphAdvance: t2 };\n if (0 === n2 || 0 === l2) return _2;\n const { ctx: p2, buffer: m2, gridInner: f2, gridOuter: g2 } = this;\n this.lang && (p2.lang = this.lang), p2.clearRect(m2, m2, n2, l2), p2.fillText(e2, m2, m2 + s2);\n const v2 = p2.getImageData(m2, m2, n2, l2);\n g2.fill(T, 0, u2), f2.fill(0, 0, u2);\n for (let e3 = 0; e3 < l2; e3++) for (let t3 = 0; t3 < n2; t3++) {\n const i3 = v2.data[4 * (e3 * n2 + t3) + 3] / 255;\n if (0 === i3) continue;\n const a3 = (e3 + m2) * c2 + t3 + m2;\n if (1 === i3) g2[a3] = 0, f2[a3] = T;\n else {\n const e4 = 0.5 - i3;\n g2[a3] = e4 > 0 ? e4 * e4 : 0, f2[a3] = e4 < 0 ? e4 * e4 : 0;\n }\n }\n P(g2, 0, 0, c2, h2, c2, this.f, this.v, this.z), P(f2, m2, m2, n2, l2, c2, this.f, this.v, this.z);\n for (let e3 = 0; e3 < u2; e3++) {\n const t3 = Math.sqrt(g2[e3]) - Math.sqrt(f2[e3]);\n d2[e3] = Math.round(255 - 255 * (t3 / this.radius + this.cutoff));\n }\n return _2;\n }\n };\n class E {\n constructor() {\n this.specification = t.u.light.position;\n }\n possiblyEvaluate(e2, i2) {\n return t.F(e2.expression.evaluate(i2));\n }\n interpolate(e2, i2, a2) {\n return { x: t.G.number(e2.x, i2.x, a2), y: t.G.number(e2.y, i2.y, a2), z: t.G.number(e2.z, i2.z, a2) };\n }\n }\n let S;\n class R extends t.E {\n constructor(e2) {\n super(), S = S || new t.t({ anchor: new t.D(t.u.light.anchor), position: new E(), color: new t.D(t.u.light.color), intensity: new t.D(t.u.light.intensity) }), this._transitionable = new t.x(S, void 0), this.setLight(e2), this._transitioning = this._transitionable.untransitioned();\n }\n getLight() {\n return this._transitionable.serialize();\n }\n setLight(e2, i2 = {}) {\n if (!this._validate(t.y, e2, i2)) for (const i3 in e2) {\n const a2 = e2[i3];\n i3.endsWith(t.z) ? this._transitionable.setTransition(i3.slice(0, -t.z.length), a2) : this._transitionable.setValue(i3, a2);\n }\n }\n updateTransitions(e2) {\n this._transitioning = this._transitionable.transitioned(e2, this._transitioning);\n }\n hasTransition() {\n return this._transitioning.hasTransition();\n }\n recalculate(e2) {\n this.properties = this._transitioning.possiblyEvaluate(e2);\n }\n _validate(e2, i2, a2) {\n return (!a2 || false !== a2.validate) && t.B(this, e2.call(t.C, { value: i2, style: { glyphs: true, sprite: true }, styleSpec: t.u }));\n }\n }\n const z = new t.t({ \"sky-color\": new t.D(t.u.sky[\"sky-color\"]), \"horizon-color\": new t.D(t.u.sky[\"horizon-color\"]), \"fog-color\": new t.D(t.u.sky[\"fog-color\"]), \"fog-ground-blend\": new t.D(t.u.sky[\"fog-ground-blend\"]), \"horizon-fog-blend\": new t.D(t.u.sky[\"horizon-fog-blend\"]), \"sky-horizon-blend\": new t.D(t.u.sky[\"sky-horizon-blend\"]), \"atmosphere-blend\": new t.D(t.u.sky[\"atmosphere-blend\"]) });\n class D extends t.E {\n constructor(e2) {\n super(), this._transitionable = new t.x(z, void 0), this.setSky(e2), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new t.H(0));\n }\n setSky(e2, i2 = {}) {\n if (!this._validate(t.J, e2, i2)) {\n e2 || (e2 = { \"sky-color\": \"transparent\", \"horizon-color\": \"transparent\", \"fog-color\": \"transparent\", \"fog-ground-blend\": 1, \"atmosphere-blend\": 0 });\n for (const i3 in e2) {\n const a2 = e2[i3];\n i3.endsWith(t.z) ? this._transitionable.setTransition(i3.slice(0, -t.z.length), a2) : this._transitionable.setValue(i3, a2);\n }\n }\n }\n getSky() {\n return this._transitionable.serialize();\n }\n updateTransitions(e2) {\n this._transitioning = this._transitionable.transitioned(e2, this._transitioning);\n }\n hasTransition() {\n return this._transitioning.hasTransition();\n }\n recalculate(e2) {\n this.properties = this._transitioning.possiblyEvaluate(e2);\n }\n _validate(e2, i2, a2 = {}) {\n return false !== (null == a2 ? void 0 : a2.validate) && t.B(this, e2.call(t.C, t.e({ value: i2, style: { glyphs: true, sprite: true }, styleSpec: t.u })));\n }\n calculateFogBlendOpacity(e2) {\n return e2 < 60 ? 0 : e2 < 70 ? (e2 - 60) / 10 : 1;\n }\n }\n class A {\n constructor(e2, t2) {\n this.width = e2, this.height = t2, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {};\n }\n getDash(e2, t2) {\n const i2 = e2.join(\",\") + String(t2);\n return this.dashEntry[i2] || (this.dashEntry[i2] = this.addDash(e2, t2)), this.dashEntry[i2];\n }\n getDashRanges(e2, t2, i2) {\n const a2 = [];\n let r2 = e2.length % 2 == 1 ? -e2[e2.length - 1] * i2 : 0, o2 = e2[0] * i2, s2 = true;\n a2.push({ left: r2, right: o2, isDash: s2, zeroLength: 0 === e2[0] });\n let n2 = e2[0];\n for (let t3 = 1; t3 < e2.length; t3++) {\n s2 = !s2;\n const l2 = e2[t3];\n r2 = n2 * i2, n2 += l2, o2 = n2 * i2, a2.push({ left: r2, right: o2, isDash: s2, zeroLength: 0 === l2 });\n }\n return a2;\n }\n addRoundDash(e2, t2, i2) {\n const a2 = t2 / 2;\n for (let t3 = -i2; t3 <= i2; t3++) {\n const r2 = this.width * (this.nextRow + i2 + t3);\n let o2 = 0, s2 = e2[o2];\n for (let n2 = 0; n2 < this.width; n2++) {\n n2 / s2.right > 1 && (s2 = e2[++o2]);\n const l2 = Math.abs(n2 - s2.left), c2 = Math.abs(n2 - s2.right), h2 = Math.min(l2, c2);\n let u2;\n const d2 = t3 / i2 * (a2 + 1);\n if (s2.isDash) {\n const e3 = a2 - Math.abs(d2);\n u2 = Math.sqrt(h2 * h2 + e3 * e3);\n } else u2 = a2 - Math.sqrt(h2 * h2 + d2 * d2);\n this.data[r2 + n2] = Math.max(0, Math.min(255, u2 + 128));\n }\n }\n }\n addRegularDash(e2) {\n for (let t3 = e2.length - 1; t3 >= 0; --t3) {\n const i3 = e2[t3], a3 = e2[t3 + 1];\n i3.zeroLength ? e2.splice(t3, 1) : a3 && a3.isDash === i3.isDash && (a3.left = i3.left, e2.splice(t3, 1));\n }\n const t2 = e2[0], i2 = e2[e2.length - 1];\n t2.isDash === i2.isDash && (t2.left = i2.left - this.width, i2.right = t2.right + this.width);\n const a2 = this.width * this.nextRow;\n let r2 = 0, o2 = e2[r2];\n for (let t3 = 0; t3 < this.width; t3++) {\n t3 / o2.right > 1 && (o2 = e2[++r2]);\n const i3 = Math.abs(t3 - o2.left), s2 = Math.abs(t3 - o2.right), n2 = Math.min(i3, s2);\n this.data[a2 + t3] = Math.max(0, Math.min(255, (o2.isDash ? n2 : -n2) + 128));\n }\n }\n addDash(e2, i2) {\n const a2 = i2 ? 7 : 0, r2 = 2 * a2 + 1;\n if (this.nextRow + r2 > this.height) return t.w(\"LineAtlas out of space\"), null;\n let o2 = 0;\n for (let t2 = 0; t2 < e2.length; t2++) o2 += e2[t2];\n if (0 !== o2) {\n const t2 = this.width / o2, r3 = this.getDashRanges(e2, this.width, t2);\n i2 ? this.addRoundDash(r3, t2, a2) : this.addRegularDash(r3);\n }\n const s2 = { y: this.nextRow + a2, height: 2 * a2, width: o2 };\n return this.nextRow += r2, this.dirty = true, s2;\n }\n bind(e2) {\n const t2 = e2.gl;\n this.texture ? (t2.bindTexture(t2.TEXTURE_2D, this.texture), this.dirty && (this.dirty = false, t2.texSubImage2D(t2.TEXTURE_2D, 0, 0, 0, this.width, this.height, t2.ALPHA, t2.UNSIGNED_BYTE, this.data))) : (this.texture = t2.createTexture(), t2.bindTexture(t2.TEXTURE_2D, this.texture), t2.texParameteri(t2.TEXTURE_2D, t2.TEXTURE_WRAP_S, t2.REPEAT), t2.texParameteri(t2.TEXTURE_2D, t2.TEXTURE_WRAP_T, t2.REPEAT), t2.texParameteri(t2.TEXTURE_2D, t2.TEXTURE_MIN_FILTER, t2.LINEAR), t2.texParameteri(t2.TEXTURE_2D, t2.TEXTURE_MAG_FILTER, t2.LINEAR), t2.texImage2D(t2.TEXTURE_2D, 0, t2.ALPHA, this.width, this.height, 0, t2.ALPHA, t2.UNSIGNED_BYTE, this.data));\n }\n }\n const L = \"maplibre_preloaded_worker_pool\";\n class k {\n constructor() {\n this.active = {};\n }\n acquire(e2) {\n if (!this.workers) for (this.workers = []; this.workers.length < k.workerCount; ) this.workers.push(new Worker(t.c.WORKER_URL));\n return this.active[e2] = true, this.workers.slice();\n }\n release(e2) {\n delete this.active[e2], 0 === this.numActive() && (this.workers.forEach(((e3) => {\n e3.terminate();\n })), this.workers = null);\n }\n isPreloaded() {\n return !!this.active[L];\n }\n numActive() {\n return Object.keys(this.active).length;\n }\n }\n const F = Math.floor(n.hardwareConcurrency / 2);\n let B, O;\n function j() {\n return B || (B = new k()), B;\n }\n k.workerCount = t.K(globalThis) ? Math.max(Math.min(F, 3), 1) : 1;\n class N {\n constructor(e2, i2) {\n this.workerPool = e2, this.actors = [], this.currentActor = 0, this.id = i2;\n const a2 = this.workerPool.acquire(i2);\n for (let e3 = 0; e3 < a2.length; e3++) {\n const r2 = new t.L(a2[e3], i2);\n r2.name = `Worker ${e3}`, this.actors.push(r2);\n }\n if (!this.actors.length) throw new Error(\"No actors found\");\n }\n broadcast(e2, t2) {\n const i2 = [];\n for (const a2 of this.actors) i2.push(a2.sendAsync({ type: e2, data: t2 }));\n return Promise.all(i2);\n }\n getActor() {\n return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor];\n }\n remove(e2 = true) {\n this.actors.forEach(((e3) => {\n e3.remove();\n })), this.actors = [], e2 && this.workerPool.release(this.id);\n }\n registerMessageHandler(e2, t2) {\n for (const i2 of this.actors) i2.registerMessageHandler(e2, t2);\n }\n unregisterMessageHandler(e2) {\n for (const t2 of this.actors) t2.unregisterMessageHandler(e2);\n }\n }\n function Z() {\n return O || (O = new N(j(), t.M), O.registerMessageHandler(\"GR\", ((e2, i2, a2) => t.m(i2, a2)))), O;\n }\n function G(e2, i2) {\n const a2 = t.N();\n return t.O(a2, a2, [1, 1, 0]), t.Q(a2, a2, [0.5 * e2.width, 0.5 * e2.height, 1]), e2.calculatePosMatrix ? t.S(a2, a2, e2.calculatePosMatrix(i2.toUnwrapped())) : a2;\n }\n function U(e2, t2, i2, a2, r2, o2, s2) {\n var n2;\n const l2 = (function(e3, t3, i3) {\n if (e3) for (const a3 of e3) {\n const e4 = t3[a3];\n if (e4 && e4.source === i3 && \"fill-extrusion\" === e4.type) return true;\n }\n else for (const e4 in t3) {\n const a3 = t3[e4];\n if (a3.source === i3 && \"fill-extrusion\" === a3.type) return true;\n }\n return false;\n })(null !== (n2 = null == r2 ? void 0 : r2.layers) && void 0 !== n2 ? n2 : null, t2, e2.id), c2 = o2.maxPitchScaleFactor(), h2 = e2.tilesIn(a2, c2, l2);\n h2.sort(V);\n const u2 = [];\n for (const a3 of h2) u2.push({ wrappedTileID: a3.tileID.wrapped().key, queryResults: a3.tile.queryRenderedFeatures(t2, i2, e2.getState(), a3.queryGeometry, a3.cameraQueryGeometry, a3.scale, r2, o2, c2, G(o2, a3.tileID), s2 ? (e3, t3) => s2(a3.tileID, e3, t3) : void 0) });\n return (function(e3, t3) {\n for (const i3 in e3) for (const a3 of e3[i3]) q(a3, t3);\n return e3;\n })((function(e3) {\n const t3 = {}, i3 = {};\n for (const a3 of e3) {\n const e4 = a3.queryResults, r3 = a3.wrappedTileID, o3 = i3[r3] = i3[r3] || {};\n for (const i4 in e4) {\n const a4 = e4[i4], r4 = o3[i4] = o3[i4] || {}, s3 = t3[i4] = t3[i4] || [];\n for (const e5 of a4) r4[e5.featureIndex] || (r4[e5.featureIndex] = true, s3.push(e5));\n }\n }\n return t3;\n })(u2), e2);\n }\n function V(e2, t2) {\n const i2 = e2.tileID, a2 = t2.tileID;\n return i2.overscaledZ - a2.overscaledZ || i2.canonical.y - a2.canonical.y || i2.wrap - a2.wrap || i2.canonical.x - a2.canonical.x;\n }\n function q(e2, t2) {\n const i2 = e2.feature, a2 = t2.getFeatureState(i2.layer[\"source-layer\"], i2.id);\n i2.source = i2.layer.source, i2.layer[\"source-layer\"] && (i2.sourceLayer = i2.layer[\"source-layer\"]), i2.state = a2;\n }\n function W(e2, i2, a2) {\n return t._(this, void 0, void 0, (function* () {\n let r2 = e2;\n if (e2.url ? r2 = (yield t.j(i2.transformRequest(e2.url, \"Source\"), a2)).data : yield n.frameAsync(a2), !r2) return null;\n const o2 = t.U(t.e(r2, e2), [\"tiles\", \"minzoom\", \"maxzoom\", \"attribution\", \"bounds\", \"scheme\", \"tileSize\", \"encoding\"]);\n return \"vector_layers\" in r2 && r2.vector_layers && (o2.vectorLayerIds = r2.vector_layers.map(((e3) => e3.id))), o2;\n }));\n }\n class $ {\n constructor(e2, t2) {\n e2 && (t2 ? this.setSouthWest(e2).setNorthEast(t2) : Array.isArray(e2) && (4 === e2.length ? this.setSouthWest([e2[0], e2[1]]).setNorthEast([e2[2], e2[3]]) : this.setSouthWest(e2[0]).setNorthEast(e2[1])));\n }\n setNorthEast(e2) {\n return this._ne = e2 instanceof t.V ? new t.V(e2.lng, e2.lat) : t.V.convert(e2), this;\n }\n setSouthWest(e2) {\n return this._sw = e2 instanceof t.V ? new t.V(e2.lng, e2.lat) : t.V.convert(e2), this;\n }\n extend(e2) {\n const i2 = this._sw, a2 = this._ne;\n let r2, o2;\n if (e2 instanceof t.V) r2 = e2, o2 = e2;\n else {\n if (!(e2 instanceof $)) return Array.isArray(e2) ? 4 === e2.length || e2.every(Array.isArray) ? this.extend($.convert(e2)) : this.extend(t.V.convert(e2)) : e2 && (\"lng\" in e2 || \"lon\" in e2) && \"lat\" in e2 ? this.extend(t.V.convert(e2)) : this;\n if (r2 = e2._sw, o2 = e2._ne, !r2 || !o2) return this;\n }\n return i2 || a2 ? (i2.lng = Math.min(r2.lng, i2.lng), i2.lat = Math.min(r2.lat, i2.lat), a2.lng = Math.max(o2.lng, a2.lng), a2.lat = Math.max(o2.lat, a2.lat)) : (this._sw = new t.V(r2.lng, r2.lat), this._ne = new t.V(o2.lng, o2.lat)), this;\n }\n getCenter() {\n return new t.V((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);\n }\n getSouthWest() {\n return this._sw;\n }\n getNorthEast() {\n return this._ne;\n }\n getNorthWest() {\n return new t.V(this.getWest(), this.getNorth());\n }\n getSouthEast() {\n return new t.V(this.getEast(), this.getSouth());\n }\n getWest() {\n return this._sw.lng;\n }\n getSouth() {\n return this._sw.lat;\n }\n getEast() {\n return this._ne.lng;\n }\n getNorth() {\n return this._ne.lat;\n }\n toArray() {\n return [this._sw.toArray(), this._ne.toArray()];\n }\n toString() {\n return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`;\n }\n isEmpty() {\n return !(this._sw && this._ne);\n }\n contains(e2) {\n const { lng: i2, lat: a2 } = t.V.convert(e2);\n let r2 = this._sw.lng <= i2 && i2 <= this._ne.lng;\n return this._sw.lng > this._ne.lng && (r2 = this._sw.lng >= i2 && i2 >= this._ne.lng), this._sw.lat <= a2 && a2 <= this._ne.lat && r2;\n }\n intersects(e2) {\n if (!((e2 = $.convert(e2)).getNorth() >= this.getSouth() && e2.getSouth() <= this.getNorth())) return false;\n const i2 = t.W(this.getWest(), -180, 180), a2 = t.W(this.getEast(), -180, 180), r2 = t.W(e2.getWest(), -180, 180), o2 = t.W(e2.getEast(), -180, 180), s2 = i2 >= a2, n2 = r2 >= o2;\n return !(!s2 || !n2) || (s2 ? o2 >= i2 || r2 <= a2 : n2 ? a2 >= r2 || i2 <= o2 : r2 <= a2 && o2 >= i2);\n }\n static convert(e2) {\n return e2 instanceof $ ? e2 : e2 ? new $(e2) : e2;\n }\n static fromLngLat(e2, i2 = 0) {\n const a2 = 360 * i2 / 40075017, r2 = a2 / Math.cos(Math.PI / 180 * e2.lat);\n return new $(new t.V(e2.lng - r2, e2.lat - a2), new t.V(e2.lng + r2, e2.lat + a2));\n }\n adjustAntiMeridian() {\n const e2 = new t.V(this._sw.lng, this._sw.lat), i2 = new t.V(this._ne.lng, this._ne.lat);\n return new $(e2, e2.lng > i2.lng ? new t.V(i2.lng + 360, i2.lat) : i2);\n }\n }\n class H {\n constructor(e2, t2, i2) {\n this.bounds = $.convert(this.validateBounds(e2)), this.minzoom = t2 || 0, this.maxzoom = i2 || 24;\n }\n validateBounds(e2) {\n return Array.isArray(e2) && 4 === e2.length ? [Math.max(-180, e2[0]), Math.max(-90, e2[1]), Math.min(180, e2[2]), Math.min(90, e2[3])] : [-180, -90, 180, 90];\n }\n contains(e2) {\n const i2 = Math.pow(2, e2.z), a2 = Math.floor(t.Y(this.bounds.getWest()) * i2), r2 = Math.floor(t.X(this.bounds.getNorth()) * i2), o2 = Math.ceil(t.Y(this.bounds.getEast()) * i2), s2 = Math.ceil(t.X(this.bounds.getSouth()) * i2);\n return e2.x >= a2 && e2.x < o2 && e2.y >= r2 && e2.y < s2;\n }\n }\n class X extends t.E {\n constructor(e2, i2, a2, r2) {\n if (super(), this.id = e2, this.dispatcher = a2, this.type = \"vector\", this.minzoom = 0, this.maxzoom = 22, this.scheme = \"xyz\", this.tileSize = 512, this.reparseOverscaled = true, this.isTileClipped = true, this._loaded = false, t.e(this, t.U(i2, [\"url\", \"scheme\", \"tileSize\", \"promoteId\", \"encoding\"])), this._options = t.e({ type: \"vector\" }, i2), this._collectResourceTiming = i2.collectResourceTiming, 512 !== this.tileSize) throw new Error(\"vector tile sources must have a tileSize of 512\");\n this.setEventedParent(r2);\n }\n load() {\n return t._(this, void 0, void 0, (function* () {\n this._loaded = false, this.fire(new t.l(\"dataloading\", { dataType: \"source\" })), this._tileJSONRequest = new AbortController();\n try {\n const e2 = yield W(this._options, this.map._requestManager, this._tileJSONRequest);\n this._tileJSONRequest = null, this._loaded = true, this.map.style.tileManagers[this.id].clearTiles(), e2 && (t.e(this, e2), e2.bounds && (this.tileBounds = new H(e2.bounds, this.minzoom, this.maxzoom)), this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"metadata\" })), this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"content\" })));\n } catch (e2) {\n this._tileJSONRequest = null, this._loaded = true, t.Z(e2) || this.fire(new t.k(e2));\n }\n }));\n }\n loaded() {\n return this._loaded;\n }\n hasTile(e2) {\n return !this.tileBounds || this.tileBounds.contains(e2.canonical);\n }\n onAdd(e2) {\n this.map = e2, this.load();\n }\n setSourceProperty(e2) {\n this._tileJSONRequest && this._tileJSONRequest.abort(), e2(), this.load();\n }\n setTiles(e2) {\n return this.setSourceProperty((() => {\n this._options.tiles = e2;\n })), this;\n }\n setUrl(e2) {\n return this.setSourceProperty((() => {\n this.url = e2, this._options.url = e2;\n })), this;\n }\n onRemove() {\n this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);\n }\n serialize() {\n return t.e({}, this._options);\n }\n loadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = e2.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), i2 = { request: this.map._requestManager.transformRequest(t2, \"Tile\"), uid: e2.uid, tileID: e2.tileID, zoom: e2.tileID.overscaledZ, tileSize: this.tileSize * e2.tileID.overscaleFactor(), type: this.type, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId, subdivisionGranularity: this.map.style.projection.subdivisionGranularity, encoding: this.encoding, overzoomParameters: this._getOverzoomParameters(e2) };\n i2.request.collectResourceTiming = this._collectResourceTiming;\n let a2 = \"RT\";\n if (e2.actor && \"expired\" !== e2.state) {\n if (\"loading\" === e2.state) return new Promise(((t3, i3) => {\n e2.reloadPromise = { resolve: t3, reject: i3 };\n }));\n } else e2.actor = this.dispatcher.getActor(), a2 = \"LT\";\n e2.abortController = new AbortController();\n try {\n const t3 = yield e2.actor.sendAsync({ type: a2, data: i2 }, e2.abortController);\n if (delete e2.abortController, e2.aborted) return;\n this._afterTileLoadWorkerResponse(e2, t3);\n } catch (t3) {\n if (delete e2.abortController, e2.aborted) return;\n if (t3 && 404 !== t3.status) throw t3;\n this._afterTileLoadWorkerResponse(e2, null);\n }\n }));\n }\n _getOverzoomParameters(e2) {\n if (e2.tileID.canonical.z <= this.maxzoom) return;\n if (void 0 === this.map._zoomLevelsToOverscale) return;\n const t2 = e2.tileID.scaledTo(this.maxzoom).canonical, i2 = t2.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n return { maxZoomTileID: t2, overzoomRequest: this.map._requestManager.transformRequest(i2, \"Tile\") };\n }\n _afterTileLoadWorkerResponse(e2, t2) {\n if (t2 && t2.resourceTiming && (e2.resourceTiming = t2.resourceTiming), t2 && this.map._refreshExpiredTiles && e2.setExpiryData(t2), e2.loadVectorData(t2, this.map.painter), e2.reloadPromise) {\n const t3 = e2.reloadPromise;\n e2.reloadPromise = null, this.loadTile(e2).then(t3.resolve).catch(t3.reject);\n }\n }\n abortTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.abortController && (e2.abortController.abort(), delete e2.abortController), e2.actor && (yield e2.actor.sendAsync({ type: \"AT\", data: { uid: e2.uid, type: this.type, source: this.id } }));\n }));\n }\n unloadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.unloadVectorData(), e2.actor && (yield e2.actor.sendAsync({ type: \"RMT\", data: { uid: e2.uid, type: this.type, source: this.id } }));\n }));\n }\n hasTransition() {\n return false;\n }\n }\n class K extends t.E {\n constructor(e2, i2, a2, r2) {\n super(), this.id = e2, this.dispatcher = a2, this.setEventedParent(r2), this.type = \"raster\", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = true, this.scheme = \"xyz\", this.tileSize = 512, this._loaded = false, this._options = t.e({ type: \"raster\" }, i2), t.e(this, t.U(i2, [\"url\", \"scheme\", \"tileSize\"]));\n }\n load() {\n return t._(this, arguments, void 0, (function* (e2 = false) {\n this._loaded = false, this.fire(new t.l(\"dataloading\", { dataType: \"source\" })), this._tileJSONRequest = new AbortController();\n try {\n const i2 = yield W(this._options, this.map._requestManager, this._tileJSONRequest);\n this._tileJSONRequest = null, this._loaded = true, i2 && (t.e(this, i2), i2.bounds && (this.tileBounds = new H(i2.bounds, this.minzoom, this.maxzoom)), this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"metadata\" })), this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"content\", sourceDataChanged: e2 })));\n } catch (e3) {\n this._tileJSONRequest = null, this._loaded = true, t.Z(e3) || this.fire(new t.k(e3));\n }\n }));\n }\n loaded() {\n return this._loaded;\n }\n onAdd(e2) {\n this.map = e2, this.load();\n }\n onRemove() {\n this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);\n }\n setSourceProperty(e2) {\n this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null), e2(), this.load(true);\n }\n setTiles(e2) {\n return this.setSourceProperty((() => {\n this._options.tiles = e2;\n })), this;\n }\n setUrl(e2) {\n return this.setSourceProperty((() => {\n this.url = e2, this._options.url = e2;\n })), this;\n }\n serialize() {\n return t.e({}, this._options);\n }\n hasTile(e2) {\n return !this.tileBounds || this.tileBounds.contains(e2.canonical);\n }\n loadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n const i2 = e2.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);\n e2.abortController = new AbortController();\n try {\n const a2 = yield g.getImage(this.map._requestManager.transformRequest(i2, \"Tile\"), e2.abortController, this.map._refreshExpiredTiles);\n if (delete e2.abortController, e2.aborted) return void (e2.state = \"unloaded\");\n if (a2 && a2.data) {\n this.map._refreshExpiredTiles && (a2.cacheControl || a2.expires) && e2.setExpiryData({ cacheControl: a2.cacheControl, expires: a2.expires });\n const i3 = this.map.painter.context, r2 = i3.gl, o2 = a2.data;\n e2.texture = this.map.painter.getTileTexture(o2.width), e2.texture ? e2.texture.update(o2, { useMipmap: true }) : (e2.texture = new t.T(i3, o2, r2.RGBA, { useMipmap: true }), e2.texture.bind(r2.LINEAR, r2.CLAMP_TO_EDGE, r2.LINEAR_MIPMAP_NEAREST)), e2.state = \"loaded\";\n }\n } catch (t2) {\n if (delete e2.abortController, e2.aborted) e2.state = \"unloaded\";\n else if (t2) throw e2.state = \"errored\", t2;\n }\n }));\n }\n abortTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.abortController && (e2.abortController.abort(), delete e2.abortController);\n }));\n }\n unloadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.texture && this.map.painter.saveTileTexture(e2.texture);\n }));\n }\n hasTransition() {\n return false;\n }\n }\n class Y extends K {\n constructor(e2, i2, a2, r2) {\n super(e2, i2, a2, r2), this.type = \"raster-dem\", this.maxzoom = 22, this._options = t.e({ type: \"raster-dem\" }, i2), this.encoding = i2.encoding || \"mapbox\", this.redFactor = i2.redFactor, this.greenFactor = i2.greenFactor, this.blueFactor = i2.blueFactor, this.baseShift = i2.baseShift;\n }\n loadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n const i2 = e2.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), a2 = this.map._requestManager.transformRequest(i2, \"Tile\");\n e2.neighboringTiles = this._getNeighboringTiles(e2.tileID), e2.abortController = new AbortController();\n try {\n const i3 = yield g.getImage(a2, e2.abortController, this.map._refreshExpiredTiles);\n if (delete e2.abortController, e2.aborted) return void (e2.state = \"unloaded\");\n if (i3 && i3.data) {\n const a3 = i3.data;\n this.map._refreshExpiredTiles && (i3.cacheControl || i3.expires) && e2.setExpiryData({ cacheControl: i3.cacheControl, expires: i3.expires });\n const r2 = t.b(a3) && t.$() ? a3 : yield this.readImageNow(a3), o2 = { type: this.type, uid: e2.uid, source: this.id, rawImageData: r2, encoding: this.encoding, redFactor: this.redFactor, greenFactor: this.greenFactor, blueFactor: this.blueFactor, baseShift: this.baseShift };\n if (!e2.actor || \"expired\" === e2.state) {\n e2.actor = this.dispatcher.getActor();\n const t2 = yield e2.actor.sendAsync({ type: \"LDT\", data: o2 });\n e2.dem = t2, e2.needsHillshadePrepare = true, e2.needsTerrainPrepare = true, e2.state = \"loaded\";\n }\n }\n } catch (t2) {\n if (delete e2.abortController, e2.aborted) e2.state = \"unloaded\";\n else if (t2) throw e2.state = \"errored\", t2;\n }\n }));\n }\n readImageNow(e2) {\n return t._(this, void 0, void 0, (function* () {\n if (\"undefined\" != typeof VideoFrame && t.a0()) {\n const i2 = e2.width + 2, a2 = e2.height + 2;\n try {\n return new t.R({ width: i2, height: a2 }, yield t.a1(e2, -1, -1, i2, a2));\n } catch (e3) {\n }\n }\n return n.getImageData(e2, 1);\n }));\n }\n _getNeighboringTiles(e2) {\n const i2 = e2.canonical, a2 = Math.pow(2, i2.z), r2 = (i2.x - 1 + a2) % a2, o2 = 0 === i2.x ? e2.wrap - 1 : e2.wrap, s2 = (i2.x + 1 + a2) % a2, n2 = i2.x + 1 === a2 ? e2.wrap + 1 : e2.wrap, l2 = {};\n return l2[new t.a2(e2.overscaledZ, o2, i2.z, r2, i2.y).key] = { backfilled: false }, l2[new t.a2(e2.overscaledZ, n2, i2.z, s2, i2.y).key] = { backfilled: false }, i2.y > 0 && (l2[new t.a2(e2.overscaledZ, o2, i2.z, r2, i2.y - 1).key] = { backfilled: false }, l2[new t.a2(e2.overscaledZ, e2.wrap, i2.z, i2.x, i2.y - 1).key] = { backfilled: false }, l2[new t.a2(e2.overscaledZ, n2, i2.z, s2, i2.y - 1).key] = { backfilled: false }), i2.y + 1 < a2 && (l2[new t.a2(e2.overscaledZ, o2, i2.z, r2, i2.y + 1).key] = { backfilled: false }, l2[new t.a2(e2.overscaledZ, e2.wrap, i2.z, i2.x, i2.y + 1).key] = { backfilled: false }, l2[new t.a2(e2.overscaledZ, n2, i2.z, s2, i2.y + 1).key] = { backfilled: false }), l2;\n }\n unloadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.demTexture && this.map.painter.saveTileTexture(e2.demTexture), e2.fbo && (e2.fbo.destroy(), delete e2.fbo), e2.dem && delete e2.dem, delete e2.neighboringTiles, e2.state = \"unloaded\", e2.actor && (yield e2.actor.sendAsync({ type: \"RDT\", data: { type: this.type, uid: e2.uid, source: this.id } }));\n }));\n }\n }\n function Q(e2) {\n return \"GeometryCollection\" === e2.type ? e2.geometries.map(((e3) => e3.coordinates)).flat(1 / 0) : e2.coordinates.flat(1 / 0);\n }\n function J(e2) {\n const t2 = new $();\n let i2;\n switch (e2.type) {\n case \"FeatureCollection\":\n i2 = e2.features.map(((e3) => Q(e3.geometry))).flat(1 / 0);\n break;\n case \"Feature\":\n i2 = Q(e2.geometry);\n break;\n default:\n i2 = Q(e2);\n }\n if (0 == i2.length) return t2;\n for (let e3 = 0; e3 < i2.length - 1; e3 += 2) t2.extend([i2[e3], i2[e3 + 1]]);\n return t2;\n }\n class ee extends t.E {\n constructor(e2, i2, a2, r2) {\n super(), this.id = e2, this.type = \"geojson\", this.minzoom = 0, this.maxzoom = 18, this.tileSize = 512, this.isTileClipped = true, this.reparseOverscaled = true, this._removed = false, this._isUpdatingWorker = false, this._pendingWorkerUpdate = { data: i2.data }, this.actor = a2.getActor(), this.setEventedParent(r2), this._data = \"string\" == typeof i2.data ? { url: i2.data } : { geojson: i2.data }, this._options = t.e({}, i2), this._collectResourceTiming = i2.collectResourceTiming, void 0 !== i2.maxzoom && (this.maxzoom = i2.maxzoom), i2.type && (this.type = i2.type), i2.attribution && (this.attribution = i2.attribution), this.promoteId = i2.promoteId, void 0 !== i2.clusterMaxZoom && this.maxzoom <= i2.clusterMaxZoom && t.w(`The maxzoom value \"${this.maxzoom}\" is expected to be greater than the clusterMaxZoom value \"${i2.clusterMaxZoom}\".`), this.workerOptions = t.e({ source: this.id, cluster: i2.cluster || false, geojsonVtOptions: { buffer: this._pixelsToTileUnits(void 0 !== i2.buffer ? i2.buffer : 128), tolerance: this._pixelsToTileUnits(void 0 !== i2.tolerance ? i2.tolerance : 0.375), extent: t.a5, maxZoom: this.maxzoom, lineMetrics: i2.lineMetrics || false, generateId: i2.generateId || false }, superclusterOptions: { maxZoom: this._getClusterMaxZoom(i2.clusterMaxZoom), minPoints: Math.max(2, i2.clusterMinPoints || 2), extent: t.a5, radius: this._pixelsToTileUnits(i2.clusterRadius || 50), log: false, generateId: i2.generateId || false }, clusterProperties: i2.clusterProperties, filter: i2.filter }, i2.workerOptions), \"string\" == typeof this.promoteId && (this.workerOptions.promoteId = this.promoteId);\n }\n _hasPendingWorkerUpdate() {\n return void 0 !== this._pendingWorkerUpdate.data || void 0 !== this._pendingWorkerUpdate.diff || this._pendingWorkerUpdate.optionsChanged;\n }\n _pixelsToTileUnits(e2) {\n return e2 * (t.a5 / this.tileSize);\n }\n _getClusterMaxZoom(e2) {\n const i2 = e2 ? Math.round(e2) : this.maxzoom - 1;\n return Number.isInteger(e2) || void 0 === e2 || t.w(`Integer expected for option 'clusterMaxZoom': provided value \"${e2}\" rounded to \"${i2}\"`), i2;\n }\n load() {\n return t._(this, void 0, void 0, (function* () {\n yield this._updateWorkerData();\n }));\n }\n onAdd(e2) {\n this.map = e2, this.load();\n }\n setData(e2, t2) {\n this._data = \"string\" == typeof e2 ? { url: e2 } : { geojson: e2 }, this._pendingWorkerUpdate = { data: e2 };\n const i2 = this._updateWorkerData();\n return t2 ? i2 : this;\n }\n updateData(e2, i2) {\n this._pendingWorkerUpdate.diff = t.a6(this._pendingWorkerUpdate.diff, e2);\n const a2 = this._updateWorkerData();\n return i2 ? a2 : this;\n }\n getData() {\n return t._(this, void 0, void 0, (function* () {\n const e2 = t.e({ type: this.type }, this.workerOptions);\n return this.actor.sendAsync({ type: \"GD\", data: e2 });\n }));\n }\n getBounds() {\n return t._(this, void 0, void 0, (function* () {\n return J(yield this.getData());\n }));\n }\n setClusterOptions(e2) {\n return this.workerOptions.cluster = e2.cluster, void 0 !== e2.clusterRadius && (this.workerOptions.superclusterOptions.radius = this._pixelsToTileUnits(e2.clusterRadius)), void 0 !== e2.clusterMaxZoom && (this.workerOptions.superclusterOptions.maxZoom = this._getClusterMaxZoom(e2.clusterMaxZoom)), this._pendingWorkerUpdate.optionsChanged = true, this._updateWorkerData(), this;\n }\n getClusterExpansionZoom(e2) {\n return this.actor.sendAsync({ type: \"GCEZ\", data: { type: this.type, clusterId: e2, source: this.id } });\n }\n getClusterChildren(e2) {\n return this.actor.sendAsync({ type: \"GCC\", data: { type: this.type, clusterId: e2, source: this.id } });\n }\n getClusterLeaves(e2, t2, i2) {\n return this.actor.sendAsync({ type: \"GCL\", data: { type: this.type, source: this.id, clusterId: e2, limit: t2, offset: i2 } });\n }\n _updateWorkerData() {\n return t._(this, void 0, void 0, (function* () {\n if (this._isUpdatingWorker) return;\n if (!this._hasPendingWorkerUpdate()) return void t.w(`No pending worker updates for GeoJSONSource ${this.id}.`);\n const { data: e2, diff: i2 } = this._pendingWorkerUpdate, a2 = t.e({ type: this.type }, this.workerOptions);\n void 0 !== e2 ? (\"string\" == typeof e2 ? (a2.request = this.map._requestManager.transformRequest(n.resolveURL(e2), \"Source\"), a2.request.collectResourceTiming = this._collectResourceTiming) : a2.data = e2, this._pendingWorkerUpdate.data = void 0) : i2 && (a2.dataDiff = i2, this._pendingWorkerUpdate.diff = void 0), this._pendingWorkerUpdate.optionsChanged = void 0, this._isUpdatingWorker = true, this.fire(new t.l(\"dataloading\", { dataType: \"source\" }));\n try {\n const e3 = yield this.actor.sendAsync({ type: \"LD\", data: a2 });\n if (this._isUpdatingWorker = false, this._removed || e3.abandoned) return void this.fire(new t.l(\"dataabort\", { dataType: \"source\" }));\n i2 && this._applyDiff(i2);\n let r2 = null;\n e3.resourceTiming && e3.resourceTiming[this.id] && (r2 = e3.resourceTiming[this.id].slice(0));\n const o2 = { dataType: \"source\" };\n this._collectResourceTiming && r2 && r2.length > 0 && t.e(o2, { resourceTiming: r2 }), this.fire(new t.l(\"data\", Object.assign(Object.assign({}, o2), { sourceDataType: \"metadata\" }))), this.fire(new t.l(\"data\", Object.assign(Object.assign({}, o2), { sourceDataType: \"content\", shouldReloadTileOptions: this._getShouldReloadTileOptions(i2) })));\n } catch (e3) {\n if (this._isUpdatingWorker = false, this._removed) return void this.fire(new t.l(\"dataabort\", { dataType: \"source\" }));\n this.fire(new t.k(e3));\n } finally {\n this._hasPendingWorkerUpdate() && this._updateWorkerData();\n }\n }));\n }\n _applyDiff(e2) {\n const i2 = \"string\" == typeof this.promoteId ? this.promoteId : void 0;\n if (!this._data.url && !this._data.updateable) {\n if (!t.a7(this._data.geojson, i2)) throw new Error(`GeoJSONSource \"${this.id}\": GeoJSON data is not compatible with updateData`);\n this._data = { updateable: t.a8(this._data.geojson, i2) };\n }\n this._data.updateable && t.a9(this._data.updateable, e2, i2);\n }\n _getShouldReloadTileOptions(e2) {\n if (this._options.cluster || !e2 || e2.removeAll) return;\n const { add: i2 = [], update: a2 = [], remove: r2 = [] } = e2 || {}, o2 = /* @__PURE__ */ new Set([...a2.map(((e3) => e3.id)), ...r2]);\n for (const e3 of o2.values()) if (\"number\" != typeof e3 && null == this.promoteId) return void t.w(`GeoJSONSource \"${this.id}\": updateData is slower when using string GeoJSON feature IDs. Consider using promoteId or numeric IDs for better performance.`);\n return { nextBounds: [...a2.map(((e3) => e3.newGeometry)), ...i2.map(((e3) => e3.geometry))].filter(Boolean).map(((e3) => J(e3))), prevIds: o2 };\n }\n shouldReloadTile(e2, { nextBounds: i2, prevIds: a2 }) {\n if (!e2.latestFeatureIndex) return \"unloaded\" !== e2.state;\n const r2 = e2.latestFeatureIndex.loadVTLayers();\n for (let i3 = 0; i3 < e2.latestFeatureIndex.featureIndexArray.length; i3++) {\n const o3 = e2.latestFeatureIndex.featureIndexArray.get(i3), s3 = r2[t.aa].feature(o3.featureIndex), n3 = e2.latestFeatureIndex.getId(s3, t.aa);\n if (a2.has(n3)) return true;\n }\n const { buffer: o2, extent: s2 } = this.workerOptions.geojsonVtOptions, n2 = (function({ x: e3, y: i3, z: a3 }, r3 = 0) {\n const o3 = t.a3((e3 - r3) / Math.pow(2, a3)), s3 = t.a4((i3 + 1 + r3) / Math.pow(2, a3)), n3 = t.a3((e3 + 1 + r3) / Math.pow(2, a3)), l2 = t.a4((i3 - r3) / Math.pow(2, a3));\n return new $([o3, s3], [n3, l2]);\n })(e2.tileID.canonical, o2 / s2);\n for (const e3 of i2) if (n2.intersects(e3)) return true;\n return false;\n }\n loaded() {\n return !this._isUpdatingWorker && !this._hasPendingWorkerUpdate();\n }\n loadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = e2.actor ? \"RT\" : \"LT\";\n e2.actor = this.actor;\n const i2 = { type: this.type, uid: e2.uid, tileID: e2.tileID, zoom: e2.tileID.overscaledZ, maxZoom: this.maxzoom, tileSize: this.tileSize, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId, subdivisionGranularity: this.map.style.projection.subdivisionGranularity };\n e2.abortController = new AbortController();\n const a2 = yield this.actor.sendAsync({ type: t2, data: i2 }, e2.abortController);\n delete e2.abortController, e2.unloadVectorData(), e2.aborted || e2.loadVectorData(a2, this.map.painter, \"RT\" === t2);\n }));\n }\n abortTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.abortController && (e2.abortController.abort(), delete e2.abortController), e2.aborted = true;\n }));\n }\n unloadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n e2.unloadVectorData(), yield this.actor.sendAsync({ type: \"RMT\", data: { uid: e2.uid, type: this.type, source: this.id } });\n }));\n }\n onRemove() {\n this._removed = true, this.actor.sendAsync({ type: \"RS\", data: { type: this.type, source: this.id } });\n }\n serialize() {\n return t.e({}, this._options, { type: this.type, data: this._data.updateable ? { type: \"FeatureCollection\", features: Array.from(this._data.updateable.values()) } : this._data.url || this._data.geojson });\n }\n hasTransition() {\n return false;\n }\n }\n class te extends t.E {\n constructor(e2, t2, i2, a2) {\n super(), this.flippedWindingOrder = false, this.id = e2, this.dispatcher = i2, this.coordinates = t2.coordinates, this.type = \"image\", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = false, this.setEventedParent(a2), this.options = t2;\n }\n load(e2) {\n return t._(this, void 0, void 0, (function* () {\n this._loaded = false, this.fire(new t.l(\"dataloading\", { dataType: \"source\" })), this.url = this.options.url, this._request = new AbortController();\n try {\n const t2 = yield g.getImage(this.map._requestManager.transformRequest(this.url, \"Image\"), this._request);\n this._request = null, this._loaded = true, t2 && t2.data && (this.image = t2.data, e2 && (this.coordinates = e2), this._finishLoading());\n } catch (e3) {\n this._request = null, this._loaded = true, t.Z(e3) || this.fire(new t.k(e3));\n }\n }));\n }\n loaded() {\n return this._loaded;\n }\n updateImage(e2) {\n return e2.url ? (this._request && (this._request.abort(), this._request = null), this.options.url = e2.url, this.load(e2.coordinates).finally((() => {\n this.texture = null;\n })), this) : this;\n }\n _finishLoading() {\n this.map && (this.setCoordinates(this.coordinates), this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"metadata\" })));\n }\n onAdd(e2) {\n this.map = e2, this.load();\n }\n onRemove() {\n this._request && (this._request.abort(), this._request = null);\n }\n setCoordinates(e2) {\n this.coordinates = e2;\n const i2 = e2.map(t.ab.fromLngLat);\n var a2;\n return this.tileID = (function(e3) {\n const i3 = t.ac.fromPoints(e3), a3 = i3.width(), r2 = i3.height(), o2 = Math.max(a3, r2), s2 = Math.max(0, Math.floor(-Math.log(o2) / Math.LN2)), n2 = Math.pow(2, s2);\n return new t.ae(s2, Math.floor((i3.minX + i3.maxX) / 2 * n2), Math.floor((i3.minY + i3.maxY) / 2 * n2));\n })(i2), this.terrainTileRanges = this._getOverlappingTileRanges(i2), this.minzoom = this.maxzoom = this.tileID.z, this.tileCoords = i2.map(((e3) => this.tileID.getTilePoint(e3)._round())), this.flippedWindingOrder = ((a2 = this.tileCoords)[1].x - a2[0].x) * (a2[2].y - a2[0].y) - (a2[1].y - a2[0].y) * (a2[2].x - a2[0].x) < 0, this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"content\" })), this;\n }\n prepare() {\n if (0 === Object.keys(this.tiles).length || !this.image) return;\n const e2 = this.map.painter.context, i2 = e2.gl;\n this.texture || (this.texture = new t.T(e2, this.image, i2.RGBA), this.texture.bind(i2.LINEAR, i2.CLAMP_TO_EDGE));\n let a2 = false;\n for (const e3 in this.tiles) {\n const t2 = this.tiles[e3];\n \"loaded\" !== t2.state && (t2.state = \"loaded\", t2.texture = this.texture, a2 = true);\n }\n a2 && this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"idle\", sourceId: this.id }));\n }\n loadTile(e2) {\n return t._(this, void 0, void 0, (function* () {\n this.tileID && this.tileID.equals(e2.tileID.canonical) ? (this.tiles[String(e2.tileID.wrap)] = e2, e2.buckets = {}) : e2.state = \"errored\";\n }));\n }\n serialize() {\n return { type: \"image\", url: this.options.url, coordinates: this.coordinates };\n }\n hasTransition() {\n return false;\n }\n _getOverlappingTileRanges(e2) {\n const { minX: i2, minY: a2, maxX: r2, maxY: o2 } = t.ac.fromPoints(e2), s2 = {};\n for (let e3 = 0; e3 <= t.ad; e3++) {\n const t2 = Math.pow(2, e3), n2 = Math.floor(i2 * t2), l2 = Math.floor(a2 * t2), c2 = Math.floor(r2 * t2), h2 = Math.floor(o2 * t2);\n s2[e3] = { minTileX: n2, minTileY: l2, maxTileX: c2, maxTileY: h2 };\n }\n return s2;\n }\n }\n class ie extends te {\n constructor(e2, t2, i2, a2) {\n super(e2, t2, i2, a2), this.roundZoom = true, this.type = \"video\", this.options = t2;\n }\n load() {\n return t._(this, void 0, void 0, (function* () {\n this._loaded = false;\n const e2 = this.options;\n this.urls = [];\n for (const t2 of e2.urls) this.urls.push(this.map._requestManager.transformRequest(t2, \"Source\").url);\n try {\n const e3 = yield t.af(this.urls);\n if (this._loaded = true, !e3) return;\n this.video = e3, this.video.loop = true, this.video.addEventListener(\"playing\", (() => {\n this.map.triggerRepaint();\n })), this.map && this.video.play(), this._finishLoading();\n } catch (e3) {\n this.fire(new t.k(e3));\n }\n }));\n }\n pause() {\n this.video && this.video.pause();\n }\n play() {\n this.video && this.video.play();\n }\n seek(e2) {\n if (this.video) {\n const i2 = this.video.seekable;\n e2 < i2.start(0) || e2 > i2.end(0) ? this.fire(new t.k(new t.ag(`sources.${this.id}`, null, `Playback for this video can be set only between the ${i2.start(0)} and ${i2.end(0)}-second mark.`))) : this.video.currentTime = e2;\n }\n }\n getVideo() {\n return this.video;\n }\n onAdd(e2) {\n this.map || (this.map = e2, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates)));\n }\n prepare() {\n if (0 === Object.keys(this.tiles).length || this.video.readyState < 2) return;\n const e2 = this.map.painter.context, i2 = e2.gl;\n this.texture ? this.video.paused || (this.texture.bind(i2.LINEAR, i2.CLAMP_TO_EDGE), i2.texSubImage2D(i2.TEXTURE_2D, 0, 0, 0, i2.RGBA, i2.UNSIGNED_BYTE, this.video)) : (this.texture = new t.T(e2, this.video, i2.RGBA), this.texture.bind(i2.LINEAR, i2.CLAMP_TO_EDGE));\n let a2 = false;\n for (const e3 in this.tiles) {\n const t2 = this.tiles[e3];\n \"loaded\" !== t2.state && (t2.state = \"loaded\", t2.texture = this.texture, a2 = true);\n }\n a2 && this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"idle\", sourceId: this.id }));\n }\n serialize() {\n return { type: \"video\", urls: this.urls, coordinates: this.coordinates };\n }\n hasTransition() {\n return this.video && !this.video.paused;\n }\n }\n class ae extends te {\n constructor(e2, i2, a2, r2) {\n super(e2, i2, a2, r2), i2.coordinates ? Array.isArray(i2.coordinates) && 4 === i2.coordinates.length && !i2.coordinates.some(((e3) => !Array.isArray(e3) || 2 !== e3.length || e3.some(((e4) => \"number\" != typeof e4)))) || this.fire(new t.k(new t.ag(`sources.${e2}`, null, '\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new t.k(new t.ag(`sources.${e2}`, null, 'missing required property \"coordinates\"'))), i2.animate && \"boolean\" != typeof i2.animate && this.fire(new t.k(new t.ag(`sources.${e2}`, null, 'optional \"animate\" property must be a boolean value'))), i2.canvas ? \"string\" == typeof i2.canvas || i2.canvas instanceof HTMLCanvasElement || this.fire(new t.k(new t.ag(`sources.${e2}`, null, '\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))) : this.fire(new t.k(new t.ag(`sources.${e2}`, null, 'missing required property \"canvas\"'))), this.options = i2, this.animate = void 0 === i2.animate || i2.animate;\n }\n load() {\n return t._(this, void 0, void 0, (function* () {\n this._loaded = true, this.canvas || (this.canvas = this.options.canvas instanceof HTMLCanvasElement ? this.options.canvas : document.getElementById(this.options.canvas)), this.width = this.canvas.width, this.height = this.canvas.height, this._hasInvalidDimensions() ? this.fire(new t.k(new Error(\"Canvas dimensions cannot be less than or equal to zero.\"))) : (this.play = function() {\n this._playing = true, this.map.triggerRepaint();\n }, this.pause = function() {\n this._playing && (this.prepare(), this._playing = false);\n }, this._finishLoading());\n }));\n }\n getCanvas() {\n return this.canvas;\n }\n onAdd(e2) {\n this.map = e2, this.load(), this.canvas && this.animate && this.play();\n }\n onRemove() {\n this.pause();\n }\n prepare() {\n let e2 = false;\n if (this.canvas.width !== this.width && (this.width = this.canvas.width, e2 = true), this.canvas.height !== this.height && (this.height = this.canvas.height, e2 = true), this._hasInvalidDimensions()) return;\n if (0 === Object.keys(this.tiles).length) return;\n const i2 = this.map.painter.context, a2 = i2.gl;\n this.texture ? (e2 || this._playing) && this.texture.update(this.canvas, { premultiply: true }) : (this.texture = new t.T(i2, this.canvas, a2.RGBA, { premultiply: true }), this.texture.bind(a2.LINEAR, a2.CLAMP_TO_EDGE));\n let r2 = false;\n for (const e3 in this.tiles) {\n const t2 = this.tiles[e3];\n \"loaded\" !== t2.state && (t2.state = \"loaded\", t2.texture = this.texture, r2 = true);\n }\n r2 && this.fire(new t.l(\"data\", { dataType: \"source\", sourceDataType: \"idle\", sourceId: this.id }));\n }\n serialize() {\n return { type: \"canvas\", animate: this.animate, canvas: this.options.canvas, coordinates: this.coordinates };\n }\n hasTransition() {\n return this._playing;\n }\n _hasInvalidDimensions() {\n for (const e2 of [this.canvas.width, this.canvas.height]) if (isNaN(e2) || e2 <= 0) return true;\n return false;\n }\n }\n const re = {}, oe = (e2) => {\n switch (e2) {\n case \"geojson\":\n return ee;\n case \"image\":\n return te;\n case \"raster\":\n return K;\n case \"raster-dem\":\n return Y;\n case \"vector\":\n return X;\n case \"video\":\n return ie;\n case \"canvas\":\n return ae;\n }\n return re[e2];\n }, se = \"RTLPluginLoaded\";\n class ne extends t.E {\n constructor() {\n super(...arguments), this.status = \"unavailable\", this.url = null, this.dispatcher = Z();\n }\n _syncState(e2) {\n return this.status = e2, this.dispatcher.broadcast(\"SRPS\", { pluginStatus: e2, pluginURL: this.url }).catch(((e3) => {\n throw this.status = \"error\", e3;\n }));\n }\n getRTLTextPluginStatus() {\n return this.status;\n }\n clearRTLTextPlugin() {\n this.status = \"unavailable\", this.url = null;\n }\n setRTLTextPlugin(e2) {\n return t._(this, arguments, void 0, (function* (e3, t2 = false) {\n if (this.url) throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");\n if (this.url = n.resolveURL(e3), !this.url) throw new Error(`requested url ${e3} is invalid`);\n if (\"unavailable\" === this.status) {\n if (!t2) return this._requestImport();\n this.status = \"deferred\", this._syncState(this.status);\n } else if (\"requested\" === this.status) return this._requestImport();\n }));\n }\n _requestImport() {\n return t._(this, void 0, void 0, (function* () {\n yield this._syncState(\"loading\"), this.status = \"loaded\", this.fire(new t.l(se));\n }));\n }\n lazyLoad() {\n \"unavailable\" === this.status ? this.status = \"requested\" : \"deferred\" === this.status && this._requestImport();\n }\n }\n let le = null;\n function ce() {\n return le || (le = new ne()), le;\n }\n var he, ue;\n !(function(e2) {\n e2[e2.Base = 0] = \"Base\", e2[e2.Parent = 1] = \"Parent\";\n })(he || (he = {})), (function(e2) {\n e2[e2.Departing = 0] = \"Departing\", e2[e2.Incoming = 1] = \"Incoming\";\n })(ue || (ue = {}));\n class de {\n constructor(e2, i2) {\n this.timeAdded = 0, this.fadeEndTime = 0, this.fadeOpacity = 1, this.tileID = e2, this.uid = t.ah(), this.uses = 0, this.tileSize = i2, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = false, this.hasRTLText = false, this.dependencies = {}, this.rtt = [], this.rttCoords = {}, this.expiredRequestCount = 0, this.state = \"loading\";\n }\n isRenderable(e2) {\n return this.hasData() && (!this.fadeEndTime || this.fadeOpacity > 0) && (e2 || !this.holdingForSymbolFade());\n }\n setCrossFadeLogic({ fadingRole: e2, fadingDirection: t2, fadingParentID: i2, fadeEndTime: a2 }) {\n this.resetFadeLogic(), this.fadingRole = e2, this.fadingDirection = t2, this.fadingParentID = i2, this.fadeEndTime = a2;\n }\n setSelfFadeLogic(e2) {\n this.resetFadeLogic(), this.selfFading = true, this.fadeEndTime = e2;\n }\n resetFadeLogic() {\n this.fadingRole = null, this.fadingDirection = null, this.fadingParentID = null, this.selfFading = false, this.timeAdded = c(), this.fadeEndTime = 0, this.fadeOpacity = 1;\n }\n wasRequested() {\n return \"errored\" === this.state || \"loaded\" === this.state || \"reloading\" === this.state;\n }\n clearTextures(e2) {\n this.demTexture && e2.saveTileTexture(this.demTexture), this.demTexture = null;\n }\n loadVectorData(e2, i2, a2) {\n if (this.hasData() && this.unloadVectorData(), this.state = \"loaded\", e2) {\n e2.featureIndex && (this.latestFeatureIndex = e2.featureIndex, e2.rawTileData ? (this.latestRawTileData = e2.rawTileData, this.latestFeatureIndex.rawTileData = e2.rawTileData, this.latestFeatureIndex.encoding = e2.encoding) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData, this.latestFeatureIndex.encoding = this.latestEncoding)), this.collisionBoxArray = e2.collisionBoxArray, this.buckets = (function(e3, t2) {\n const i3 = {};\n if (!t2) return i3;\n for (const a3 of e3) {\n const e4 = a3.layerIds.map(((e5) => t2.getLayer(e5))).filter(Boolean);\n if (0 !== e4.length) {\n a3.layers = e4, a3.stateDependentLayerIds && (a3.stateDependentLayers = a3.stateDependentLayerIds.map(((t3) => e4.filter(((e5) => e5.id === t3))[0])));\n for (const t3 of e4) i3[t3.id] = a3;\n }\n }\n return i3;\n })(e2.buckets, null == i2 ? void 0 : i2.style), this.hasSymbolBuckets = false;\n for (const e3 in this.buckets) {\n const i3 = this.buckets[e3];\n if (i3 instanceof t.aj) {\n if (this.hasSymbolBuckets = true, !a2) break;\n i3.justReloaded = true;\n }\n }\n if (this.hasRTLText = false, this.hasSymbolBuckets) for (const e3 in this.buckets) {\n const i3 = this.buckets[e3];\n if (i3 instanceof t.aj && i3.hasRTLText) {\n this.hasRTLText = true, ce().lazyLoad();\n break;\n }\n }\n this.queryPadding = 0;\n for (const e3 in this.buckets) {\n const t2 = this.buckets[e3];\n this.queryPadding = Math.max(this.queryPadding, i2.style.getLayer(e3).queryRadius(t2));\n }\n e2.imageAtlas && (this.imageAtlas = e2.imageAtlas), e2.glyphAtlasImage && (this.glyphAtlasImage = e2.glyphAtlasImage), this.dashPositions = e2.dashPositions;\n } else this.collisionBoxArray = new t.ai();\n }\n unloadVectorData() {\n for (const e2 in this.buckets) this.buckets[e2].destroy();\n this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.dashPositions && (this.dashPositions = null), this.latestFeatureIndex = null, this.state = \"unloaded\";\n }\n getBucket(e2) {\n return this.buckets[e2.id];\n }\n upload(e2) {\n for (const t2 in this.buckets) {\n const i3 = this.buckets[t2];\n i3.uploadPending() && i3.upload(e2);\n }\n const i2 = e2.gl;\n this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new t.T(e2, this.imageAtlas.image, i2.RGBA), this.imageAtlas.uploaded = true), this.glyphAtlasImage && (this.glyphAtlasTexture = new t.T(e2, this.glyphAtlasImage, i2.ALPHA), this.glyphAtlasImage = null);\n }\n prepare(e2) {\n this.imageAtlas && this.imageAtlas.patchUpdatedImages(e2, this.imageAtlasTexture);\n }\n queryRenderedFeatures(e2, t2, i2, a2, r2, o2, s2, n2, l2, c2, h2) {\n return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: a2, cameraQueryGeometry: r2, scale: o2, tileSize: this.tileSize, pixelPosMatrix: c2, transform: n2, params: s2, queryPadding: this.queryPadding * l2, getElevation: h2 }, e2, t2, i2) : {};\n }\n querySourceFeatures(e2, i2) {\n const a2 = this.latestFeatureIndex;\n if (!a2 || !a2.rawTileData) return;\n const r2 = a2.loadVTLayers(), o2 = i2 && i2.sourceLayer ? i2.sourceLayer : \"\", s2 = r2[t.aa] || r2[o2];\n if (!s2) return;\n const n2 = t.ak(null == i2 ? void 0 : i2.filter, null == i2 ? void 0 : i2.globalState), { z: l2, x: c2, y: h2 } = this.tileID.canonical, u2 = { z: l2, x: c2, y: h2 };\n for (let i3 = 0; i3 < s2.length; i3++) {\n const r3 = s2.feature(i3);\n if (n2.needGeometry) {\n const e3 = t.al(r3, true);\n if (!n2.filter(new t.H(this.tileID.overscaledZ), e3, this.tileID.canonical)) continue;\n } else if (!n2.filter(new t.H(this.tileID.overscaledZ), r3)) continue;\n const d2 = a2.getId(r3, o2), _2 = new t.am(r3, l2, c2, h2, d2);\n _2.tile = u2, e2.push(_2);\n }\n }\n hasData() {\n return \"loaded\" === this.state || \"reloading\" === this.state || \"expired\" === this.state;\n }\n patternsLoaded() {\n return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;\n }\n setExpiryData(e2) {\n const i2 = this.expirationTime;\n if (e2.cacheControl) {\n const i3 = t.an(e2.cacheControl);\n i3[\"max-age\"] && (this.expirationTime = Date.now() + 1e3 * i3[\"max-age\"]);\n } else e2.expires && (this.expirationTime = new Date(e2.expires).getTime());\n if (this.expirationTime) {\n const e3 = Date.now();\n let t2 = false;\n if (this.expirationTime > e3) t2 = false;\n else if (i2) if (this.expirationTime < i2) t2 = true;\n else {\n const a2 = this.expirationTime - i2;\n a2 ? this.expirationTime = e3 + Math.max(a2, 3e4) : t2 = true;\n }\n else t2 = true;\n t2 ? (this.expiredRequestCount++, this.state = \"expired\") : this.expiredRequestCount = 0;\n }\n }\n getExpiryTimeout() {\n if (this.expirationTime) return this.expiredRequestCount ? 1e3 * (1 << Math.min(this.expiredRequestCount - 1, 31)) : Math.min(this.expirationTime - (/* @__PURE__ */ new Date()).getTime(), Math.pow(2, 31) - 1);\n }\n setFeatureState(e2, i2) {\n if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData || 0 === Object.keys(e2).length) return;\n const a2 = this.latestFeatureIndex.loadVTLayers();\n for (const r2 in this.buckets) {\n if (!i2.style.hasLayer(r2)) continue;\n const o2 = this.buckets[r2], s2 = o2.layers[0].sourceLayer || t.aa, n2 = a2[s2], l2 = e2[s2];\n if (!n2 || !l2 || 0 === Object.keys(l2).length) continue;\n o2.update(l2, n2, this.imageAtlas && this.imageAtlas.patternPositions || {}, this.dashPositions || {});\n const c2 = i2 && i2.style && i2.style.getLayer(r2);\n c2 && (this.queryPadding = Math.max(this.queryPadding, c2.queryRadius(o2)));\n }\n }\n holdingForSymbolFade() {\n return void 0 !== this.symbolFadeHoldUntil;\n }\n symbolFadeFinished() {\n return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < c();\n }\n clearSymbolFadeHold() {\n this.symbolFadeHoldUntil = void 0;\n }\n setSymbolHoldDuration(e2) {\n this.symbolFadeHoldUntil = c() + e2;\n }\n setDependencies(e2, t2) {\n const i2 = {};\n for (const e3 of t2) i2[e3] = true;\n this.dependencies[e2] = i2;\n }\n hasDependency(e2, t2) {\n for (const i2 of e2) {\n const e3 = this.dependencies[i2];\n if (e3) {\n for (const i3 of t2) if (e3[i3]) return true;\n }\n }\n return false;\n }\n }\n class _e {\n constructor() {\n this.state = {}, this.stateChanges = {}, this.deletedStates = {};\n }\n updateState(e2, i2, a2) {\n const r2 = String(i2);\n if (this.stateChanges[e2] = this.stateChanges[e2] || {}, this.stateChanges[e2][r2] = this.stateChanges[e2][r2] || {}, t.e(this.stateChanges[e2][r2], a2), null === this.deletedStates[e2]) {\n this.deletedStates[e2] = {};\n for (const t2 in this.state[e2]) t2 !== r2 && (this.deletedStates[e2][t2] = null);\n } else if (this.deletedStates[e2] && null === this.deletedStates[e2][r2]) {\n this.deletedStates[e2][r2] = {};\n for (const t2 in this.state[e2][r2]) a2[t2] || (this.deletedStates[e2][r2][t2] = null);\n } else for (const t2 in a2) this.deletedStates[e2] && this.deletedStates[e2][r2] && null === this.deletedStates[e2][r2][t2] && delete this.deletedStates[e2][r2][t2];\n }\n removeFeatureState(e2, t2, i2) {\n if (null === this.deletedStates[e2]) return;\n const a2 = String(t2);\n if (this.deletedStates[e2] = this.deletedStates[e2] || {}, i2 && void 0 !== t2) null !== this.deletedStates[e2][a2] && (this.deletedStates[e2][a2] = this.deletedStates[e2][a2] || {}, this.deletedStates[e2][a2][i2] = null);\n else if (void 0 !== t2) if (this.stateChanges[e2] && this.stateChanges[e2][a2]) for (i2 in this.deletedStates[e2][a2] = {}, this.stateChanges[e2][a2]) this.deletedStates[e2][a2][i2] = null;\n else this.deletedStates[e2][a2] = null;\n else this.deletedStates[e2] = null;\n }\n getState(e2, i2) {\n const a2 = String(i2), r2 = t.e({}, (this.state[e2] || {})[a2], (this.stateChanges[e2] || {})[a2]);\n if (null === this.deletedStates[e2]) return {};\n if (this.deletedStates[e2]) {\n const t2 = this.deletedStates[e2][i2];\n if (null === t2) return {};\n for (const e3 in t2) delete r2[e3];\n }\n return r2;\n }\n initializeTileState(e2, t2) {\n e2.setFeatureState(this.state, t2);\n }\n coalesceChanges(e2, i2) {\n const a2 = {};\n for (const e3 in this.stateChanges) {\n this.state[e3] = this.state[e3] || {};\n const i3 = {};\n for (const a3 in this.stateChanges[e3]) this.state[e3][a3] || (this.state[e3][a3] = {}), t.e(this.state[e3][a3], this.stateChanges[e3][a3]), i3[a3] = this.state[e3][a3];\n a2[e3] = i3;\n }\n for (const e3 in this.deletedStates) {\n this.state[e3] = this.state[e3] || {};\n const i3 = {};\n if (null === this.deletedStates[e3]) for (const t2 in this.state[e3]) i3[t2] = {}, this.state[e3][t2] = {};\n else for (const t2 in this.deletedStates[e3]) {\n if (null === this.deletedStates[e3][t2]) this.state[e3][t2] = {};\n else for (const i4 of Object.keys(this.deletedStates[e3][t2])) delete this.state[e3][t2][i4];\n i3[t2] = this.state[e3][t2];\n }\n a2[e3] = a2[e3] || {}, t.e(a2[e3], i3);\n }\n this.stateChanges = {}, this.deletedStates = {}, 0 !== Object.keys(a2).length && e2.setFeatureState(a2, i2);\n }\n }\n const pe = 89.25;\n function me(e2, i2) {\n const a2 = t.ao(i2.lat, -t.ap, t.ap);\n return new t.P(t.Y(i2.lng) * e2, t.X(a2) * e2);\n }\n function fe(e2, i2) {\n return new t.ab(i2.x / e2, i2.y / e2).toLngLat();\n }\n function ge(e2) {\n return e2.cameraToCenterDistance * Math.min(0.85 * Math.tan(t.aq(90 - e2.pitch)), Math.tan(t.aq(pe - e2.pitch)));\n }\n function ve(e2, i2) {\n const a2 = e2.canonical, r2 = i2 / t.ar(a2.z), o2 = a2.x + Math.pow(2, a2.z) * e2.wrap, s2 = t.as(new Float64Array(16));\n return t.O(s2, s2, [o2 * r2, a2.y * r2, 0]), t.Q(s2, s2, [r2 / t.a5, r2 / t.a5, 1]), s2;\n }\n function xe(e2, i2, a2, r2, o2) {\n const s2 = t.ab.fromLngLat(e2, i2), n2 = o2 * t.at(1, e2.lat), { x: l2, y: c2, z: h2 } = be(a2, r2);\n return new t.ab(s2.x + n2 * -l2, s2.y + n2 * -c2, s2.z + n2 * -h2);\n }\n function be(e2, i2) {\n const a2 = t.aq(e2), r2 = t.aq(i2), o2 = Math.cos(-a2), s2 = Math.sin(a2);\n return { x: s2 * Math.sin(r2), y: -s2 * Math.cos(r2), z: o2 };\n }\n function ye(e2, t2, i2) {\n const a2 = t2.intersectsFrustum(e2);\n if (!i2 || 0 === a2) return a2;\n const r2 = t2.intersectsPlane(i2);\n return 0 === r2 ? 0 : 2 === a2 && 2 === r2 ? 2 : 1;\n }\n function we(e2, t2, i2) {\n let a2 = 0;\n const r2 = (i2 - t2) / 10;\n for (let o2 = 0; o2 < 10; o2++) a2 += r2 * Math.pow(Math.cos(t2 + (o2 + 0.5) / 10 * (i2 - t2)), e2);\n return a2;\n }\n function Te(e2, i2) {\n return function(a2, r2, o2, s2, n2) {\n const l2 = 2 * ((e2 - 1) / t.au(Math.cos(t.aq(pe - n2)) / Math.cos(t.aq(pe))) - 1), c2 = Math.acos(o2 / s2), h2 = 2 * we(l2 - 1, 0, t.aq(n2 / 2)), u2 = Math.min(t.aq(pe), c2 + t.aq(n2 / 2)), d2 = we(l2 - 1, Math.min(u2, c2 - t.aq(n2 / 2)), u2), _2 = Math.atan(r2 / o2), p2 = Math.hypot(r2, o2);\n let m2 = a2;\n return m2 += t.au(s2 / p2 / Math.max(0.5, Math.cos(t.aq(n2 / 2)))), m2 += l2 * t.au(Math.cos(_2)) / 2, m2 -= t.au(Math.max(1, d2 / h2 / i2)) / 2, m2;\n };\n }\n const Pe = Te(9.314, 3);\n function Ie(e2, i2) {\n const a2 = (i2.roundZoom ? Math.round : Math.floor)(e2.zoom + t.au(e2.tileSize / i2.tileSize));\n return Math.max(0, a2);\n }\n function Ce(e2, i2) {\n const a2 = e2.getCameraFrustum(), r2 = e2.getClippingPlane(), o2 = e2.screenPointToMercatorCoordinate(e2.getCameraPoint()), s2 = t.ab.fromLngLat(e2.center, e2.elevation);\n o2.z = s2.z + Math.cos(e2.pitchInRadians) * e2.cameraToCenterDistance / e2.worldSize;\n const n2 = e2.getCoveringTilesDetailsProvider(), l2 = n2.allowVariableZoom(e2, i2), c2 = Ie(e2, i2), h2 = i2.minzoom || 0, u2 = void 0 !== i2.maxzoom ? i2.maxzoom : e2.maxZoom, d2 = Math.min(Math.max(0, c2), u2), _2 = Math.pow(2, d2), p2 = [_2 * o2.x, _2 * o2.y, 0], m2 = [_2 * s2.x, _2 * s2.y, 0], f2 = Math.hypot(s2.x - o2.x, s2.y - o2.y), g2 = Math.abs(s2.z - o2.z), v2 = Math.hypot(f2, g2), x2 = (e3) => ({ zoom: 0, x: 0, y: 0, wrap: e3, fullyVisible: false }), b2 = [], y2 = [];\n if (e2.renderWorldCopies && n2.allowWorldCopies()) for (let e3 = 1; e3 <= 3; e3++) b2.push(x2(-e3)), b2.push(x2(e3));\n for (b2.push(x2(0)); b2.length > 0; ) {\n const _3 = b2.pop(), f3 = _3.x, x3 = _3.y;\n let w2 = _3.fullyVisible;\n const T2 = { x: f3, y: x3, z: _3.zoom }, P2 = n2.getTileBoundingVolume(T2, _3.wrap, e2.elevation, i2);\n if (!w2) {\n const e3 = ye(a2, P2, r2);\n if (0 === e3) continue;\n w2 = 2 === e3;\n }\n const I2 = n2.distanceToTile2d(o2.x, o2.y, T2, P2);\n let C2 = c2;\n l2 && (C2 = (i2.calculateTileZoom || Pe)(e2.zoom + t.au(e2.tileSize / i2.tileSize), I2, g2, v2, e2.fov)), C2 = (i2.roundZoom ? Math.round : Math.floor)(C2), C2 = Math.max(0, C2);\n const M2 = Math.min(C2, u2);\n if (_3.wrap = n2.getWrap(s2, T2, _3.wrap), _3.zoom >= M2) {\n if (_3.zoom < h2) continue;\n const e3 = d2 - _3.zoom, a3 = p2[0] - 0.5 - (f3 << e3), r3 = p2[1] - 0.5 - (x3 << e3), o3 = i2.reparseOverscaled ? Math.max(_3.zoom, C2) : _3.zoom;\n y2.push({ tileID: new t.a2(_3.zoom === u2 ? o3 : _3.zoom, _3.wrap, _3.zoom, f3, x3), distanceSq: t.av([m2[0] - 0.5 - f3, m2[1] - 0.5 - x3]), tileDistanceToCamera: Math.sqrt(a3 * a3 + r3 * r3) });\n } else for (let e3 = 0; e3 < 4; e3++) b2.push({ zoom: _3.zoom + 1, x: (f3 << 1) + e3 % 2, y: (x3 << 1) + (e3 >> 1), wrap: _3.wrap, fullyVisible: w2 });\n }\n return y2.sort(((e3, t2) => e3.distanceSq - t2.distanceSq)).map(((e3) => e3.tileID));\n }\n const Me = t.ac.fromPoints([new t.P(0, 0), new t.P(t.a5, t.a5)]);\n function Ee(e2) {\n return \"raster\" === e2 || \"image\" === e2 || \"video\" === e2;\n }\n function Se(e2, t2, i2, a2, r2, o2, s2) {\n if (!t2.hasData()) return false;\n const { tileID: n2, fadingRole: l2, fadingDirection: c2, fadingParentID: h2 } = t2;\n if (l2 === he.Base && c2 === ue.Incoming && h2) return i2[h2.key] = h2, true;\n const u2 = Math.max(n2.overscaledZ - r2, o2);\n for (let r3 = n2.overscaledZ - 1; r3 >= u2; r3--) {\n const o3 = n2.scaledTo(r3), l3 = e2.getLoadedTile(o3);\n if (l3) return t2.setCrossFadeLogic({ fadingRole: he.Base, fadingDirection: ue.Incoming, fadingParentID: l3.tileID, fadeEndTime: a2 + s2 }), l3.setCrossFadeLogic({ fadingRole: he.Parent, fadingDirection: ue.Departing, fadeEndTime: a2 + s2 }), i2[o3.key] = o3, true;\n }\n return false;\n }\n function Re(e2, t2, i2, a2, r2, o2) {\n if (!t2.hasData()) return false;\n const s2 = t2.tileID.children(r2);\n let n2 = ze(e2, t2, s2, i2, a2, r2, o2);\n if (n2) return true;\n for (const l2 of s2) ze(e2, t2, l2.children(r2), i2, a2, r2, o2) && (n2 = true);\n return n2;\n }\n function ze(e2, t2, i2, a2, r2, o2, s2) {\n if (i2[0].overscaledZ >= o2) return false;\n let n2 = false;\n for (const o3 of i2) {\n const i3 = e2.getLoadedTile(o3);\n if (!i3) continue;\n const { fadingRole: l2, fadingDirection: c2, fadingParentID: h2 } = i3;\n l2 === he.Base && c2 === ue.Departing && h2 || (i3.setCrossFadeLogic({ fadingRole: he.Base, fadingDirection: ue.Departing, fadingParentID: t2.tileID, fadeEndTime: r2 + s2 }), t2.setCrossFadeLogic({ fadingRole: he.Parent, fadingDirection: ue.Incoming, fadeEndTime: r2 + s2 })), a2[o3.key] = o3, n2 = true;\n }\n return n2;\n }\n function De(e2, t2, i2, a2) {\n const r2 = e2.tileID;\n return !!e2.selfFading || !e2.hasData() && !!t2.has(r2) && (e2.setSelfFadeLogic(i2 + a2), true);\n }\n function Ae(e2, t2) {\n var i2;\n e2.needsHillshadePrepare = true, e2.needsTerrainPrepare = true;\n let a2 = t2.tileID.canonical.x - e2.tileID.canonical.x;\n const r2 = t2.tileID.canonical.y - e2.tileID.canonical.y, o2 = Math.pow(2, e2.tileID.canonical.z), s2 = t2.tileID.key;\n 0 === a2 && 0 === r2 || Math.abs(r2) > 1 || (Math.abs(a2) > 1 && (1 === Math.abs(a2 + o2) ? a2 += o2 : 1 === Math.abs(a2 - o2) && (a2 -= o2)), t2.dem && e2.dem && (e2.dem.backfillBorder(t2.dem, a2, r2), (null === (i2 = e2.neighboringTiles) || void 0 === i2 ? void 0 : i2[s2]) && (e2.neighboringTiles[s2].backfilled = true)));\n }\n class Le {\n constructor() {\n this._tiles = {};\n }\n handleWrapJump(e2) {\n const t2 = {};\n for (const i2 in this._tiles) {\n const a2 = this._tiles[i2];\n a2.tileID = a2.tileID.unwrapTo(a2.tileID.wrap + e2), t2[a2.tileID.key] = a2;\n }\n this._tiles = t2;\n }\n setFeatureState(e2, t2) {\n for (const i2 in this._tiles) this._tiles[i2].setFeatureState(e2, t2);\n }\n getAllTiles() {\n return Object.values(this._tiles);\n }\n getAllIds(e2 = false) {\n return e2 ? Object.values(this._tiles).map(((e3) => e3.tileID)).sort(t.ax).map(((e3) => e3.key)) : Object.keys(this._tiles);\n }\n getTileById(e2) {\n return this._tiles[e2];\n }\n setTile(e2, t2) {\n this._tiles[e2] = t2;\n }\n deleteTileById(e2) {\n delete this._tiles[e2];\n }\n getLoadedTile(e2) {\n const t2 = this.getTileById(e2.key);\n return (null == t2 ? void 0 : t2.hasData()) ? t2 : null;\n }\n isIdRenderable(e2, t2 = false) {\n var i2;\n return null === (i2 = this.getTileById(e2)) || void 0 === i2 ? void 0 : i2.isRenderable(t2);\n }\n getRenderableIds(e2 = 0, i2) {\n const a2 = [];\n for (const e3 of this.getAllIds()) this.isIdRenderable(e3, i2) && a2.push(this.getTileById(e3));\n return i2 ? a2.sort(((i3, a3) => {\n const r2 = i3.tileID, o2 = a3.tileID, s2 = new t.P(r2.canonical.x, r2.canonical.y)._rotate(-e2), n2 = new t.P(o2.canonical.x, o2.canonical.y)._rotate(-e2);\n return r2.overscaledZ - o2.overscaledZ || n2.y - s2.y || n2.x - s2.x;\n })).map(((e3) => e3.tileID.key)) : a2.map(((e3) => e3.tileID)).sort(t.ax).map(((e3) => e3.key));\n }\n }\n class ke extends t.E {\n constructor(e2, i2, a2) {\n super(), this.id = e2, this.dispatcher = a2, this.on(\"data\", ((e3) => this._dataHandler(e3))), this.on(\"dataloading\", (() => {\n this._sourceErrored = false;\n })), this.on(\"error\", (() => {\n this._sourceErrored = this._source.loaded();\n })), this._source = ((e3, t2, i3, a3) => {\n const r2 = new (oe(t2.type))(e3, t2, i3, a3);\n if (r2.id !== e3) throw new Error(`Expected Source id to be ${e3} instead of ${r2.id}`);\n return r2;\n })(e2, i2, a2, this), this._inViewTiles = new Le(), this._outOfViewCache = new t.ay(0, ((e3) => this._unloadTile(e3))), this._timers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._rasterFadeDuration = 0, this._maxFadingAncestorLevels = 5, this._state = new _e(), this._didEmitContent = false, this._updated = false;\n }\n onAdd(e2) {\n this.map = e2, this._maxTileCacheSize = e2 ? e2._maxTileCacheSize : null, this._maxTileCacheZoomLevels = e2 ? e2._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(e2);\n }\n onRemove(e2) {\n for (const e3 of this._inViewTiles.getAllTiles()) e3.unloadVectorData();\n this.clearTiles(), this._source && this._source.onRemove && this._source.onRemove(e2), this._inViewTiles = new Le();\n }\n loaded() {\n if (this._sourceErrored) return true;\n if (!this._sourceLoaded) return false;\n if (!this._source.loaded()) return false;\n if (!(void 0 === this.used && void 0 === this.usedForTerrain || this.used || this.usedForTerrain)) return true;\n if (!this._updated) return false;\n for (const e2 of this._inViewTiles.getAllTiles()) if (\"loaded\" !== e2.state && \"errored\" !== e2.state) return false;\n return true;\n }\n getSource() {\n return this._source;\n }\n getState() {\n return this._state;\n }\n pause() {\n this._paused = true;\n }\n resume() {\n if (!this._paused) return;\n const e2 = this._shouldReloadOnResume;\n this._paused = false, this._shouldReloadOnResume = false, e2 && this.reload(), this.transform && this.update(this.transform, this.terrain);\n }\n _loadTile(e2, i2, a2) {\n return t._(this, void 0, void 0, (function* () {\n try {\n yield this._source.loadTile(e2), this._tileLoaded(e2, i2, a2);\n } catch (i3) {\n e2.state = \"errored\", 404 !== i3.status ? this._source.fire(new t.k(i3, { tile: e2 })) : this.update(this.transform, this.terrain);\n }\n }));\n }\n _unloadTile(e2) {\n this._source.unloadTile && this._source.unloadTile(e2);\n }\n _abortTile(e2) {\n this._source.abortTile && this._source.abortTile(e2), this._source.fire(new t.l(\"dataabort\", { tile: e2, coord: e2.tileID, dataType: \"source\" }));\n }\n serialize() {\n return this._source.serialize();\n }\n prepare(e2) {\n this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._inViewTiles, this.map ? this.map.painter : null);\n for (const t2 of this._inViewTiles.getAllTiles()) t2.upload(e2), t2.prepare(this.map.style.imageManager);\n }\n getIds() {\n return this._inViewTiles.getAllIds(true);\n }\n getRenderableIds(e2) {\n var t2;\n return this._inViewTiles.getRenderableIds(null === (t2 = this.transform) || void 0 === t2 ? void 0 : t2.bearingInRadians, e2);\n }\n hasRenderableParent(e2) {\n const t2 = e2.overscaledZ - 1;\n if (t2 >= this._source.minzoom) {\n const i2 = this.getLoadedTile(e2.scaledTo(t2));\n if (i2) return this._inViewTiles.isIdRenderable(i2.tileID.key);\n }\n return false;\n }\n reload(e2, t2 = void 0) {\n if (this._paused) this._shouldReloadOnResume = true;\n else {\n this._outOfViewCache.reset();\n for (const i2 of this._inViewTiles.getAllIds()) {\n const a2 = this._inViewTiles.getTileById(i2);\n t2 && !this._source.shouldReloadTile(a2, t2) || (e2 ? this._reloadTile(i2, \"expired\") : \"errored\" !== a2.state && this._reloadTile(i2, \"reloading\"));\n }\n }\n }\n _reloadTile(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = this._inViewTiles.getTileById(e2);\n t2 && (\"loading\" !== t2.state && (t2.state = i2), yield this._loadTile(t2, e2, i2));\n }));\n }\n _tileLoaded(e2, i2, a2) {\n e2.timeAdded = c(), e2.selfFading && (e2.fadeEndTime = e2.timeAdded + this._rasterFadeDuration), \"expired\" === a2 && (e2.refreshedUponExpiration = true), this._setTileReloadTimer(i2, e2), \"raster-dem\" === this.getSource().type && e2.dem && (function(e3, t2) {\n var i3, a3;\n const r2 = t2.getRenderableIds();\n for (const o2 of r2) {\n if (!e3.neighboringTiles || !e3.neighboringTiles[o2]) continue;\n const r3 = t2.getTileById(o2);\n e3.neighboringTiles[o2].backfilled || Ae(e3, r3), (null === (a3 = null === (i3 = r3.neighboringTiles) || void 0 === i3 ? void 0 : i3[e3.tileID.key]) || void 0 === a3 ? void 0 : a3.backfilled) || Ae(r3, e3);\n }\n })(e2, this._inViewTiles), this._state.initializeTileState(e2, this.map ? this.map.painter : null), e2.aborted || this._source.fire(new t.l(\"data\", { dataType: \"source\", tile: e2, coord: e2.tileID }));\n }\n getTile(e2) {\n return this.getTileByID(e2.key);\n }\n getTileByID(e2) {\n return this._inViewTiles.getTileById(e2);\n }\n _retainLoadedChildren(e2, t2) {\n const i2 = this._getLoadedDescendents(t2), a2 = /* @__PURE__ */ new Set();\n for (const r2 of t2) {\n const t3 = i2[r2.key];\n if (!(null == t3 ? void 0 : t3.length)) {\n a2.add(r2);\n continue;\n }\n const o2 = r2.overscaledZ + ke.maxOverzooming, s2 = t3.filter(((e3) => e3.tileID.overscaledZ <= o2));\n if (!s2.length) {\n a2.add(r2);\n continue;\n }\n const n2 = Math.min(...s2.map(((e3) => e3.tileID.overscaledZ))), l2 = s2.filter(((e3) => e3.tileID.overscaledZ === n2)).map(((e3) => e3.tileID));\n for (const t4 of l2) e2[t4.key] = t4;\n this._areDescendentsComplete(l2, n2, r2.overscaledZ) || a2.add(r2);\n }\n return a2;\n }\n _getLoadedDescendents(e2) {\n var t2;\n const i2 = {};\n for (const a2 of this._inViewTiles.getAllTiles().filter(((e3) => e3.hasData()))) for (const r2 of e2) a2.tileID.isChildOf(r2) && (i2[t2 = r2.key] || (i2[t2] = [])).push(a2);\n return i2;\n }\n _areDescendentsComplete(e2, t2, i2) {\n return 1 === e2.length && e2[0].isOverscaled() ? e2[0].overscaledZ === t2 : Math.pow(4, t2 - i2) === e2.length;\n }\n getLoadedTile(e2) {\n return this._inViewTiles.getLoadedTile(e2);\n }\n updateCacheSize(e2) {\n const i2 = Math.ceil(e2.width / this._source.tileSize) + 1, a2 = Math.ceil(e2.height / this._source.tileSize) + 1, r2 = Math.floor(i2 * a2 * (null === this._maxTileCacheZoomLevels ? t.c.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels)), o2 = \"number\" == typeof this._maxTileCacheSize ? Math.min(this._maxTileCacheSize, r2) : r2;\n this._outOfViewCache.setMaxSize(o2);\n }\n handleWrapJump(e2) {\n const t2 = Math.round((e2 - (void 0 === this._prevLng ? e2 : this._prevLng)) / 360);\n this._prevLng = e2, t2 && (this._inViewTiles.handleWrapJump(t2), this._resetTileReloadTimers());\n }\n update(e2, i2) {\n if (!this._sourceLoaded || this._paused) return;\n let a2;\n this.transform = e2, this.terrain = i2, this.updateCacheSize(e2), this.handleWrapJump(this.transform.center.lng), this.used || this.usedForTerrain ? this._source.tileID ? a2 = e2.getVisibleUnwrappedCoordinates(this._source.tileID).map(((e3) => new t.a2(e3.canonical.z, e3.wrap, e3.canonical.z, e3.canonical.x, e3.canonical.y))) : (a2 = Ce(e2, { tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: \"vector\" === this._source.type && void 0 !== this.map._zoomLevelsToOverscale ? e2.maxZoom - this.map._zoomLevelsToOverscale : this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: i2, calculateTileZoom: this._source.calculateTileZoom }), this._source.hasTile && (a2 = a2.filter(((e3) => this._source.hasTile(e3))))) : a2 = [], this.usedForTerrain && (a2 = this._addTerrainIdealTiles(a2));\n const r2 = 0 === a2.length && !this._updated && this._didEmitContent;\n this._updated = true, r2 && this.fire(new t.l(\"data\", { sourceDataType: \"idle\", dataType: \"source\", sourceId: this.id }));\n const o2 = Ie(e2, this._source), s2 = this._updateRetainedTiles(a2, o2), n2 = Ee(this._source.type);\n n2 && this._rasterFadeDuration > 0 && !i2 && (function(e3, i3, a3, r3, o3, s3, n3) {\n const l2 = c(), h2 = t.aw(i3);\n for (const t2 of i3) {\n const i4 = e3.getTileById(t2.key);\n i4.fadingDirection !== ue.Departing && 0 !== i4.fadeOpacity || i4.resetFadeLogic(), Se(e3, i4, a3, l2, r3, o3, n3) || Re(e3, i4, a3, l2, s3, n3) || De(i4, h2, l2, n3) || i4.resetFadeLogic();\n }\n })(this._inViewTiles, a2, s2, this._maxFadingAncestorLevels, this._source.minzoom, this._source.maxzoom, this._rasterFadeDuration), n2 ? this._cleanUpRasterTiles(s2) : this._cleanUpVectorTiles(s2);\n }\n _cleanUpRasterTiles(e2) {\n for (const t2 of this._inViewTiles.getAllIds()) e2[t2] || this._removeTile(t2);\n }\n _cleanUpVectorTiles(e2) {\n for (const t2 of this._inViewTiles.getAllIds()) {\n const i2 = this._inViewTiles.getTileById(t2);\n e2[t2] ? i2.clearSymbolFadeHold() : i2.hasSymbolBuckets ? i2.holdingForSymbolFade() ? i2.symbolFadeFinished() && this._removeTile(t2) : i2.setSymbolHoldDuration(this.map._fadeDuration) : this._removeTile(t2);\n }\n }\n _addTerrainIdealTiles(e2) {\n const t2 = [];\n for (const i2 of e2) if (i2.canonical.z > this._source.minzoom) {\n const e3 = i2.scaledTo(i2.canonical.z - 1);\n t2.push(e3);\n const a2 = i2.scaledTo(Math.max(this._source.minzoom, Math.min(i2.canonical.z, 5)));\n t2.push(a2);\n }\n return e2.concat(t2);\n }\n releaseSymbolFadeTiles() {\n for (const e2 of this._inViewTiles.getAllIds()) this._inViewTiles.getTileById(e2).holdingForSymbolFade() && this._removeTile(e2);\n }\n _updateRetainedTiles(e2, t2) {\n var i2;\n const a2 = /* @__PURE__ */ new Set();\n for (const t3 of e2) this._addTile(t3).hasData() || a2.add(t3);\n const r2 = e2.reduce(((e3, t3) => (e3[t3.key] = t3, e3)), {}), o2 = this._retainLoadedChildren(r2, a2), s2 = {}, n2 = Math.max(t2 - ke.maxUnderzooming, this._source.minzoom);\n for (const e3 of o2) {\n let t3 = this._inViewTiles.getTileById(e3.key), a3 = null == t3 ? void 0 : t3.wasRequested();\n for (let o3 = e3.overscaledZ - 1; o3 >= n2; --o3) {\n const n3 = e3.scaledTo(o3);\n if (s2[n3.key]) break;\n if (s2[n3.key] = true, t3 = this.getTile(n3), !t3 && a3 && (t3 = this._addTile(n3)), t3) {\n const e4 = t3.hasData();\n if ((e4 || !(null === (i2 = this.map) || void 0 === i2 ? void 0 : i2.cancelPendingTileRequestsWhileZooming) || a3) && (r2[n3.key] = n3), a3 = t3.wasRequested(), e4) break;\n }\n }\n }\n return r2;\n }\n _addTile(e2) {\n let i2 = this._inViewTiles.getTileById(e2.key);\n if (i2) return i2;\n i2 = this._outOfViewCache.getAndRemove(e2), i2 && (i2.resetFadeLogic(), this._setTileReloadTimer(e2.key, i2), i2.tileID = e2, this._state.initializeTileState(i2, this.map ? this.map.painter : null));\n const a2 = i2;\n return i2 || (i2 = new de(e2, this._source.tileSize * e2.overscaleFactor()), this._loadTile(i2, e2.key, i2.state)), i2.uses++, this._inViewTiles.setTile(e2.key, i2), a2 || this._source.fire(new t.l(\"dataloading\", { tile: i2, coord: i2.tileID, dataType: \"source\" })), i2;\n }\n _setTileReloadTimer(e2, t2) {\n this._clearTileReloadTimer(e2);\n const i2 = t2.getExpiryTimeout();\n i2 && (this._timers[e2] = setTimeout((() => {\n this._reloadTile(e2, \"expired\"), delete this._timers[e2];\n }), i2));\n }\n _clearTileReloadTimer(e2) {\n const t2 = this._timers[e2];\n t2 && (clearTimeout(t2), delete this._timers[e2]);\n }\n _resetTileReloadTimers() {\n for (const e2 in this._timers) clearTimeout(this._timers[e2]), delete this._timers[e2];\n for (const e2 of this._inViewTiles.getAllIds()) {\n const t2 = this._inViewTiles.getTileById(e2);\n this._setTileReloadTimer(e2, t2);\n }\n }\n refreshTiles(e2) {\n for (const t2 of this._inViewTiles.getAllIds()) {\n const i2 = this._inViewTiles.getTileById(t2);\n (this._inViewTiles.isIdRenderable(t2) || \"errored\" == i2.state) && e2.some(((e3) => e3.equals(i2.tileID.canonical))) && this._reloadTile(t2, \"expired\");\n }\n }\n _removeTile(e2) {\n const t2 = this._inViewTiles.getTileById(e2);\n t2 && (t2.uses--, this._inViewTiles.deleteTileById(e2), this._clearTileReloadTimer(e2), t2.uses > 0 || (t2.hasData() && \"reloading\" !== t2.state ? this._outOfViewCache.add(t2.tileID, t2, t2.getExpiryTimeout()) : (t2.aborted = true, this._abortTile(t2), this._unloadTile(t2))));\n }\n _dataHandler(e2) {\n \"source\" === e2.dataType && (\"metadata\" !== e2.sourceDataType ? \"content\" === e2.sourceDataType && this._sourceLoaded && !this._paused && (this.reload(e2.sourceDataChanged, e2.shouldReloadTileOptions), this.transform && this.update(this.transform, this.terrain), this._didEmitContent = true) : this._sourceLoaded = true);\n }\n clearTiles() {\n this._shouldReloadOnResume = false, this._paused = false;\n for (const e2 of this._inViewTiles.getAllIds()) this._removeTile(e2);\n this._outOfViewCache.reset();\n }\n tilesIn(e2, i2, a2) {\n const r2 = [], o2 = this.transform;\n if (!o2) return r2;\n const s2 = o2.getCoveringTilesDetailsProvider().allowWorldCopies(), n2 = a2 ? o2.getCameraQueryGeometry(e2) : e2, l2 = (e3) => o2.screenPointToMercatorCoordinate(e3, this.terrain), c2 = this.transformBbox(e2, l2, !s2), h2 = this.transformBbox(n2, l2, !s2), u2 = this.getIds(), d2 = t.ac.fromPoints(h2);\n for (let e3 = 0; e3 < u2.length; e3++) {\n const a3 = this._inViewTiles.getTileById(u2[e3]);\n if (a3.holdingForSymbolFade()) continue;\n const n3 = s2 ? [a3.tileID] : [a3.tileID.unwrapTo(-1), a3.tileID.unwrapTo(0)], l3 = Math.pow(2, o2.zoom - a3.tileID.overscaledZ), _2 = i2 * a3.queryPadding * t.a5 / a3.tileSize / l3;\n for (const e4 of n3) {\n const i3 = d2.map(((i4) => e4.getTilePoint(new t.ab(i4.x, i4.y))));\n if (i3.expandBy(_2), i3.intersects(Me)) {\n const t2 = c2.map(((t3) => e4.getTilePoint(t3))), i4 = h2.map(((t3) => e4.getTilePoint(t3)));\n r2.push({ tile: a3, tileID: s2 ? e4 : e4.unwrapTo(0), queryGeometry: t2, cameraQueryGeometry: i4, scale: l3 });\n }\n }\n }\n return r2;\n }\n transformBbox(e2, i2, a2) {\n let r2 = e2.map(i2);\n if (a2) {\n const a3 = t.ac.fromPoints(e2);\n a3.shrinkBy(1e-3 * Math.min(a3.width(), a3.height()));\n const o2 = a3.map(i2);\n t.ac.fromPoints(r2).covers(o2) || (r2 = r2.map(((e3) => e3.x > 0.5 ? new t.ab(e3.x - 1, e3.y, e3.z) : e3)));\n }\n return r2;\n }\n getVisibleCoordinates(e2) {\n const t2 = this.getRenderableIds(e2).map(((e3) => this._inViewTiles.getTileById(e3).tileID));\n return this.transform && this.transform.populateCache(t2), t2;\n }\n hasTransition() {\n return !!this._source.hasTransition() || !(!Ee(this._source.type) || !(function(e2, t2) {\n if (t2 <= 0) return false;\n const i2 = c();\n for (const t3 of e2.getAllTiles()) if (t3.fadeEndTime >= i2) return true;\n return false;\n })(this._inViewTiles, this._rasterFadeDuration));\n }\n setRasterFadeDuration(e2) {\n this._rasterFadeDuration = e2;\n }\n setFeatureState(e2, i2, a2) {\n this._state.updateState(e2 = e2 || t.aa, i2, a2);\n }\n removeFeatureState(e2, i2, a2) {\n this._state.removeFeatureState(e2 = e2 || t.aa, i2, a2);\n }\n getFeatureState(e2, i2) {\n return this._state.getState(e2 = e2 || t.aa, i2);\n }\n setDependencies(e2, t2, i2) {\n const a2 = this._inViewTiles.getTileById(e2);\n a2 && a2.setDependencies(t2, i2);\n }\n reloadTilesForDependencies(e2, t2) {\n for (const i2 of this._inViewTiles.getAllIds()) this._inViewTiles.getTileById(i2).hasDependency(e2, t2) && this._reloadTile(i2, \"reloading\");\n this._outOfViewCache.filter(((i2) => !i2.hasDependency(e2, t2)));\n }\n areTilesLoaded() {\n for (const e2 of this._inViewTiles.getAllTiles()) if (\"loaded\" !== e2.state && \"errored\" !== e2.state) return false;\n return true;\n }\n }\n ke.maxUnderzooming = 10, ke.maxOverzooming = 3;\n class Fe {\n constructor(e2, t2) {\n this.reset(e2, t2);\n }\n reset(e2, t2) {\n this.points = e2 || [], this._distances = [0];\n for (let e3 = 1; e3 < this.points.length; e3++) this._distances[e3] = this._distances[e3 - 1] + this.points[e3].dist(this.points[e3 - 1]);\n this.length = this._distances[this._distances.length - 1], this.padding = Math.min(t2 || 0, 0.5 * this.length), this.paddedLength = this.length - 2 * this.padding;\n }\n lerp(e2) {\n if (1 === this.points.length) return this.points[0];\n e2 = t.ao(e2, 0, 1);\n let i2 = 1, a2 = this._distances[i2];\n const r2 = e2 * this.paddedLength + this.padding;\n for (; a2 < r2 && i2 < this._distances.length; ) a2 = this._distances[++i2];\n const o2 = i2 - 1, s2 = this._distances[o2], n2 = a2 - s2, l2 = n2 > 0 ? (r2 - s2) / n2 : 0;\n return this.points[o2].mult(1 - l2).add(this.points[i2].mult(l2));\n }\n }\n function Be(e2, t2) {\n let i2 = true;\n return \"always\" === e2 || \"never\" !== e2 && \"never\" !== t2 || (i2 = false), i2;\n }\n class Oe {\n constructor(e2, t2, i2) {\n const a2 = this.boxCells = [], r2 = this.circleCells = [];\n this.xCellCount = Math.ceil(e2 / i2), this.yCellCount = Math.ceil(t2 / i2);\n for (let e3 = 0; e3 < this.xCellCount * this.yCellCount; e3++) a2.push([]), r2.push([]);\n this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = e2, this.height = t2, this.xScale = this.xCellCount / e2, this.yScale = this.yCellCount / t2, this.boxUid = 0, this.circleUid = 0;\n }\n keysLength() {\n return this.boxKeys.length + this.circleKeys.length;\n }\n insert(e2, t2, i2, a2, r2) {\n this._forEachCell(t2, i2, a2, r2, this._insertBoxCell, this.boxUid++), this.boxKeys.push(e2), this.bboxes.push(t2), this.bboxes.push(i2), this.bboxes.push(a2), this.bboxes.push(r2);\n }\n insertCircle(e2, t2, i2, a2) {\n this._forEachCell(t2 - a2, i2 - a2, t2 + a2, i2 + a2, this._insertCircleCell, this.circleUid++), this.circleKeys.push(e2), this.circles.push(t2), this.circles.push(i2), this.circles.push(a2);\n }\n _insertBoxCell(e2, t2, i2, a2, r2, o2) {\n this.boxCells[r2].push(o2);\n }\n _insertCircleCell(e2, t2, i2, a2, r2, o2) {\n this.circleCells[r2].push(o2);\n }\n _query(e2, t2, i2, a2, r2, o2, s2) {\n if (i2 < 0 || e2 > this.width || a2 < 0 || t2 > this.height) return [];\n const n2 = [];\n if (e2 <= 0 && t2 <= 0 && this.width <= i2 && this.height <= a2) {\n if (r2) return [{ key: null, x1: e2, y1: t2, x2: i2, y2: a2 }];\n for (let e3 = 0; e3 < this.boxKeys.length; e3++) n2.push({ key: this.boxKeys[e3], x1: this.bboxes[4 * e3], y1: this.bboxes[4 * e3 + 1], x2: this.bboxes[4 * e3 + 2], y2: this.bboxes[4 * e3 + 3] });\n for (let e3 = 0; e3 < this.circleKeys.length; e3++) {\n const t3 = this.circles[3 * e3], i3 = this.circles[3 * e3 + 1], a3 = this.circles[3 * e3 + 2];\n n2.push({ key: this.circleKeys[e3], x1: t3 - a3, y1: i3 - a3, x2: t3 + a3, y2: i3 + a3 });\n }\n } else this._forEachCell(e2, t2, i2, a2, this._queryCell, n2, { hitTest: r2, overlapMode: o2, seenUids: { box: {}, circle: {} } }, s2);\n return n2;\n }\n query(e2, t2, i2, a2) {\n return this._query(e2, t2, i2, a2, false, null);\n }\n hitTest(e2, t2, i2, a2, r2, o2) {\n return this._query(e2, t2, i2, a2, true, r2, o2).length > 0;\n }\n hitTestCircle(e2, t2, i2, a2, r2) {\n const o2 = e2 - i2, s2 = e2 + i2, n2 = t2 - i2, l2 = t2 + i2;\n if (s2 < 0 || o2 > this.width || l2 < 0 || n2 > this.height) return false;\n const c2 = [];\n return this._forEachCell(o2, n2, s2, l2, this._queryCellCircle, c2, { hitTest: true, overlapMode: a2, circle: { x: e2, y: t2, radius: i2 }, seenUids: { box: {}, circle: {} } }, r2), c2.length > 0;\n }\n _queryCell(e2, t2, i2, a2, r2, o2, s2, n2) {\n const { seenUids: l2, hitTest: c2, overlapMode: h2 } = s2, u2 = this.boxCells[r2];\n if (null !== u2) {\n const r3 = this.bboxes;\n for (const s3 of u2) if (!l2.box[s3]) {\n l2.box[s3] = true;\n const u3 = 4 * s3, d3 = this.boxKeys[s3];\n if (e2 <= r3[u3 + 2] && t2 <= r3[u3 + 3] && i2 >= r3[u3 + 0] && a2 >= r3[u3 + 1] && (!n2 || n2(d3)) && (!c2 || !Be(h2, d3.overlapMode)) && (o2.push({ key: d3, x1: r3[u3], y1: r3[u3 + 1], x2: r3[u3 + 2], y2: r3[u3 + 3] }), c2)) return true;\n }\n }\n const d2 = this.circleCells[r2];\n if (null !== d2) {\n const r3 = this.circles;\n for (const s3 of d2) if (!l2.circle[s3]) {\n l2.circle[s3] = true;\n const u3 = 3 * s3, d3 = this.circleKeys[s3];\n if (this._circleAndRectCollide(r3[u3], r3[u3 + 1], r3[u3 + 2], e2, t2, i2, a2) && (!n2 || n2(d3)) && (!c2 || !Be(h2, d3.overlapMode))) {\n const e3 = r3[u3], t3 = r3[u3 + 1], i3 = r3[u3 + 2];\n if (o2.push({ key: d3, x1: e3 - i3, y1: t3 - i3, x2: e3 + i3, y2: t3 + i3 }), c2) return true;\n }\n }\n }\n return false;\n }\n _queryCellCircle(e2, t2, i2, a2, r2, o2, s2, n2) {\n const { circle: l2, seenUids: c2, overlapMode: h2 } = s2, u2 = this.boxCells[r2];\n if (null !== u2) {\n const e3 = this.bboxes;\n for (const t3 of u2) if (!c2.box[t3]) {\n c2.box[t3] = true;\n const i3 = 4 * t3, a3 = this.boxKeys[t3];\n if (this._circleAndRectCollide(l2.x, l2.y, l2.radius, e3[i3 + 0], e3[i3 + 1], e3[i3 + 2], e3[i3 + 3]) && (!n2 || n2(a3)) && !Be(h2, a3.overlapMode)) return o2.push(true), true;\n }\n }\n const d2 = this.circleCells[r2];\n if (null !== d2) {\n const e3 = this.circles;\n for (const t3 of d2) if (!c2.circle[t3]) {\n c2.circle[t3] = true;\n const i3 = 3 * t3, a3 = this.circleKeys[t3];\n if (this._circlesCollide(e3[i3], e3[i3 + 1], e3[i3 + 2], l2.x, l2.y, l2.radius) && (!n2 || n2(a3)) && !Be(h2, a3.overlapMode)) return o2.push(true), true;\n }\n }\n }\n _forEachCell(e2, t2, i2, a2, r2, o2, s2, n2) {\n const l2 = this._convertToXCellCoord(e2), c2 = this._convertToYCellCoord(t2), h2 = this._convertToXCellCoord(i2), u2 = this._convertToYCellCoord(a2);\n for (let d2 = l2; d2 <= h2; d2++) for (let l3 = c2; l3 <= u2; l3++) if (r2.call(this, e2, t2, i2, a2, this.xCellCount * l3 + d2, o2, s2, n2)) return;\n }\n _convertToXCellCoord(e2) {\n return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(e2 * this.xScale)));\n }\n _convertToYCellCoord(e2) {\n return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(e2 * this.yScale)));\n }\n _circlesCollide(e2, t2, i2, a2, r2, o2) {\n const s2 = a2 - e2, n2 = r2 - t2, l2 = i2 + o2;\n return l2 * l2 > s2 * s2 + n2 * n2;\n }\n _circleAndRectCollide(e2, t2, i2, a2, r2, o2, s2) {\n const n2 = (o2 - a2) / 2, l2 = Math.abs(e2 - (a2 + n2));\n if (l2 > n2 + i2) return false;\n const c2 = (s2 - r2) / 2, h2 = Math.abs(t2 - (r2 + c2));\n if (h2 > c2 + i2) return false;\n if (l2 <= n2 || h2 <= c2) return true;\n const u2 = l2 - n2, d2 = h2 - c2;\n return u2 * u2 + d2 * d2 <= i2 * i2;\n }\n }\n function je(e2, i2, r2) {\n const o2 = t.N();\n if (!e2) {\n const { vecSouth: e3, vecEast: t2 } = Ze(i2), r3 = a();\n r3[0] = t2[0], r3[1] = t2[1], r3[2] = e3[0], r3[3] = e3[1], s2 = r3, (d2 = (l2 = (n2 = r3)[0]) * (u2 = n2[3]) - (h2 = n2[2]) * (c2 = n2[1])) && (s2[0] = u2 * (d2 = 1 / d2), s2[1] = -c2 * d2, s2[2] = -h2 * d2, s2[3] = l2 * d2), o2[0] = r3[0], o2[1] = r3[1], o2[4] = r3[2], o2[5] = r3[3];\n }\n var s2, n2, l2, c2, h2, u2, d2;\n return t.Q(o2, o2, [1 / r2, 1 / r2, 1]), o2;\n }\n function Ne(e2, i2, a2, r2) {\n if (e2) {\n const e3 = t.N();\n if (!i2) {\n const { vecSouth: t2, vecEast: i3 } = Ze(a2);\n e3[0] = i3[0], e3[1] = i3[1], e3[4] = t2[0], e3[5] = t2[1];\n }\n return t.Q(e3, e3, [r2, r2, 1]), e3;\n }\n return a2.pixelsToClipSpaceMatrix;\n }\n function Ze(e2) {\n const i2 = Math.cos(e2.rollInRadians), a2 = Math.sin(e2.rollInRadians), r2 = Math.cos(e2.pitchInRadians), o2 = Math.cos(e2.bearingInRadians), s2 = Math.sin(e2.bearingInRadians), n2 = t.aD();\n n2[0] = -o2 * r2 * a2 - s2 * i2, n2[1] = -s2 * r2 * a2 + o2 * i2;\n const l2 = t.aE(n2);\n l2 < 1e-9 ? t.aF(n2) : t.aG(n2, n2, 1 / l2);\n const c2 = t.aD();\n c2[0] = o2 * r2 * i2 - s2 * a2, c2[1] = s2 * r2 * i2 + o2 * a2;\n const h2 = t.aE(c2);\n return h2 < 1e-9 ? t.aF(c2) : t.aG(c2, c2, 1 / h2), { vecEast: c2, vecSouth: n2 };\n }\n function Ge(e2, i2, a2, r2) {\n let o2;\n r2 ? (o2 = [e2, i2, r2(e2, i2), 1], t.aI(o2, o2, a2)) : (o2 = [e2, i2, 0, 1], ot(o2, o2, a2));\n const s2 = o2[3];\n return { point: new t.P(o2[0] / s2, o2[1] / s2), signedDistanceFromCamera: s2, isOccluded: false };\n }\n function Ue(e2, t2) {\n return 0.5 + e2 / t2 * 0.5;\n }\n function Ve(e2, t2) {\n return e2.x >= -t2[0] && e2.x <= t2[0] && e2.y >= -t2[1] && e2.y <= t2[1];\n }\n function qe(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2) {\n const p2 = a2 ? e2.textSizeData : e2.iconSizeData, m2 = t.az(p2, i2.transform.zoom), f2 = [256 / i2.width * 2 + 1, 256 / i2.height * 2 + 1], g2 = a2 ? e2.text.dynamicLayoutVertexArray : e2.icon.dynamicLayoutVertexArray;\n g2.clear();\n const v2 = e2.lineVertexArray, x2 = a2 ? e2.text.placedSymbolArray : e2.icon.placedSymbolArray, b2 = i2.transform.width / i2.transform.height;\n let y2 = false;\n for (let a3 = 0; a3 < x2.length; a3++) {\n const w2 = x2.get(a3);\n if (w2.hidden || w2.writingMode === t.aA.vertical && !y2) {\n rt(w2.numGlyphs, g2);\n continue;\n }\n y2 = false;\n const T2 = new t.P(w2.anchorX, w2.anchorY), P2 = { getElevation: _2, pitchedLabelPlaneMatrix: r2, lineVertexArray: v2, pitchWithMap: s2, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: false }, transform: i2.transform, tileAnchorPoint: T2, unwrappedTileID: c2, width: h2, height: u2, translation: d2 }, I2 = Je(w2.anchorX, w2.anchorY, P2);\n if (!Ve(I2.point, f2)) {\n rt(w2.numGlyphs, g2);\n continue;\n }\n const C2 = Ue(i2.transform.cameraToCenterDistance, I2.signedDistanceFromCamera), M2 = t.aB(p2, m2, w2), E2 = s2 ? M2 * i2.transform.getPitchedTextCorrection(w2.anchorX, w2.anchorY, c2) / C2 : M2 * C2, S2 = He({ projectionContext: P2, pitchedLabelPlaneMatrixInverse: o2, symbol: w2, fontSize: E2, flip: false, keepUpright: n2, glyphOffsetArray: e2.glyphOffsetArray, dynamicLayoutVertexArray: g2, aspectRatio: b2, rotateToLine: l2 });\n y2 = S2.useVertical, (S2.notEnoughRoom || y2 || S2.needsFlipping && He({ projectionContext: P2, pitchedLabelPlaneMatrixInverse: o2, symbol: w2, fontSize: E2, flip: true, keepUpright: n2, glyphOffsetArray: e2.glyphOffsetArray, dynamicLayoutVertexArray: g2, aspectRatio: b2, rotateToLine: l2 }).notEnoughRoom) && rt(w2.numGlyphs, g2);\n }\n a2 ? e2.text.dynamicLayoutVertexBuffer.updateData(g2) : e2.icon.dynamicLayoutVertexBuffer.updateData(g2);\n }\n function We(e2, t2, i2, a2, r2, o2, s2, n2) {\n const l2 = o2.glyphStartIndex + o2.numGlyphs, c2 = o2.lineStartIndex, h2 = o2.lineStartIndex + o2.lineLength, u2 = t2.getoffsetX(o2.glyphStartIndex), d2 = t2.getoffsetX(l2 - 1), _2 = it(e2 * u2, i2, a2, r2, o2.segment, c2, h2, n2, s2);\n if (!_2) return null;\n const p2 = it(e2 * d2, i2, a2, r2, o2.segment, c2, h2, n2, s2);\n return p2 ? n2.projectionCache.anyProjectionOccluded ? null : { first: _2, last: p2 } : null;\n }\n function $e(e2, i2, a2, r2) {\n return e2 === t.aA.horizontal && Math.abs(a2.y - i2.y) > Math.abs(a2.x - i2.x) * r2 ? { useVertical: true } : (e2 === t.aA.vertical ? i2.y < a2.y : i2.x > a2.x) ? { needsFlipping: true } : null;\n }\n function He(e2) {\n const { projectionContext: i2, pitchedLabelPlaneMatrixInverse: a2, symbol: r2, fontSize: o2, flip: s2, keepUpright: n2, glyphOffsetArray: l2, dynamicLayoutVertexArray: c2, aspectRatio: h2, rotateToLine: u2 } = e2, d2 = o2 / 24, _2 = r2.lineOffsetX * d2, p2 = r2.lineOffsetY * d2;\n let m2;\n if (r2.numGlyphs > 1) {\n const e3 = r2.glyphStartIndex + r2.numGlyphs, t2 = r2.lineStartIndex, o3 = r2.lineStartIndex + r2.lineLength, c3 = We(d2, l2, _2, p2, s2, r2, u2, i2);\n if (!c3) return { notEnoughRoom: true };\n const f2 = Qe(c3.first.point.x, c3.first.point.y, i2, a2), g2 = Qe(c3.last.point.x, c3.last.point.y, i2, a2);\n if (n2 && !s2) {\n const e4 = $e(r2.writingMode, f2, g2, h2);\n if (e4) return e4;\n }\n m2 = [c3.first];\n for (let a3 = r2.glyphStartIndex + 1; a3 < e3 - 1; a3++) {\n const e4 = it(d2 * l2.getoffsetX(a3), _2, p2, s2, r2.segment, t2, o3, i2, u2);\n if (!e4) return { notEnoughRoom: true };\n m2.push(e4);\n }\n m2.push(c3.last);\n } else {\n if (n2 && !s2) {\n const e4 = Ye(i2.tileAnchorPoint.x, i2.tileAnchorPoint.y, i2).point, o3 = r2.lineStartIndex + r2.segment + 1, s3 = new t.P(i2.lineVertexArray.getx(o3), i2.lineVertexArray.gety(o3)), n3 = Ye(s3.x, s3.y, i2), l3 = n3.signedDistanceFromCamera > 0 ? n3.point : Xe(i2.tileAnchorPoint, s3, e4, 1, i2), c3 = Qe(e4.x, e4.y, i2, a2), u3 = Qe(l3.x, l3.y, i2, a2), d3 = $e(r2.writingMode, c3, u3, h2);\n if (d3) return d3;\n }\n const e3 = it(d2 * l2.getoffsetX(r2.glyphStartIndex), _2, p2, s2, r2.segment, r2.lineStartIndex, r2.lineStartIndex + r2.lineLength, i2, u2);\n if (!e3 || i2.projectionCache.anyProjectionOccluded) return { notEnoughRoom: true };\n m2 = [e3];\n }\n for (const e3 of m2) t.aH(c2, e3.point, e3.angle);\n return {};\n }\n function Xe(e2, t2, i2, a2, r2) {\n const o2 = e2.add(e2.sub(t2)._unit()), s2 = Ye(o2.x, o2.y, r2).point, n2 = i2.sub(s2);\n return i2.add(n2._mult(a2 / n2.mag()));\n }\n function Ke(e2, i2, a2) {\n const r2 = i2.projectionCache;\n if (r2.projections[e2]) return r2.projections[e2];\n const o2 = new t.P(i2.lineVertexArray.getx(e2), i2.lineVertexArray.gety(e2)), s2 = Ye(o2.x, o2.y, i2);\n if (s2.signedDistanceFromCamera > 0) return r2.projections[e2] = s2.point, r2.anyProjectionOccluded = r2.anyProjectionOccluded || s2.isOccluded, s2.point;\n const n2 = e2 - a2.direction;\n return Xe(0 === a2.distanceFromAnchor ? i2.tileAnchorPoint : new t.P(i2.lineVertexArray.getx(n2), i2.lineVertexArray.gety(n2)), o2, a2.previousVertex, a2.absOffsetX - a2.distanceFromAnchor + 1, i2);\n }\n function Ye(e2, t2, i2) {\n const a2 = e2 + i2.translation[0], r2 = t2 + i2.translation[1];\n let o2;\n return i2.pitchWithMap ? (o2 = Ge(a2, r2, i2.pitchedLabelPlaneMatrix, i2.getElevation), o2.isOccluded = false) : (o2 = i2.transform.projectTileCoordinates(a2, r2, i2.unwrappedTileID, i2.getElevation), o2.point.x = (0.5 * o2.point.x + 0.5) * i2.width, o2.point.y = (0.5 * -o2.point.y + 0.5) * i2.height), o2;\n }\n function Qe(e2, i2, a2, r2) {\n if (a2.pitchWithMap) {\n const o2 = [e2, i2, 0, 1];\n return t.aI(o2, o2, r2), a2.transform.projectTileCoordinates(o2[0] / o2[3], o2[1] / o2[3], a2.unwrappedTileID, a2.getElevation).point;\n }\n return { x: e2 / a2.width * 2 - 1, y: 1 - i2 / a2.height * 2 };\n }\n function Je(e2, t2, i2) {\n return i2.transform.projectTileCoordinates(e2, t2, i2.unwrappedTileID, i2.getElevation);\n }\n function et(e2, t2, i2) {\n return e2._unit()._perp()._mult(t2 * i2);\n }\n function tt(e2, i2, a2, r2, o2, s2, n2, l2, c2) {\n if (l2.projectionCache.offsets[e2]) return l2.projectionCache.offsets[e2];\n const h2 = a2.add(i2);\n if (e2 + c2.direction < r2 || e2 + c2.direction >= o2) return l2.projectionCache.offsets[e2] = h2, h2;\n const u2 = Ke(e2 + c2.direction, l2, c2), d2 = et(u2.sub(a2), n2, c2.direction), _2 = a2.add(d2), p2 = u2.add(d2);\n return l2.projectionCache.offsets[e2] = t.aJ(s2, h2, _2, p2) || h2, l2.projectionCache.offsets[e2];\n }\n function it(e2, t2, i2, a2, r2, o2, s2, n2, l2) {\n const c2 = a2 ? e2 - t2 : e2 + t2;\n let h2 = c2 > 0 ? 1 : -1, u2 = 0;\n a2 && (h2 *= -1, u2 = Math.PI), h2 < 0 && (u2 += Math.PI);\n let d2, _2 = h2 > 0 ? o2 + r2 : o2 + r2 + 1;\n n2.projectionCache.cachedAnchorPoint ? d2 = n2.projectionCache.cachedAnchorPoint : (d2 = Ye(n2.tileAnchorPoint.x, n2.tileAnchorPoint.y, n2).point, n2.projectionCache.cachedAnchorPoint = d2);\n let p2, m2, f2 = d2, g2 = d2, v2 = 0, x2 = 0;\n const b2 = Math.abs(c2), y2 = [];\n let w2;\n for (; v2 + x2 <= b2; ) {\n if (_2 += h2, _2 < o2 || _2 >= s2) return null;\n v2 += x2, g2 = f2, m2 = p2;\n const e3 = { absOffsetX: b2, direction: h2, distanceFromAnchor: v2, previousVertex: g2 };\n if (f2 = Ke(_2, n2, e3), 0 === i2) y2.push(g2), w2 = f2.sub(g2);\n else {\n let t3;\n const a3 = f2.sub(g2);\n t3 = 0 === a3.mag() ? et(Ke(_2 + h2, n2, e3).sub(f2), i2, h2) : et(a3, i2, h2), m2 || (m2 = g2.add(t3)), p2 = tt(_2, t3, f2, o2, s2, m2, i2, n2, e3), y2.push(m2), w2 = p2.sub(m2);\n }\n x2 = w2.mag();\n }\n const T2 = w2._mult((b2 - v2) / x2)._add(m2 || g2), P2 = u2 + Math.atan2(f2.y - g2.y, f2.x - g2.x);\n return y2.push(T2), { point: T2, angle: l2 ? P2 : 0, path: y2 };\n }\n const at = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);\n function rt(e2, t2) {\n for (let i2 = 0; i2 < e2; i2++) {\n const e3 = t2.length;\n t2.resize(e3 + 4), t2.float32.set(at, 3 * e3);\n }\n }\n function ot(e2, t2, i2) {\n const a2 = t2[0], r2 = t2[1];\n return e2[0] = i2[0] * a2 + i2[4] * r2 + i2[12], e2[1] = i2[1] * a2 + i2[5] * r2 + i2[13], e2[3] = i2[3] * a2 + i2[7] * r2 + i2[15], e2;\n }\n const st = 100;\n class nt {\n constructor(e2, t2 = new Oe(e2.width + 200, e2.height + 200, 25), i2 = new Oe(e2.width + 200, e2.height + 200, 25)) {\n this.transform = e2, this.grid = t2, this.ignoredGrid = i2, this.pitchFactor = Math.cos(e2.pitch * Math.PI / 180) * e2.cameraToCenterDistance, this.screenRightBoundary = e2.width + st, this.screenBottomBoundary = e2.height + st, this.gridRightBoundary = e2.width + 200, this.gridBottomBoundary = e2.height + 200, this.perspectiveRatioCutoff = 0.6;\n }\n placeCollisionBox(e2, t2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2) {\n const d2 = this.projectAndGetPerspectiveRatio(e2.anchorPointX + n2[0], e2.anchorPointY + n2[1], r2, c2, u2), _2 = i2 * d2.perspectiveRatio;\n let p2;\n if (o2 || s2) p2 = this._projectCollisionBox(e2, _2, a2, r2, o2, s2, n2, d2, c2, h2, u2);\n else {\n const t3 = d2.x + (h2 ? h2.x * _2 : 0), i3 = d2.y + (h2 ? h2.y * _2 : 0);\n p2 = { allPointsOccluded: false, box: [t3 + e2.x1 * _2, i3 + e2.y1 * _2, t3 + e2.x2 * _2, i3 + e2.y2 * _2] };\n }\n const [m2, f2, g2, v2] = p2.box, x2 = o2 ? p2.allPointsOccluded : d2.isOccluded;\n let b2 = x2;\n return b2 || (b2 = d2.perspectiveRatio < this.perspectiveRatioCutoff), b2 || (b2 = !this.isInsideGrid(m2, f2, g2, v2)), b2 || \"always\" !== t2 && this.grid.hitTest(m2, f2, g2, v2, t2, l2) ? { box: [m2, f2, g2, v2], placeable: false, offscreen: false, occluded: x2 } : { box: [m2, f2, g2, v2], placeable: true, offscreen: this.isOffscreen(m2, f2, g2, v2), occluded: x2 };\n }\n placeCollisionCircles(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2, p2) {\n const m2 = [], f2 = new t.P(i2.anchorX, i2.anchorY), g2 = this.getPerspectiveRatio(f2.x, f2.y, s2, p2), v2 = (c2 ? o2 * this.transform.getPitchedTextCorrection(i2.anchorX, i2.anchorY, s2) / g2 : o2 * g2) / t.aN, x2 = { getElevation: p2, pitchedLabelPlaneMatrix: n2, lineVertexArray: a2, pitchWithMap: c2, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: false }, transform: this.transform, tileAnchorPoint: f2, unwrappedTileID: s2, width: this.transform.width, height: this.transform.height, translation: _2 }, b2 = We(v2, r2, i2.lineOffsetX * v2, i2.lineOffsetY * v2, false, i2, false, x2);\n let y2 = false, w2 = false, T2 = true;\n if (b2) {\n const i3 = 0.5 * u2 * g2 + d2, a3 = new t.P(-100, -100), r3 = new t.P(this.screenRightBoundary, this.screenBottomBoundary), o3 = new Fe(), s3 = b2.first, n3 = b2.last;\n let _3 = [];\n for (let e3 = s3.path.length - 1; e3 >= 1; e3--) _3.push(s3.path[e3]);\n for (let e3 = 1; e3 < n3.path.length; e3++) _3.push(n3.path[e3]);\n const p3 = 2.5 * i3;\n if (c2) {\n const e3 = this.projectPathToScreenSpace(_3, x2);\n _3 = e3.some(((e4) => e4.signedDistanceFromCamera <= 0)) ? [] : e3.map(((e4) => e4.point));\n }\n let f3 = [];\n if (_3.length > 0) {\n const e3 = _3[0].clone(), i4 = _3[0].clone();\n for (let t2 = 1; t2 < _3.length; t2++) e3.x = Math.min(e3.x, _3[t2].x), e3.y = Math.min(e3.y, _3[t2].y), i4.x = Math.max(i4.x, _3[t2].x), i4.y = Math.max(i4.y, _3[t2].y);\n f3 = e3.x >= a3.x && i4.x <= r3.x && e3.y >= a3.y && i4.y <= r3.y ? [_3] : i4.x < a3.x || e3.x > r3.x || i4.y < a3.y || e3.y > r3.y ? [] : t.aK([_3], a3.x, a3.y, r3.x, r3.y);\n }\n for (const t2 of f3) {\n o3.reset(t2, 0.25 * i3);\n let a4 = 0;\n a4 = o3.length <= 0.5 * i3 ? 1 : Math.ceil(o3.paddedLength / p3) + 1;\n for (let t3 = 0; t3 < a4; t3++) {\n const r4 = t3 / Math.max(a4 - 1, 1), s4 = o3.lerp(r4), n4 = s4.x + st, c3 = s4.y + st;\n m2.push(n4, c3, i3, 0);\n const u3 = n4 - i3, d3 = c3 - i3, _4 = n4 + i3, p4 = c3 + i3;\n if (T2 = T2 && this.isOffscreen(u3, d3, _4, p4), w2 = w2 || this.isInsideGrid(u3, d3, _4, p4), \"always\" !== e2 && this.grid.hitTestCircle(n4, c3, i3, e2, h2) && (y2 = true, !l2)) return { circles: [], offscreen: false, collisionDetected: y2 };\n }\n }\n }\n return { circles: !l2 && y2 || !w2 || g2 < this.perspectiveRatioCutoff ? [] : m2, offscreen: T2, collisionDetected: y2 };\n }\n projectPathToScreenSpace(e2, i2) {\n const a2 = (function(e3, i3) {\n const a3 = t.N();\n return t.aC(a3, i3.pitchedLabelPlaneMatrix), e3.map(((e4) => {\n const t2 = Ge(e4.x, e4.y, a3, i3.getElevation), r2 = i3.transform.projectTileCoordinates(t2.point.x, t2.point.y, i3.unwrappedTileID, i3.getElevation);\n return r2.point.x = (0.5 * r2.point.x + 0.5) * i3.width, r2.point.y = (0.5 * -r2.point.y + 0.5) * i3.height, r2;\n }));\n })(e2, i2);\n return (function(e3) {\n let t2 = 0, i3 = 0, a3 = 0, r2 = 0;\n for (let o2 = 0; o2 < e3.length; o2++) e3[o2].isOccluded ? (a3 = o2 + 1, r2 = 0) : (r2++, r2 > i3 && (i3 = r2, t2 = a3));\n return e3.slice(t2, t2 + i3);\n })(a2);\n }\n queryRenderedSymbols(e2) {\n if (0 === e2.length || 0 === this.grid.keysLength() && 0 === this.ignoredGrid.keysLength()) return {};\n const i2 = [], a2 = new t.ac();\n for (const r3 of e2) {\n const e3 = new t.P(r3.x + st, r3.y + st);\n a2.extend(e3), i2.push(e3);\n }\n const { minX: r2, minY: o2, maxX: s2, maxY: n2 } = a2, l2 = this.grid.query(r2, o2, s2, n2).concat(this.ignoredGrid.query(r2, o2, s2, n2)), c2 = {}, h2 = {};\n for (const e3 of l2) {\n const a3 = e3.key;\n if (void 0 === c2[a3.bucketInstanceId] && (c2[a3.bucketInstanceId] = {}), c2[a3.bucketInstanceId][a3.featureIndex]) continue;\n const r3 = [new t.P(e3.x1, e3.y1), new t.P(e3.x2, e3.y1), new t.P(e3.x2, e3.y2), new t.P(e3.x1, e3.y2)];\n t.aL(i2, r3) && (c2[a3.bucketInstanceId][a3.featureIndex] = true, void 0 === h2[a3.bucketInstanceId] && (h2[a3.bucketInstanceId] = []), h2[a3.bucketInstanceId].push(a3.featureIndex));\n }\n return h2;\n }\n insertCollisionBox(e2, t2, i2, a2, r2, o2) {\n (i2 ? this.ignoredGrid : this.grid).insert({ bucketInstanceId: a2, featureIndex: r2, collisionGroupID: o2, overlapMode: t2 }, e2[0], e2[1], e2[2], e2[3]);\n }\n insertCollisionCircles(e2, t2, i2, a2, r2, o2) {\n const s2 = i2 ? this.ignoredGrid : this.grid, n2 = { bucketInstanceId: a2, featureIndex: r2, collisionGroupID: o2, overlapMode: t2 };\n for (let t3 = 0; t3 < e2.length; t3 += 4) s2.insertCircle(n2, e2[t3], e2[t3 + 1], e2[t3 + 2]);\n }\n projectAndGetPerspectiveRatio(e2, i2, a2, r2, o2) {\n if (o2) {\n let a3;\n r2 ? (a3 = [e2, i2, r2(e2, i2), 1], t.aI(a3, a3, o2)) : (a3 = [e2, i2, 0, 1], ot(a3, a3, o2));\n const s2 = a3[3];\n return { x: (a3[0] / s2 + 1) / 2 * this.transform.width + st, y: (-a3[1] / s2 + 1) / 2 * this.transform.height + st, perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / s2 * 0.5, isOccluded: false, signedDistanceFromCamera: s2 };\n }\n {\n const t2 = this.transform.projectTileCoordinates(e2, i2, a2, r2);\n return { x: (t2.point.x + 1) / 2 * this.transform.width + st, y: (1 - t2.point.y) / 2 * this.transform.height + st, perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / t2.signedDistanceFromCamera * 0.5, isOccluded: t2.isOccluded, signedDistanceFromCamera: t2.signedDistanceFromCamera };\n }\n }\n getPerspectiveRatio(e2, t2, i2, a2) {\n const r2 = this.transform.projectTileCoordinates(e2, t2, i2, a2);\n return 0.5 + this.transform.cameraToCenterDistance / r2.signedDistanceFromCamera * 0.5;\n }\n isOffscreen(e2, t2, i2, a2) {\n return i2 < st || e2 >= this.screenRightBoundary || a2 < st || t2 > this.screenBottomBoundary;\n }\n isInsideGrid(e2, t2, i2, a2) {\n return i2 >= 0 && e2 < this.gridRightBoundary && a2 >= 0 && t2 < this.gridBottomBoundary;\n }\n getViewportMatrix() {\n const e2 = t.as([]);\n return t.O(e2, e2, [-100, -100, 0]), e2;\n }\n _projectCollisionBox(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2) {\n let d2 = 1, _2 = 0, p2 = 0, m2 = 1;\n const f2 = e2.anchorPointX + n2[0], g2 = e2.anchorPointY + n2[1];\n if (s2 && !o2) {\n const e3 = this.projectAndGetPerspectiveRatio(f2 + 1, g2, r2, c2, u2), t2 = e3.x - l2.x, i3 = Math.atan((e3.y - l2.y) / t2) + (t2 < 0 ? Math.PI : 0), a3 = Math.sin(i3), o3 = Math.cos(i3);\n d2 = o3, _2 = a3, p2 = -a3, m2 = o3;\n } else if (!s2 && o2) {\n const e3 = Ze(this.transform);\n d2 = e3.vecEast[0], _2 = e3.vecEast[1], p2 = e3.vecSouth[0], m2 = e3.vecSouth[1];\n }\n let v2 = l2.x, x2 = l2.y, b2 = i2;\n o2 && (v2 = f2, x2 = g2, b2 = Math.pow(2, -(this.transform.zoom - a2.overscaledZ)), b2 *= this.transform.getPitchedTextCorrection(f2, g2, r2), h2 || (b2 *= t.ao(0.5 + l2.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4))), h2 && (v2 += d2 * h2.x * b2 + p2 * h2.y * b2, x2 += _2 * h2.x * b2 + m2 * h2.y * b2);\n const y2 = e2.x1 * b2, w2 = e2.x2 * b2, T2 = (y2 + w2) / 2, P2 = e2.y1 * b2, I2 = e2.y2 * b2, C2 = (P2 + I2) / 2, M2 = [{ offsetX: y2, offsetY: P2 }, { offsetX: T2, offsetY: P2 }, { offsetX: w2, offsetY: P2 }, { offsetX: w2, offsetY: C2 }, { offsetX: w2, offsetY: I2 }, { offsetX: T2, offsetY: I2 }, { offsetX: y2, offsetY: I2 }, { offsetX: y2, offsetY: C2 }];\n let E2 = [];\n for (const { offsetX: e3, offsetY: i3 } of M2) E2.push(new t.P(v2 + d2 * e3 + p2 * i3, x2 + _2 * e3 + m2 * i3));\n let S2 = false;\n if (o2) {\n const e3 = E2.map(((e4) => this.projectAndGetPerspectiveRatio(e4.x, e4.y, r2, c2, u2)));\n S2 = e3.some(((e4) => !e4.isOccluded)), E2 = e3.map(((e4) => new t.P(e4.x, e4.y)));\n } else S2 = true;\n return { box: t.aM(E2), allPointsOccluded: !S2 };\n }\n }\n class lt {\n constructor(e2, t2, i2, a2) {\n this.opacity = e2 ? Math.max(0, Math.min(1, e2.opacity + (e2.placed ? t2 : -t2))) : a2 && i2 ? 1 : 0, this.placed = i2;\n }\n isHidden() {\n return 0 === this.opacity && !this.placed;\n }\n }\n class ct {\n constructor(e2, t2, i2, a2, r2) {\n this.text = new lt(e2 ? e2.text : null, t2, i2, r2), this.icon = new lt(e2 ? e2.icon : null, t2, a2, r2);\n }\n isHidden() {\n return this.text.isHidden() && this.icon.isHidden();\n }\n }\n class ht {\n constructor(e2, t2, i2) {\n this.text = e2, this.icon = t2, this.skipFade = i2;\n }\n }\n class ut {\n constructor(e2, t2, i2, a2, r2) {\n this.bucketInstanceId = e2, this.featureIndex = t2, this.sourceLayerIndex = i2, this.bucketIndex = a2, this.tileID = r2;\n }\n }\n class dt {\n constructor(e2) {\n this.crossSourceCollisions = e2, this.maxGroupID = 0, this.collisionGroups = {};\n }\n get(e2) {\n if (this.crossSourceCollisions) return { ID: 0, predicate: null };\n if (!this.collisionGroups[e2]) {\n const t2 = ++this.maxGroupID;\n this.collisionGroups[e2] = { ID: t2, predicate: (e3) => e3.collisionGroupID === t2 };\n }\n return this.collisionGroups[e2];\n }\n }\n function _t(e2, i2, a2, r2, o2) {\n const { horizontalAlign: s2, verticalAlign: n2 } = t.aT(e2);\n return new t.P(-(s2 - 0.5) * i2 + r2[0] * o2, -(n2 - 0.5) * a2 + r2[1] * o2);\n }\n class pt {\n constructor(e2, t2, i2, a2, r2) {\n this.transform = e2.clone(), this.terrain = t2, this.collisionIndex = new nt(this.transform), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = false, this.commitTime = 0, this.fadeDuration = i2, this.retainedQueryData = {}, this.collisionGroups = new dt(a2), this.collisionCircleArrays = {}, this.collisionBoxArrays = /* @__PURE__ */ new Map(), this.prevPlacement = r2, r2 && (r2.prevPlacement = void 0), this.placedOrientations = {};\n }\n _getTerrainElevationFunc(e2) {\n const t2 = this.terrain;\n return t2 ? (i2, a2) => t2.getElevation(e2, i2, a2) : null;\n }\n getBucketParts(e2, i2, a2, r2) {\n const o2 = a2.getBucket(i2), s2 = a2.latestFeatureIndex;\n if (!o2 || !s2 || i2.id !== o2.layerIds[0]) return;\n const n2 = a2.collisionBoxArray, l2 = o2.layers[0].layout, c2 = o2.layers[0].paint, h2 = Math.pow(2, this.transform.zoom - a2.tileID.overscaledZ), u2 = a2.tileSize / t.a5, d2 = a2.tileID.toUnwrapped(), _2 = \"map\" === l2.get(\"text-rotation-alignment\"), p2 = t.aO(a2, 1, this.transform.zoom), m2 = t.aP(this.collisionIndex.transform, a2, c2.get(\"text-translate\"), c2.get(\"text-translate-anchor\")), f2 = t.aP(this.collisionIndex.transform, a2, c2.get(\"icon-translate\"), c2.get(\"icon-translate-anchor\")), g2 = je(_2, this.transform, p2);\n this.retainedQueryData[o2.bucketInstanceId] = new ut(o2.bucketInstanceId, s2, o2.sourceLayerIndex, o2.index, a2.tileID);\n const v2 = { bucket: o2, layout: l2, translationText: m2, translationIcon: f2, unwrappedTileID: d2, pitchedLabelPlaneMatrix: g2, scale: h2, textPixelRatio: u2, holdingForFade: a2.holdingForSymbolFade(), collisionBoxArray: n2, partiallyEvaluatedTextSize: t.az(o2.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(o2.sourceID) };\n if (r2) for (const t2 of o2.sortKeyRanges) {\n const { sortKey: i3, symbolInstanceStart: a3, symbolInstanceEnd: r3 } = t2;\n e2.push({ sortKey: i3, symbolInstanceStart: a3, symbolInstanceEnd: r3, parameters: v2 });\n }\n else e2.push({ symbolInstanceStart: 0, symbolInstanceEnd: o2.symbolInstances.length, parameters: v2 });\n }\n attemptAnchorPlacement(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2, p2, m2, f2, g2, v2, x2, b2) {\n const y2 = t.aQ[e2.textAnchor], w2 = [e2.textOffset0, e2.textOffset1], T2 = _t(y2, a2, r2, w2, o2), P2 = this.collisionIndex.placeCollisionBox(i2, d2, l2, c2, h2, n2, s2, f2, u2.predicate, x2, T2, b2);\n if ((!v2 || this.collisionIndex.placeCollisionBox(v2, d2, l2, c2, h2, n2, s2, g2, u2.predicate, x2, T2, b2).placeable) && P2.placeable) {\n let e3;\n if (this.prevPlacement && this.prevPlacement.variableOffsets[_2.crossTileID] && this.prevPlacement.placements[_2.crossTileID] && this.prevPlacement.placements[_2.crossTileID].text && (e3 = this.prevPlacement.variableOffsets[_2.crossTileID].anchor), 0 === _2.crossTileID) throw new Error(\"symbolInstance.crossTileID can't be 0\");\n return this.variableOffsets[_2.crossTileID] = { textOffset: w2, width: a2, height: r2, anchor: y2, textBoxScale: o2, prevAnchor: e3 }, this.markUsedJustification(p2, y2, _2, m2), p2.allowVerticalPlacement && (this.markUsedOrientation(p2, m2, _2), this.placedOrientations[_2.crossTileID] = m2), { shift: T2, placedGlyphBoxes: P2 };\n }\n }\n placeLayerBucketPart(e2, i2, a2) {\n const { bucket: r2, layout: o2, translationText: s2, translationIcon: n2, unwrappedTileID: l2, pitchedLabelPlaneMatrix: c2, textPixelRatio: h2, holdingForFade: u2, collisionBoxArray: d2, partiallyEvaluatedTextSize: _2, collisionGroup: p2 } = e2.parameters, m2 = o2.get(\"text-optional\"), f2 = o2.get(\"icon-optional\"), g2 = t.aR(o2, \"text-overlap\", \"text-allow-overlap\"), v2 = \"always\" === g2, x2 = t.aR(o2, \"icon-overlap\", \"icon-allow-overlap\"), b2 = \"always\" === x2, y2 = \"map\" === o2.get(\"text-rotation-alignment\"), w2 = \"map\" === o2.get(\"text-pitch-alignment\"), T2 = \"none\" !== o2.get(\"icon-text-fit\"), P2 = \"viewport-y\" === o2.get(\"symbol-z-order\"), I2 = v2 && (b2 || !r2.hasIconData() || f2), C2 = b2 && (v2 || !r2.hasTextData() || m2);\n !r2.collisionArrays && d2 && r2.deserializeCollisionBoxes(d2);\n const M2 = this.retainedQueryData[r2.bucketInstanceId].tileID, E2 = this._getTerrainElevationFunc(M2), S2 = this.transform.getFastPathSimpleProjectionMatrix(M2), R2 = (e3, d3, b3) => {\n var P3, R3;\n if (i2[e3.crossTileID]) return;\n if (u2) return void (this.placements[e3.crossTileID] = new ht(false, false, false));\n let z2 = false, D2 = false, A2 = true, L2 = null, k2 = { box: null, placeable: false, offscreen: null, occluded: false }, F2 = { placeable: false }, B2 = null, O2 = null, j2 = null, N2 = 0, Z2 = 0, G2 = 0;\n d3.textFeatureIndex ? N2 = d3.textFeatureIndex : e3.useRuntimeCollisionCircles && (N2 = e3.featureIndex), d3.verticalTextFeatureIndex && (Z2 = d3.verticalTextFeatureIndex);\n const U2 = d3.textBox;\n if (U2) {\n const i3 = (i4) => {\n let a3 = t.aA.horizontal;\n if (r2.allowVerticalPlacement && !i4 && this.prevPlacement) {\n const t2 = this.prevPlacement.placedOrientations[e3.crossTileID];\n t2 && (this.placedOrientations[e3.crossTileID] = t2, a3 = t2, this.markUsedOrientation(r2, a3, e3));\n }\n return a3;\n }, o3 = (i4, a3) => {\n if (r2.allowVerticalPlacement && e3.numVerticalGlyphVertices > 0 && d3.verticalTextBox) {\n for (const e4 of r2.writingModes) if (e4 === t.aA.vertical ? (k2 = a3(), F2 = k2) : k2 = i4(), k2 && k2.placeable) break;\n } else k2 = i4();\n }, c3 = e3.textAnchorOffsetStartIndex, u3 = e3.textAnchorOffsetEndIndex;\n if (u3 === c3) {\n const a3 = (t2, i4) => {\n const a4 = this.collisionIndex.placeCollisionBox(t2, g2, h2, M2, l2, w2, y2, s2, p2.predicate, E2, void 0, S2);\n return a4 && a4.placeable && (this.markUsedOrientation(r2, i4, e3), this.placedOrientations[e3.crossTileID] = i4), a4;\n };\n o3((() => a3(U2, t.aA.horizontal)), (() => {\n const i4 = d3.verticalTextBox;\n return r2.allowVerticalPlacement && e3.numVerticalGlyphVertices > 0 && i4 ? a3(i4, t.aA.vertical) : { box: null, offscreen: null };\n })), i3(k2 && k2.placeable);\n } else {\n let _3 = t.aQ[null === (R3 = null === (P3 = this.prevPlacement) || void 0 === P3 ? void 0 : P3.variableOffsets[e3.crossTileID]) || void 0 === R3 ? void 0 : R3.anchor];\n const m3 = (t2, i4, o4) => {\n const d4 = t2.x2 - t2.x1, m4 = t2.y2 - t2.y1, f4 = e3.textBoxScale, v3 = T2 && \"never\" === x2 ? i4 : null;\n let b4 = null, P4 = \"never\" === g2 ? 1 : 2, I3 = \"never\";\n _3 && P4++;\n for (let i5 = 0; i5 < P4; i5++) {\n for (let i6 = c3; i6 < u3; i6++) {\n const a3 = r2.textAnchorOffsets.get(i6);\n if (_3 && a3.textAnchor !== _3) continue;\n const c4 = this.attemptAnchorPlacement(a3, t2, d4, m4, f4, y2, w2, h2, M2, l2, p2, I3, e3, r2, o4, s2, n2, v3, E2);\n if (c4 && (b4 = c4.placedGlyphBoxes, b4 && b4.placeable)) return z2 = true, L2 = c4.shift, b4;\n }\n _3 ? _3 = null : I3 = g2;\n }\n return a2 && !b4 && (b4 = { box: this.collisionIndex.placeCollisionBox(U2, \"always\", h2, M2, l2, w2, y2, s2, p2.predicate, E2, void 0, S2).box, offscreen: false, placeable: false, occluded: false }), b4;\n };\n o3((() => m3(U2, d3.iconBox, t.aA.horizontal)), (() => {\n const i4 = d3.verticalTextBox;\n return r2.allowVerticalPlacement && (!k2 || !k2.placeable) && e3.numVerticalGlyphVertices > 0 && i4 ? m3(i4, d3.verticalIconBox, t.aA.vertical) : { box: null, occluded: true, offscreen: null };\n })), k2 && (z2 = k2.placeable, A2 = k2.offscreen);\n const f3 = i3(k2 && k2.placeable);\n if (!z2 && this.prevPlacement) {\n const t2 = this.prevPlacement.variableOffsets[e3.crossTileID];\n t2 && (this.variableOffsets[e3.crossTileID] = t2, this.markUsedJustification(r2, t2.anchor, e3, f3));\n }\n }\n }\n if (B2 = k2, z2 = B2 && B2.placeable, A2 = B2 && B2.offscreen, e3.useRuntimeCollisionCircles && e3.centerJustifiedTextSymbolIndex >= 0) {\n const i3 = r2.text.placedSymbolArray.get(e3.centerJustifiedTextSymbolIndex), n3 = t.aB(r2.textSizeData, _2, i3), h3 = o2.get(\"text-padding\");\n O2 = this.collisionIndex.placeCollisionCircles(g2, i3, r2.lineVertexArray, r2.glyphOffsetArray, n3, l2, c2, a2, w2, p2.predicate, e3.collisionCircleDiameter, h3, s2, E2), O2.circles.length && O2.collisionDetected && !a2 && t.w(\"Collisions detected, but collision boxes are not shown\"), z2 = v2 || O2.circles.length > 0 && !O2.collisionDetected, A2 = A2 && O2.offscreen;\n }\n if (d3.iconFeatureIndex && (G2 = d3.iconFeatureIndex), d3.iconBox) {\n const e4 = (e5) => this.collisionIndex.placeCollisionBox(e5, x2, h2, M2, l2, w2, y2, n2, p2.predicate, E2, T2 && L2 ? L2 : void 0, S2);\n F2 && F2.placeable && d3.verticalIconBox ? (j2 = e4(d3.verticalIconBox), D2 = j2.placeable) : (j2 = e4(d3.iconBox), D2 = j2.placeable), A2 = A2 && j2.offscreen;\n }\n const V2 = m2 || 0 === e3.numHorizontalGlyphVertices && 0 === e3.numVerticalGlyphVertices, q2 = f2 || 0 === e3.numIconVertices;\n V2 || q2 ? q2 ? V2 || (D2 = D2 && z2) : z2 = D2 && z2 : D2 = z2 = D2 && z2;\n const W2 = D2 && j2.placeable;\n if (z2 && B2.placeable && this.collisionIndex.insertCollisionBox(B2.box, g2, o2.get(\"text-ignore-placement\"), r2.bucketInstanceId, F2 && F2.placeable && Z2 ? Z2 : N2, p2.ID), W2 && this.collisionIndex.insertCollisionBox(j2.box, x2, o2.get(\"icon-ignore-placement\"), r2.bucketInstanceId, G2, p2.ID), O2 && z2 && this.collisionIndex.insertCollisionCircles(O2.circles, g2, o2.get(\"text-ignore-placement\"), r2.bucketInstanceId, N2, p2.ID), a2 && this.storeCollisionData(r2.bucketInstanceId, b3, d3, B2, j2, O2), 0 === e3.crossTileID) throw new Error(\"symbolInstance.crossTileID can't be 0\");\n if (0 === r2.bucketInstanceId) throw new Error(\"bucket.bucketInstanceId can't be 0\");\n this.placements[e3.crossTileID] = new ht((z2 || I2) && !(null == B2 ? void 0 : B2.occluded), (D2 || C2) && !(null == j2 ? void 0 : j2.occluded), A2 || r2.justReloaded), i2[e3.crossTileID] = true;\n };\n if (P2) {\n if (0 !== e2.symbolInstanceStart) throw new Error(\"bucket.bucketInstanceId should be 0\");\n const t2 = r2.getSortedSymbolIndexes(-this.transform.bearingInRadians);\n for (let e3 = t2.length - 1; e3 >= 0; --e3) {\n const i3 = t2[e3];\n R2(r2.symbolInstances.get(i3), r2.collisionArrays[i3], i3);\n }\n } else for (let t2 = e2.symbolInstanceStart; t2 < e2.symbolInstanceEnd; t2++) R2(r2.symbolInstances.get(t2), r2.collisionArrays[t2], t2);\n r2.justReloaded = false;\n }\n storeCollisionData(e2, t2, i2, a2, r2, o2) {\n if (i2.textBox || i2.iconBox) {\n let o3, s2;\n this.collisionBoxArrays.has(e2) ? o3 = this.collisionBoxArrays.get(e2) : (o3 = /* @__PURE__ */ new Map(), this.collisionBoxArrays.set(e2, o3)), o3.has(t2) ? s2 = o3.get(t2) : (s2 = { text: null, icon: null }, o3.set(t2, s2)), i2.textBox && (s2.text = a2.box), i2.iconBox && (s2.icon = r2.box);\n }\n if (o2) {\n let t3 = this.collisionCircleArrays[e2];\n void 0 === t3 && (t3 = this.collisionCircleArrays[e2] = []);\n for (let e3 = 0; e3 < o2.circles.length; e3 += 4) t3.push(o2.circles[e3 + 0] - st), t3.push(o2.circles[e3 + 1] - st), t3.push(o2.circles[e3 + 2]), t3.push(o2.collisionDetected ? 1 : 0);\n }\n }\n markUsedJustification(e2, i2, a2, r2) {\n let o2;\n o2 = r2 === t.aA.vertical ? a2.verticalPlacedTextSymbolIndex : { left: a2.leftJustifiedTextSymbolIndex, center: a2.centerJustifiedTextSymbolIndex, right: a2.rightJustifiedTextSymbolIndex }[t.aS(i2)];\n const s2 = [a2.leftJustifiedTextSymbolIndex, a2.centerJustifiedTextSymbolIndex, a2.rightJustifiedTextSymbolIndex, a2.verticalPlacedTextSymbolIndex];\n for (const t2 of s2) t2 >= 0 && (e2.text.placedSymbolArray.get(t2).crossTileID = o2 >= 0 && t2 !== o2 ? 0 : a2.crossTileID);\n }\n markUsedOrientation(e2, i2, a2) {\n const r2 = i2 === t.aA.horizontal || i2 === t.aA.horizontalOnly ? i2 : 0, o2 = i2 === t.aA.vertical ? i2 : 0, s2 = [a2.leftJustifiedTextSymbolIndex, a2.centerJustifiedTextSymbolIndex, a2.rightJustifiedTextSymbolIndex];\n for (const t2 of s2) e2.text.placedSymbolArray.get(t2).placedOrientation = r2;\n a2.verticalPlacedTextSymbolIndex && (e2.text.placedSymbolArray.get(a2.verticalPlacedTextSymbolIndex).placedOrientation = o2);\n }\n commit(e2) {\n this.commitTime = e2, this.zoomAtLastRecencyCheck = this.transform.zoom;\n const t2 = this.prevPlacement;\n let i2 = false;\n this.prevZoomAdjustment = t2 ? t2.zoomAdjustment(this.transform.zoom) : 0;\n const a2 = t2 ? t2.symbolFadeChange(e2) : 1, r2 = t2 ? t2.opacities : {}, o2 = t2 ? t2.variableOffsets : {}, s2 = t2 ? t2.placedOrientations : {};\n for (const e3 in this.placements) {\n const t3 = this.placements[e3], o3 = r2[e3];\n o3 ? (this.opacities[e3] = new ct(o3, a2, t3.text, t3.icon), i2 = i2 || t3.text !== o3.text.placed || t3.icon !== o3.icon.placed) : (this.opacities[e3] = new ct(null, a2, t3.text, t3.icon, t3.skipFade), i2 = i2 || t3.text || t3.icon);\n }\n for (const e3 in r2) {\n const t3 = r2[e3];\n if (!this.opacities[e3]) {\n const r3 = new ct(t3, a2, false, false);\n r3.isHidden() || (this.opacities[e3] = r3, i2 = i2 || t3.text.placed || t3.icon.placed);\n }\n }\n for (const e3 in o2) this.variableOffsets[e3] || !this.opacities[e3] || this.opacities[e3].isHidden() || (this.variableOffsets[e3] = o2[e3]);\n for (const e3 in s2) this.placedOrientations[e3] || !this.opacities[e3] || this.opacities[e3].isHidden() || (this.placedOrientations[e3] = s2[e3]);\n if (t2 && void 0 === t2.lastPlacementChangeTime) throw new Error(\"Last placement time for previous placement is not defined\");\n i2 ? this.lastPlacementChangeTime = e2 : \"number\" != typeof this.lastPlacementChangeTime && (this.lastPlacementChangeTime = t2 ? t2.lastPlacementChangeTime : e2);\n }\n updateLayerOpacities(e2, t2) {\n const i2 = {};\n for (const a2 of t2) {\n const t3 = a2.getBucket(e2);\n t3 && a2.latestFeatureIndex && e2.id === t3.layerIds[0] && this.updateBucketOpacities(t3, a2.tileID, i2, a2.collisionBoxArray);\n }\n }\n updateBucketOpacities(e2, i2, a2, r2) {\n e2.hasTextData() && (e2.text.opacityVertexArray.clear(), e2.text.hasVisibleVertices = false), e2.hasIconData() && (e2.icon.opacityVertexArray.clear(), e2.icon.hasVisibleVertices = false), e2.hasIconCollisionBoxData() && e2.iconCollisionBox.collisionVertexArray.clear(), e2.hasTextCollisionBoxData() && e2.textCollisionBox.collisionVertexArray.clear();\n const o2 = e2.layers[0], s2 = o2.layout, n2 = new ct(null, 0, false, false, true), l2 = s2.get(\"text-allow-overlap\"), c2 = s2.get(\"icon-allow-overlap\"), h2 = o2._unevaluatedLayout.hasValue(\"text-variable-anchor\") || o2._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"), u2 = \"map\" === s2.get(\"text-rotation-alignment\"), d2 = \"map\" === s2.get(\"text-pitch-alignment\"), _2 = \"none\" !== s2.get(\"icon-text-fit\"), p2 = new ct(null, 0, l2 && (c2 || !e2.hasIconData() || s2.get(\"icon-optional\")), c2 && (l2 || !e2.hasTextData() || s2.get(\"text-optional\")), true);\n !e2.collisionArrays && r2 && (e2.hasIconCollisionBoxData() || e2.hasTextCollisionBoxData()) && e2.deserializeCollisionBoxes(r2);\n const m2 = (e3, t2, i3) => {\n for (let a3 = 0; a3 < t2 / 4; a3++) e3.opacityVertexArray.emplaceBack(i3);\n e3.hasVisibleVertices = e3.hasVisibleVertices || i3 !== Pt;\n }, f2 = this.collisionBoxArrays.get(e2.bucketInstanceId);\n for (let i3 = 0; i3 < e2.symbolInstances.length; i3++) {\n const r3 = e2.symbolInstances.get(i3), { numHorizontalGlyphVertices: o3, numVerticalGlyphVertices: s3, crossTileID: l3 } = r3;\n let c3 = this.opacities[l3];\n a2[l3] ? c3 = n2 : c3 || (c3 = p2, this.opacities[l3] = c3), a2[l3] = true;\n const g2 = r3.numIconVertices > 0, v2 = this.placedOrientations[r3.crossTileID], x2 = v2 === t.aA.vertical, b2 = v2 === t.aA.horizontal || v2 === t.aA.horizontalOnly;\n if (o3 > 0 || s3 > 0) {\n const t2 = Tt(c3.text);\n m2(e2.text, o3, x2 ? Pt : t2), m2(e2.text, s3, b2 ? Pt : t2);\n const i4 = c3.text.isHidden();\n [r3.rightJustifiedTextSymbolIndex, r3.centerJustifiedTextSymbolIndex, r3.leftJustifiedTextSymbolIndex].forEach(((t3) => {\n t3 >= 0 && (e2.text.placedSymbolArray.get(t3).hidden = i4 || x2 ? 1 : 0);\n })), r3.verticalPlacedTextSymbolIndex >= 0 && (e2.text.placedSymbolArray.get(r3.verticalPlacedTextSymbolIndex).hidden = i4 || b2 ? 1 : 0);\n const a3 = this.variableOffsets[r3.crossTileID];\n a3 && this.markUsedJustification(e2, a3.anchor, r3, v2);\n const n3 = this.placedOrientations[r3.crossTileID];\n n3 && (this.markUsedJustification(e2, \"left\", r3, n3), this.markUsedOrientation(e2, n3, r3));\n }\n if (g2) {\n const t2 = Tt(c3.icon), i4 = !(_2 && r3.verticalPlacedIconSymbolIndex && x2);\n r3.placedIconSymbolIndex >= 0 && (m2(e2.icon, r3.numIconVertices, i4 ? t2 : Pt), e2.icon.placedSymbolArray.get(r3.placedIconSymbolIndex).hidden = c3.icon.isHidden()), r3.verticalPlacedIconSymbolIndex >= 0 && (m2(e2.icon, r3.numVerticalIconVertices, i4 ? Pt : t2), e2.icon.placedSymbolArray.get(r3.verticalPlacedIconSymbolIndex).hidden = c3.icon.isHidden());\n }\n const y2 = f2 && f2.has(i3) ? f2.get(i3) : { text: null, icon: null };\n if (e2.hasIconCollisionBoxData() || e2.hasTextCollisionBoxData()) {\n const a3 = e2.collisionArrays[i3];\n if (a3) {\n let i4 = new t.P(0, 0);\n if (a3.textBox || a3.verticalTextBox) {\n let t2 = true;\n if (h2) {\n const e3 = this.variableOffsets[l3];\n e3 ? (i4 = _t(e3.anchor, e3.width, e3.height, e3.textOffset, e3.textBoxScale), u2 && i4._rotate(d2 ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : t2 = false;\n }\n if (a3.textBox || a3.verticalTextBox) {\n let r4;\n a3.textBox && (r4 = x2), a3.verticalTextBox && (r4 = b2), mt(e2.textCollisionBox.collisionVertexArray, c3.text.placed, !t2 || r4, y2.text, i4.x, i4.y);\n }\n }\n if (a3.iconBox || a3.verticalIconBox) {\n const t2 = Boolean(!b2 && a3.verticalIconBox);\n let r4;\n a3.iconBox && (r4 = t2), a3.verticalIconBox && (r4 = !t2), mt(e2.iconCollisionBox.collisionVertexArray, c3.icon.placed, r4, y2.icon, _2 ? i4.x : 0, _2 ? i4.y : 0);\n }\n }\n }\n }\n if (e2.sortFeatures(-this.transform.bearingInRadians), this.retainedQueryData[e2.bucketInstanceId] && (this.retainedQueryData[e2.bucketInstanceId].featureSortOrder = e2.featureSortOrder), e2.hasTextData() && e2.text.opacityVertexBuffer && e2.text.opacityVertexBuffer.updateData(e2.text.opacityVertexArray), e2.hasIconData() && e2.icon.opacityVertexBuffer && e2.icon.opacityVertexBuffer.updateData(e2.icon.opacityVertexArray), e2.hasIconCollisionBoxData() && e2.iconCollisionBox.collisionVertexBuffer && e2.iconCollisionBox.collisionVertexBuffer.updateData(e2.iconCollisionBox.collisionVertexArray), e2.hasTextCollisionBoxData() && e2.textCollisionBox.collisionVertexBuffer && e2.textCollisionBox.collisionVertexBuffer.updateData(e2.textCollisionBox.collisionVertexArray), e2.text.opacityVertexArray.length !== e2.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${e2.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e2.text.layoutVertexArray.length}) / 4`);\n if (e2.icon.opacityVertexArray.length !== e2.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${e2.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e2.icon.layoutVertexArray.length}) / 4`);\n e2.bucketInstanceId in this.collisionCircleArrays && (e2.collisionCircleArray = this.collisionCircleArrays[e2.bucketInstanceId], delete this.collisionCircleArrays[e2.bucketInstanceId]);\n }\n symbolFadeChange(e2) {\n return 0 === this.fadeDuration ? 1 : (e2 - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment;\n }\n zoomAdjustment(e2) {\n return Math.max(0, (this.transform.zoom - e2) / 1.5);\n }\n hasTransitions(e2) {\n return this.stale || e2 - this.lastPlacementChangeTime < this.fadeDuration;\n }\n stillRecent(e2, t2) {\n const i2 = this.zoomAtLastRecencyCheck === t2 ? 1 - this.zoomAdjustment(t2) : 1;\n return this.zoomAtLastRecencyCheck = t2, this.commitTime + this.fadeDuration * i2 > e2;\n }\n setStale() {\n this.stale = true;\n }\n }\n function mt(e2, t2, i2, a2, r2, o2) {\n a2 && 0 !== a2.length || (a2 = [0, 0, 0, 0]);\n const s2 = a2[0] - st, n2 = a2[1] - st, l2 = a2[2] - st, c2 = a2[3] - st;\n e2.emplaceBack(t2 ? 1 : 0, i2 ? 1 : 0, r2 || 0, o2 || 0, s2, n2), e2.emplaceBack(t2 ? 1 : 0, i2 ? 1 : 0, r2 || 0, o2 || 0, l2, n2), e2.emplaceBack(t2 ? 1 : 0, i2 ? 1 : 0, r2 || 0, o2 || 0, l2, c2), e2.emplaceBack(t2 ? 1 : 0, i2 ? 1 : 0, r2 || 0, o2 || 0, s2, c2);\n }\n const ft = Math.pow(2, 25), gt = Math.pow(2, 24), vt = Math.pow(2, 17), xt = Math.pow(2, 16), bt = Math.pow(2, 9), yt = Math.pow(2, 8), wt = Math.pow(2, 1);\n function Tt(e2) {\n if (0 === e2.opacity && !e2.placed) return 0;\n if (1 === e2.opacity && e2.placed) return 4294967295;\n const t2 = e2.placed ? 1 : 0, i2 = Math.floor(127 * e2.opacity);\n return i2 * ft + t2 * gt + i2 * vt + t2 * xt + i2 * bt + t2 * yt + i2 * wt + t2;\n }\n const Pt = 0;\n class It {\n constructor(e2) {\n this._sortAcrossTiles = \"viewport-y\" !== e2.layout.get(\"symbol-z-order\") && !e2.layout.get(\"symbol-sort-key\").isConstant(), this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [];\n }\n continuePlacement(e2, t2, i2, a2, r2) {\n const o2 = this._bucketParts;\n for (; this._currentTileIndex < e2.length; ) if (t2.getBucketParts(o2, a2, e2[this._currentTileIndex], this._sortAcrossTiles), this._currentTileIndex++, r2()) return true;\n for (this._sortAcrossTiles && (this._sortAcrossTiles = false, o2.sort(((e3, t3) => e3.sortKey - t3.sortKey))); this._currentPartIndex < o2.length; ) if (t2.placeLayerBucketPart(o2[this._currentPartIndex], this._seenCrossTileIDs, i2), this._currentPartIndex++, r2()) return true;\n return false;\n }\n }\n class Ct {\n constructor(e2, t2, i2, a2, r2, o2, s2, n2) {\n this.placement = new pt(e2, t2, o2, s2, n2), this._currentPlacementIndex = i2.length - 1, this._forceFullPlacement = a2, this._showCollisionBoxes = r2, this._done = false;\n }\n isDone() {\n return this._done;\n }\n continuePlacement(e2, t2, i2) {\n const a2 = c(), r2 = () => !this._forceFullPlacement && c() - a2 > 2;\n for (; this._currentPlacementIndex >= 0; ) {\n const a3 = t2[e2[this._currentPlacementIndex]], o2 = this.placement.collisionIndex.transform.zoom;\n if (\"symbol\" === a3.type && (!a3.minzoom || a3.minzoom <= o2) && (!a3.maxzoom || a3.maxzoom > o2)) {\n if (this._inProgressLayer || (this._inProgressLayer = new It(a3)), this._inProgressLayer.continuePlacement(i2[a3.source], this.placement, this._showCollisionBoxes, a3, r2)) return;\n delete this._inProgressLayer;\n }\n this._currentPlacementIndex--;\n }\n this._done = true;\n }\n commit(e2) {\n return this.placement.commit(e2), this.placement;\n }\n }\n const Mt = 512 / t.a5 / 2;\n class Et {\n constructor(e2, i2, a2) {\n this.tileID = e2, this.bucketInstanceId = a2, this._symbolsByKey = {};\n const r2 = /* @__PURE__ */ new Map();\n for (let e3 = 0; e3 < i2.length; e3++) {\n const t2 = i2.get(e3), a3 = t2.key, o2 = r2.get(a3);\n o2 ? o2.push(t2) : r2.set(a3, [t2]);\n }\n for (const [e3, i3] of r2) {\n const a3 = { positions: i3.map(((e4) => ({ x: Math.floor(e4.anchorX * Mt), y: Math.floor(e4.anchorY * Mt) }))), crossTileIDs: i3.map(((e4) => e4.crossTileID)) };\n if (a3.positions.length > 128) {\n const e4 = new t.aU(a3.positions.length, 16, Uint16Array);\n for (const { x: t2, y: i4 } of a3.positions) e4.add(t2, i4);\n e4.finish(), delete a3.positions, a3.index = e4;\n }\n this._symbolsByKey[e3] = a3;\n }\n }\n getScaledCoordinates(e2, i2) {\n const { x: a2, y: r2, z: o2 } = this.tileID.canonical, { x: s2, y: n2, z: l2 } = i2.canonical, c2 = Mt / Math.pow(2, l2 - o2), h2 = (n2 * t.a5 + e2.anchorY) * c2, u2 = r2 * t.a5 * Mt;\n return { x: Math.floor((s2 * t.a5 + e2.anchorX) * c2 - a2 * t.a5 * Mt), y: Math.floor(h2 - u2) };\n }\n findMatches(e2, t2, i2) {\n const a2 = this.tileID.canonical.z < t2.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - t2.canonical.z);\n for (let r2 = 0; r2 < e2.length; r2++) {\n const o2 = e2.get(r2);\n if (o2.crossTileID) continue;\n const s2 = this._symbolsByKey[o2.key];\n if (!s2) continue;\n const n2 = this.getScaledCoordinates(o2, t2);\n if (s2.index) {\n const e3 = s2.index.range(n2.x - a2, n2.y - a2, n2.x + a2, n2.y + a2).sort();\n for (const t3 of e3) {\n const e4 = s2.crossTileIDs[t3];\n if (!i2[e4]) {\n i2[e4] = true, o2.crossTileID = e4;\n break;\n }\n }\n } else if (s2.positions) for (let e3 = 0; e3 < s2.positions.length; e3++) {\n const t3 = s2.positions[e3], r3 = s2.crossTileIDs[e3];\n if (Math.abs(t3.x - n2.x) <= a2 && Math.abs(t3.y - n2.y) <= a2 && !i2[r3]) {\n i2[r3] = true, o2.crossTileID = r3;\n break;\n }\n }\n }\n }\n getCrossTileIDsLists() {\n return Object.values(this._symbolsByKey).map((({ crossTileIDs: e2 }) => e2));\n }\n }\n class St {\n constructor() {\n this.maxCrossTileID = 0;\n }\n generate() {\n return ++this.maxCrossTileID;\n }\n }\n class Rt {\n constructor() {\n this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0;\n }\n handleWrapJump(e2) {\n const t2 = Math.round((e2 - this.lng) / 360);\n if (0 !== t2) for (const e3 in this.indexes) {\n const i2 = this.indexes[e3], a2 = {};\n for (const e4 in i2) {\n const r2 = i2[e4];\n r2.tileID = r2.tileID.unwrapTo(r2.tileID.wrap + t2), a2[r2.tileID.key] = r2;\n }\n this.indexes[e3] = a2;\n }\n this.lng = e2;\n }\n addBucket(e2, t2, i2) {\n if (this.indexes[e2.overscaledZ] && this.indexes[e2.overscaledZ][e2.key]) {\n if (this.indexes[e2.overscaledZ][e2.key].bucketInstanceId === t2.bucketInstanceId) return false;\n this.removeBucketCrossTileIDs(e2.overscaledZ, this.indexes[e2.overscaledZ][e2.key]);\n }\n for (let e3 = 0; e3 < t2.symbolInstances.length; e3++) t2.symbolInstances.get(e3).crossTileID = 0;\n this.usedCrossTileIDs[e2.overscaledZ] || (this.usedCrossTileIDs[e2.overscaledZ] = {});\n const a2 = this.usedCrossTileIDs[e2.overscaledZ];\n for (const i3 in this.indexes) {\n const r2 = this.indexes[i3];\n if (Number(i3) > e2.overscaledZ) for (const i4 in r2) {\n const o2 = r2[i4];\n o2.tileID.isChildOf(e2) && o2.findMatches(t2.symbolInstances, e2, a2);\n }\n else {\n const o2 = r2[e2.scaledTo(Number(i3)).key];\n o2 && o2.findMatches(t2.symbolInstances, e2, a2);\n }\n }\n for (let e3 = 0; e3 < t2.symbolInstances.length; e3++) {\n const r2 = t2.symbolInstances.get(e3);\n r2.crossTileID || (r2.crossTileID = i2.generate(), a2[r2.crossTileID] = true);\n }\n return void 0 === this.indexes[e2.overscaledZ] && (this.indexes[e2.overscaledZ] = {}), this.indexes[e2.overscaledZ][e2.key] = new Et(e2, t2.symbolInstances, t2.bucketInstanceId), true;\n }\n removeBucketCrossTileIDs(e2, t2) {\n for (const i2 of t2.getCrossTileIDsLists()) for (const t3 of i2) delete this.usedCrossTileIDs[e2][t3];\n }\n removeStaleBuckets(e2) {\n let t2 = false;\n for (const i2 in this.indexes) {\n const a2 = this.indexes[i2];\n for (const r2 in a2) e2[a2[r2].bucketInstanceId] || (this.removeBucketCrossTileIDs(i2, a2[r2]), delete a2[r2], t2 = true);\n }\n return t2;\n }\n }\n class zt {\n constructor() {\n this.layerIndexes = {}, this.crossTileIDs = new St(), this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {};\n }\n addLayer(e2, t2, i2) {\n let a2 = this.layerIndexes[e2.id];\n void 0 === a2 && (a2 = this.layerIndexes[e2.id] = new Rt());\n let r2 = false;\n const o2 = {};\n a2.handleWrapJump(i2);\n for (const i3 of t2) {\n const t3 = i3.getBucket(e2);\n t3 && e2.id === t3.layerIds[0] && (t3.bucketInstanceId || (t3.bucketInstanceId = ++this.maxBucketInstanceId), a2.addBucket(i3.tileID, t3, this.crossTileIDs) && (r2 = true), o2[t3.bucketInstanceId] = true);\n }\n return a2.removeStaleBuckets(o2) && (r2 = true), r2;\n }\n pruneUnusedLayers(e2) {\n const t2 = {};\n e2.forEach(((e3) => {\n t2[e3] = true;\n }));\n for (const e3 in this.layerIndexes) t2[e3] || delete this.layerIndexes[e3];\n }\n }\n var Dt = \"void main() {fragColor=vec4(1.0);}\";\n const At = { prelude: Lt(\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\\nout highp vec4 fragColor;\", \"#ifdef GL_ES\\nprecision highp float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c\\n);}\\n#ifdef TERRAIN3D\\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\\n#endif\\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\\n#ifdef TERRAIN3D\\nhighp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\\n#else\\nreturn 1.0;\\n#endif\\n}float calculate_visibility(vec4 pos) {\\n#ifdef TERRAIN3D\\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\\n#else\\nreturn 1.0;\\n#endif\\n}float ele(vec2 pos) {\\n#ifdef TERRAIN3D\\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\\n#else\\nreturn 0.0;\\n#endif\\n}float get_elevation(vec2 pos) {\\n#ifdef TERRAIN3D\\n#ifdef GLOBE\\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\\n#endif\\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\\n#else\\nreturn 0.0;\\n#endif\\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;\"), projectionMercator: Lt(\"\", \"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}\"), projectionGlobe: Lt(\"\", \"#define GLOBE_RADIUS 6371008.8\\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); \\nif (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len\\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}\"), background: Lt(\"uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}\"), backgroundPattern: Lt(\"uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}\"), circle: Lt(\"in vec3 v_data;in float v_visibility;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main(void) {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\\n#ifdef GLOBE\\nvec3 center_vector=projectToSphere(circle_center);\\n#endif\\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\\n#ifdef GLOBE\\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\\n#else\\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\\n#endif\\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\\n#ifdef GLOBE\\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\\n#else\\ngl_Position=projectTileWithElevation(corner_position,ele);\\n#endif\\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}\"), clippingMask: Lt(Dt, \"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}\"), heatmap: Lt(\"uniform highp float u_intensity;in vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main() {\\n#pragma mapbox: initialize highp float weight\\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#pragma mapbox: define mediump float radius\\nconst highp float ZERO=1.0/255.0/16.0;\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main(void) {\\n#pragma mapbox: initialize highp float weight\\n#pragma mapbox: initialize mediump float radius\\nvec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);\\n#ifdef GLOBE\\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\\n#else\\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\\n#endif\\n}\"), heatmapTexture: Lt(\"uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(0.0);\\n#endif\\n}\", \"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\"), collisionBox: Lt(\"in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}\", \"in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}\"), collisionCircle: Lt(\"in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}\", \"in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"), colorRelief: Lt(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}\"), debug: Lt(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}\", \"in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}\"), depth: Lt(Dt, \"in vec2 a_pos;void main() {\\n#ifdef GLOBE\\ngl_Position=projectTileFor3D(a_pos,0.0);\\n#else\\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\\n#endif\\n}\"), fill: Lt(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\nfragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_fill_translate;in vec2 a_pos;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}\"), fillOutline: Lt(\"in vec2 v_pos;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n}\"), fillOutlinePattern: Lt(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n}\"), fillPattern: Lt(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"), fillExtrusion: Lt(\"in vec4 v_color;void main() {fragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;\\n#ifdef TERRAIN3D\\nin vec2 a_centroid;\\n#endif\\nout vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;\\n#ifdef TERRAIN3D\\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\\n#else\\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\\n#endif\\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\\n#ifdef GLOBE\\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\\n#else\\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\\n#endif\\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\\n#ifdef GLOBE\\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\\n#endif\\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"), fillExtrusionPattern: Lt(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;\\n#ifdef TERRAIN3D\\nin vec2 a_centroid;\\n#endif\\n#ifdef GLOBE\\nout vec3 v_sphere_pos;\\n#endif\\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\\n#ifdef TERRAIN3D\\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\\n#else\\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\\n#endif\\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\\n#ifdef GLOBE\\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\\n#else\\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\\n#endif\\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"), hillshadePrepare: Lt(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"), hillshade: Lt(\"uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\\n#define PI 3.141592653589793\\n#define STANDARD 0\\n#define COMBINED 1\\n#define IGOR 2\\n#define MULTIDIRECTIONAL 3\\n#define BASIC 4\\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}\"), line: Lt(\"uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"\\n#define scale 0.015873016\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_width2=vec2(outset,inset);}\"), lineGradient: Lt(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"\\n#define scale 0.015873016\\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_width2=vec2(outset,inset);}\"), linePattern: Lt(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"), lineSDF: Lt(\"uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}\"), lineGradientSDF: Lt(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\\n#ifdef GLOBE\\nin float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\\n#ifdef GLOBE\\nif (v_depth > 1.0) {discard;}\\n#endif\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\\n#ifdef GLOBE\\nout float v_depth;\\n#endif\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define mediump vec4 dasharray_from\\n#pragma mapbox: define mediump vec4 dasharray_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 dasharray_from\\n#pragma mapbox: initialize mediump vec4 dasharray_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\\n#ifdef GLOBE\\nv_depth=gl_Position.z/gl_Position.w;\\n#endif\\n#ifdef TERRAIN3D\\nv_gamma_scale=1.0;\\n#else\\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\\n#endif\\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}\"), raster: Lt(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;\\n#ifdef GLOBE\\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\\n#endif\\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"), symbolIcon: Lt(\"uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}\"), symbolSDF: Lt(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"), symbolTextAndIcon: Lt(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\nfragColor=vec4(1.0);\\n#endif\\n}\", \"in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\\n#ifdef GLOBE\\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\\n#endif\\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\"), terrain: Lt(\"uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}\", \"in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}\"), terrainDepth: Lt(\"in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}\", \"in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}\"), terrainCoords: Lt(\"precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}\", \"in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}\"), projectionErrorMeasurement: Lt(\"in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}\", \"in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}\"), atmosphere: Lt(\"in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}\", \"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}\"), sky: Lt(\"uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}\", \"in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}\") };\n function Lt(e2, t2) {\n const i2 = /#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g, a2 = t2.match(/in ([\\w]+) ([\\w]+)/g), r2 = e2.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g), o2 = t2.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g), s2 = o2 ? o2.concat(r2) : r2, n2 = {};\n return { fragmentSource: e2 = e2.replace(i2, ((e3, t3, i3, a3, r3) => (n2[r3] = true, \"define\" === t3 ? `\n#ifndef HAS_UNIFORM_u_${r3}\nin ${i3} ${a3} ${r3};\n#else\nuniform ${i3} ${a3} u_${r3};\n#endif\n` : `\n#ifdef HAS_UNIFORM_u_${r3}\n ${i3} ${a3} ${r3} = u_${r3};\n#endif\n`))), vertexSource: t2 = t2.replace(i2, ((e3, t3, i3, a3, r3) => {\n const o3 = \"float\" === a3 ? \"vec2\" : \"vec4\", s3 = r3.match(/color/) ? \"color\" : o3;\n return n2[r3] ? \"define\" === t3 ? `\n#ifndef HAS_UNIFORM_u_${r3}\nuniform lowp float u_${r3}_t;\nin ${i3} ${o3} a_${r3};\nout ${i3} ${a3} ${r3};\n#else\nuniform ${i3} ${a3} u_${r3};\n#endif\n` : \"vec4\" === s3 ? `\n#ifndef HAS_UNIFORM_u_${r3}\n ${r3} = a_${r3};\n#else\n ${i3} ${a3} ${r3} = u_${r3};\n#endif\n` : `\n#ifndef HAS_UNIFORM_u_${r3}\n ${r3} = unpack_mix_${s3}(a_${r3}, u_${r3}_t);\n#else\n ${i3} ${a3} ${r3} = u_${r3};\n#endif\n` : \"define\" === t3 ? `\n#ifndef HAS_UNIFORM_u_${r3}\nuniform lowp float u_${r3}_t;\nin ${i3} ${o3} a_${r3};\n#else\nuniform ${i3} ${a3} u_${r3};\n#endif\n` : \"vec4\" === s3 ? `\n#ifndef HAS_UNIFORM_u_${r3}\n ${i3} ${a3} ${r3} = a_${r3};\n#else\n ${i3} ${a3} ${r3} = u_${r3};\n#endif\n` : `\n#ifndef HAS_UNIFORM_u_${r3}\n ${i3} ${a3} ${r3} = unpack_mix_${s3}(a_${r3}, u_${r3}_t);\n#else\n ${i3} ${a3} ${r3} = u_${r3};\n#endif\n`;\n })), staticAttributes: a2, staticUniforms: s2 };\n }\n class kt {\n constructor(e2, t2, i2) {\n this.vertexBuffer = e2, this.indexBuffer = t2, this.segments = i2;\n }\n destroy() {\n this.vertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.vertexBuffer = null, this.indexBuffer = null, this.segments = null;\n }\n }\n var Ft = t.aV([{ name: \"a_pos\", type: \"Int16\", components: 2 }]);\n const Bt = \"#define PROJECTION_MERCATOR\", Ot = \"mercator\";\n class jt {\n constructor() {\n this._cachedMesh = null;\n }\n get name() {\n return \"mercator\";\n }\n get useSubdivision() {\n return false;\n }\n get shaderVariantName() {\n return Ot;\n }\n get shaderDefine() {\n return Bt;\n }\n get shaderPreludeCode() {\n return At.projectionMercator;\n }\n get vertexShaderPreludeCode() {\n return At.projectionMercator.vertexSource;\n }\n get subdivisionGranularity() {\n return t.aW.noSubdivision;\n }\n get useGlobeControls() {\n return false;\n }\n get transitionState() {\n return 0;\n }\n get latitudeErrorCorrectionRadians() {\n return 0;\n }\n destroy() {\n }\n updateGPUdependent(e2) {\n }\n getMeshFromTileID(e2, i2, a2, r2, o2) {\n if (this._cachedMesh) return this._cachedMesh;\n const s2 = new t.aX();\n s2.emplaceBack(0, 0), s2.emplaceBack(t.a5, 0), s2.emplaceBack(0, t.a5), s2.emplaceBack(t.a5, t.a5);\n const n2 = e2.createVertexBuffer(s2, Ft.members), l2 = t.aY.simpleSegment(0, 0, 4, 2), c2 = new t.aZ();\n c2.emplaceBack(1, 0, 2), c2.emplaceBack(1, 2, 3);\n const h2 = e2.createIndexBuffer(c2);\n return this._cachedMesh = new kt(n2, h2, l2), this._cachedMesh;\n }\n recalculate() {\n }\n hasTransition() {\n return false;\n }\n setErrorQueryLatitudeDegrees(e2) {\n }\n }\n class Nt {\n constructor(e2 = 0, t2 = 0, i2 = 0, a2 = 0) {\n if (isNaN(e2) || e2 < 0 || isNaN(t2) || t2 < 0 || isNaN(i2) || i2 < 0 || isNaN(a2) || a2 < 0) throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");\n this.top = e2, this.bottom = t2, this.left = i2, this.right = a2;\n }\n interpolate(e2, i2, a2) {\n return null != i2.top && null != e2.top && (this.top = t.G.number(e2.top, i2.top, a2)), null != i2.bottom && null != e2.bottom && (this.bottom = t.G.number(e2.bottom, i2.bottom, a2)), null != i2.left && null != e2.left && (this.left = t.G.number(e2.left, i2.left, a2)), null != i2.right && null != e2.right && (this.right = t.G.number(e2.right, i2.right, a2)), this;\n }\n getCenter(e2, i2) {\n const a2 = t.ao((this.left + e2 - this.right) / 2, 0, e2), r2 = t.ao((this.top + i2 - this.bottom) / 2, 0, i2);\n return new t.P(a2, r2);\n }\n equals(e2) {\n return this.top === e2.top && this.bottom === e2.bottom && this.left === e2.left && this.right === e2.right;\n }\n clone() {\n return new Nt(this.top, this.bottom, this.left, this.right);\n }\n toJSON() {\n return { top: this.top, bottom: this.bottom, left: this.left, right: this.right };\n }\n }\n function Zt(e2, t2) {\n if (!e2.renderWorldCopies || e2.lngRange) return;\n const i2 = t2.lng - e2.center.lng;\n t2.lng += i2 > 180 ? -360 : i2 < -180 ? 360 : 0;\n }\n function Gt(e2) {\n return Math.max(0, Math.floor(e2));\n }\n class Ut {\n constructor(e2, i2) {\n var a2;\n this.applyConstrain = (e3, t2) => null !== this._constrainOverride ? this._constrainOverride(e3, t2) : this._callbacks.defaultConstrain(e3, t2), this._callbacks = e2, this._tileSize = 512, this._renderWorldCopies = void 0 === (null == i2 ? void 0 : i2.renderWorldCopies) || !!(null == i2 ? void 0 : i2.renderWorldCopies), this._minZoom = (null == i2 ? void 0 : i2.minZoom) || 0, this._maxZoom = (null == i2 ? void 0 : i2.maxZoom) || 22, this._minPitch = null == (null == i2 ? void 0 : i2.minPitch) ? 0 : null == i2 ? void 0 : i2.minPitch, this._maxPitch = null == (null == i2 ? void 0 : i2.maxPitch) ? 60 : null == i2 ? void 0 : i2.maxPitch, this._constrainOverride = null !== (a2 = null == i2 ? void 0 : i2.constrainOverride) && void 0 !== a2 ? a2 : null, this.setMaxBounds(), this._width = 0, this._height = 0, this._center = new t.V(0, 0), this._elevation = 0, this._zoom = 0, this._tileZoom = Gt(this._zoom), this._scale = t.ar(this._zoom), this._bearingInRadians = 0, this._fovInRadians = 0.6435011087932844, this._pitchInRadians = 0, this._rollInRadians = 0, this._unmodified = true, this._edgeInsets = new Nt(), this._minElevationForCurrentTile = 0, this._autoCalculateNearFarZ = true;\n }\n apply(e2, i2, a2) {\n this._constrainOverride = e2.constrainOverride, this._latRange = e2.latRange, this._lngRange = e2.lngRange, this._width = e2.width, this._height = e2.height, this._center = e2.center, this._elevation = e2.elevation, this._minElevationForCurrentTile = e2.minElevationForCurrentTile, this._zoom = e2.zoom, this._tileZoom = Gt(this._zoom), this._scale = t.ar(this._zoom), this._bearingInRadians = e2.bearingInRadians, this._fovInRadians = e2.fovInRadians, this._pitchInRadians = e2.pitchInRadians, this._rollInRadians = e2.rollInRadians, this._unmodified = e2.unmodified, this._edgeInsets = new Nt(e2.padding.top, e2.padding.bottom, e2.padding.left, e2.padding.right), this._minZoom = e2.minZoom, this._maxZoom = e2.maxZoom, this._minPitch = e2.minPitch, this._maxPitch = e2.maxPitch, this._renderWorldCopies = e2.renderWorldCopies, this._cameraToCenterDistance = e2.cameraToCenterDistance, this._nearZ = e2.nearZ, this._farZ = e2.farZ, this._autoCalculateNearFarZ = !a2 && e2.autoCalculateNearFarZ, i2 && this.constrainInternal(), this._calcMatrices();\n }\n get pixelsToClipSpaceMatrix() {\n return this._pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix() {\n return this._clipSpaceToPixelsMatrix;\n }\n get minElevationForCurrentTile() {\n return this._minElevationForCurrentTile;\n }\n setMinElevationForCurrentTile(e2) {\n this._minElevationForCurrentTile = e2;\n }\n get tileSize() {\n return this._tileSize;\n }\n get tileZoom() {\n return this._tileZoom;\n }\n get scale() {\n return this._scale;\n }\n get width() {\n return this._width;\n }\n get height() {\n return this._height;\n }\n get bearingInRadians() {\n return this._bearingInRadians;\n }\n get lngRange() {\n return this._lngRange;\n }\n get latRange() {\n return this._latRange;\n }\n get pixelsToGLUnits() {\n return this._pixelsToGLUnits;\n }\n get minZoom() {\n return this._minZoom;\n }\n setMinZoom(e2) {\n this._minZoom !== e2 && (this._minZoom = e2, this.setZoom(this.applyConstrain(this._center, this.zoom).zoom));\n }\n get maxZoom() {\n return this._maxZoom;\n }\n setMaxZoom(e2) {\n this._maxZoom !== e2 && (this._maxZoom = e2, this.setZoom(this.applyConstrain(this._center, this.zoom).zoom));\n }\n get minPitch() {\n return this._minPitch;\n }\n setMinPitch(e2) {\n this._minPitch !== e2 && (this._minPitch = e2, this.setPitch(Math.max(this.pitch, e2)));\n }\n get maxPitch() {\n return this._maxPitch;\n }\n setMaxPitch(e2) {\n this._maxPitch !== e2 && (this._maxPitch = e2, this.setPitch(Math.min(this.pitch, e2)));\n }\n get renderWorldCopies() {\n return this._renderWorldCopies;\n }\n setRenderWorldCopies(e2) {\n void 0 === e2 ? e2 = true : null === e2 && (e2 = false), this._renderWorldCopies = e2;\n }\n get constrainOverride() {\n return this._constrainOverride;\n }\n setConstrainOverride(e2) {\n void 0 === e2 && (e2 = null), this._constrainOverride !== e2 && (this._constrainOverride = e2, this.constrainInternal(), this._calcMatrices());\n }\n get worldSize() {\n return this._tileSize * this._scale;\n }\n get centerOffset() {\n return this.centerPoint._sub(this.size._div(2));\n }\n get size() {\n return new t.P(this._width, this._height);\n }\n get bearing() {\n return this._bearingInRadians / Math.PI * 180;\n }\n setBearing(e2) {\n const i2 = t.W(e2, -180, 180) * Math.PI / 180;\n var r2, o2, s2, n2, l2, c2, h2, u2, d2;\n this._bearingInRadians !== i2 && (this._unmodified = false, this._bearingInRadians = i2, this._calcMatrices(), this._rotationMatrix = a(), r2 = this._rotationMatrix, s2 = -this._bearingInRadians, n2 = (o2 = this._rotationMatrix)[0], l2 = o2[1], c2 = o2[2], h2 = o2[3], u2 = Math.sin(s2), d2 = Math.cos(s2), r2[0] = n2 * d2 + c2 * u2, r2[1] = l2 * d2 + h2 * u2, r2[2] = n2 * -u2 + c2 * d2, r2[3] = l2 * -u2 + h2 * d2);\n }\n get rotationMatrix() {\n return this._rotationMatrix;\n }\n get pitchInRadians() {\n return this._pitchInRadians;\n }\n get pitch() {\n return this._pitchInRadians / Math.PI * 180;\n }\n setPitch(e2) {\n const i2 = t.ao(e2, this.minPitch, this.maxPitch) / 180 * Math.PI;\n this._pitchInRadians !== i2 && (this._unmodified = false, this._pitchInRadians = i2, this._calcMatrices());\n }\n get rollInRadians() {\n return this._rollInRadians;\n }\n get roll() {\n return this._rollInRadians / Math.PI * 180;\n }\n setRoll(e2) {\n const t2 = e2 / 180 * Math.PI;\n this._rollInRadians !== t2 && (this._unmodified = false, this._rollInRadians = t2, this._calcMatrices());\n }\n get fovInRadians() {\n return this._fovInRadians;\n }\n get fov() {\n return t.a_(this._fovInRadians);\n }\n setFov(e2) {\n e2 = t.ao(e2, 0.1, 150), this.fov !== e2 && (this._unmodified = false, this._fovInRadians = t.aq(e2), this._calcMatrices());\n }\n get zoom() {\n return this._zoom;\n }\n setZoom(e2) {\n const i2 = this.applyConstrain(this._center, e2).zoom;\n this._zoom !== i2 && (this._unmodified = false, this._zoom = i2, this._tileZoom = Math.max(0, Math.floor(i2)), this._scale = t.ar(i2), this.constrainInternal(), this._calcMatrices());\n }\n get center() {\n return this._center;\n }\n setCenter(e2) {\n e2.lat === this._center.lat && e2.lng === this._center.lng || (this._unmodified = false, this._center = e2, this.constrainInternal(), this._calcMatrices());\n }\n get elevation() {\n return this._elevation;\n }\n setElevation(e2) {\n e2 !== this._elevation && (this._elevation = e2, this.constrainInternal(), this._calcMatrices());\n }\n get padding() {\n return this._edgeInsets.toJSON();\n }\n setPadding(e2) {\n this._edgeInsets.equals(e2) || (this._unmodified = false, this._edgeInsets.interpolate(this._edgeInsets, e2, 1), this._calcMatrices());\n }\n get centerPoint() {\n return this._edgeInsets.getCenter(this._width, this._height);\n }\n get pixelsPerMeter() {\n return this._pixelPerMeter;\n }\n get unmodified() {\n return this._unmodified;\n }\n get cameraToCenterDistance() {\n return this._cameraToCenterDistance;\n }\n get nearZ() {\n return this._nearZ;\n }\n get farZ() {\n return this._farZ;\n }\n get autoCalculateNearFarZ() {\n return this._autoCalculateNearFarZ;\n }\n overrideNearFarZ(e2, t2) {\n this._autoCalculateNearFarZ = false, this._nearZ = e2, this._farZ = t2, this._calcMatrices();\n }\n clearNearFarZOverride() {\n this._autoCalculateNearFarZ = true, this._calcMatrices();\n }\n isPaddingEqual(e2) {\n return this._edgeInsets.equals(e2);\n }\n interpolatePadding(e2, t2, i2) {\n this._unmodified = false, this._edgeInsets.interpolate(e2, t2, i2), this.constrainInternal(), this._calcMatrices();\n }\n resize(e2, t2, i2 = true) {\n this._width = e2, this._height = t2, i2 && this.constrainInternal(), this._calcMatrices();\n }\n getMaxBounds() {\n return this._latRange && 2 === this._latRange.length && this._lngRange && 2 === this._lngRange.length ? new $([this._lngRange[0], this._latRange[0]], [this._lngRange[1], this._latRange[1]]) : null;\n }\n setMaxBounds(e2) {\n e2 ? (this._lngRange = [e2.getWest(), e2.getEast()], this._latRange = [e2.getSouth(), e2.getNorth()], this.constrainInternal()) : (this._lngRange = null, this._latRange = [-t.ap, t.ap]);\n }\n getCameraQueryGeometry(e2, i2) {\n if (1 === i2.length) return [i2[0], e2];\n {\n const { minX: a2, minY: r2, maxX: o2, maxY: s2 } = t.ac.fromPoints(i2).extend(e2);\n return [new t.P(a2, r2), new t.P(o2, r2), new t.P(o2, s2), new t.P(a2, s2), new t.P(a2, r2)];\n }\n }\n constrainInternal() {\n if (!this.center || !this._width || !this._height || this._constraining) return;\n this._constraining = true;\n const e2 = this._unmodified, { center: t2, zoom: i2 } = this.applyConstrain(this.center, this.zoom);\n this.setCenter(t2), this.setZoom(i2), this._unmodified = e2, this._constraining = false;\n }\n _calcMatrices() {\n if (this._width && this._height) {\n this._pixelsToGLUnits = [2 / this._width, -2 / this._height];\n let e2 = t.as(new Float64Array(16));\n t.Q(e2, e2, [this._width / 2, -this._height / 2, 1]), t.O(e2, e2, [1, -1, 0]), this._clipSpaceToPixelsMatrix = e2, e2 = t.as(new Float64Array(16)), t.Q(e2, e2, [1, -1, 1]), t.O(e2, e2, [-1, -1, 0]), t.Q(e2, e2, [2 / this._width, 2 / this._height, 1]), this._pixelsToClipSpaceMatrix = e2, this._cameraToCenterDistance = 0.5 / Math.tan(this.fovInRadians / 2) * this._height;\n }\n this._callbacks.calcMatrices();\n }\n calculateCenterFromCameraLngLatAlt(e2, i2, a2, r2) {\n const o2 = void 0 !== a2 ? a2 : this.bearing, s2 = r2 = void 0 !== r2 ? r2 : this.pitch, { distanceToCenter: n2, clampedElevation: l2 } = this._distanceToCenterFromAltElevationPitch(i2, this.elevation, s2), { x: c2, y: h2 } = be(s2, o2), u2 = t.ab.fromLngLat(e2, i2);\n let d2, _2, p2 = t.a$(1, u2.y), m2 = 0;\n do {\n if (m2 += 1, m2 > 10) break;\n _2 = n2 / p2, d2 = new t.ab(u2.x + c2 * _2, u2.y + h2 * _2), p2 = 1 / d2.meterInMercatorCoordinateUnits();\n } while (Math.abs(n2 - _2 * p2) > 1e-12);\n return { center: d2.toLngLat(), elevation: l2, zoom: t.au(this.height / 2 / Math.tan(this.fovInRadians / 2) / _2 / this.tileSize) };\n }\n recalculateZoomAndCenter(e2) {\n if (this.elevation - e2 == 0) return;\n const i2 = 1 / this.worldSize, a2 = t.at(1, this.center.lat) * this.worldSize, r2 = t.ab.fromLngLat(this.center, this.elevation), o2 = r2.x / i2, s2 = r2.y / i2, n2 = r2.z / i2, l2 = this.pitch, c2 = this.bearing, { x: h2, y: u2, z: d2 } = be(l2, c2), _2 = this.cameraToCenterDistance, p2 = o2 + _2 * -h2, m2 = s2 + _2 * -u2, f2 = n2 + _2 * d2, { distanceToCenter: g2, clampedElevation: v2 } = this._distanceToCenterFromAltElevationPitch(f2 / a2, e2, l2), x2 = g2 * a2, b2 = new t.ab((p2 + h2 * x2) * i2, (m2 + u2 * x2) * i2, 0).toLngLat(), y2 = t.at(1, b2.lat), w2 = t.au(this.height / 2 / Math.tan(this.fovInRadians / 2) / g2 / y2 / this.tileSize);\n this._elevation = v2, this._center = b2, this.setZoom(w2);\n }\n _distanceToCenterFromAltElevationPitch(e2, i2, a2) {\n const r2 = -Math.cos(t.aq(a2)), o2 = e2 - i2;\n let s2, n2 = i2;\n return r2 * o2 >= 0 || Math.abs(r2) < 0.1 ? (s2 = 1e4, n2 = e2 + s2 * r2) : s2 = -o2 / r2, { distanceToCenter: s2, clampedElevation: n2 };\n }\n getCameraPoint() {\n const e2 = Math.tan(this.pitchInRadians) * (this.cameraToCenterDistance || 1);\n return this.centerPoint.add(new t.P(e2 * Math.sin(this.rollInRadians), e2 * Math.cos(this.rollInRadians)));\n }\n getCameraAltitude() {\n return Math.cos(this.pitchInRadians) * this._cameraToCenterDistance / this._pixelPerMeter + this.elevation;\n }\n getCameraLngLat() {\n const e2 = t.at(1, this.center.lat) * this.worldSize;\n return xe(this.center, this.elevation, this.pitch, this.bearing, this.cameraToCenterDistance / e2).toLngLat();\n }\n getMercatorTileCoordinates(e2) {\n if (!e2) return [0, 0, 1, 1];\n const i2 = e2.canonical.z >= 0 ? 1 << e2.canonical.z : Math.pow(2, e2.canonical.z);\n return [e2.canonical.x / i2, e2.canonical.y / i2, 1 / i2 / t.a5, 1 / i2 / t.a5];\n }\n }\n class Vt {\n constructor(e2, i2) {\n this.min = e2, this.max = i2, this.center = t.b0([], t.b1([], this.min, this.max), 0.5);\n }\n quadrant(e2) {\n const i2 = [e2 % 2 == 0, e2 < 2], a2 = t.b2(this.min), r2 = t.b2(this.max);\n for (let e3 = 0; e3 < i2.length; e3++) a2[e3] = i2[e3] ? this.min[e3] : this.center[e3], r2[e3] = i2[e3] ? this.center[e3] : this.max[e3];\n return r2[2] = this.max[2], new Vt(a2, r2);\n }\n distanceX(e2) {\n return Math.max(Math.min(this.max[0], e2[0]), this.min[0]) - e2[0];\n }\n distanceY(e2) {\n return Math.max(Math.min(this.max[1], e2[1]), this.min[1]) - e2[1];\n }\n intersectsFrustum(e2) {\n let t2 = true;\n for (let i2 = 0; i2 < e2.planes.length; i2++) {\n const a2 = this.intersectsPlane(e2.planes[i2]);\n if (0 === a2) return 0;\n 1 === a2 && (t2 = false);\n }\n return t2 ? 2 : e2.aabb.min[0] > this.max[0] || e2.aabb.min[1] > this.max[1] || e2.aabb.min[2] > this.max[2] || e2.aabb.max[0] < this.min[0] || e2.aabb.max[1] < this.min[1] || e2.aabb.max[2] < this.min[2] ? 0 : 1;\n }\n intersectsPlane(e2) {\n let t2 = e2[3], i2 = e2[3];\n for (let a2 = 0; a2 < 3; a2++) e2[a2] > 0 ? (t2 += e2[a2] * this.min[a2], i2 += e2[a2] * this.max[a2]) : (i2 += e2[a2] * this.min[a2], t2 += e2[a2] * this.max[a2]);\n return t2 >= 0 ? 2 : i2 < 0 ? 0 : 1;\n }\n }\n class qt {\n distanceToTile2d(e2, t2, i2, a2) {\n const r2 = a2.distanceX([e2, t2]), o2 = a2.distanceY([e2, t2]);\n return Math.hypot(r2, o2);\n }\n getWrap(e2, t2, i2) {\n return i2;\n }\n getTileBoundingVolume(e2, i2, a2, r2) {\n var o2, s2;\n let n2 = 0, l2 = 0;\n if (null == r2 ? void 0 : r2.terrain) {\n const c3 = new t.a2(e2.z, i2, e2.z, e2.x, e2.y), h2 = r2.terrain.getMinMaxElevation(c3);\n n2 = null !== (o2 = h2.minElevation) && void 0 !== o2 ? o2 : Math.min(0, a2), l2 = null !== (s2 = h2.maxElevation) && void 0 !== s2 ? s2 : Math.max(0, a2);\n }\n const c2 = 1 << e2.z;\n return new Vt([i2 + e2.x / c2, e2.y / c2, n2], [i2 + (e2.x + 1) / c2, (e2.y + 1) / c2, l2]);\n }\n allowVariableZoom(e2, i2) {\n const a2 = e2.fov * (Math.abs(Math.cos(e2.rollInRadians)) * e2.height + Math.abs(Math.sin(e2.rollInRadians)) * e2.width) / e2.height, r2 = t.ao(78.5 - a2 / 2, 0, 60);\n return !!i2.terrain || e2.pitch > r2;\n }\n allowWorldCopies() {\n return true;\n }\n prepareNextFrame() {\n }\n }\n class Wt {\n constructor(e2, t2, i2) {\n this.points = e2, this.planes = t2, this.aabb = i2;\n }\n static fromInvProjectionMatrix(e2, i2 = 1, a2 = 0, r2, o2) {\n const s2 = o2 ? [[6, 5, 4], [0, 1, 2], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]] : [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]], n2 = Math.pow(2, a2), l2 = [[-1, 1, -1, 1], [1, 1, -1, 1], [1, -1, -1, 1], [-1, -1, -1, 1], [-1, 1, 1, 1], [1, 1, 1, 1], [1, -1, 1, 1], [-1, -1, 1, 1]].map(((a3) => (function(e3, i3, a4, r3) {\n const o3 = t.aI([], e3, i3), s3 = 1 / o3[3] / a4 * r3;\n return t.b7(o3, o3, [s3, s3, 1 / o3[3], s3]);\n })(a3, e2, i2, n2)));\n r2 && (function(e3, i3, a3, r3) {\n const o3 = r3 ? 4 : 0, s3 = r3 ? 0 : 4;\n let n3 = 0;\n const l3 = [], c3 = [];\n for (let i4 = 0; i4 < 4; i4++) {\n const a4 = t.b3([], e3[i4 + s3], e3[i4 + o3]), r4 = t.b8(a4);\n t.b0(a4, a4, 1 / r4), l3.push(r4), c3.push(a4);\n }\n for (let i4 = 0; i4 < 4; i4++) {\n const r4 = t.b9(e3[i4 + o3], c3[i4], a3);\n n3 = null !== r4 && r4 >= 0 ? Math.max(n3, r4) : Math.max(n3, l3[i4]);\n }\n const h3 = (function(e4, i4) {\n const a4 = t.b3([], e4[i4[0]], e4[i4[1]]), r4 = t.b3([], e4[i4[2]], e4[i4[1]]), o4 = [0, 0, 0, 0];\n return t.b4(o4, t.b5([], a4, r4)), o4[3] = -t.b6(o4, e4[i4[0]]), o4;\n })(e3, i3), u3 = (function(e4, i4) {\n const a4 = t.ba(e4), r4 = t.bb([], e4, 1 / a4), o4 = t.b3([], i4, t.b0([], r4, t.b6(i4, r4))), s4 = t.ba(o4);\n if (s4 > 0) {\n const e5 = Math.sqrt(1 - r4[3] * r4[3]), a5 = t.b0([], r4, -r4[3]), n4 = t.b1([], a5, t.b0([], o4, e5 / s4));\n return t.bc(i4, n4);\n }\n return null;\n })(a3, h3);\n if (null !== u3) {\n const e4 = u3 / t.b6(c3[0], h3);\n n3 = Math.min(n3, e4);\n }\n for (let t2 = 0; t2 < 4; t2++) {\n const i4 = Math.min(n3, l3[t2]);\n e3[t2 + s3] = [e3[t2 + o3][0] + c3[t2][0] * i4, e3[t2 + o3][1] + c3[t2][1] * i4, e3[t2 + o3][2] + c3[t2][2] * i4, 1];\n }\n })(l2, s2[0], r2, o2);\n const c2 = s2.map(((e3) => {\n const i3 = t.b3([], l2[e3[0]], l2[e3[1]]), a3 = t.b3([], l2[e3[2]], l2[e3[1]]), r3 = t.b4([], t.b5([], i3, a3)), o3 = -t.b6(r3, l2[e3[1]]);\n return r3.concat(o3);\n })), h2 = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY], u2 = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY];\n for (const e3 of l2) for (let t2 = 0; t2 < 3; t2++) h2[t2] = Math.min(h2[t2], e3[t2]), u2[t2] = Math.max(u2[t2], e3[t2]);\n return new Wt(l2, c2, new Vt(h2, u2));\n }\n }\n class $t {\n get pixelsToClipSpaceMatrix() {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix() {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits() {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset() {\n return this._helper.centerOffset;\n }\n get size() {\n return this._helper.size;\n }\n get rotationMatrix() {\n return this._helper.rotationMatrix;\n }\n get centerPoint() {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter() {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(e2) {\n this._helper.setMinZoom(e2);\n }\n setMaxZoom(e2) {\n this._helper.setMaxZoom(e2);\n }\n setMinPitch(e2) {\n this._helper.setMinPitch(e2);\n }\n setMaxPitch(e2) {\n this._helper.setMaxPitch(e2);\n }\n setRenderWorldCopies(e2) {\n this._helper.setRenderWorldCopies(e2);\n }\n setBearing(e2) {\n this._helper.setBearing(e2);\n }\n setPitch(e2) {\n this._helper.setPitch(e2);\n }\n setRoll(e2) {\n this._helper.setRoll(e2);\n }\n setFov(e2) {\n this._helper.setFov(e2);\n }\n setZoom(e2) {\n this._helper.setZoom(e2);\n }\n setCenter(e2) {\n this._helper.setCenter(e2);\n }\n setElevation(e2) {\n this._helper.setElevation(e2);\n }\n setMinElevationForCurrentTile(e2) {\n this._helper.setMinElevationForCurrentTile(e2);\n }\n setPadding(e2) {\n this._helper.setPadding(e2);\n }\n interpolatePadding(e2, t2, i2) {\n return this._helper.interpolatePadding(e2, t2, i2);\n }\n isPaddingEqual(e2) {\n return this._helper.isPaddingEqual(e2);\n }\n resize(e2, t2, i2 = true) {\n this._helper.resize(e2, t2, i2);\n }\n getMaxBounds() {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(e2) {\n this._helper.setMaxBounds(e2);\n }\n setConstrainOverride(e2) {\n this._helper.setConstrainOverride(e2);\n }\n overrideNearFarZ(e2, t2) {\n this._helper.overrideNearFarZ(e2, t2);\n }\n clearNearFarZOverride() {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(e2) {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e2);\n }\n get tileSize() {\n return this._helper.tileSize;\n }\n get tileZoom() {\n return this._helper.tileZoom;\n }\n get scale() {\n return this._helper.scale;\n }\n get worldSize() {\n return this._helper.worldSize;\n }\n get width() {\n return this._helper.width;\n }\n get height() {\n return this._helper.height;\n }\n get lngRange() {\n return this._helper.lngRange;\n }\n get latRange() {\n return this._helper.latRange;\n }\n get minZoom() {\n return this._helper.minZoom;\n }\n get maxZoom() {\n return this._helper.maxZoom;\n }\n get zoom() {\n return this._helper.zoom;\n }\n get center() {\n return this._helper.center;\n }\n get minPitch() {\n return this._helper.minPitch;\n }\n get maxPitch() {\n return this._helper.maxPitch;\n }\n get pitch() {\n return this._helper.pitch;\n }\n get pitchInRadians() {\n return this._helper.pitchInRadians;\n }\n get roll() {\n return this._helper.roll;\n }\n get rollInRadians() {\n return this._helper.rollInRadians;\n }\n get bearing() {\n return this._helper.bearing;\n }\n get bearingInRadians() {\n return this._helper.bearingInRadians;\n }\n get fov() {\n return this._helper.fov;\n }\n get fovInRadians() {\n return this._helper.fovInRadians;\n }\n get elevation() {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile() {\n return this._helper.minElevationForCurrentTile;\n }\n get padding() {\n return this._helper.padding;\n }\n get unmodified() {\n return this._helper.unmodified;\n }\n get renderWorldCopies() {\n return this._helper.renderWorldCopies;\n }\n get cameraToCenterDistance() {\n return this._helper.cameraToCenterDistance;\n }\n get constrainOverride() {\n return this._helper.constrainOverride;\n }\n get nearZ() {\n return this._helper.nearZ;\n }\n get farZ() {\n return this._helper.farZ;\n }\n get autoCalculateNearFarZ() {\n return this._helper.autoCalculateNearFarZ;\n }\n setTransitionState(e2, t2) {\n }\n constructor(e2) {\n this._posMatrixCache = /* @__PURE__ */ new Map(), this._alignedPosMatrixCache = /* @__PURE__ */ new Map(), this._fogMatrixCacheF32 = /* @__PURE__ */ new Map(), this.defaultConstrain = (e3, i2) => {\n i2 = t.ao(+i2, this.minZoom, this.maxZoom);\n const a2 = { center: new t.V(e3.lng, e3.lat), zoom: i2 };\n let r2 = this._helper._lngRange;\n if (!this._helper._renderWorldCopies && null === r2) {\n const e4 = 180 - 1e-10;\n r2 = [-e4, e4];\n }\n const o2 = this.tileSize * t.ar(a2.zoom);\n let s2 = 0, n2 = o2, l2 = 0, c2 = o2, h2 = 0, u2 = 0;\n const { x: d2, y: _2 } = this.size;\n if (this._helper._latRange) {\n const e4 = this._helper._latRange;\n s2 = t.X(e4[1]) * o2, n2 = t.X(e4[0]) * o2, n2 - s2 < _2 && (h2 = _2 / (n2 - s2));\n }\n r2 && (l2 = t.W(t.Y(r2[0]) * o2, 0, o2), c2 = t.W(t.Y(r2[1]) * o2, 0, o2), c2 < l2 && (c2 += o2), c2 - l2 < d2 && (u2 = d2 / (c2 - l2)));\n const { x: p2, y: m2 } = me(o2, e3);\n let f2, g2;\n const v2 = Math.max(u2 || 0, h2 || 0);\n if (v2) {\n const e4 = new t.P(u2 ? (c2 + l2) / 2 : p2, h2 ? (n2 + s2) / 2 : m2);\n return a2.center = fe(o2, e4).wrap(), a2.zoom += t.au(v2), a2;\n }\n if (this._helper._latRange) {\n const e4 = _2 / 2;\n m2 - e4 < s2 && (g2 = s2 + e4), m2 + e4 > n2 && (g2 = n2 - e4);\n }\n if (r2) {\n const e4 = (l2 + c2) / 2;\n let i3 = p2;\n this._helper._renderWorldCopies && (i3 = t.W(p2, e4 - o2 / 2, e4 + o2 / 2));\n const a3 = d2 / 2;\n i3 - a3 < l2 && (f2 = l2 + a3), i3 + a3 > c2 && (f2 = c2 - a3);\n }\n if (void 0 !== f2 || void 0 !== g2) {\n const e4 = new t.P(null != f2 ? f2 : p2, null != g2 ? g2 : m2);\n a2.center = fe(o2, e4).wrap();\n }\n return a2;\n }, this.applyConstrain = (e3, t2) => this._helper.applyConstrain(e3, t2), this._helper = new Ut({ calcMatrices: () => {\n this._calcMatrices();\n }, defaultConstrain: (e3, t2) => this.defaultConstrain(e3, t2) }, e2), this._coveringTilesDetailsProvider = new qt();\n }\n clone() {\n const e2 = new $t();\n return e2.apply(this), e2;\n }\n apply(e2, t2, i2) {\n this._helper.apply(e2, t2, i2);\n }\n get cameraPosition() {\n return this._cameraPosition;\n }\n get projectionMatrix() {\n return this._projectionMatrix;\n }\n get modelViewProjectionMatrix() {\n return this._viewProjMatrix;\n }\n get inverseProjectionMatrix() {\n return this._invProjMatrix;\n }\n get mercatorMatrix() {\n return this._mercatorMatrix;\n }\n getVisibleUnwrappedCoordinates(e2) {\n const i2 = [new t.bd(0, e2)];\n if (this._helper._renderWorldCopies) {\n const a2 = this.screenPointToMercatorCoordinate(new t.P(0, 0)), r2 = this.screenPointToMercatorCoordinate(new t.P(this._helper._width, 0)), o2 = this.screenPointToMercatorCoordinate(new t.P(this._helper._width, this._helper._height)), s2 = this.screenPointToMercatorCoordinate(new t.P(0, this._helper._height)), n2 = Math.floor(Math.min(a2.x, r2.x, o2.x, s2.x)), l2 = Math.floor(Math.max(a2.x, r2.x, o2.x, s2.x)), c2 = 1;\n for (let a3 = n2 - c2; a3 <= l2 + c2; a3++) 0 !== a3 && i2.push(new t.bd(a3, e2));\n }\n return i2;\n }\n getCameraFrustum() {\n return Wt.fromInvProjectionMatrix(this._invViewProjMatrix, this.worldSize);\n }\n getClippingPlane() {\n return null;\n }\n getCoveringTilesDetailsProvider() {\n return this._coveringTilesDetailsProvider;\n }\n recalculateZoomAndCenter(e2) {\n const t2 = this.screenPointToLocation(this.centerPoint, e2), i2 = e2 ? e2.getElevationForLngLatZoom(t2, this._helper._tileZoom) : 0;\n this._helper.recalculateZoomAndCenter(i2);\n }\n setLocationAtPoint(e2, i2) {\n const a2 = t.at(this.elevation, this.center.lat), r2 = this.screenPointToMercatorCoordinateAtZ(i2, a2), o2 = this.screenPointToMercatorCoordinateAtZ(this.centerPoint, a2), s2 = t.ab.fromLngLat(e2), n2 = new t.ab(s2.x - (r2.x - o2.x), s2.y - (r2.y - o2.y));\n this.setCenter(null == n2 ? void 0 : n2.toLngLat()), this._helper._renderWorldCopies && this.setCenter(this.center.wrap());\n }\n locationToScreenPoint(e2, i2) {\n return i2 ? this.coordinatePoint(t.ab.fromLngLat(e2), i2.getElevationForLngLat(e2), this._pixelMatrix3D) : this.coordinatePoint(t.ab.fromLngLat(e2));\n }\n screenPointToLocation(e2, t2) {\n var i2;\n return null === (i2 = this.screenPointToMercatorCoordinate(e2, t2)) || void 0 === i2 ? void 0 : i2.toLngLat();\n }\n screenPointToMercatorCoordinate(e2, t2) {\n if (t2) {\n const i2 = t2.pointCoordinate(e2);\n if (null != i2) return i2;\n }\n return this.screenPointToMercatorCoordinateAtZ(e2);\n }\n screenPointToMercatorCoordinateAtZ(e2, i2) {\n const a2 = i2 || 0, r2 = [e2.x, e2.y, 0, 1], o2 = [e2.x, e2.y, 1, 1];\n t.aI(r2, r2, this._pixelMatrixInverse), t.aI(o2, o2, this._pixelMatrixInverse);\n const s2 = r2[3], n2 = o2[3], l2 = r2[1] / s2, c2 = o2[1] / n2, h2 = r2[2] / s2, u2 = o2[2] / n2, d2 = h2 === u2 ? 0 : (a2 - h2) / (u2 - h2);\n return new t.ab(t.G.number(r2[0] / s2, o2[0] / n2, d2) / this.worldSize, t.G.number(l2, c2, d2) / this.worldSize, a2);\n }\n coordinatePoint(e2, i2 = 0, a2 = this._pixelMatrix) {\n const r2 = [e2.x * this.worldSize, e2.y * this.worldSize, i2, 1];\n return t.aI(r2, r2, a2), new t.P(r2[0] / r2[3], r2[1] / r2[3]);\n }\n getBounds() {\n const e2 = Math.max(0, this._helper._height / 2 - ge(this));\n return new $().extend(this.screenPointToLocation(new t.P(0, e2))).extend(this.screenPointToLocation(new t.P(this._helper._width, e2))).extend(this.screenPointToLocation(new t.P(this._helper._width, this._helper._height))).extend(this.screenPointToLocation(new t.P(0, this._helper._height)));\n }\n isPointOnMapSurface(e2, t2) {\n return t2 ? null != t2.pointCoordinate(e2) : e2.y > this.height / 2 - ge(this);\n }\n calculatePosMatrix(e2, i2 = false, a2) {\n var r2;\n const o2 = null !== (r2 = e2.key) && void 0 !== r2 ? r2 : t.be(e2.wrap, e2.canonical.z, e2.canonical.z, e2.canonical.x, e2.canonical.y), s2 = i2 ? this._alignedPosMatrixCache : this._posMatrixCache;\n if (s2.has(o2)) {\n const e3 = s2.get(o2);\n return a2 ? e3.f32 : e3.f64;\n }\n const n2 = ve(e2, this.worldSize);\n t.S(n2, i2 ? this._alignedProjMatrix : this._viewProjMatrix, n2);\n const l2 = { f64: n2, f32: new Float32Array(n2) };\n return s2.set(o2, l2), a2 ? l2.f32 : l2.f64;\n }\n calculateFogMatrix(e2) {\n const i2 = e2.key, a2 = this._fogMatrixCacheF32;\n if (a2.has(i2)) return a2.get(i2);\n const r2 = ve(e2, this.worldSize);\n return t.S(r2, this._fogMatrix, r2), a2.set(i2, new Float32Array(r2)), a2.get(i2);\n }\n calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2) {\n return this._helper.calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2);\n }\n _calculateNearFarZIfNeeded(e2, i2, a2) {\n if (!this._helper.autoCalculateNearFarZ) return;\n const r2 = Math.min(this.elevation, this.minElevationForCurrentTile, this.getCameraAltitude() - 100), o2 = e2 - r2 * this._helper._pixelPerMeter / Math.cos(i2), s2 = r2 < 0 ? o2 : e2, n2 = Math.PI / 2 + this.pitchInRadians, l2 = t.aq(this.fov) * (Math.abs(Math.cos(t.aq(this.roll))) * this.height + Math.abs(Math.sin(t.aq(this.roll))) * this.width) / this.height * (0.5 + a2.y / this.height), c2 = Math.sin(l2) * s2 / Math.sin(t.ao(Math.PI - n2 - l2, 0.01, Math.PI - 0.01)), h2 = ge(this), u2 = Math.atan(h2 / this._helper.cameraToCenterDistance), d2 = t.aq(0.75), _2 = u2 > d2 ? 2 * u2 * (0.5 + a2.y / (2 * h2)) : d2, p2 = Math.sin(_2) * s2 / Math.sin(t.ao(Math.PI - n2 - _2, 0.01, Math.PI - 0.01)), m2 = Math.min(c2, p2);\n this._helper._farZ = 1.01 * (Math.cos(Math.PI / 2 - i2) * m2 + s2), this._helper._nearZ = this._helper._height / 50;\n }\n _calcMatrices() {\n if (!this._helper._height) return;\n const e2 = this.centerOffset, i2 = me(this.worldSize, this.center), a2 = i2.x, r2 = i2.y;\n this._helper._pixelPerMeter = t.at(1, this.center.lat) * this.worldSize;\n const o2 = t.aq(Math.min(this.pitch, pe)), s2 = Math.max(this._helper.cameraToCenterDistance / 2, this._helper.cameraToCenterDistance + this._helper._elevation * this._helper._pixelPerMeter / Math.cos(o2));\n let n2;\n this._calculateNearFarZIfNeeded(s2, o2, e2), n2 = new Float64Array(16), t.bf(n2, this.fovInRadians, this._helper._width / this._helper._height, this._helper._nearZ, this._helper._farZ), this._invProjMatrix = new Float64Array(16), t.aC(this._invProjMatrix, n2), n2[8] = 2 * -e2.x / this._helper._width, n2[9] = 2 * e2.y / this._helper._height, this._projectionMatrix = t.bg(n2), t.Q(n2, n2, [1, -1, 1]), t.O(n2, n2, [0, 0, -this._helper.cameraToCenterDistance]), t.bh(n2, n2, -this.rollInRadians), t.bi(n2, n2, this.pitchInRadians), t.bh(n2, n2, -this.bearingInRadians), t.O(n2, n2, [-a2, -r2, 0]), this._mercatorMatrix = t.Q([], n2, [this.worldSize, this.worldSize, this.worldSize]), t.Q(n2, n2, [1, 1, this._helper._pixelPerMeter]), this._pixelMatrix = t.S(new Float64Array(16), this.clipSpaceToPixelsMatrix, n2), t.O(n2, n2, [0, 0, -this.elevation]), this._viewProjMatrix = n2, this._invViewProjMatrix = t.aC([], n2);\n const l2 = [0, 0, -1, 1];\n t.aI(l2, l2, this._invViewProjMatrix), this._cameraPosition = [l2[0] / l2[3], l2[1] / l2[3], l2[2] / l2[3]], this._fogMatrix = new Float64Array(16), t.bf(this._fogMatrix, this.fovInRadians, this.width / this.height, s2, this._helper._farZ), this._fogMatrix[8] = 2 * -e2.x / this.width, this._fogMatrix[9] = 2 * e2.y / this.height, t.Q(this._fogMatrix, this._fogMatrix, [1, -1, 1]), t.O(this._fogMatrix, this._fogMatrix, [0, 0, -this.cameraToCenterDistance]), t.bh(this._fogMatrix, this._fogMatrix, -this.rollInRadians), t.bi(this._fogMatrix, this._fogMatrix, this.pitchInRadians), t.bh(this._fogMatrix, this._fogMatrix, -this.bearingInRadians), t.O(this._fogMatrix, this._fogMatrix, [-a2, -r2, 0]), t.Q(this._fogMatrix, this._fogMatrix, [1, 1, this._helper._pixelPerMeter]), t.O(this._fogMatrix, this._fogMatrix, [0, 0, -this.elevation]), this._pixelMatrix3D = t.S(new Float64Array(16), this.clipSpaceToPixelsMatrix, n2);\n const c2 = this._helper._width % 2 / 2, h2 = this._helper._height % 2 / 2, u2 = Math.cos(this.bearingInRadians), d2 = Math.sin(-this.bearingInRadians), _2 = a2 - Math.round(a2) + u2 * c2 + d2 * h2, p2 = r2 - Math.round(r2) + u2 * h2 + d2 * c2, m2 = new Float64Array(n2);\n if (t.O(m2, m2, [_2 > 0.5 ? _2 - 1 : _2, p2 > 0.5 ? p2 - 1 : p2, 0]), this._alignedProjMatrix = m2, n2 = t.aC(new Float64Array(16), this._pixelMatrix), !n2) throw new Error(\"failed to invert matrix\");\n this._pixelMatrixInverse = n2, this._clearMatrixCaches();\n }\n _clearMatrixCaches() {\n this._posMatrixCache.clear(), this._alignedPosMatrixCache.clear(), this._fogMatrixCacheF32.clear();\n }\n maxPitchScaleFactor() {\n if (!this._pixelMatrixInverse) return 1;\n const e2 = this.screenPointToMercatorCoordinate(new t.P(0, 0)), i2 = [e2.x * this.worldSize, e2.y * this.worldSize, 0, 1];\n return t.aI(i2, i2, this._pixelMatrix)[3] / this._helper.cameraToCenterDistance;\n }\n getCameraPoint() {\n return this._helper.getCameraPoint();\n }\n getCameraAltitude() {\n return this._helper.getCameraAltitude();\n }\n getCameraLngLat() {\n const e2 = t.at(1, this.center.lat) * this.worldSize;\n return xe(this.center, this.elevation, this.pitch, this.bearing, this._helper.cameraToCenterDistance / e2).toLngLat();\n }\n lngLatToCameraDepth(e2, i2) {\n const a2 = t.ab.fromLngLat(e2), r2 = [a2.x * this.worldSize, a2.y * this.worldSize, i2, 1];\n return t.aI(r2, r2, this._viewProjMatrix), r2[2] / r2[3];\n }\n getProjectionData(e2) {\n const { overscaledTileID: i2, aligned: a2, applyTerrainMatrix: r2 } = e2, o2 = this._helper.getMercatorTileCoordinates(i2), s2 = i2 ? this.calculatePosMatrix(i2, a2, true) : null;\n let n2;\n return n2 = i2 && i2.terrainRttPosMatrix32f && r2 ? i2.terrainRttPosMatrix32f : s2 || t.bj(), { mainMatrix: n2, tileMercatorCoords: o2, clippingPlane: [0, 0, 0, 0], projectionTransition: 0, fallbackMatrix: n2 };\n }\n isLocationOccluded(e2) {\n return false;\n }\n getPixelScale() {\n return 1;\n }\n getCircleRadiusCorrection() {\n return 1;\n }\n getPitchedTextCorrection(e2, t2, i2) {\n return 1;\n }\n transformLightDirection(e2) {\n return t.b2(e2);\n }\n getRayDirectionFromPixel(e2) {\n throw new Error(\"Not implemented.\");\n }\n projectTileCoordinates(e2, i2, a2, r2) {\n const o2 = this.calculatePosMatrix(a2);\n let s2;\n r2 ? (s2 = [e2, i2, r2(e2, i2), 1], t.aI(s2, s2, o2)) : (s2 = [e2, i2, 0, 1], ot(s2, s2, o2));\n const n2 = s2[3];\n return { point: new t.P(s2[0] / n2, s2[1] / n2), signedDistanceFromCamera: n2, isOccluded: false };\n }\n populateCache(e2) {\n for (const t2 of e2) this.calculatePosMatrix(t2);\n }\n getMatrixForModel(e2, i2) {\n const a2 = t.ab.fromLngLat(e2, i2), r2 = a2.meterInMercatorCoordinateUnits(), o2 = t.bk();\n return t.O(o2, o2, [a2.x, a2.y, a2.z]), t.bh(o2, o2, Math.PI), t.bi(o2, o2, Math.PI / 2), t.Q(o2, o2, [-r2, r2, r2]), o2;\n }\n getProjectionDataForCustomLayer(e2 = true) {\n const i2 = new t.a2(0, 0, 0, 0, 0), a2 = this.getProjectionData({ overscaledTileID: i2, applyGlobeMatrix: e2 }), r2 = ve(i2, this.worldSize);\n t.S(r2, this._viewProjMatrix, r2), a2.tileMercatorCoords = [0, 0, 1, 1];\n const o2 = [t.a5, t.a5, this.worldSize / this._helper.pixelsPerMeter], s2 = t.bl();\n return t.Q(s2, r2, o2), a2.fallbackMatrix = s2, a2.mainMatrix = s2, a2;\n }\n getFastPathSimpleProjectionMatrix(e2) {\n return this.calculatePosMatrix(e2);\n }\n }\n function Ht() {\n t.w(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\");\n }\n function Xt(e2) {\n if (e2.useSlerp) if (e2.k < 1) {\n const i2 = t.bm(e2.startEulerAngles.roll, e2.startEulerAngles.pitch, e2.startEulerAngles.bearing), a2 = t.bm(e2.endEulerAngles.roll, e2.endEulerAngles.pitch, e2.endEulerAngles.bearing), r2 = new Float64Array(4);\n t.bn(r2, i2, a2, e2.k);\n const o2 = t.bo(r2);\n e2.tr.setRoll(o2.roll), e2.tr.setPitch(o2.pitch), e2.tr.setBearing(o2.bearing);\n } else e2.tr.setRoll(e2.endEulerAngles.roll), e2.tr.setPitch(e2.endEulerAngles.pitch), e2.tr.setBearing(e2.endEulerAngles.bearing);\n else e2.tr.setRoll(t.G.number(e2.startEulerAngles.roll, e2.endEulerAngles.roll, e2.k)), e2.tr.setPitch(t.G.number(e2.startEulerAngles.pitch, e2.endEulerAngles.pitch, e2.k)), e2.tr.setBearing(t.G.number(e2.startEulerAngles.bearing, e2.endEulerAngles.bearing, e2.k));\n }\n function Kt(e2, i2, a2, r2, o2) {\n const s2 = o2.padding, n2 = me(o2.worldSize, a2.getNorthWest()), l2 = me(o2.worldSize, a2.getNorthEast()), c2 = me(o2.worldSize, a2.getSouthEast()), h2 = me(o2.worldSize, a2.getSouthWest()), u2 = t.aq(-r2), d2 = n2.rotate(u2), _2 = l2.rotate(u2), p2 = c2.rotate(u2), m2 = h2.rotate(u2), f2 = new t.P(Math.max(d2.x, _2.x, m2.x, p2.x), Math.max(d2.y, _2.y, m2.y, p2.y)), g2 = new t.P(Math.min(d2.x, _2.x, m2.x, p2.x), Math.min(d2.y, _2.y, m2.y, p2.y)), v2 = f2.sub(g2), x2 = (o2.width - (s2.left + s2.right + i2.left + i2.right)) / v2.x, b2 = (o2.height - (s2.top + s2.bottom + i2.top + i2.bottom)) / v2.y;\n if (b2 < 0 || x2 < 0) return void Ht();\n const y2 = Math.min(t.au(o2.scale * Math.min(x2, b2)), e2.maxZoom), w2 = t.P.convert(e2.offset), T2 = new t.P((i2.left - i2.right) / 2, (i2.top - i2.bottom) / 2).rotate(t.aq(r2)), P2 = w2.add(T2).mult(o2.scale / t.ar(y2));\n return { center: fe(o2.worldSize, n2.add(c2).div(2).sub(P2)), zoom: y2, bearing: r2 };\n }\n class Yt {\n get useGlobeControls() {\n return false;\n }\n handlePanInertia(e2, t2) {\n const i2 = e2.mag(), a2 = Math.abs(ge(t2));\n return { easingOffset: e2.mult(Math.min(0.75 * a2 / i2, 1)), easingCenter: t2.center };\n }\n handleMapControlsRollPitchBearingZoom(e2, t2) {\n e2.bearingDelta && t2.setBearing(t2.bearing + e2.bearingDelta), e2.pitchDelta && t2.setPitch(t2.pitch + e2.pitchDelta), e2.rollDelta && t2.setRoll(t2.roll + e2.rollDelta), e2.zoomDelta && t2.setZoom(t2.zoom + e2.zoomDelta);\n }\n handleMapControlsPan(e2, t2, i2) {\n e2.around.distSqr(t2.centerPoint) < 0.01 || t2.setLocationAtPoint(i2, e2.around);\n }\n cameraForBoxAndBearing(e2, t2, i2, a2, r2) {\n return Kt(e2, t2, i2, a2, r2);\n }\n handleJumpToCenterZoom(e2, i2) {\n e2.zoom !== (void 0 !== i2.zoom ? +i2.zoom : e2.zoom) && e2.setZoom(+i2.zoom), void 0 !== i2.center && e2.setCenter(t.V.convert(i2.center));\n }\n handleEaseTo(e2, i2) {\n const a2 = e2.zoom, r2 = e2.padding, o2 = { roll: e2.roll, pitch: e2.pitch, bearing: e2.bearing }, s2 = { roll: void 0 === i2.roll ? e2.roll : i2.roll, pitch: void 0 === i2.pitch ? e2.pitch : i2.pitch, bearing: void 0 === i2.bearing ? e2.bearing : i2.bearing }, n2 = void 0 !== i2.zoom, l2 = !e2.isPaddingEqual(i2.padding);\n let c2 = false;\n const h2 = n2 ? +i2.zoom : e2.zoom;\n let u2 = e2.centerPoint.add(i2.offsetAsPoint);\n const d2 = e2.screenPointToLocation(u2), { center: _2, zoom: p2 } = e2.applyConstrain(t.V.convert(i2.center || d2), null != h2 ? h2 : a2);\n Zt(e2, _2);\n const m2 = me(e2.worldSize, d2), f2 = me(e2.worldSize, _2).sub(m2), g2 = t.ar(p2 - a2);\n return c2 = p2 !== a2, { easeFunc: (n3) => {\n if (c2 && e2.setZoom(t.G.number(a2, p2, n3)), t.bp(o2, s2) || Xt({ startEulerAngles: o2, endEulerAngles: s2, tr: e2, k: n3, useSlerp: o2.roll != s2.roll }), l2 && (e2.interpolatePadding(r2, i2.padding, n3), u2 = e2.centerPoint.add(i2.offsetAsPoint)), i2.around) e2.setLocationAtPoint(i2.around, i2.aroundPoint);\n else {\n const i3 = t.ar(e2.zoom - a2), r3 = p2 > a2 ? Math.min(2, g2) : Math.max(0.5, g2), o3 = Math.pow(r3, 1 - n3), s3 = fe(e2.worldSize, m2.add(f2.mult(n3 * o3)).mult(i3));\n e2.setLocationAtPoint(e2.renderWorldCopies ? s3.wrap() : s3, u2);\n }\n }, isZooming: c2, elevationCenter: _2 };\n }\n handleFlyTo(e2, i2) {\n const a2 = void 0 !== i2.zoom, r2 = e2.zoom, o2 = e2.applyConstrain(t.V.convert(i2.center || i2.locationAtOffset), a2 ? +i2.zoom : r2), s2 = o2.center, n2 = o2.zoom;\n Zt(e2, s2);\n const l2 = me(e2.worldSize, i2.locationAtOffset), c2 = me(e2.worldSize, s2).sub(l2), h2 = c2.mag(), u2 = t.ar(n2 - r2);\n let d2;\n if (void 0 !== i2.minZoom) {\n const a3 = Math.min(+i2.minZoom, r2, n2), o3 = e2.applyConstrain(s2, a3).zoom;\n d2 = t.ar(o3 - r2);\n }\n return { easeFunc: (i3, a3, o3, h3) => {\n e2.setZoom(1 === i3 ? n2 : r2 + t.au(a3));\n const u3 = 1 === i3 ? s2 : fe(e2.worldSize, l2.add(c2.mult(o3)).mult(a3));\n e2.setLocationAtPoint(e2.renderWorldCopies ? u3.wrap() : u3, h3);\n }, scaleOfZoom: u2, targetCenter: s2, scaleOfMinZoom: d2, pixelPathLength: h2 };\n }\n }\n class Qt {\n constructor(e2, t2, i2) {\n this.blendFunction = e2, this.blendColor = t2, this.mask = i2;\n }\n }\n Qt.Replace = [1, 0], Qt.disabled = new Qt(Qt.Replace, t.bq.transparent, [false, false, false, false]), Qt.unblended = new Qt(Qt.Replace, t.bq.transparent, [true, true, true, true]), Qt.alphaBlended = new Qt([1, 771], t.bq.transparent, [true, true, true, true]);\n const Jt = 2305;\n class ei {\n constructor(e2, t2, i2) {\n this.enable = e2, this.mode = t2, this.frontFace = i2;\n }\n }\n ei.disabled = new ei(false, 1029, Jt), ei.backCCW = new ei(true, 1029, Jt), ei.frontCCW = new ei(true, 1028, Jt);\n class ti {\n constructor(e2, t2, i2) {\n this.func = e2, this.mask = t2, this.range = i2;\n }\n }\n ti.ReadOnly = false, ti.ReadWrite = true, ti.disabled = new ti(519, ti.ReadOnly, [0, 1]);\n const ii = 7680;\n class ai {\n constructor(e2, t2, i2, a2, r2, o2) {\n this.test = e2, this.ref = t2, this.mask = i2, this.fail = a2, this.depthFail = r2, this.pass = o2;\n }\n }\n ai.disabled = new ai({ func: 519, mask: 0 }, 0, 0, ii, ii, ii);\n const ri = /* @__PURE__ */ new WeakMap();\n function oi(e2) {\n var t2;\n if (ri.has(e2)) return ri.get(e2);\n {\n const i2 = null === (t2 = e2.getParameter(e2.VERSION)) || void 0 === t2 ? void 0 : t2.startsWith(\"WebGL 2.0\");\n return ri.set(e2, i2), i2;\n }\n }\n class si {\n get awaitingQuery() {\n return !!this._readbackQueue;\n }\n constructor(e2) {\n this._readbackWaitFrames = 4, this._measureWaitFrames = 6, this._texWidth = 1, this._texHeight = 1, this._measuredError = 0, this._updateCount = 0, this._lastReadbackFrame = -1e3, this._readbackQueue = null, this._cachedRenderContext = e2;\n const i2 = e2.context, a2 = i2.gl;\n this._texFormat = a2.RGBA, this._texType = a2.UNSIGNED_BYTE;\n const r2 = new t.aX();\n r2.emplaceBack(-1, -1), r2.emplaceBack(2, -1), r2.emplaceBack(-1, 2);\n const o2 = new t.aZ();\n o2.emplaceBack(0, 1, 2), this._fullscreenTriangle = new kt(i2.createVertexBuffer(r2, Ft.members), i2.createIndexBuffer(o2), t.aY.simpleSegment(0, 0, r2.length, o2.length)), this._resultBuffer = new Uint8Array(4), i2.activeTexture.set(a2.TEXTURE1);\n const s2 = a2.createTexture();\n a2.bindTexture(a2.TEXTURE_2D, s2), a2.texParameteri(a2.TEXTURE_2D, a2.TEXTURE_WRAP_S, a2.CLAMP_TO_EDGE), a2.texParameteri(a2.TEXTURE_2D, a2.TEXTURE_WRAP_T, a2.CLAMP_TO_EDGE), a2.texParameteri(a2.TEXTURE_2D, a2.TEXTURE_MIN_FILTER, a2.NEAREST), a2.texParameteri(a2.TEXTURE_2D, a2.TEXTURE_MAG_FILTER, a2.NEAREST), a2.texImage2D(a2.TEXTURE_2D, 0, this._texFormat, this._texWidth, this._texHeight, 0, this._texFormat, this._texType, null), this._fbo = i2.createFramebuffer(this._texWidth, this._texHeight, false, false), this._fbo.colorAttachment.set(s2), oi(a2) && (this._pbo = a2.createBuffer(), a2.bindBuffer(a2.PIXEL_PACK_BUFFER, this._pbo), a2.bufferData(a2.PIXEL_PACK_BUFFER, 4, a2.STREAM_READ), a2.bindBuffer(a2.PIXEL_PACK_BUFFER, null));\n }\n destroy() {\n const e2 = this._cachedRenderContext.context.gl;\n this._fullscreenTriangle.destroy(), this._fbo.destroy(), e2.deleteBuffer(this._pbo), this._fullscreenTriangle = null, this._fbo = null, this._pbo = null, this._resultBuffer = null;\n }\n updateErrorLoop(e2, t2) {\n const i2 = this._updateCount;\n return this._readbackQueue ? i2 >= this._readbackQueue.frameNumberIssued + this._readbackWaitFrames && this._tryReadback() : i2 >= this._lastReadbackFrame + this._measureWaitFrames && this._renderErrorTexture(e2, t2), this._updateCount++, this._measuredError;\n }\n _bindFramebuffer() {\n const e2 = this._cachedRenderContext.context, t2 = e2.gl;\n e2.activeTexture.set(t2.TEXTURE1), t2.bindTexture(t2.TEXTURE_2D, this._fbo.colorAttachment.get()), e2.bindFramebuffer.set(this._fbo.framebuffer);\n }\n _renderErrorTexture(e2, i2) {\n const a2 = this._cachedRenderContext.context, r2 = a2.gl;\n if (this._bindFramebuffer(), a2.viewport.set([0, 0, this._texWidth, this._texHeight]), a2.clear({ color: t.bq.transparent }), this._cachedRenderContext.useProgram(\"projectionErrorMeasurement\").draw(a2, r2.TRIANGLES, ti.disabled, ai.disabled, Qt.unblended, ei.disabled, /* @__PURE__ */ ((e3, t2) => ({ u_input: e3, u_output_expected: t2 }))(e2, i2), null, null, \"$clipping\", this._fullscreenTriangle.vertexBuffer, this._fullscreenTriangle.indexBuffer, this._fullscreenTriangle.segments), this._pbo && oi(r2)) {\n r2.bindBuffer(r2.PIXEL_PACK_BUFFER, this._pbo), r2.readBuffer(r2.COLOR_ATTACHMENT0), r2.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, 0), r2.bindBuffer(r2.PIXEL_PACK_BUFFER, null);\n const e3 = r2.fenceSync(r2.SYNC_GPU_COMMANDS_COMPLETE, 0);\n r2.flush(), this._readbackQueue = { frameNumberIssued: this._updateCount, sync: e3 };\n } else this._readbackQueue = { frameNumberIssued: this._updateCount, sync: null };\n }\n _tryReadback() {\n const e2 = this._cachedRenderContext.context.gl;\n if (this._pbo && this._readbackQueue && oi(e2)) {\n const i2 = e2.clientWaitSync(this._readbackQueue.sync, 0, 0);\n if (i2 === e2.WAIT_FAILED) return t.w(\"WebGL2 clientWaitSync failed.\"), this._readbackQueue = null, void (this._lastReadbackFrame = this._updateCount);\n if (i2 === e2.TIMEOUT_EXPIRED) return;\n e2.bindBuffer(e2.PIXEL_PACK_BUFFER, this._pbo), e2.getBufferSubData(e2.PIXEL_PACK_BUFFER, 0, this._resultBuffer, 0, 4), e2.bindBuffer(e2.PIXEL_PACK_BUFFER, null);\n } else this._bindFramebuffer(), e2.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, this._resultBuffer);\n this._readbackQueue = null, this._measuredError = si._parseRGBA8float(this._resultBuffer), this._lastReadbackFrame = this._updateCount;\n }\n static _parseRGBA8float(e2) {\n let t2 = 0;\n return t2 += e2[0] / 256, t2 += e2[1] / 65536, t2 += e2[2] / 16777216, e2[3] < 127 && (t2 = -t2), t2 / 128;\n }\n }\n const ni = t.a5 / 128;\n function li(e2, i2) {\n const a2 = void 0 !== e2.granularity ? Math.max(e2.granularity, 1) : 1, r2 = a2 + (e2.generateBorders ? 2 : 0), o2 = a2 + (e2.extendToNorthPole || e2.generateBorders ? 1 : 0) + (e2.extendToSouthPole || e2.generateBorders ? 1 : 0), s2 = r2 + 1, n2 = o2 + 1, l2 = e2.generateBorders ? -1 : 0, c2 = e2.generateBorders || e2.extendToNorthPole ? -1 : 0, h2 = a2 + (e2.generateBorders ? 1 : 0), u2 = a2 + (e2.generateBorders || e2.extendToSouthPole ? 1 : 0), d2 = s2 * n2, _2 = r2 * o2 * 6, p2 = s2 * n2 > 65536;\n if (p2 && \"16bit\" === i2) throw new Error(\"Granularity is too large and meshes would not fit inside 16 bit vertex indices.\");\n const m2 = p2 || \"32bit\" === i2, f2 = new Int16Array(2 * d2);\n let g2 = 0;\n for (let i3 = c2; i3 <= u2; i3++) for (let r3 = l2; r3 <= h2; r3++) {\n let o3 = r3 / a2 * t.a5;\n -1 === r3 && (o3 = -ni), r3 === a2 + 1 && (o3 = t.a5 + ni);\n let s3 = i3 / a2 * t.a5;\n -1 === i3 && (s3 = e2.extendToNorthPole ? t.bs : -ni), i3 === a2 + 1 && (s3 = e2.extendToSouthPole ? t.bt : t.a5 + ni), f2[g2++] = o3, f2[g2++] = s3;\n }\n const v2 = m2 ? new Uint32Array(_2) : new Uint16Array(_2);\n let x2 = 0;\n for (let e3 = 0; e3 < o2; e3++) for (let t2 = 0; t2 < r2; t2++) {\n const i3 = t2 + 1 + e3 * s2, a3 = t2 + (e3 + 1) * s2, r3 = t2 + 1 + (e3 + 1) * s2;\n v2[x2++] = t2 + e3 * s2, v2[x2++] = a3, v2[x2++] = i3, v2[x2++] = i3, v2[x2++] = a3, v2[x2++] = r3;\n }\n return { vertices: f2.buffer.slice(0), indices: v2.buffer.slice(0), uses32bitIndices: m2 };\n }\n const ci = new t.aW({ fill: new t.bu(128, 2), line: new t.bu(512, 0), tile: new t.bu(128, 32), stencil: new t.bu(128, 1), circle: 3 });\n class hi {\n constructor() {\n this._tileMeshCache = {}, this._errorCorrectionUsable = 0, this._errorMeasurementLastValue = 0, this._errorCorrectionPreviousValue = 0, this._errorMeasurementLastChangeTime = -1e3;\n }\n get name() {\n return \"vertical-perspective\";\n }\n get transitionState() {\n return 1;\n }\n get useSubdivision() {\n return true;\n }\n get shaderVariantName() {\n return \"globe\";\n }\n get shaderDefine() {\n return \"#define GLOBE\";\n }\n get shaderPreludeCode() {\n return At.projectionGlobe;\n }\n get vertexShaderPreludeCode() {\n return At.projectionMercator.vertexSource;\n }\n get subdivisionGranularity() {\n return ci;\n }\n get useGlobeControls() {\n return true;\n }\n get latitudeErrorCorrectionRadians() {\n return this._errorCorrectionUsable;\n }\n destroy() {\n this._errorMeasurement && this._errorMeasurement.destroy();\n }\n updateGPUdependent(e2) {\n this._errorMeasurement || (this._errorMeasurement = new si(e2));\n const i2 = t.X(this._errorQueryLatitudeDegrees), a2 = 2 * Math.atan(Math.exp(Math.PI - i2 * Math.PI * 2)) - 0.5 * Math.PI, r2 = this._errorMeasurement.updateErrorLoop(i2, a2), o2 = c();\n r2 !== this._errorMeasurementLastValue && (this._errorCorrectionPreviousValue = this._errorCorrectionUsable, this._errorMeasurementLastValue = r2, this._errorMeasurementLastChangeTime = o2);\n const s2 = Math.min(Math.max((o2 - this._errorMeasurementLastChangeTime) / 1e3 / 0.5, 0), 1);\n this._errorCorrectionUsable = t.bv(this._errorCorrectionPreviousValue, -this._errorMeasurementLastValue, t.bw(s2));\n }\n _getMeshKey(e2) {\n return `${e2.granularity.toString(36)}_${e2.generateBorders ? \"b\" : \"\"}${e2.extendToNorthPole ? \"n\" : \"\"}${e2.extendToSouthPole ? \"s\" : \"\"}`;\n }\n getMeshFromTileID(e2, t2, i2, a2, r2) {\n const o2 = (\"stencil\" === r2 ? ci.stencil : ci.tile).getGranularityForZoomLevel(t2.z);\n return this._getMesh(e2, { granularity: o2, generateBorders: i2, extendToNorthPole: 0 === t2.y && a2, extendToSouthPole: t2.y === (1 << t2.z) - 1 && a2 });\n }\n _getMesh(e2, i2) {\n const a2 = this._getMeshKey(i2);\n if (a2 in this._tileMeshCache) return this._tileMeshCache[a2];\n const r2 = (function(e3, i3) {\n const a3 = li(i3, \"16bit\"), r3 = t.aX.deserialize({ arrayBuffer: a3.vertices, length: a3.vertices.byteLength / 2 / 2 }), o2 = t.aZ.deserialize({ arrayBuffer: a3.indices, length: a3.indices.byteLength / 2 / 3 });\n return new kt(e3.createVertexBuffer(r3, Ft.members), e3.createIndexBuffer(o2), t.aY.simpleSegment(0, 0, r3.length, o2.length));\n })(e2, i2);\n return this._tileMeshCache[a2] = r2, r2;\n }\n recalculate(e2) {\n }\n hasTransition() {\n const e2 = c();\n let t2 = false;\n return t2 = t2 || (e2 - this._errorMeasurementLastChangeTime) / 1e3 < 0.7, t2 = t2 || this._errorMeasurement && this._errorMeasurement.awaitingQuery, t2;\n }\n setErrorQueryLatitudeDegrees(e2) {\n this._errorQueryLatitudeDegrees = e2;\n }\n }\n const ui = new t.t({ type: new t.D(t.u.projection.type) });\n class di extends t.E {\n constructor(e2) {\n super(), this._transitionable = new t.x(ui, void 0), this.setProjection(e2), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new t.H(0)), this._mercatorProjection = new jt(), this._verticalPerspectiveProjection = new hi();\n }\n get transitionState() {\n const e2 = this.properties.get(\"type\");\n if (\"string\" == typeof e2 && \"mercator\" === e2) return 0;\n if (\"string\" == typeof e2 && \"vertical-perspective\" === e2) return 1;\n if (e2 instanceof t.bx) {\n if (\"vertical-perspective\" === e2.from && \"mercator\" === e2.to) return 1 - e2.transition;\n if (\"mercator\" === e2.from && \"vertical-perspective\" === e2.to) return e2.transition;\n }\n return 1;\n }\n get useGlobeRendering() {\n return this.transitionState > 0;\n }\n get latitudeErrorCorrectionRadians() {\n return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians;\n }\n get currentProjection() {\n return this.useGlobeRendering ? this._verticalPerspectiveProjection : this._mercatorProjection;\n }\n get name() {\n return \"globe\";\n }\n get useSubdivision() {\n return this.currentProjection.useSubdivision;\n }\n get shaderVariantName() {\n return this.currentProjection.shaderVariantName;\n }\n get shaderDefine() {\n return this.currentProjection.shaderDefine;\n }\n get shaderPreludeCode() {\n return this.currentProjection.shaderPreludeCode;\n }\n get vertexShaderPreludeCode() {\n return this.currentProjection.vertexShaderPreludeCode;\n }\n get subdivisionGranularity() {\n return this.currentProjection.subdivisionGranularity;\n }\n get useGlobeControls() {\n return this.transitionState > 0;\n }\n destroy() {\n this._mercatorProjection.destroy(), this._verticalPerspectiveProjection.destroy();\n }\n updateGPUdependent(e2) {\n this._mercatorProjection.updateGPUdependent(e2), this._verticalPerspectiveProjection.updateGPUdependent(e2);\n }\n getMeshFromTileID(e2, t2, i2, a2, r2) {\n return this.currentProjection.getMeshFromTileID(e2, t2, i2, a2, r2);\n }\n setProjection(e2) {\n this._transitionable.setValue(\"type\", (null == e2 ? void 0 : e2.type) || \"mercator\");\n }\n updateTransitions(e2) {\n this._transitioning = this._transitionable.transitioned(e2, this._transitioning);\n }\n hasTransition() {\n return this._transitioning.hasTransition() || this.currentProjection.hasTransition();\n }\n recalculate(e2) {\n this.properties = this._transitioning.possiblyEvaluate(e2);\n }\n setErrorQueryLatitudeDegrees(e2) {\n this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e2), this._mercatorProjection.setErrorQueryLatitudeDegrees(e2);\n }\n }\n function _i(e2) {\n const t2 = fi(e2.worldSize, e2.center.lat);\n return 2 * Math.PI * t2;\n }\n function pi(e2, i2, a2, r2, o2) {\n const s2 = 1 / (1 << o2), n2 = i2 / t.a5 * s2 + r2 * s2, l2 = t.bz((e2 / t.a5 * s2 + a2 * s2) * Math.PI * 2 + Math.PI, 2 * Math.PI), c2 = 2 * Math.atan(Math.exp(Math.PI - n2 * Math.PI * 2)) - 0.5 * Math.PI, h2 = Math.cos(c2), u2 = new Float64Array(3);\n return u2[0] = Math.sin(l2) * h2, u2[1] = Math.sin(c2), u2[2] = Math.cos(l2) * h2, u2;\n }\n function mi(e2) {\n return (function(e3, t2) {\n const i2 = Math.cos(t2), a2 = new Float64Array(3);\n return a2[0] = Math.sin(e3) * i2, a2[1] = Math.sin(t2), a2[2] = Math.cos(e3) * i2, a2;\n })(e2.lng * Math.PI / 180, e2.lat * Math.PI / 180);\n }\n function fi(e2, t2) {\n return e2 / (2 * Math.PI) / Math.cos(t2 * Math.PI / 180);\n }\n function gi(e2) {\n const i2 = Math.asin(e2[1]) / Math.PI * 180, a2 = Math.sqrt(e2[0] * e2[0] + e2[2] * e2[2]);\n if (a2 > 1e-6) {\n const r2 = e2[0] / a2, o2 = Math.acos(e2[2] / a2), s2 = (r2 > 0 ? o2 : -o2) / Math.PI * 180;\n return new t.V(t.W(s2, -180, 180), i2);\n }\n return new t.V(0, i2);\n }\n function vi(e2) {\n return Math.cos(e2 * Math.PI / 180);\n }\n function xi(e2, i2) {\n const a2 = vi(e2), r2 = vi(i2);\n return t.au(r2 / a2);\n }\n function bi(e2, i2) {\n const a2 = e2.rotate(i2.bearingInRadians), r2 = i2.zoom + xi(i2.center.lat, 0), o2 = t.bv(1 / vi(i2.center.lat), 1 / vi(Math.min(Math.abs(i2.center.lat), 60)), t.by(r2, 7, 3, 0, 1)), s2 = 360 / _i({ worldSize: i2.worldSize, center: { lat: i2.center.lat } });\n return new t.V(i2.center.lng - a2.x * s2 * o2, t.ao(i2.center.lat + a2.y * s2, -t.ap, t.ap));\n }\n function yi(e2) {\n const t2 = 0.5 * e2, i2 = Math.sin(t2), a2 = Math.cos(t2);\n return Math.log(i2 + a2) - Math.log(a2 - i2);\n }\n function wi(e2, i2, a2, r2) {\n const o2 = e2.lat + a2 * r2;\n if (Math.abs(a2) > 1) {\n const s2 = (Math.sign(e2.lat + a2) !== Math.sign(e2.lat) ? -Math.abs(e2.lat) : Math.abs(e2.lat)) * Math.PI / 180, n2 = Math.abs(e2.lat + a2) * Math.PI / 180, l2 = yi(s2 + r2 * (n2 - s2)), c2 = yi(s2), h2 = yi(n2);\n return new t.V(e2.lng + i2 * ((l2 - c2) / (h2 - c2)), o2);\n }\n return new t.V(e2.lng + i2 * r2, o2);\n }\n class Ti {\n constructor(e2) {\n this._cachePrevious = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this._hadAnyChanges = false, this._boundingVolumeFactory = e2;\n }\n swapBuffers() {\n if (!this._hadAnyChanges) return;\n const e2 = this._cachePrevious;\n this._cachePrevious = this._cache, this._cache = e2, this._cache.clear(), this._hadAnyChanges = false;\n }\n getTileBoundingVolume(e2, t2, i2, a2) {\n const r2 = `${e2.z}_${e2.x}_${e2.y}_${(null == a2 ? void 0 : a2.terrain) ? \"t\" : \"\"}`, o2 = this._cache.get(r2);\n if (o2) return o2;\n const s2 = this._cachePrevious.get(r2);\n if (s2) return this._cache.set(r2, s2), s2;\n const n2 = this._boundingVolumeFactory(e2, t2, i2, a2);\n return this._cache.set(r2, n2), this._hadAnyChanges = true, n2;\n }\n }\n class Pi {\n constructor(e2, t2, i2, a2) {\n this.min = i2, this.max = a2, this.points = e2, this.planes = t2;\n }\n static fromAabb(e2, t2) {\n const i2 = [];\n for (let a2 = 0; a2 < 8; a2++) i2.push([1 & ~a2 ? e2[0] : t2[0], 1 == (a2 >> 1 & 1) ? t2[1] : e2[1], 1 == (a2 >> 2 & 1) ? t2[2] : e2[2]]);\n return new Pi(i2, [[-1, 0, 0, t2[0]], [1, 0, 0, -e2[0]], [0, -1, 0, t2[1]], [0, 1, 0, -e2[1]], [0, 0, -1, t2[2]], [0, 0, 1, -e2[2]]], e2, t2);\n }\n static fromCenterSizeAngles(e2, i2, a2) {\n const r2 = t.bC([], a2[0], a2[1], a2[2]), o2 = t.bD([], [i2[0], 0, 0], r2), s2 = t.bD([], [0, i2[1], 0], r2), n2 = t.bD([], [0, 0, i2[2]], r2), l2 = [...e2], c2 = [...e2];\n for (let t2 = 0; t2 < 8; t2++) for (let i3 = 0; i3 < 3; i3++) {\n const a3 = e2[i3] + o2[i3] * (1 & ~t2 ? -1 : 1) + s2[i3] * (1 == (t2 >> 1 & 1) ? 1 : -1) + n2[i3] * (1 == (t2 >> 2 & 1) ? 1 : -1);\n l2[i3] = Math.min(l2[i3], a3), c2[i3] = Math.max(c2[i3], a3);\n }\n const h2 = [];\n for (let i3 = 0; i3 < 8; i3++) {\n const a3 = [...e2];\n t.b1(a3, a3, t.b0([], o2, 1 & ~i3 ? -1 : 1)), t.b1(a3, a3, t.b0([], s2, 1 == (i3 >> 1 & 1) ? 1 : -1)), t.b1(a3, a3, t.b0([], n2, 1 == (i3 >> 2 & 1) ? 1 : -1)), h2.push(a3);\n }\n return new Pi(h2, [[...o2, -t.b6(o2, h2[0])], [...s2, -t.b6(s2, h2[0])], [...n2, -t.b6(n2, h2[0])], [-o2[0], -o2[1], -o2[2], -t.b6(o2, h2[7])], [-s2[0], -s2[1], -s2[2], -t.b6(s2, h2[7])], [-n2[0], -n2[1], -n2[2], -t.b6(n2, h2[7])]], l2, c2);\n }\n intersectsFrustum(e2) {\n let t2 = true;\n const i2 = this.points.length, a2 = this.planes.length, r2 = e2.planes.length, o2 = e2.points.length;\n for (let a3 = 0; a3 < r2; a3++) {\n const r3 = e2.planes[a3];\n let o3 = 0;\n for (let e3 = 0; e3 < i2; e3++) {\n const t3 = this.points[e3];\n r3[0] * t3[0] + r3[1] * t3[1] + r3[2] * t3[2] + r3[3] >= 0 && o3++;\n }\n if (0 === o3) return 0;\n o3 < i2 && (t2 = false);\n }\n if (t2) return 2;\n for (let t3 = 0; t3 < a2; t3++) {\n const i3 = this.planes[t3];\n let a3 = 0;\n for (let t4 = 0; t4 < o2; t4++) {\n const r3 = e2.points[t4];\n i3[0] * r3[0] + i3[1] * r3[1] + i3[2] * r3[2] + i3[3] >= 0 && a3++;\n }\n if (0 === a3) return 0;\n }\n return 1;\n }\n intersectsPlane(e2) {\n const t2 = this.points.length;\n let i2 = 0;\n for (let a2 = 0; a2 < t2; a2++) {\n const t3 = this.points[a2];\n e2[0] * t3[0] + e2[1] * t3[1] + e2[2] * t3[2] + e2[3] >= 0 && i2++;\n }\n return i2 === t2 ? 2 : 0 === i2 ? 0 : 1;\n }\n }\n function Ii(e2, t2, i2) {\n const a2 = e2 - t2;\n return a2 < 0 ? -a2 : Math.max(0, a2 - i2);\n }\n function Ci(e2, t2, i2, a2, r2) {\n const o2 = e2 - i2;\n let s2;\n return s2 = o2 < 0 ? Math.min(-o2, 1 + o2 - r2) : o2 > 1 ? Math.min(Math.max(o2 - r2, 0), 1 - o2) : 0, Math.max(s2, Ii(t2, a2, r2));\n }\n class Mi {\n constructor() {\n this._boundingVolumeCache = new Ti(this._computeTileBoundingVolume);\n }\n prepareNextFrame() {\n this._boundingVolumeCache.swapBuffers();\n }\n distanceToTile2d(e2, t2, i2, a2) {\n const r2 = 1 << i2.z, o2 = 1 / r2, s2 = i2.x / r2, n2 = i2.y / r2;\n let l2 = 2;\n return l2 = Math.min(l2, Ci(e2, t2, s2, n2, o2)), l2 = Math.min(l2, Ci(e2, t2, s2 + 0.5, -n2 - o2, o2)), l2 = Math.min(l2, Ci(e2, t2, s2 + 0.5, 2 - n2 - o2, o2)), l2;\n }\n getWrap(e2, t2, i2) {\n const a2 = 1 << t2.z, r2 = 1 / a2, o2 = t2.x / a2, s2 = Ii(e2.x, o2, r2), n2 = Ii(e2.x, o2 - 1, r2), l2 = Ii(e2.x, o2 + 1, r2), c2 = Math.min(s2, n2, l2);\n return c2 === l2 ? 1 : c2 === n2 ? -1 : 0;\n }\n allowVariableZoom(e2, t2) {\n return Ie(e2, t2) > 4;\n }\n allowWorldCopies() {\n return false;\n }\n getTileBoundingVolume(e2, t2, i2, a2) {\n return this._boundingVolumeCache.getTileBoundingVolume(e2, t2, i2, a2);\n }\n _computeTileBoundingVolume(e2, i2, a2, r2) {\n var o2, s2;\n let n2 = 0, l2 = 0;\n if (null == r2 ? void 0 : r2.terrain) {\n const c2 = new t.a2(e2.z, i2, e2.z, e2.x, e2.y), h2 = r2.terrain.getMinMaxElevation(c2);\n n2 = null !== (o2 = h2.minElevation) && void 0 !== o2 ? o2 : Math.min(0, a2), l2 = null !== (s2 = h2.maxElevation) && void 0 !== s2 ? s2 : Math.max(0, a2);\n }\n if (n2 /= t.bF, l2 /= t.bF, n2 += 1, l2 += 1, e2.z <= 0) return Pi.fromAabb([-l2, -l2, -l2], [l2, l2, l2]);\n if (1 === e2.z) return Pi.fromAabb([0 === e2.x ? -l2 : 0, 0 === e2.y ? 0 : -l2, -l2], [0 === e2.x ? 0 : l2, 0 === e2.y ? l2 : 0, l2]);\n {\n const i3 = [pi(0, 0, e2.x, e2.y, e2.z), pi(t.a5, 0, e2.x, e2.y, e2.z), pi(t.a5, t.a5, e2.x, e2.y, e2.z), pi(0, t.a5, e2.x, e2.y, e2.z)], a3 = [];\n for (const e3 of i3) a3.push(t.b0([], e3, l2));\n if (l2 !== n2) for (const e3 of i3) a3.push(t.b0([], e3, n2));\n 0 === e2.y && a3.push([0, 1, 0]), e2.y === (1 << e2.z) - 1 && a3.push([0, -1, 0]);\n const r3 = [1, 1, 1], o3 = [-1, -1, -1];\n for (const e3 of a3) for (let t2 = 0; t2 < 3; t2++) r3[t2] = Math.min(r3[t2], e3[t2]), o3[t2] = Math.max(o3[t2], e3[t2]);\n const s3 = pi(t.a5 / 2, t.a5 / 2, e2.x, e2.y, e2.z), c2 = t.b5([], [0, 1, 0], s3);\n t.b4(c2, c2);\n const h2 = t.b5([], s3, c2);\n t.b4(h2, h2);\n const u2 = t.b5([], i3[2], i3[1]);\n t.b4(u2, u2);\n const d2 = t.b5([], i3[0], i3[3]);\n t.b4(d2, d2), a3.push(t.b0([], s3, l2)), e2.y >= (1 << e2.z) / 2 && a3.push(t.b0([], pi(t.a5 / 2, 0, e2.x, e2.y, e2.z), l2)), e2.y < (1 << e2.z) / 2 && a3.push(t.b0([], pi(t.a5 / 2, t.a5, e2.x, e2.y, e2.z), l2));\n const _2 = Ei(s3, a3), p2 = Ei(h2, a3), m2 = [-s3[0], -s3[1], -s3[2], _2.max], f2 = [s3[0], s3[1], s3[2], -_2.min], g2 = [-h2[0], -h2[1], -h2[2], p2.max], v2 = [h2[0], h2[1], h2[2], -p2.min], x2 = [...u2, 0], b2 = [...d2, 0], y2 = [];\n return 0 === e2.y ? y2.push(t.bE(b2, x2, m2), t.bE(b2, x2, f2)) : y2.push(t.bE(g2, x2, m2), t.bE(g2, x2, f2), t.bE(g2, b2, m2), t.bE(g2, b2, f2)), e2.y === (1 << e2.z) - 1 ? y2.push(t.bE(b2, x2, m2), t.bE(b2, x2, f2)) : y2.push(t.bE(v2, x2, m2), t.bE(v2, x2, f2), t.bE(v2, b2, m2), t.bE(v2, b2, f2)), new Pi(y2, [m2, f2, g2, v2, x2, b2], r3, o3);\n }\n }\n }\n function Ei(e2, i2) {\n let a2 = 1 / 0, r2 = -1 / 0;\n for (const o2 of i2) {\n const i3 = t.b6(e2, o2);\n a2 = Math.min(a2, i3), r2 = Math.max(r2, i3);\n }\n return { min: a2, max: r2 };\n }\n class Si {\n get pixelsToClipSpaceMatrix() {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix() {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits() {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset() {\n return this._helper.centerOffset;\n }\n get size() {\n return this._helper.size;\n }\n get rotationMatrix() {\n return this._helper.rotationMatrix;\n }\n get centerPoint() {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter() {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(e2) {\n this._helper.setMinZoom(e2);\n }\n setMaxZoom(e2) {\n this._helper.setMaxZoom(e2);\n }\n setMinPitch(e2) {\n this._helper.setMinPitch(e2);\n }\n setMaxPitch(e2) {\n this._helper.setMaxPitch(e2);\n }\n setRenderWorldCopies(e2) {\n this._helper.setRenderWorldCopies(e2);\n }\n setBearing(e2) {\n this._helper.setBearing(e2);\n }\n setPitch(e2) {\n this._helper.setPitch(e2);\n }\n setRoll(e2) {\n this._helper.setRoll(e2);\n }\n setFov(e2) {\n this._helper.setFov(e2);\n }\n setZoom(e2) {\n this._helper.setZoom(e2);\n }\n setCenter(e2) {\n this._helper.setCenter(e2);\n }\n setElevation(e2) {\n this._helper.setElevation(e2);\n }\n setMinElevationForCurrentTile(e2) {\n this._helper.setMinElevationForCurrentTile(e2);\n }\n setPadding(e2) {\n this._helper.setPadding(e2);\n }\n interpolatePadding(e2, t2, i2) {\n return this._helper.interpolatePadding(e2, t2, i2);\n }\n isPaddingEqual(e2) {\n return this._helper.isPaddingEqual(e2);\n }\n resize(e2, t2) {\n this._helper.resize(e2, t2);\n }\n getMaxBounds() {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(e2) {\n this._helper.setMaxBounds(e2);\n }\n setConstrainOverride(e2) {\n this._helper.setConstrainOverride(e2);\n }\n overrideNearFarZ(e2, t2) {\n this._helper.overrideNearFarZ(e2, t2);\n }\n clearNearFarZOverride() {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(e2) {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e2);\n }\n get tileSize() {\n return this._helper.tileSize;\n }\n get tileZoom() {\n return this._helper.tileZoom;\n }\n get scale() {\n return this._helper.scale;\n }\n get worldSize() {\n return this._helper.worldSize;\n }\n get width() {\n return this._helper.width;\n }\n get height() {\n return this._helper.height;\n }\n get lngRange() {\n return this._helper.lngRange;\n }\n get latRange() {\n return this._helper.latRange;\n }\n get minZoom() {\n return this._helper.minZoom;\n }\n get maxZoom() {\n return this._helper.maxZoom;\n }\n get zoom() {\n return this._helper.zoom;\n }\n get center() {\n return this._helper.center;\n }\n get minPitch() {\n return this._helper.minPitch;\n }\n get maxPitch() {\n return this._helper.maxPitch;\n }\n get pitch() {\n return this._helper.pitch;\n }\n get pitchInRadians() {\n return this._helper.pitchInRadians;\n }\n get roll() {\n return this._helper.roll;\n }\n get rollInRadians() {\n return this._helper.rollInRadians;\n }\n get bearing() {\n return this._helper.bearing;\n }\n get bearingInRadians() {\n return this._helper.bearingInRadians;\n }\n get fov() {\n return this._helper.fov;\n }\n get fovInRadians() {\n return this._helper.fovInRadians;\n }\n get elevation() {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile() {\n return this._helper.minElevationForCurrentTile;\n }\n get padding() {\n return this._helper.padding;\n }\n get unmodified() {\n return this._helper.unmodified;\n }\n get renderWorldCopies() {\n return this._helper.renderWorldCopies;\n }\n get constrainOverride() {\n return this._helper.constrainOverride;\n }\n get nearZ() {\n return this._helper.nearZ;\n }\n get farZ() {\n return this._helper.farZ;\n }\n get autoCalculateNearFarZ() {\n return this._helper.autoCalculateNearFarZ;\n }\n setTransitionState(e2) {\n }\n constructor(e2) {\n this._cachedClippingPlane = t.bG(), this._projectionMatrix = t.bk(), this._globeViewProjMatrix32f = t.bj(), this._globeViewProjMatrixNoCorrection = t.bk(), this._globeViewProjMatrixNoCorrectionInverted = t.bk(), this._globeProjMatrixInverted = t.bk(), this._cameraPosition = t.bA(), this._globeLatitudeErrorCorrectionRadians = 0, this.defaultConstrain = (e3, i2) => {\n const a2 = t.ao(e3.lat, -t.ap, t.ap), r2 = t.ao(+i2, this.minZoom + xi(0, a2), this.maxZoom);\n return { center: new t.V(e3.lng, a2), zoom: r2 };\n }, this.applyConstrain = (e3, t2) => this._helper.applyConstrain(e3, t2), this._helper = new Ut({ calcMatrices: () => {\n this._calcMatrices();\n }, defaultConstrain: (e3, t2) => this.defaultConstrain(e3, t2) }, e2), this._coveringTilesDetailsProvider = new Mi();\n }\n clone() {\n const e2 = new Si();\n return e2.apply(this), e2;\n }\n apply(e2, t2) {\n this._globeLatitudeErrorCorrectionRadians = t2 || 0, this._helper.apply(e2);\n }\n get projectionMatrix() {\n return this._projectionMatrix;\n }\n get modelViewProjectionMatrix() {\n return this._globeViewProjMatrixNoCorrection;\n }\n get inverseProjectionMatrix() {\n return this._globeProjMatrixInverted;\n }\n get cameraPosition() {\n const e2 = t.bA();\n return e2[0] = this._cameraPosition[0], e2[1] = this._cameraPosition[1], e2[2] = this._cameraPosition[2], e2;\n }\n get cameraToCenterDistance() {\n return this._helper.cameraToCenterDistance;\n }\n getProjectionData(e2) {\n const { overscaledTileID: t2, applyGlobeMatrix: i2 } = e2, a2 = this._helper.getMercatorTileCoordinates(t2);\n return { mainMatrix: this._globeViewProjMatrix32f, tileMercatorCoords: a2, clippingPlane: this._cachedClippingPlane, projectionTransition: i2 ? 1 : 0, fallbackMatrix: this._globeViewProjMatrix32f };\n }\n _computeClippingPlane(e2) {\n const i2 = this.pitchInRadians, a2 = this.cameraToCenterDistance / e2, r2 = Math.sin(i2) * a2, o2 = Math.cos(i2) * a2 + 1, s2 = 1 / Math.sqrt(r2 * r2 + o2 * o2) * 1;\n let n2 = -r2, l2 = o2;\n const c2 = Math.sqrt(n2 * n2 + l2 * l2);\n n2 /= c2, l2 /= c2;\n const h2 = [0, n2, l2];\n t.bH(h2, h2, [0, 0, 0], -this.bearingInRadians), t.bI(h2, h2, [0, 0, 0], -1 * this.center.lat * Math.PI / 180), t.bJ(h2, h2, [0, 0, 0], this.center.lng * Math.PI / 180);\n const u2 = 1 / t.b8(h2);\n return t.b0(h2, h2, u2), [...h2, -s2 * u2];\n }\n isLocationOccluded(e2) {\n return !this.isSurfacePointVisible(mi(e2));\n }\n transformLightDirection(e2) {\n const i2 = this._helper._center.lng * Math.PI / 180, a2 = this._helper._center.lat * Math.PI / 180, r2 = Math.cos(a2), o2 = [Math.sin(i2) * r2, Math.sin(a2), Math.cos(i2) * r2], s2 = [o2[2], 0, -o2[0]], n2 = [0, 0, 0];\n t.b5(n2, s2, o2), t.b4(s2, s2), t.b4(n2, n2);\n const l2 = [0, 0, 0];\n return t.b4(l2, [s2[0] * e2[0] + n2[0] * e2[1] + o2[0] * e2[2], s2[1] * e2[0] + n2[1] * e2[1] + o2[1] * e2[2], s2[2] * e2[0] + n2[2] * e2[1] + o2[2] * e2[2]]), l2;\n }\n getPixelScale() {\n return 1 / Math.cos(this._helper._center.lat * Math.PI / 180);\n }\n getCircleRadiusCorrection() {\n return Math.cos(this._helper._center.lat * Math.PI / 180);\n }\n getPitchedTextCorrection(e2, i2, a2) {\n const r2 = (function(e3, i3, a3) {\n const r3 = 1 / (1 << a3.z);\n return new t.ab(e3 / t.a5 * r3 + a3.x * r3, i3 / t.a5 * r3 + a3.y * r3);\n })(e2, i2, a2.canonical), o2 = (s2 = r2.y, [t.bz(r2.x * Math.PI * 2 + Math.PI, 2 * Math.PI), 2 * Math.atan(Math.exp(Math.PI - s2 * Math.PI * 2)) - 0.5 * Math.PI]);\n var s2;\n return this.getCircleRadiusCorrection() / Math.cos(o2[1]);\n }\n projectTileCoordinates(e2, i2, a2, r2) {\n const o2 = a2.canonical, s2 = pi(e2, i2, o2.x, o2.y, o2.z), n2 = 1 + (r2 ? r2(e2, i2) : 0) / t.bF, l2 = [s2[0] * n2, s2[1] * n2, s2[2] * n2, 1];\n t.aI(l2, l2, this._globeViewProjMatrixNoCorrection);\n const c2 = this._cachedClippingPlane, h2 = c2[0] * s2[0] + c2[1] * s2[1] + c2[2] * s2[2] + c2[3] < 0;\n return { point: new t.P(l2[0] / l2[3], l2[1] / l2[3]), signedDistanceFromCamera: l2[3], isOccluded: h2 };\n }\n _calcMatrices() {\n if (!this._helper._width || !this._helper._height) return;\n const e2 = fi(this.worldSize, this.center.lat), i2 = t.bl(), a2 = t.bl();\n this._helper.autoCalculateNearFarZ && (this._helper._nearZ = 0.5, this._helper._farZ = this.cameraToCenterDistance + 2 * e2), t.bf(i2, this.fovInRadians, this.width / this.height, this._helper._nearZ, this._helper._farZ);\n const r2 = this.centerOffset;\n i2[8] = 2 * -r2.x / this._helper._width, i2[9] = 2 * r2.y / this._helper._height, this._projectionMatrix = t.bg(i2), this._globeProjMatrixInverted = t.bl(), t.aC(this._globeProjMatrixInverted, i2), t.O(i2, i2, [0, 0, -this.cameraToCenterDistance]), t.bh(i2, i2, this.rollInRadians), t.bi(i2, i2, -this.pitchInRadians), t.bh(i2, i2, this.bearingInRadians), t.O(i2, i2, [0, 0, -e2]);\n const o2 = t.bA();\n o2[0] = e2, o2[1] = e2, o2[2] = e2, t.bi(a2, i2, this.center.lat * Math.PI / 180), t.bK(a2, a2, -this.center.lng * Math.PI / 180), t.Q(a2, a2, o2), this._globeViewProjMatrixNoCorrection = a2, t.bi(i2, i2, this.center.lat * Math.PI / 180 - this._globeLatitudeErrorCorrectionRadians), t.bK(i2, i2, -this.center.lng * Math.PI / 180), t.Q(i2, i2, o2), this._globeViewProjMatrix32f = new Float32Array(i2), this._globeViewProjMatrixNoCorrectionInverted = t.bl(), t.aC(this._globeViewProjMatrixNoCorrectionInverted, a2);\n const s2 = t.bA();\n this._cameraPosition = t.bA(), this._cameraPosition[2] = this.cameraToCenterDistance / e2, t.bH(this._cameraPosition, this._cameraPosition, s2, -this.rollInRadians), t.bI(this._cameraPosition, this._cameraPosition, s2, this.pitchInRadians), t.bH(this._cameraPosition, this._cameraPosition, s2, -this.bearingInRadians), t.b1(this._cameraPosition, this._cameraPosition, [0, 0, 1]), t.bI(this._cameraPosition, this._cameraPosition, s2, -this.center.lat * Math.PI / 180), t.bJ(this._cameraPosition, this._cameraPosition, s2, this.center.lng * Math.PI / 180), this._cachedClippingPlane = this._computeClippingPlane(e2);\n const n2 = t.bg(this._globeViewProjMatrixNoCorrectionInverted);\n t.Q(n2, n2, [1, 1, -1]), this._cachedFrustum = Wt.fromInvProjectionMatrix(n2, 1, 0, this._cachedClippingPlane, true);\n }\n calculateFogMatrix(e2) {\n t.w(\"calculateFogMatrix is not supported on globe projection.\");\n const i2 = t.bl();\n return t.as(i2), i2;\n }\n getVisibleUnwrappedCoordinates(e2) {\n return [new t.bd(0, e2)];\n }\n getCameraFrustum() {\n return this._cachedFrustum;\n }\n getClippingPlane() {\n return this._cachedClippingPlane;\n }\n getCoveringTilesDetailsProvider() {\n return this._coveringTilesDetailsProvider;\n }\n recalculateZoomAndCenter(e2) {\n e2 && t.w(\"terrain is not fully supported on vertical perspective projection.\"), this._helper.recalculateZoomAndCenter(0);\n }\n maxPitchScaleFactor() {\n return 1;\n }\n getCameraPoint() {\n return this._helper.getCameraPoint();\n }\n getCameraAltitude() {\n return this._helper.getCameraAltitude();\n }\n getCameraLngLat() {\n return this._helper.getCameraLngLat();\n }\n lngLatToCameraDepth(e2, i2) {\n if (!this._globeViewProjMatrixNoCorrection) return 1;\n const a2 = mi(e2);\n t.b0(a2, a2, 1 + i2 / t.bF);\n const r2 = t.bG();\n return t.aI(r2, [a2[0], a2[1], a2[2], 1], this._globeViewProjMatrixNoCorrection), r2[2] / r2[3];\n }\n populateCache(e2) {\n }\n getBounds() {\n const e2 = 0.5 * this.width, i2 = 0.5 * this.height, a2 = [new t.P(0, 0), new t.P(e2, 0), new t.P(this.width, 0), new t.P(this.width, i2), new t.P(this.width, this.height), new t.P(e2, this.height), new t.P(0, this.height), new t.P(0, i2)], r2 = [];\n for (const e3 of a2) r2.push(this.unprojectScreenPoint(e3));\n let o2 = 0, s2 = 0, n2 = 0, l2 = 0;\n const c2 = this.center;\n for (const e3 of r2) {\n const i3 = t.bL(c2.lng, e3.lng), a3 = t.bL(c2.lat, e3.lat);\n i3 < s2 && (s2 = i3), i3 > o2 && (o2 = i3), a3 < l2 && (l2 = a3), a3 > n2 && (n2 = a3);\n }\n const h2 = [c2.lng + s2, c2.lat + l2, c2.lng + o2, c2.lat + n2];\n return this.isSurfacePointOnScreen([0, 1, 0]) && (h2[3] = 90, h2[0] = -180, h2[2] = 180), this.isSurfacePointOnScreen([0, -1, 0]) && (h2[1] = -90, h2[0] = -180, h2[2] = 180), new $(h2);\n }\n calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2) {\n return this._helper.calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2);\n }\n setLocationAtPoint(e2, i2) {\n const a2 = mi(this.unprojectScreenPoint(i2)), r2 = mi(e2), o2 = t.bA();\n t.bM(o2);\n const s2 = t.bA();\n t.bJ(s2, a2, o2, -this.center.lng * Math.PI / 180), t.bI(s2, s2, o2, this.center.lat * Math.PI / 180);\n const n2 = r2[0] * r2[0] + r2[2] * r2[2], l2 = s2[0] * s2[0];\n if (n2 < l2) return;\n const c2 = Math.sqrt(n2 - l2), h2 = -c2, u2 = t.bN(r2[0], r2[2], s2[0], c2), d2 = t.bN(r2[0], r2[2], s2[0], h2), _2 = t.bA();\n t.bJ(_2, r2, o2, -u2);\n const p2 = t.bN(_2[1], _2[2], s2[1], s2[2]), m2 = t.bA();\n t.bJ(m2, r2, o2, -d2);\n const f2 = t.bN(m2[1], m2[2], s2[1], s2[2]), g2 = 0.5 * Math.PI, v2 = p2 >= -g2 && p2 <= g2, x2 = f2 >= -g2 && f2 <= g2;\n let b2, y2;\n if (v2 && x2) {\n const e3 = this.center.lng * Math.PI / 180, i3 = this.center.lat * Math.PI / 180;\n t.bO(u2, e3) + t.bO(p2, i3) < t.bO(d2, e3) + t.bO(f2, i3) ? (b2 = u2, y2 = p2) : (b2 = d2, y2 = f2);\n } else if (v2) b2 = u2, y2 = p2;\n else {\n if (!x2) return;\n b2 = d2, y2 = f2;\n }\n const w2 = b2 / Math.PI * 180, T2 = y2 / Math.PI * 180, P2 = this.center.lat;\n this.setCenter(new t.V(w2, t.ao(T2, -90, 90))), this.setZoom(this.zoom + xi(P2, this.center.lat));\n }\n locationToScreenPoint(e2, i2) {\n const a2 = mi(e2);\n if (i2) {\n const r2 = i2.getElevationForLngLatZoom(e2, this._helper._tileZoom);\n t.b0(a2, a2, 1 + r2 / t.bF);\n }\n return this._projectSurfacePointToScreen(a2);\n }\n _projectSurfacePointToScreen(e2) {\n const i2 = t.bG();\n return t.aI(i2, [...e2, 1], this._globeViewProjMatrixNoCorrection), i2[0] /= i2[3], i2[1] /= i2[3], new t.P((0.5 * i2[0] + 0.5) * this.width, (0.5 * -i2[1] + 0.5) * this.height);\n }\n screenPointToMercatorCoordinate(e2, i2) {\n if (i2) {\n const t2 = i2.pointCoordinate(e2);\n if (t2) return t2;\n }\n return t.ab.fromLngLat(this.unprojectScreenPoint(e2));\n }\n screenPointToLocation(e2, t2) {\n var i2;\n return null === (i2 = this.screenPointToMercatorCoordinate(e2, t2)) || void 0 === i2 ? void 0 : i2.toLngLat();\n }\n isPointOnMapSurface(e2, t2) {\n const i2 = this._cameraPosition, a2 = this.getRayDirectionFromPixel(e2);\n return !!this.rayPlanetIntersection(i2, a2);\n }\n getRayDirectionFromPixel(e2) {\n const i2 = t.bG();\n i2[0] = e2.x / this.width * 2 - 1, i2[1] = -1 * (e2.y / this.height * 2 - 1), i2[2] = 1, i2[3] = 1, t.aI(i2, i2, this._globeViewProjMatrixNoCorrectionInverted), i2[0] /= i2[3], i2[1] /= i2[3], i2[2] /= i2[3];\n const a2 = t.bA();\n a2[0] = i2[0] - this._cameraPosition[0], a2[1] = i2[1] - this._cameraPosition[1], a2[2] = i2[2] - this._cameraPosition[2];\n const r2 = t.bA();\n return t.b4(r2, a2), r2;\n }\n isSurfacePointVisible(e2) {\n const t2 = this._cachedClippingPlane;\n return t2[0] * e2[0] + t2[1] * e2[1] + t2[2] * e2[2] + t2[3] >= 0;\n }\n isSurfacePointOnScreen(e2) {\n if (!this.isSurfacePointVisible(e2)) return false;\n const i2 = t.bG();\n return t.aI(i2, [...e2, 1], this._globeViewProjMatrixNoCorrection), i2[0] /= i2[3], i2[1] /= i2[3], i2[2] /= i2[3], i2[0] > -1 && i2[0] < 1 && i2[1] > -1 && i2[1] < 1 && i2[2] > -1 && i2[2] < 1;\n }\n rayPlanetIntersection(e2, i2) {\n const a2 = t.b6(e2, i2), r2 = t.bA(), o2 = t.bA();\n t.b0(o2, i2, a2), t.b3(r2, e2, o2);\n const s2 = 1 - t.b6(r2, r2);\n if (s2 < 0) return null;\n const n2 = t.b6(e2, e2) - 1, l2 = -a2 + (a2 < 0 ? 1 : -1) * Math.sqrt(s2), c2 = n2 / l2, h2 = l2;\n return { tMin: Math.min(c2, h2), tMax: Math.max(c2, h2) };\n }\n unprojectScreenPoint(e2) {\n const i2 = this._cameraPosition, a2 = this.getRayDirectionFromPixel(e2), r2 = this.rayPlanetIntersection(i2, a2);\n if (r2) {\n const e3 = t.bA();\n t.b1(e3, i2, [a2[0] * r2.tMin, a2[1] * r2.tMin, a2[2] * r2.tMin]);\n const o3 = t.bA();\n return t.b4(o3, e3), gi(o3);\n }\n const o2 = this._cachedClippingPlane, s2 = o2[0] * a2[0] + o2[1] * a2[1] + o2[2] * a2[2], n2 = -t.bc(o2, i2) / s2, l2 = t.bA();\n if (n2 > 0) t.b1(l2, i2, [a2[0] * n2, a2[1] * n2, a2[2] * n2]);\n else {\n const e3 = t.bA();\n t.b1(e3, i2, [2 * a2[0], 2 * a2[1], 2 * a2[2]]);\n const r3 = t.bc(this._cachedClippingPlane, e3);\n t.b3(l2, e3, [this._cachedClippingPlane[0] * r3, this._cachedClippingPlane[1] * r3, this._cachedClippingPlane[2] * r3]);\n }\n const c2 = (function(e3) {\n const i3 = t.bA();\n return i3[0] = e3[0] * -e3[3], i3[1] = e3[1] * -e3[3], i3[2] = e3[2] * -e3[3], { center: i3, radius: Math.sqrt(1 - e3[3] * e3[3]) };\n })(o2);\n return gi((function(e3, i3, a3) {\n const r3 = t.bA();\n t.b3(r3, a3, e3);\n const o3 = t.bA();\n return t.bB(o3, e3, r3, i3 / t.ba(r3)), o3;\n })(c2.center, c2.radius, l2));\n }\n getMatrixForModel(e2, i2) {\n const a2 = t.V.convert(e2), r2 = 1 / t.bF, o2 = t.bk();\n return t.bK(o2, o2, a2.lng / 180 * Math.PI), t.bi(o2, o2, -a2.lat / 180 * Math.PI), t.O(o2, o2, [0, 0, 1 + i2 / t.bF]), t.bi(o2, o2, 0.5 * Math.PI), t.Q(o2, o2, [r2, r2, r2]), o2;\n }\n getProjectionDataForCustomLayer(e2 = true) {\n const i2 = this.getProjectionData({ overscaledTileID: new t.a2(0, 0, 0, 0, 0), applyGlobeMatrix: e2 });\n return i2.tileMercatorCoords = [0, 0, 1, 1], i2;\n }\n getFastPathSimpleProjectionMatrix(e2) {\n }\n }\n class Ri {\n get pixelsToClipSpaceMatrix() {\n return this._helper.pixelsToClipSpaceMatrix;\n }\n get clipSpaceToPixelsMatrix() {\n return this._helper.clipSpaceToPixelsMatrix;\n }\n get pixelsToGLUnits() {\n return this._helper.pixelsToGLUnits;\n }\n get centerOffset() {\n return this._helper.centerOffset;\n }\n get size() {\n return this._helper.size;\n }\n get rotationMatrix() {\n return this._helper.rotationMatrix;\n }\n get centerPoint() {\n return this._helper.centerPoint;\n }\n get pixelsPerMeter() {\n return this._helper.pixelsPerMeter;\n }\n setMinZoom(e2) {\n this._helper.setMinZoom(e2);\n }\n setMaxZoom(e2) {\n this._helper.setMaxZoom(e2);\n }\n setMinPitch(e2) {\n this._helper.setMinPitch(e2);\n }\n setMaxPitch(e2) {\n this._helper.setMaxPitch(e2);\n }\n setRenderWorldCopies(e2) {\n this._helper.setRenderWorldCopies(e2);\n }\n setBearing(e2) {\n this._helper.setBearing(e2);\n }\n setPitch(e2) {\n this._helper.setPitch(e2);\n }\n setRoll(e2) {\n this._helper.setRoll(e2);\n }\n setFov(e2) {\n this._helper.setFov(e2);\n }\n setZoom(e2) {\n this._helper.setZoom(e2);\n }\n setCenter(e2) {\n this._helper.setCenter(e2);\n }\n setElevation(e2) {\n this._helper.setElevation(e2);\n }\n setMinElevationForCurrentTile(e2) {\n this._helper.setMinElevationForCurrentTile(e2);\n }\n setPadding(e2) {\n this._helper.setPadding(e2);\n }\n interpolatePadding(e2, t2, i2) {\n return this._helper.interpolatePadding(e2, t2, i2);\n }\n isPaddingEqual(e2) {\n return this._helper.isPaddingEqual(e2);\n }\n resize(e2, t2, i2 = true) {\n this._helper.resize(e2, t2, i2);\n }\n getMaxBounds() {\n return this._helper.getMaxBounds();\n }\n setMaxBounds(e2) {\n this._helper.setMaxBounds(e2);\n }\n setConstrainOverride(e2) {\n this._helper.setConstrainOverride(e2);\n }\n overrideNearFarZ(e2, t2) {\n this._helper.overrideNearFarZ(e2, t2);\n }\n clearNearFarZOverride() {\n this._helper.clearNearFarZOverride();\n }\n getCameraQueryGeometry(e2) {\n return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e2);\n }\n get tileSize() {\n return this._helper.tileSize;\n }\n get tileZoom() {\n return this._helper.tileZoom;\n }\n get scale() {\n return this._helper.scale;\n }\n get worldSize() {\n return this._helper.worldSize;\n }\n get width() {\n return this._helper.width;\n }\n get height() {\n return this._helper.height;\n }\n get lngRange() {\n return this._helper.lngRange;\n }\n get latRange() {\n return this._helper.latRange;\n }\n get minZoom() {\n return this._helper.minZoom;\n }\n get maxZoom() {\n return this._helper.maxZoom;\n }\n get zoom() {\n return this._helper.zoom;\n }\n get center() {\n return this._helper.center;\n }\n get minPitch() {\n return this._helper.minPitch;\n }\n get maxPitch() {\n return this._helper.maxPitch;\n }\n get pitch() {\n return this._helper.pitch;\n }\n get pitchInRadians() {\n return this._helper.pitchInRadians;\n }\n get roll() {\n return this._helper.roll;\n }\n get rollInRadians() {\n return this._helper.rollInRadians;\n }\n get bearing() {\n return this._helper.bearing;\n }\n get bearingInRadians() {\n return this._helper.bearingInRadians;\n }\n get fov() {\n return this._helper.fov;\n }\n get fovInRadians() {\n return this._helper.fovInRadians;\n }\n get elevation() {\n return this._helper.elevation;\n }\n get minElevationForCurrentTile() {\n return this._helper.minElevationForCurrentTile;\n }\n get padding() {\n return this._helper.padding;\n }\n get unmodified() {\n return this._helper.unmodified;\n }\n get renderWorldCopies() {\n return this._helper.renderWorldCopies;\n }\n get cameraToCenterDistance() {\n return this._helper.cameraToCenterDistance;\n }\n get constrainOverride() {\n return this._helper.constrainOverride;\n }\n get nearZ() {\n return this._helper.nearZ;\n }\n get farZ() {\n return this._helper.farZ;\n }\n get autoCalculateNearFarZ() {\n return this._helper.autoCalculateNearFarZ;\n }\n get isGlobeRendering() {\n return this._globeness > 0;\n }\n setTransitionState(e2, t2) {\n this._globeness = e2, this._globeLatitudeErrorCorrectionRadians = t2, this._calcMatrices(), this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(), this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame();\n }\n get currentTransform() {\n return this.isGlobeRendering ? this._verticalPerspectiveTransform : this._mercatorTransform;\n }\n constructor(e2) {\n this._globeLatitudeErrorCorrectionRadians = 0, this._globeness = 1, this.defaultConstrain = (e3, t2) => this.currentTransform.defaultConstrain(e3, t2), this.applyConstrain = (e3, t2) => this._helper.applyConstrain(e3, t2), this._helper = new Ut({ calcMatrices: () => {\n this._calcMatrices();\n }, defaultConstrain: (e3, t2) => this.defaultConstrain(e3, t2) }, e2), this._globeness = 1, this._mercatorTransform = new $t(), this._verticalPerspectiveTransform = new Si();\n }\n clone() {\n const e2 = new Ri();\n return e2._globeness = this._globeness, e2._globeLatitudeErrorCorrectionRadians = this._globeLatitudeErrorCorrectionRadians, e2.apply(this), e2;\n }\n apply(e2) {\n this._helper.apply(e2), this._mercatorTransform.apply(this), this._verticalPerspectiveTransform.apply(this, this._globeLatitudeErrorCorrectionRadians);\n }\n get projectionMatrix() {\n return this.currentTransform.projectionMatrix;\n }\n get modelViewProjectionMatrix() {\n return this.currentTransform.modelViewProjectionMatrix;\n }\n get inverseProjectionMatrix() {\n return this.currentTransform.inverseProjectionMatrix;\n }\n get cameraPosition() {\n return this.currentTransform.cameraPosition;\n }\n getProjectionData(e2) {\n const t2 = this._mercatorTransform.getProjectionData(e2), i2 = this._verticalPerspectiveTransform.getProjectionData(e2);\n return { mainMatrix: this.isGlobeRendering ? i2.mainMatrix : t2.mainMatrix, clippingPlane: i2.clippingPlane, tileMercatorCoords: i2.tileMercatorCoords, projectionTransition: e2.applyGlobeMatrix ? this._globeness : 0, fallbackMatrix: t2.fallbackMatrix };\n }\n isLocationOccluded(e2) {\n return this.currentTransform.isLocationOccluded(e2);\n }\n transformLightDirection(e2) {\n return this.currentTransform.transformLightDirection(e2);\n }\n getPixelScale() {\n return t.bv(this._mercatorTransform.getPixelScale(), this._verticalPerspectiveTransform.getPixelScale(), this._globeness);\n }\n getCircleRadiusCorrection() {\n return t.bv(this._mercatorTransform.getCircleRadiusCorrection(), this._verticalPerspectiveTransform.getCircleRadiusCorrection(), this._globeness);\n }\n getPitchedTextCorrection(e2, i2, a2) {\n const r2 = this._mercatorTransform.getPitchedTextCorrection(e2, i2, a2), o2 = this._verticalPerspectiveTransform.getPitchedTextCorrection(e2, i2, a2);\n return t.bv(r2, o2, this._globeness);\n }\n projectTileCoordinates(e2, t2, i2, a2) {\n return this.currentTransform.projectTileCoordinates(e2, t2, i2, a2);\n }\n _calcMatrices() {\n this._helper._width && this._helper._height && (this._verticalPerspectiveTransform.apply(this, this._globeLatitudeErrorCorrectionRadians), this._helper._nearZ = this._verticalPerspectiveTransform.nearZ, this._helper._farZ = this._verticalPerspectiveTransform.farZ, this._mercatorTransform.apply(this, true, this.isGlobeRendering), this._helper._nearZ = this._mercatorTransform.nearZ, this._helper._farZ = this._mercatorTransform.farZ);\n }\n calculateFogMatrix(e2) {\n return this.currentTransform.calculateFogMatrix(e2);\n }\n getVisibleUnwrappedCoordinates(e2) {\n return this.currentTransform.getVisibleUnwrappedCoordinates(e2);\n }\n getCameraFrustum() {\n return this.currentTransform.getCameraFrustum();\n }\n getClippingPlane() {\n return this.currentTransform.getClippingPlane();\n }\n getCoveringTilesDetailsProvider() {\n return this.currentTransform.getCoveringTilesDetailsProvider();\n }\n recalculateZoomAndCenter(e2) {\n this._mercatorTransform.recalculateZoomAndCenter(e2), this._verticalPerspectiveTransform.recalculateZoomAndCenter(e2);\n }\n maxPitchScaleFactor() {\n return this._mercatorTransform.maxPitchScaleFactor();\n }\n getCameraPoint() {\n return this._helper.getCameraPoint();\n }\n getCameraAltitude() {\n return this._helper.getCameraAltitude();\n }\n getCameraLngLat() {\n return this._helper.getCameraLngLat();\n }\n lngLatToCameraDepth(e2, t2) {\n return this.currentTransform.lngLatToCameraDepth(e2, t2);\n }\n populateCache(e2) {\n this._mercatorTransform.populateCache(e2), this._verticalPerspectiveTransform.populateCache(e2);\n }\n getBounds() {\n return this.currentTransform.getBounds();\n }\n calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2) {\n return this._helper.calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2);\n }\n setLocationAtPoint(e2, t2) {\n if (!this.isGlobeRendering) return this._mercatorTransform.setLocationAtPoint(e2, t2), void this.apply(this._mercatorTransform);\n this._verticalPerspectiveTransform.setLocationAtPoint(e2, t2), this.apply(this._verticalPerspectiveTransform);\n }\n locationToScreenPoint(e2, t2) {\n return this.currentTransform.locationToScreenPoint(e2, t2);\n }\n screenPointToMercatorCoordinate(e2, t2) {\n return this.currentTransform.screenPointToMercatorCoordinate(e2, t2);\n }\n screenPointToLocation(e2, t2) {\n return this.currentTransform.screenPointToLocation(e2, t2);\n }\n isPointOnMapSurface(e2, t2) {\n return this.currentTransform.isPointOnMapSurface(e2, t2);\n }\n getRayDirectionFromPixel(e2) {\n return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e2);\n }\n getMatrixForModel(e2, t2) {\n return this.currentTransform.getMatrixForModel(e2, t2);\n }\n getProjectionDataForCustomLayer(e2 = true) {\n const t2 = this._mercatorTransform.getProjectionDataForCustomLayer(e2);\n if (!this.isGlobeRendering) return t2;\n const i2 = this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e2);\n return i2.fallbackMatrix = t2.mainMatrix, i2;\n }\n getFastPathSimpleProjectionMatrix(e2) {\n return this.currentTransform.getFastPathSimpleProjectionMatrix(e2);\n }\n }\n class zi {\n get useGlobeControls() {\n return true;\n }\n handlePanInertia(e2, i2) {\n const a2 = bi(e2, i2);\n return Math.abs(a2.lng - i2.center.lng) > 180 && (a2.lng = i2.center.lng + 179.5 * Math.sign(a2.lng - i2.center.lng)), { easingCenter: a2, easingOffset: new t.P(0, 0) };\n }\n handleMapControlsRollPitchBearingZoom(e2, i2) {\n const a2 = e2.around, r2 = i2.screenPointToLocation(a2);\n e2.bearingDelta && i2.setBearing(i2.bearing + e2.bearingDelta), e2.pitchDelta && i2.setPitch(i2.pitch + e2.pitchDelta), e2.rollDelta && i2.setRoll(i2.roll + e2.rollDelta);\n const o2 = i2.zoom;\n e2.zoomDelta && i2.setZoom(i2.zoom + e2.zoomDelta);\n const s2 = i2.zoom - o2;\n if (0 === s2) return;\n const n2 = t.bL(i2.center.lng, r2.lng), l2 = n2 / (Math.abs(n2 / 180) + 1), c2 = t.bL(i2.center.lat, r2.lat), h2 = i2.getRayDirectionFromPixel(a2), u2 = i2.cameraPosition, d2 = -1 * t.b6(u2, h2), _2 = t.bA();\n t.b1(_2, u2, [h2[0] * d2, h2[1] * d2, h2[2] * d2]);\n const p2 = t.b8(_2) - 1, m2 = Math.exp(0.5 * -Math.max(p2 - 0.3, 0)), f2 = fi(i2.worldSize, i2.center.lat) / Math.min(i2.width, i2.height), g2 = t.by(f2, 0.9, 0.5, 1, 0.25), v2 = (1 - t.ar(-s2)) * Math.min(m2, g2), x2 = i2.center.lat, b2 = i2.zoom, y2 = new t.V(i2.center.lng + l2 * v2, t.ao(i2.center.lat + c2 * v2, -t.ap, t.ap));\n i2.setLocationAtPoint(r2, a2);\n const w2 = i2.center, T2 = t.by(Math.abs(n2), 45, 85, 0, 1), P2 = t.by(f2, 0.75, 0.35, 0, 1), I2 = Math.pow(Math.max(T2, P2), 0.25), C2 = t.bL(w2.lng, y2.lng), M2 = t.bL(w2.lat, y2.lat);\n i2.setCenter(new t.V(w2.lng + C2 * I2, w2.lat + M2 * I2).wrap()), i2.setZoom(b2 + xi(x2, i2.center.lat));\n }\n handleMapControlsPan(e2, t2, i2) {\n if (!e2.panDelta) return;\n const a2 = t2.center.lat, r2 = t2.zoom;\n t2.setCenter(bi(e2.panDelta, t2).wrap()), t2.setZoom(r2 + xi(a2, t2.center.lat));\n }\n cameraForBoxAndBearing(e2, i2, a2, r2, o2) {\n const s2 = Kt(e2, i2, a2, r2, o2), n2 = i2.left / o2.width * 2 - 1, l2 = (o2.width - i2.right) / o2.width * 2 - 1, c2 = i2.top / o2.height * -2 + 1, h2 = (o2.height - i2.bottom) / o2.height * -2 + 1, u2 = t.bL(a2.getWest(), a2.getEast()) < 0, d2 = u2 ? a2.getEast() : a2.getWest(), _2 = u2 ? a2.getWest() : a2.getEast(), p2 = Math.max(a2.getNorth(), a2.getSouth()), m2 = Math.min(a2.getNorth(), a2.getSouth()), f2 = d2 + 0.5 * t.bL(d2, _2), g2 = p2 + 0.5 * t.bL(p2, m2), v2 = o2.clone();\n v2.setCenter(s2.center), v2.setBearing(s2.bearing), v2.setPitch(0), v2.setRoll(0), v2.setZoom(s2.zoom);\n const x2 = v2.modelViewProjectionMatrix, b2 = [mi(a2.getNorthWest()), mi(a2.getNorthEast()), mi(a2.getSouthWest()), mi(a2.getSouthEast()), mi(new t.V(_2, g2)), mi(new t.V(d2, g2)), mi(new t.V(f2, p2)), mi(new t.V(f2, m2))], y2 = mi(s2.center);\n let w2 = Number.POSITIVE_INFINITY;\n for (const e3 of b2) n2 < 0 && (w2 = zi.getLesserNonNegativeNonNull(w2, zi.solveVectorScale(e3, y2, x2, \"x\", n2))), l2 > 0 && (w2 = zi.getLesserNonNegativeNonNull(w2, zi.solveVectorScale(e3, y2, x2, \"x\", l2))), c2 > 0 && (w2 = zi.getLesserNonNegativeNonNull(w2, zi.solveVectorScale(e3, y2, x2, \"y\", c2))), h2 < 0 && (w2 = zi.getLesserNonNegativeNonNull(w2, zi.solveVectorScale(e3, y2, x2, \"y\", h2)));\n if (Number.isFinite(w2) && 0 !== w2) return s2.zoom = v2.zoom + t.au(w2), s2;\n Ht();\n }\n handleJumpToCenterZoom(e2, i2) {\n const a2 = e2.center.lat, r2 = e2.applyConstrain(i2.center ? t.V.convert(i2.center) : e2.center, e2.zoom).center;\n e2.setCenter(r2.wrap());\n const o2 = void 0 !== i2.zoom ? +i2.zoom : e2.zoom + xi(a2, r2.lat);\n e2.zoom !== o2 && e2.setZoom(o2);\n }\n handleEaseTo(e2, i2) {\n const a2 = e2.zoom, r2 = e2.center, o2 = e2.padding, s2 = { roll: e2.roll, pitch: e2.pitch, bearing: e2.bearing }, n2 = { roll: void 0 === i2.roll ? e2.roll : i2.roll, pitch: void 0 === i2.pitch ? e2.pitch : i2.pitch, bearing: void 0 === i2.bearing ? e2.bearing : i2.bearing }, l2 = void 0 !== i2.zoom, c2 = !e2.isPaddingEqual(i2.padding);\n let h2 = false;\n const u2 = i2.center ? t.V.convert(i2.center) : r2, d2 = e2.applyConstrain(u2, a2).center;\n Zt(e2, d2);\n const _2 = e2.clone();\n _2.setCenter(d2), _2.setZoom(l2 ? +i2.zoom : a2 + xi(r2.lat, u2.lat)), _2.setBearing(i2.bearing);\n const p2 = new t.P(t.ao(e2.centerPoint.x + i2.offsetAsPoint.x, 0, e2.width), t.ao(e2.centerPoint.y + i2.offsetAsPoint.y, 0, e2.height));\n _2.setLocationAtPoint(d2, p2);\n const m2 = (i2.offset && i2.offsetAsPoint.mag()) > 0 ? _2.center : d2, f2 = l2 ? +i2.zoom : a2 + xi(r2.lat, m2.lat), g2 = a2 + xi(r2.lat, 0), v2 = f2 + xi(m2.lat, 0), x2 = t.bL(r2.lng, m2.lng), b2 = t.bL(r2.lat, m2.lat), y2 = t.ar(v2 - g2);\n return h2 = f2 !== a2, { easeFunc: (a3) => {\n if (t.bp(s2, n2) || Xt({ startEulerAngles: s2, endEulerAngles: n2, tr: e2, k: a3, useSlerp: s2.roll != n2.roll }), c2 && e2.interpolatePadding(o2, i2.padding, a3), i2.around) t.w(\"Easing around a point is not supported under globe projection.\"), e2.setLocationAtPoint(i2.around, i2.aroundPoint);\n else {\n const t2 = v2 > g2 ? Math.min(2, y2) : Math.max(0.5, y2), i3 = Math.pow(t2, 1 - a3), o3 = wi(r2, x2, b2, a3 * i3);\n e2.setCenter(o3.wrap());\n }\n if (h2) {\n const i3 = t.G.number(g2, v2, a3) + xi(0, e2.center.lat);\n e2.setZoom(i3);\n }\n }, isZooming: h2, elevationCenter: m2 };\n }\n handleFlyTo(e2, i2) {\n const a2 = void 0 !== i2.zoom, r2 = e2.center, o2 = e2.zoom, s2 = e2.padding, n2 = !e2.isPaddingEqual(i2.padding), l2 = e2.applyConstrain(t.V.convert(i2.center || i2.locationAtOffset), o2).center, c2 = a2 ? +i2.zoom : e2.zoom + xi(e2.center.lat, l2.lat), h2 = e2.clone();\n h2.setCenter(l2), h2.setZoom(c2), h2.setBearing(i2.bearing);\n const u2 = new t.P(t.ao(e2.centerPoint.x + i2.offsetAsPoint.x, 0, e2.width), t.ao(e2.centerPoint.y + i2.offsetAsPoint.y, 0, e2.height));\n h2.setLocationAtPoint(l2, u2);\n const d2 = h2.center;\n Zt(e2, d2);\n const _2 = (function(e3, i3, a3) {\n const r3 = mi(i3), o3 = mi(a3), s3 = t.b6(r3, o3), n3 = Math.acos(s3), l3 = _i(e3);\n return n3 / (2 * Math.PI) * l3;\n })(e2, r2, d2), p2 = o2 + xi(r2.lat, 0), m2 = c2 + xi(d2.lat, 0), f2 = t.ar(m2 - p2);\n let g2;\n if (\"number\" == typeof i2.minZoom) {\n const a3 = +i2.minZoom + xi(d2.lat, 0), r3 = Math.min(a3, p2, m2) + xi(0, d2.lat), o3 = e2.applyConstrain(d2, r3).zoom + xi(d2.lat, 0);\n g2 = t.ar(o3 - p2);\n }\n const v2 = t.bL(r2.lng, d2.lng), x2 = t.bL(r2.lat, d2.lat);\n return { easeFunc: (a3, o3, l3, h3) => {\n const u3 = wi(r2, v2, x2, l3);\n n2 && e2.interpolatePadding(s2, i2.padding, a3);\n const _3 = 1 === a3 ? d2 : u3;\n e2.setCenter(_3.wrap());\n const m3 = p2 + t.au(o3);\n e2.setZoom(1 === a3 ? c2 : m3 + xi(0, _3.lat));\n }, scaleOfZoom: f2, targetCenter: d2, scaleOfMinZoom: g2, pixelPathLength: _2 };\n }\n static solveVectorScale(e2, t2, i2, a2, r2) {\n const o2 = \"x\" === a2 ? [i2[0], i2[4], i2[8], i2[12]] : [i2[1], i2[5], i2[9], i2[13]], s2 = [i2[3], i2[7], i2[11], i2[15]], n2 = e2[0] * o2[0] + e2[1] * o2[1] + e2[2] * o2[2], l2 = e2[0] * s2[0] + e2[1] * s2[1] + e2[2] * s2[2], c2 = t2[0] * o2[0] + t2[1] * o2[1] + t2[2] * o2[2], h2 = t2[0] * s2[0] + t2[1] * s2[1] + t2[2] * s2[2];\n return c2 + r2 * l2 === n2 + r2 * h2 || s2[3] * (n2 - c2) + o2[3] * (h2 - l2) + n2 * h2 == c2 * l2 ? null : (c2 + o2[3] - r2 * h2 - r2 * s2[3]) / (c2 - n2 - r2 * h2 + r2 * l2);\n }\n static getLesserNonNegativeNonNull(e2, t2) {\n return null !== t2 && t2 >= 0 && t2 < e2 ? t2 : e2;\n }\n }\n class Di {\n constructor(e2) {\n this._globe = e2, this._mercatorCameraHelper = new Yt(), this._verticalPerspectiveCameraHelper = new zi();\n }\n get useGlobeControls() {\n return this._globe.useGlobeRendering;\n }\n get currentHelper() {\n return this.useGlobeControls ? this._verticalPerspectiveCameraHelper : this._mercatorCameraHelper;\n }\n handlePanInertia(e2, t2) {\n return this.currentHelper.handlePanInertia(e2, t2);\n }\n handleMapControlsRollPitchBearingZoom(e2, t2) {\n return this.currentHelper.handleMapControlsRollPitchBearingZoom(e2, t2);\n }\n handleMapControlsPan(e2, t2, i2) {\n this.currentHelper.handleMapControlsPan(e2, t2, i2);\n }\n cameraForBoxAndBearing(e2, t2, i2, a2, r2) {\n return this.currentHelper.cameraForBoxAndBearing(e2, t2, i2, a2, r2);\n }\n handleJumpToCenterZoom(e2, t2) {\n this.currentHelper.handleJumpToCenterZoom(e2, t2);\n }\n handleEaseTo(e2, t2) {\n return this.currentHelper.handleEaseTo(e2, t2);\n }\n handleFlyTo(e2, t2) {\n return this.currentHelper.handleFlyTo(e2, t2);\n }\n }\n const Ai = (e2, i2) => t.B(e2, i2 && i2.filter(((e3) => \"source.canvas\" !== e3.identifier))), Li = t.bP();\n class ki extends t.E {\n constructor(e2, i2 = {}) {\n var a2, r2;\n super(), this._rtlPluginLoaded = () => {\n for (const e3 in this.tileManagers) {\n const t2 = this.tileManagers[e3].getSource().type;\n \"vector\" !== t2 && \"geojson\" !== t2 || this.tileManagers[e3].reload();\n }\n }, this.map = e2, this.dispatcher = new N(j(), e2._getMapId()), this.dispatcher.registerMessageHandler(\"GG\", ((e3, t2) => this.getGlyphs(e3, t2))), this.dispatcher.registerMessageHandler(\"GI\", ((e3, t2) => this.getImages(e3, t2))), this.dispatcher.registerMessageHandler(\"GDA\", ((e3, t2) => this.getDashes(e3, t2))), this.imageManager = new w(), this.imageManager.setEventedParent(this);\n const o2 = (null === (a2 = e2._container) || void 0 === a2 ? void 0 : a2.lang) || \"undefined\" != typeof document && (null === (r2 = document.documentElement) || void 0 === r2 ? void 0 : r2.lang) || void 0;\n this.glyphManager = new M(e2._requestManager, i2.localIdeographFontFamily, o2), this.lineAtlas = new A(256, 512), this.crossTileSymbolIndex = new zt(), this._setInitialValues(), this._resetUpdates(), this.dispatcher.broadcast(\"SR\", t.bQ()), ce().on(se, this._rtlPluginLoaded), this.on(\"data\", ((e3) => {\n if (\"source\" !== e3.dataType || \"metadata\" !== e3.sourceDataType) return;\n const t2 = this.tileManagers[e3.sourceId];\n if (!t2) return;\n const i3 = t2.getSource();\n if (i3 && i3.vectorLayerIds) for (const e4 in this._layers) {\n const t3 = this._layers[e4];\n t3.source === i3.id && this._validateLayer(t3);\n }\n }));\n }\n _setInitialValues() {\n var e2;\n this._spritesImagesIds = {}, this._layers = {}, this._order = [], this.tileManagers = {}, this.zoomHistory = new t.bR(), this._availableImages = [], this._globalState = {}, this._serializedLayers = {}, this.stylesheet = null, this.light = null, this.sky = null, this.projection && (this.projection.destroy(), delete this.projection), this._loaded = false, this._changed = false, this._updatedLayers = {}, this._updatedSources = {}, this._changedImages = {}, this._glyphsDidChange = false, this._updatedPaintProps = {}, this._layerOrderChanged = false, this.crossTileSymbolIndex = new ((null === (e2 = this.crossTileSymbolIndex) || void 0 === e2 ? void 0 : e2.constructor) || Object)(), this.pauseablePlacement = void 0, this.placement = void 0, this.z = 0;\n }\n setGlobalStateProperty(e2, i2) {\n var a2, r2, o2;\n this._checkLoaded();\n const s2 = null === i2 ? null !== (o2 = null === (r2 = null === (a2 = this.stylesheet.state) || void 0 === a2 ? void 0 : a2[e2]) || void 0 === r2 ? void 0 : r2.default) && void 0 !== o2 ? o2 : null : i2;\n if (t.bS(s2, this._globalState[e2])) return this;\n this._globalState[e2] = s2, this._applyGlobalStateChanges([e2]);\n }\n getGlobalState() {\n return this._globalState;\n }\n setGlobalState(e2) {\n this._checkLoaded();\n const i2 = [];\n for (const a2 in e2) !t.bS(this._globalState[a2], e2[a2].default) && (i2.push(a2), this._globalState[a2] = e2[a2].default);\n this._applyGlobalStateChanges(i2);\n }\n _applyGlobalStateChanges(e2) {\n if (0 === e2.length) return;\n const t2 = /* @__PURE__ */ new Set(), i2 = {};\n for (const a2 of e2) {\n i2[a2] = this._globalState[a2];\n for (const e3 in this._layers) {\n const i3 = this._layers[e3], r2 = i3.getLayoutAffectingGlobalStateRefs(), o2 = i3.getPaintAffectingGlobalStateRefs();\n if (r2.has(a2) && t2.add(i3.source), o2.has(a2)) for (const { name: e4, value: t3 } of o2.get(a2)) this._updatePaintProperty(i3, e4, t3);\n }\n }\n this.dispatcher.broadcast(\"UGS\", i2);\n for (const e3 in this.tileManagers) t2.has(e3) && (this._reloadSource(e3), this._changed = true);\n }\n loadURL(e2, i2 = {}, a2) {\n this.fire(new t.l(\"dataloading\", { dataType: \"style\" })), i2.validate = \"boolean\" != typeof i2.validate || i2.validate;\n const r2 = this.map._requestManager.transformRequest(e2, \"Style\");\n this._loadStyleRequest = new AbortController();\n const o2 = this._loadStyleRequest;\n t.j(r2, this._loadStyleRequest).then(((e3) => {\n this._loadStyleRequest = null, this._load(e3.data, i2, a2);\n })).catch(((e3) => {\n this._loadStyleRequest = null, e3 && !o2.signal.aborted && this.fire(new t.k(e3));\n }));\n }\n loadJSON(e2, i2 = {}, a2) {\n this.fire(new t.l(\"dataloading\", { dataType: \"style\" })), this._frameRequest = new AbortController(), n.frameAsync(this._frameRequest).then((() => {\n this._frameRequest = null, i2.validate = false !== i2.validate, this._load(e2, i2, a2);\n })).catch((() => {\n }));\n }\n loadEmpty() {\n this.fire(new t.l(\"dataloading\", { dataType: \"style\" })), this._load(Li, { validate: false });\n }\n _load(e2, i2, a2) {\n var r2, o2;\n let s2 = i2.transformStyle ? i2.transformStyle(a2, e2) : e2;\n if (!i2.validate || !Ai(this, t.C(s2))) {\n s2 = Object.assign({}, s2), this._loaded = true, this.stylesheet = s2;\n for (const e3 in s2.sources) this.addSource(e3, s2.sources[e3], { validate: false });\n s2.sprite ? this._loadSprite(s2.sprite) : this.imageManager.setLoaded(true), this.glyphManager.setURL(s2.glyphs), this._createLayers(), this.light = new R(this.stylesheet.light), this._setProjectionInternal((null === (r2 = this.stylesheet.projection) || void 0 === r2 ? void 0 : r2.type) || \"mercator\"), this.sky = new D(this.stylesheet.sky), this.map.setTerrain(null !== (o2 = this.stylesheet.terrain) && void 0 !== o2 ? o2 : null), this.fire(new t.l(\"data\", { dataType: \"style\" })), this.fire(new t.l(\"style.load\"));\n }\n }\n _createLayers() {\n var e2, i2, a2;\n const r2 = t.bT(this.stylesheet.layers);\n this.setGlobalState(null !== (e2 = this.stylesheet.state) && void 0 !== e2 ? e2 : null), this.dispatcher.broadcast(\"SL\", r2), this._order = r2.map(((e3) => e3.id)), this._layers = {}, this._serializedLayers = null;\n for (const e3 of r2) {\n const r3 = t.bU(e3, this._globalState);\n if (r3.setEventedParent(this, { layer: { id: e3.id } }), this._layers[e3.id] = r3, t.bV(r3) && this.tileManagers[r3.source]) {\n const t2 = null !== (a2 = null === (i2 = e3.paint) || void 0 === i2 ? void 0 : i2[\"raster-fade-duration\"]) && void 0 !== a2 ? a2 : r3.paint.get(\"raster-fade-duration\");\n this.tileManagers[r3.source].setRasterFadeDuration(t2);\n }\n }\n }\n _loadSprite(e2, i2 = false, a2 = void 0) {\n this.imageManager.setLoaded(false);\n const r2 = new AbortController();\n let o2;\n this._spriteRequest = r2, (function(e3, i3, a3, r3) {\n return t._(this, void 0, void 0, (function* () {\n const o3 = x(e3), s2 = a3 > 1 ? \"@2x\" : \"\", l2 = {}, c2 = {};\n for (const { id: e4, url: a4 } of o3) {\n const o4 = i3.transformRequest(b(a4, s2, \".json\"), \"SpriteJSON\");\n l2[e4] = t.j(o4, r3);\n const n2 = i3.transformRequest(b(a4, s2, \".png\"), \"SpriteImage\");\n c2[e4] = g.getImage(n2, r3);\n }\n return yield Promise.all([...Object.values(l2), ...Object.values(c2)]), (function(e4, i4) {\n return t._(this, void 0, void 0, (function* () {\n const t2 = {};\n for (const a4 in e4) {\n t2[a4] = {};\n const r4 = n.getImageCanvasContext((yield i4[a4]).data), o4 = (yield e4[a4]).data;\n for (const e5 in o4) {\n const { width: i5, height: s3, x: n2, y: l3, sdf: c3, pixelRatio: h2, stretchX: u2, stretchY: d2, content: _2, textFitWidth: p2, textFitHeight: m2 } = o4[e5];\n t2[a4][e5] = { data: null, pixelRatio: h2, sdf: c3, stretchX: u2, stretchY: d2, content: _2, textFitWidth: p2, textFitHeight: m2, spriteData: { width: i5, height: s3, x: n2, y: l3, context: r4 } };\n }\n }\n return t2;\n }));\n })(l2, c2);\n }));\n })(e2, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then(((e3) => {\n if (this._spriteRequest = null, e3) for (const t2 in e3) {\n this._spritesImagesIds[t2] = [];\n const a3 = this._spritesImagesIds[t2] ? this._spritesImagesIds[t2].filter(((t3) => !(t3 in e3))) : [];\n for (const e4 of a3) this.imageManager.removeImage(e4), this._changedImages[e4] = true;\n for (const a4 in e3[t2]) {\n const r3 = \"default\" === t2 ? a4 : `${t2}:${a4}`;\n this._spritesImagesIds[t2].push(r3), r3 in this.imageManager.images ? this.imageManager.updateImage(r3, e3[t2][a4], false) : this.imageManager.addImage(r3, e3[t2][a4]), i2 && (this._changedImages[r3] = true);\n }\n }\n })).catch(((e3) => {\n this._spriteRequest = null, o2 = e3, r2.signal.aborted || this.fire(new t.k(o2));\n })).finally((() => {\n this.imageManager.setLoaded(true), this._availableImages = this.imageManager.listImages(), i2 && (this._changed = true), this.dispatcher.broadcast(\"SI\", this._availableImages), this.fire(new t.l(\"data\", { dataType: \"style\" })), a2 && a2(o2);\n }));\n }\n _unloadSprite() {\n for (const e2 of Object.values(this._spritesImagesIds).flat()) this.imageManager.removeImage(e2), this._changedImages[e2] = true;\n this._spritesImagesIds = {}, this._availableImages = this.imageManager.listImages(), this._changed = true, this.dispatcher.broadcast(\"SI\", this._availableImages), this.fire(new t.l(\"data\", { dataType: \"style\" }));\n }\n _validateLayer(e2) {\n const i2 = this.tileManagers[e2.source];\n if (!i2) return;\n const a2 = e2.sourceLayer;\n if (!a2) return;\n const r2 = i2.getSource();\n (\"geojson\" === r2.type || r2.vectorLayerIds && -1 === r2.vectorLayerIds.indexOf(a2)) && this.fire(new t.k(new Error(`Source layer \"${a2}\" does not exist on source \"${r2.id}\" as specified by style layer \"${e2.id}\".`)));\n }\n loaded() {\n if (!this._loaded) return false;\n if (Object.keys(this._updatedSources).length) return false;\n for (const e2 in this.tileManagers) if (!this.tileManagers[e2].loaded()) return false;\n return !!this.imageManager.isLoaded();\n }\n _serializeByIds(e2, i2 = false) {\n const a2 = this._serializedAllLayers();\n if (!e2 || 0 === e2.length) return Object.values(i2 ? t.bW(a2) : a2);\n const r2 = [];\n for (const o2 of e2) if (a2[o2]) {\n const e3 = i2 ? t.bW(a2[o2]) : a2[o2];\n r2.push(e3);\n }\n return r2;\n }\n _serializedAllLayers() {\n let e2 = this._serializedLayers;\n if (e2) return e2;\n e2 = this._serializedLayers = {};\n const t2 = Object.keys(this._layers);\n for (const i2 of t2) {\n const t3 = this._layers[i2];\n \"custom\" !== t3.type && (e2[i2] = t3.serialize());\n }\n return e2;\n }\n hasTransitions() {\n var e2, t2, i2;\n if (null === (e2 = this.light) || void 0 === e2 ? void 0 : e2.hasTransition()) return true;\n if (null === (t2 = this.sky) || void 0 === t2 ? void 0 : t2.hasTransition()) return true;\n if (null === (i2 = this.projection) || void 0 === i2 ? void 0 : i2.hasTransition()) return true;\n for (const e3 in this.tileManagers) if (this.tileManagers[e3].hasTransition()) return true;\n for (const e3 in this._layers) if (this._layers[e3].hasTransition()) return true;\n return false;\n }\n _checkLoaded() {\n if (!this._loaded) throw new Error(\"Style is not done loading.\");\n }\n update(e2) {\n if (!this._loaded) return;\n const i2 = this._changed;\n if (i2) {\n const t2 = Object.keys(this._updatedLayers), i3 = Object.keys(this._removedLayers);\n (t2.length || i3.length) && this._updateWorkerLayers(t2, i3);\n for (const e3 in this._updatedSources) {\n const t3 = this._updatedSources[e3];\n if (\"reload\" === t3) this._reloadSource(e3);\n else {\n if (\"clear\" !== t3) throw new Error(`Invalid action ${t3}`);\n this._clearSource(e3);\n }\n }\n this._updateTilesForChangedImages(), this._updateTilesForChangedGlyphs();\n for (const t3 in this._updatedPaintProps) this._layers[t3].updateTransitions(e2);\n this.light.updateTransitions(e2), this.sky.updateTransitions(e2), this._resetUpdates();\n }\n const a2 = {};\n for (const e3 in this.tileManagers) {\n const t2 = this.tileManagers[e3];\n a2[e3] = t2.used, t2.used = false;\n }\n for (const t2 of this._order) {\n const i3 = this._layers[t2];\n i3.recalculate(e2, this._availableImages), !i3.isHidden(e2.zoom) && i3.source && (this.tileManagers[i3.source].used = true);\n }\n for (const e3 in a2) {\n const i3 = this.tileManagers[e3];\n !!a2[e3] != !!i3.used && i3.fire(new t.l(\"data\", { sourceDataType: \"visibility\", dataType: \"source\", sourceId: e3 }));\n }\n this.light.recalculate(e2), this.sky.recalculate(e2), this.projection.recalculate(e2), this.z = e2.zoom, i2 && this.fire(new t.l(\"data\", { dataType: \"style\" }));\n }\n _updateTilesForChangedImages() {\n const e2 = Object.keys(this._changedImages);\n if (e2.length) {\n for (const t2 in this.tileManagers) this.tileManagers[t2].reloadTilesForDependencies([\"icons\", \"patterns\"], e2);\n this._changedImages = {};\n }\n }\n _updateTilesForChangedGlyphs() {\n if (this._glyphsDidChange) {\n for (const e2 in this.tileManagers) this.tileManagers[e2].reloadTilesForDependencies([\"glyphs\"], [\"\"]);\n this._glyphsDidChange = false;\n }\n }\n _updateWorkerLayers(e2, t2) {\n this.dispatcher.broadcast(\"UL\", { layers: this._serializeByIds(e2, false), removedIds: t2 });\n }\n _resetUpdates() {\n this._changed = false, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {}, this._glyphsDidChange = false;\n }\n setState(e2, i2 = {}) {\n var a2;\n this._checkLoaded();\n const r2 = this.serialize();\n if (e2 = i2.transformStyle ? i2.transformStyle(r2, e2) : e2, (null === (a2 = i2.validate) || void 0 === a2 || a2) && Ai(this, t.C(e2))) return false;\n (e2 = t.bW(e2)).layers = t.bT(e2.layers);\n const o2 = t.bX(r2, e2), s2 = this._getOperationsToPerform(o2);\n if (s2.unimplemented.length > 0) throw new Error(`Unimplemented: ${s2.unimplemented.join(\", \")}.`);\n if (0 === s2.operations.length) return false;\n for (const e3 of s2.operations) e3();\n return this.stylesheet = e2, this._serializedLayers = null, true;\n }\n _getOperationsToPerform(e2) {\n const t2 = [], i2 = [];\n for (const a2 of e2) switch (a2.command) {\n case \"setCenter\":\n case \"setZoom\":\n case \"setBearing\":\n case \"setPitch\":\n case \"setRoll\":\n continue;\n case \"addLayer\":\n t2.push((() => this.addLayer.apply(this, a2.args)));\n break;\n case \"removeLayer\":\n t2.push((() => this.removeLayer.apply(this, a2.args)));\n break;\n case \"setPaintProperty\":\n t2.push((() => this.setPaintProperty.apply(this, a2.args)));\n break;\n case \"setLayoutProperty\":\n t2.push((() => this.setLayoutProperty.apply(this, a2.args)));\n break;\n case \"setFilter\":\n t2.push((() => this.setFilter.apply(this, a2.args)));\n break;\n case \"addSource\":\n t2.push((() => this.addSource.apply(this, a2.args)));\n break;\n case \"removeSource\":\n t2.push((() => this.removeSource.apply(this, a2.args)));\n break;\n case \"setLayerZoomRange\":\n t2.push((() => this.setLayerZoomRange.apply(this, a2.args)));\n break;\n case \"setLight\":\n t2.push((() => this.setLight.apply(this, a2.args)));\n break;\n case \"setGeoJSONSourceData\":\n t2.push((() => this.setGeoJSONSourceData.apply(this, a2.args)));\n break;\n case \"setGlyphs\":\n t2.push((() => this.setGlyphs.apply(this, a2.args)));\n break;\n case \"setSprite\":\n t2.push((() => this.setSprite.apply(this, a2.args)));\n break;\n case \"setTerrain\":\n t2.push((() => this.map.setTerrain.apply(this, a2.args)));\n break;\n case \"setSky\":\n t2.push((() => this.setSky.apply(this, a2.args)));\n break;\n case \"setProjection\":\n this.setProjection.apply(this, a2.args);\n break;\n case \"setGlobalState\":\n t2.push((() => this.setGlobalState.apply(this, a2.args)));\n break;\n case \"setTransition\":\n t2.push((() => {\n }));\n break;\n default:\n i2.push(a2.command);\n }\n return { operations: t2, unimplemented: i2 };\n }\n addImage(e2, i2) {\n if (this.getImage(e2)) return this.fire(new t.k(new Error(`An image named \"${e2}\" already exists.`)));\n this.imageManager.addImage(e2, i2), this._afterImageUpdated(e2);\n }\n updateImage(e2, t2) {\n this.imageManager.updateImage(e2, t2);\n }\n getImage(e2) {\n return this.imageManager.getImage(e2);\n }\n removeImage(e2) {\n if (!this.getImage(e2)) return this.fire(new t.k(new Error(`An image named \"${e2}\" does not exist.`)));\n this.imageManager.removeImage(e2), this._afterImageUpdated(e2);\n }\n _afterImageUpdated(e2) {\n this._availableImages = this.imageManager.listImages(), this._changedImages[e2] = true, this._changed = true, this.dispatcher.broadcast(\"SI\", this._availableImages), this.fire(new t.l(\"data\", { dataType: \"style\" }));\n }\n listImages() {\n return this._checkLoaded(), this.imageManager.listImages();\n }\n addSource(e2, i2, a2 = {}) {\n if (this._checkLoaded(), void 0 !== this.tileManagers[e2]) throw new Error(`Source \"${e2}\" already exists.`);\n if (!i2.type) throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i2).join(\", \")}.`);\n if ([\"vector\", \"raster\", \"geojson\", \"video\", \"image\"].indexOf(i2.type) >= 0 && this._validate(t.C.source, `sources.${e2}`, i2, null, a2)) return;\n this.map && this.map._collectResourceTiming && (i2.collectResourceTiming = true);\n const r2 = this.tileManagers[e2] = new ke(e2, i2, this.dispatcher);\n r2.style = this, r2.setEventedParent(this, (() => ({ isSourceLoaded: r2.loaded(), source: r2.serialize(), sourceId: e2 }))), r2.onAdd(this.map), this._changed = true;\n }\n removeSource(e2) {\n if (this._checkLoaded(), void 0 === this.tileManagers[e2]) throw new Error(\"There is no source with this ID\");\n for (const i3 in this._layers) if (this._layers[i3].source === e2) return this.fire(new t.k(new Error(`Source \"${e2}\" cannot be removed while layer \"${i3}\" is using it.`)));\n const i2 = this.tileManagers[e2];\n delete this.tileManagers[e2], delete this._updatedSources[e2], i2.fire(new t.l(\"data\", { sourceDataType: \"metadata\", dataType: \"source\", sourceId: e2 })), i2.setEventedParent(null), i2.onRemove(this.map), this._changed = true;\n }\n setGeoJSONSourceData(e2, t2) {\n if (this._checkLoaded(), void 0 === this.tileManagers[e2]) throw new Error(`There is no source with this ID=${e2}`);\n const i2 = this.tileManagers[e2].getSource();\n if (\"geojson\" !== i2.type) throw new Error(`geojsonSource.type is ${i2.type}, which is !== 'geojson`);\n i2.setData(t2), this._changed = true;\n }\n getSource(e2) {\n return this.tileManagers[e2] && this.tileManagers[e2].getSource();\n }\n addLayer(e2, i2, a2 = {}) {\n this._checkLoaded();\n const r2 = e2.id;\n if (this.getLayer(r2)) return void this.fire(new t.k(new Error(`Layer \"${r2}\" already exists on this map.`)));\n let o2;\n if (\"custom\" === e2.type) {\n if (Ai(this, t.bY(e2))) return;\n o2 = t.bU(e2, this._globalState);\n } else {\n if (\"source\" in e2 && \"object\" == typeof e2.source && (this.addSource(r2, e2.source), e2 = t.bW(e2), e2 = t.e(e2, { source: r2 })), this._validate(t.C.layer, `layers.${r2}`, e2, { arrayIndex: -1 }, a2)) return;\n o2 = t.bU(e2, this._globalState), this._validateLayer(o2), o2.setEventedParent(this, { layer: { id: r2 } });\n }\n const s2 = i2 ? this._order.indexOf(i2) : this._order.length;\n if (i2 && -1 === s2) this.fire(new t.k(new Error(`Cannot add layer \"${r2}\" before non-existing layer \"${i2}\".`)));\n else {\n if (this._order.splice(s2, 0, r2), this._layerOrderChanged = true, this._layers[r2] = o2, this._removedLayers[r2] && o2.source && \"custom\" !== o2.type) {\n const e3 = this._removedLayers[r2];\n delete this._removedLayers[r2], e3.type !== o2.type ? this._updatedSources[o2.source] = \"clear\" : (this._updatedSources[o2.source] = \"reload\", this.tileManagers[o2.source].pause());\n }\n this._updateLayer(o2), o2.onAdd && o2.onAdd(this.map);\n }\n }\n moveLayer(e2, i2) {\n if (this._checkLoaded(), this._changed = true, !this._layers[e2]) return void this.fire(new t.k(new Error(`The layer '${e2}' does not exist in the map's style and cannot be moved.`)));\n if (e2 === i2) return;\n const a2 = this._order.indexOf(e2);\n this._order.splice(a2, 1);\n const r2 = i2 ? this._order.indexOf(i2) : this._order.length;\n i2 && -1 === r2 ? this.fire(new t.k(new Error(`Cannot move layer \"${e2}\" before non-existing layer \"${i2}\".`))) : (this._order.splice(r2, 0, e2), this._layerOrderChanged = true);\n }\n removeLayer(e2) {\n this._checkLoaded();\n const i2 = this._layers[e2];\n if (!i2) return void this.fire(new t.k(new Error(`Cannot remove non-existing layer \"${e2}\".`)));\n i2.setEventedParent(null);\n const a2 = this._order.indexOf(e2);\n this._order.splice(a2, 1), this._layerOrderChanged = true, this._changed = true, this._removedLayers[e2] = i2, delete this._layers[e2], this._serializedLayers && delete this._serializedLayers[e2], delete this._updatedLayers[e2], delete this._updatedPaintProps[e2], i2.onRemove && i2.onRemove(this.map);\n }\n getLayer(e2) {\n return this._layers[e2];\n }\n getLayersOrder() {\n return [...this._order];\n }\n hasLayer(e2) {\n return e2 in this._layers;\n }\n setLayerZoomRange(e2, i2, a2) {\n this._checkLoaded();\n const r2 = this.getLayer(e2);\n r2 ? r2.minzoom === i2 && r2.maxzoom === a2 || (null != i2 && (r2.minzoom = i2), null != a2 && (r2.maxzoom = a2), this._updateLayer(r2)) : this.fire(new t.k(new Error(`Cannot set the zoom range of non-existing layer \"${e2}\".`)));\n }\n setFilter(e2, i2, a2 = {}) {\n this._checkLoaded();\n const r2 = this.getLayer(e2);\n if (r2) {\n if (!t.bS(r2.filter, i2)) return null == i2 ? (r2.setFilter(void 0), void this._updateLayer(r2)) : void (this._validate(t.C.filter, `layers.${r2.id}.filter`, i2, null, a2) || (r2.setFilter(t.bW(i2)), this._updateLayer(r2)));\n } else this.fire(new t.k(new Error(`Cannot filter non-existing layer \"${e2}\".`)));\n }\n getFilter(e2) {\n return t.bW(this.getLayer(e2).filter);\n }\n setLayoutProperty(e2, i2, a2, r2 = {}) {\n this._checkLoaded();\n const o2 = this.getLayer(e2);\n o2 ? t.bS(o2.getLayoutProperty(i2), a2) || (o2.setLayoutProperty(i2, a2, r2), this._updateLayer(o2)) : this.fire(new t.k(new Error(`Cannot style non-existing layer \"${e2}\".`)));\n }\n getLayoutProperty(e2, i2) {\n const a2 = this.getLayer(e2);\n if (a2) return a2.getLayoutProperty(i2);\n this.fire(new t.k(new Error(`Cannot get style of non-existing layer \"${e2}\".`)));\n }\n setPaintProperty(e2, i2, a2, r2 = {}) {\n this._checkLoaded();\n const o2 = this.getLayer(e2);\n o2 ? t.bS(o2.getPaintProperty(i2), a2) || this._updatePaintProperty(o2, i2, a2, r2) : this.fire(new t.k(new Error(`Cannot style non-existing layer \"${e2}\".`)));\n }\n _updatePaintProperty(e2, i2, a2, r2 = {}) {\n e2.setPaintProperty(i2, a2, r2) && this._updateLayer(e2), t.bV(e2) && \"raster-fade-duration\" === i2 && this.tileManagers[e2.source].setRasterFadeDuration(a2), this._changed = true, this._updatedPaintProps[e2.id] = true, this._serializedLayers = null;\n }\n getPaintProperty(e2, t2) {\n return this.getLayer(e2).getPaintProperty(t2);\n }\n setFeatureState(e2, i2) {\n this._checkLoaded();\n const a2 = e2.source, r2 = e2.sourceLayer, o2 = this.tileManagers[a2];\n if (void 0 === o2) return void this.fire(new t.k(new Error(`The source '${a2}' does not exist in the map's style.`)));\n const s2 = o2.getSource().type;\n \"geojson\" === s2 && r2 ? this.fire(new t.k(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))) : \"vector\" !== s2 || r2 ? (void 0 === e2.id && this.fire(new t.k(new Error(\"The feature id parameter must be provided.\"))), o2.setFeatureState(r2, e2.id, i2)) : this.fire(new t.k(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));\n }\n removeFeatureState(e2, i2) {\n this._checkLoaded();\n const a2 = e2.source, r2 = this.tileManagers[a2];\n if (void 0 === r2) return void this.fire(new t.k(new Error(`The source '${a2}' does not exist in the map's style.`)));\n const o2 = r2.getSource().type, s2 = \"vector\" === o2 ? e2.sourceLayer : void 0;\n \"vector\" !== o2 || s2 ? i2 && \"string\" != typeof e2.id && \"number\" != typeof e2.id ? this.fire(new t.k(new Error(\"A feature id is required to remove its specific state property.\"))) : r2.removeFeatureState(s2, e2.id, i2) : this.fire(new t.k(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));\n }\n getFeatureState(e2) {\n this._checkLoaded();\n const i2 = e2.source, a2 = e2.sourceLayer, r2 = this.tileManagers[i2];\n if (void 0 !== r2) return \"vector\" !== r2.getSource().type || a2 ? (void 0 === e2.id && this.fire(new t.k(new Error(\"The feature id parameter must be provided.\"))), r2.getFeatureState(a2, e2.id)) : void this.fire(new t.k(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));\n this.fire(new t.k(new Error(`The source '${i2}' does not exist in the map's style.`)));\n }\n getTransition() {\n return t.e({ duration: 300, delay: 0 }, this.stylesheet && this.stylesheet.transition);\n }\n serialize() {\n if (!this._loaded) return;\n const e2 = t.bZ(this.tileManagers, ((e3) => e3.serialize())), i2 = this._serializeByIds(this._order, true), a2 = this.map.getTerrain() || void 0, r2 = this.stylesheet;\n return t.b_({ version: r2.version, name: r2.name, metadata: r2.metadata, light: r2.light, sky: r2.sky, center: r2.center, zoom: r2.zoom, bearing: r2.bearing, pitch: r2.pitch, sprite: r2.sprite, glyphs: r2.glyphs, transition: r2.transition, projection: r2.projection, sources: e2, layers: i2, terrain: a2 }, ((e3) => void 0 !== e3));\n }\n _updateLayer(e2) {\n this._updatedLayers[e2.id] = true, e2.source && !this._updatedSources[e2.source] && \"raster\" !== this.tileManagers[e2.source].getSource().type && (this._updatedSources[e2.source] = \"reload\", this.tileManagers[e2.source].pause()), this._serializedLayers = null, this._changed = true;\n }\n _flattenAndSortRenderedFeatures(e2) {\n const t2 = (e3) => \"fill-extrusion\" === this._layers[e3].type, i2 = {}, a2 = [];\n for (let r3 = this._order.length - 1; r3 >= 0; r3--) {\n const o2 = this._order[r3];\n if (t2(o2)) {\n i2[o2] = r3;\n for (const t3 of e2) {\n const e3 = t3[o2];\n if (e3) for (const t4 of e3) a2.push(t4);\n }\n }\n }\n a2.sort(((e3, t3) => t3.intersectionZ - e3.intersectionZ));\n const r2 = [];\n for (let o2 = this._order.length - 1; o2 >= 0; o2--) {\n const s2 = this._order[o2];\n if (t2(s2)) for (let e3 = a2.length - 1; e3 >= 0; e3--) {\n const t3 = a2[e3].feature;\n if (i2[t3.layer.id] < o2) break;\n r2.push(t3), a2.pop();\n }\n else for (const t3 of e2) {\n const e3 = t3[s2];\n if (e3) for (const t4 of e3) r2.push(t4.feature);\n }\n }\n return r2;\n }\n queryRenderedFeatures(e2, i2, a2) {\n i2 && i2.filter && this._validate(t.C.filter, \"queryRenderedFeatures.filter\", i2.filter, null, i2);\n const r2 = {};\n if (i2 && i2.layers) {\n if (!(Array.isArray(i2.layers) || i2.layers instanceof Set)) return this.fire(new t.k(new Error(\"parameters.layers must be an Array or a Set of strings\"))), [];\n for (const e3 of i2.layers) {\n const i3 = this._layers[e3];\n if (!i3) return this.fire(new t.k(new Error(`The layer '${e3}' does not exist in the map's style and cannot be queried for features.`))), [];\n r2[i3.source] = true;\n }\n }\n const o2 = [];\n i2.availableImages = this._availableImages;\n const s2 = this._serializedAllLayers(), n2 = i2.layers instanceof Set ? i2.layers : Array.isArray(i2.layers) ? new Set(i2.layers) : null, l2 = Object.assign(Object.assign({}, i2), { layers: n2, globalState: this._globalState });\n for (const t2 in this.tileManagers) i2.layers && !r2[t2] || o2.push(U(this.tileManagers[t2], this._layers, s2, e2, l2, a2, this.map.terrain ? (e3, t3, i3) => this.map.terrain.getElevation(e3, t3, i3) : void 0));\n return this.placement && o2.push((function(e3, t2, i3, a3, r3, o3, s3) {\n const n3 = {}, l3 = o3.queryRenderedSymbols(a3), c2 = [];\n for (const e4 of Object.keys(l3).map(Number)) c2.push(s3[e4]);\n c2.sort(V);\n for (const i4 of c2) {\n const a4 = i4.featureIndex.lookupSymbolFeatures(l3[i4.bucketInstanceId], t2, i4.bucketIndex, i4.sourceLayerIndex, { filterSpec: r3.filter, globalState: r3.globalState }, r3.layers, r3.availableImages, e3);\n for (const e4 in a4) {\n const t3 = n3[e4] = n3[e4] || [], r4 = a4[e4];\n r4.sort(((e5, t4) => {\n const a5 = i4.featureSortOrder;\n if (a5) {\n const i5 = a5.indexOf(e5.featureIndex);\n return a5.indexOf(t4.featureIndex) - i5;\n }\n return t4.featureIndex - e5.featureIndex;\n }));\n for (const e5 of r4) t3.push(e5);\n }\n }\n return (function(e4, t3, i4) {\n for (const a4 in e4) for (const r4 of e4[a4]) q(r4, i4[t3[a4].source]);\n return e4;\n })(n3, e3, i3);\n })(this._layers, s2, this.tileManagers, e2, l2, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(o2);\n }\n querySourceFeatures(e2, i2) {\n (null == i2 ? void 0 : i2.filter) && this._validate(t.C.filter, \"querySourceFeatures.filter\", i2.filter, null, i2);\n const a2 = this.tileManagers[e2];\n return a2 ? (function(e3, t2) {\n const i3 = e3.getRenderableIds().map(((t3) => e3.getTileByID(t3))), a3 = [], r2 = {};\n for (let e4 = 0; e4 < i3.length; e4++) {\n const o2 = i3[e4], s2 = o2.tileID.canonical.key;\n r2[s2] || (r2[s2] = true, o2.querySourceFeatures(a3, t2));\n }\n return a3;\n })(a2, i2 ? Object.assign(Object.assign({}, i2), { globalState: this._globalState }) : { globalState: this._globalState }) : [];\n }\n getLight() {\n return this.light.getLight();\n }\n setLight(e2, i2 = {}) {\n this._checkLoaded();\n const a2 = this.light.getLight();\n let r2 = false;\n for (const i3 in e2) if (!t.bS(e2[i3], a2[i3])) {\n r2 = true;\n break;\n }\n if (!r2) return;\n const o2 = { now: c(), transition: t.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };\n this.light.setLight(e2, i2), this.light.updateTransitions(o2);\n }\n getProjection() {\n var e2;\n return null === (e2 = this.stylesheet) || void 0 === e2 ? void 0 : e2.projection;\n }\n setProjection(e2) {\n if (this._checkLoaded(), this.projection) {\n if (this.projection.name === e2.type) return;\n this.projection.destroy(), delete this.projection;\n }\n this.stylesheet.projection = e2, this._setProjectionInternal(e2.type);\n }\n getSky() {\n var e2;\n return null === (e2 = this.stylesheet) || void 0 === e2 ? void 0 : e2.sky;\n }\n setSky(e2, i2 = {}) {\n this._checkLoaded();\n const a2 = this.getSky();\n let r2 = false;\n if (!e2 && !a2) return;\n if (e2 && !a2) r2 = true;\n else if (!e2 && a2) r2 = true;\n else for (const i3 in e2) if (!t.bS(e2[i3], a2[i3])) {\n r2 = true;\n break;\n }\n if (!r2) return;\n const o2 = { now: c(), transition: t.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };\n this.stylesheet.sky = e2, this.sky.setSky(e2, i2), this.sky.updateTransitions(o2);\n }\n _setProjectionInternal(e2) {\n const i2 = (function(e3, i3) {\n const a2 = { constrainOverride: i3 };\n if (Array.isArray(e3)) {\n const t2 = new di({ type: e3 });\n return { projection: t2, transform: new Ri(a2), cameraHelper: new Di(t2) };\n }\n switch (e3) {\n case \"mercator\":\n return { projection: new jt(), transform: new $t(a2), cameraHelper: new Yt() };\n case \"globe\": {\n const e4 = new di({ type: [\"interpolate\", [\"linear\"], [\"zoom\"], 11, \"vertical-perspective\", 12, \"mercator\"] });\n return { projection: e4, transform: new Ri(a2), cameraHelper: new Di(e4) };\n }\n case \"vertical-perspective\":\n return { projection: new hi(), transform: new Si(a2), cameraHelper: new zi() };\n default:\n return t.w(`Unknown projection name: ${e3}. Falling back to mercator projection.`), { projection: new jt(), transform: new $t(a2), cameraHelper: new Yt() };\n }\n })(e2, this.map.transformConstrain);\n this.projection = i2.projection, this.map.migrateProjection(i2.transform, i2.cameraHelper);\n for (const e3 in this.tileManagers) this.tileManagers[e3].reload();\n }\n _validate(e2, i2, a2, r2, o2 = {}) {\n return (!o2 || false !== o2.validate) && Ai(this, e2.call(t.C, t.e({ key: i2, style: this.serialize(), value: a2, styleSpec: t.u }, r2)));\n }\n _remove(e2 = true) {\n this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._loadStyleRequest && (this._loadStyleRequest.abort(), this._loadStyleRequest = null), this._spriteRequest && (this._spriteRequest.abort(), this._spriteRequest = null), ce().off(se, this._rtlPluginLoaded);\n for (const e3 in this._layers) this._layers[e3].setEventedParent(null);\n for (const e3 in this.tileManagers) {\n const t2 = this.tileManagers[e3];\n t2.setEventedParent(null), t2.onRemove(this.map);\n }\n this.imageManager.setEventedParent(null), this.setEventedParent(null), e2 && this.dispatcher.broadcast(\"RM\", void 0), this.dispatcher.remove(e2);\n }\n _clearSource(e2) {\n this.tileManagers[e2].clearTiles();\n }\n _reloadSource(e2) {\n this.tileManagers[e2].resume(), this.tileManagers[e2].reload();\n }\n _updateSources(e2) {\n for (const t2 in this.tileManagers) this.tileManagers[t2].update(e2, this.map.terrain);\n }\n _generateCollisionBoxes() {\n for (const e2 in this.tileManagers) this._reloadSource(e2);\n }\n _updatePlacement(e2, t2, i2, a2, r2 = false) {\n let o2 = false, s2 = false;\n const n2 = {};\n for (const t3 of this._order) {\n const i3 = this._layers[t3];\n if (\"symbol\" !== i3.type) continue;\n if (!n2[i3.source]) {\n const e3 = this.tileManagers[i3.source];\n n2[i3.source] = e3.getRenderableIds(true).map(((t4) => e3.getTileByID(t4))).sort(((e4, t4) => t4.tileID.overscaledZ - e4.tileID.overscaledZ || (e4.tileID.isLessThan(t4.tileID) ? -1 : 1)));\n }\n const a3 = this.crossTileSymbolIndex.addLayer(i3, n2[i3.source], e2.center.lng);\n o2 = o2 || a3;\n }\n if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((r2 = r2 || this._layerOrderChanged || 0 === i2) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(c(), e2.zoom)) && (this.pauseablePlacement = new Ct(e2, this.map.terrain, this._order, r2, t2, i2, a2, this.placement), this._layerOrderChanged = false), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, n2), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(c()), s2 = true), o2 && this.pauseablePlacement.placement.setStale()), s2 || o2) for (const e3 of this._order) {\n const t3 = this._layers[e3];\n \"symbol\" === t3.type && this.placement.updateLayerOpacities(t3, n2[t3.source]);\n }\n return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(c());\n }\n _releaseSymbolFadeTiles() {\n for (const e2 in this.tileManagers) this.tileManagers[e2].releaseSymbolFadeTiles();\n }\n getImages(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n const e3 = yield this.imageManager.getImages(i2.icons);\n this._updateTilesForChangedImages();\n const t2 = this.tileManagers[i2.source];\n return t2 && t2.setDependencies(i2.tileID.key, i2.type, i2.icons), e3;\n }));\n }\n getGlyphs(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n const e3 = yield this.glyphManager.getGlyphs(i2.stacks), t2 = this.tileManagers[i2.source];\n return t2 && t2.setDependencies(i2.tileID.key, i2.type, [\"\"]), e3;\n }));\n }\n getGlyphsUrl() {\n return this.stylesheet.glyphs || null;\n }\n setGlyphs(e2, i2 = {}) {\n this._checkLoaded(), e2 && this._validate(t.C.glyphs, \"glyphs\", e2, null, i2) || (this._glyphsDidChange = true, this.stylesheet.glyphs = e2, this.glyphManager.entries = {}, this.glyphManager.setURL(e2));\n }\n getDashes(e2, i2) {\n return t._(this, void 0, void 0, (function* () {\n const e3 = {};\n for (const [t2, a2] of Object.entries(i2.dashes)) e3[t2] = this.lineAtlas.getDash(a2.dasharray, a2.round);\n return e3;\n }));\n }\n addSprite(e2, i2, a2 = {}, r2) {\n this._checkLoaded();\n const o2 = [{ id: e2, url: i2 }], s2 = [...x(this.stylesheet.sprite), ...o2];\n this._validate(t.C.sprite, \"sprite\", s2, null, a2) || (this.stylesheet.sprite = s2, this._loadSprite(o2, true, r2));\n }\n removeSprite(e2) {\n this._checkLoaded();\n const i2 = x(this.stylesheet.sprite);\n if (i2.find(((t2) => t2.id === e2))) {\n if (this._spritesImagesIds[e2]) for (const t2 of this._spritesImagesIds[e2]) this.imageManager.removeImage(t2), this._changedImages[t2] = true;\n i2.splice(i2.findIndex(((t2) => t2.id === e2)), 1), this.stylesheet.sprite = i2.length > 0 ? i2 : void 0, delete this._spritesImagesIds[e2], this._availableImages = this.imageManager.listImages(), this._changed = true, this.dispatcher.broadcast(\"SI\", this._availableImages), this.fire(new t.l(\"data\", { dataType: \"style\" }));\n } else this.fire(new t.k(new Error(`Sprite \"${e2}\" doesn't exists on this map.`)));\n }\n getSprite() {\n return x(this.stylesheet.sprite);\n }\n setSprite(e2, i2 = {}, a2) {\n this._checkLoaded(), e2 && this._validate(t.C.sprite, \"sprite\", e2, null, i2) || (this.stylesheet.sprite = e2, e2 ? this._loadSprite(e2, true, a2) : (this._unloadSprite(), a2 && a2(null)));\n }\n destroy() {\n this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._loadStyleRequest && (this._loadStyleRequest.abort(), this._loadStyleRequest = null), this._spriteRequest && (this._spriteRequest.abort(), this._spriteRequest = null);\n for (const e2 in this.tileManagers) {\n const t2 = this.tileManagers[e2];\n t2.setEventedParent(null), t2.onRemove(this.map);\n }\n this.tileManagers = {}, this.imageManager && (this.imageManager.setEventedParent(null), this.imageManager.destroy(), this._availableImages = [], this._spritesImagesIds = {}), this.glyphManager && this.glyphManager.destroy();\n for (const e2 in this._layers) {\n const t2 = this._layers[e2];\n t2.setEventedParent(null), t2.onRemove && t2.onRemove(this.map);\n }\n this._setInitialValues(), this.setEventedParent(null), this.dispatcher.unregisterMessageHandler(\"GG\"), this.dispatcher.unregisterMessageHandler(\"GI\"), this.dispatcher.unregisterMessageHandler(\"GDA\"), this.dispatcher.remove(true), this._listeners = {}, this._oneTimeListeners = {};\n }\n }\n var Fi = t.aV([{ name: \"a_pos\", type: \"Int16\", components: 2 }, { name: \"a_texture_pos\", type: \"Int16\", components: 2 }]);\n class Bi {\n constructor() {\n this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null;\n }\n bind(e2, t2, i2, a2, r2, o2, s2, n2, l2) {\n this.context = e2;\n let c2 = this.boundPaintVertexBuffers.length !== a2.length;\n for (let e3 = 0; !c2 && e3 < a2.length; e3++) this.boundPaintVertexBuffers[e3] !== a2[e3] && (c2 = true);\n !this.vao || this.boundProgram !== t2 || this.boundLayoutVertexBuffer !== i2 || c2 || this.boundIndexBuffer !== r2 || this.boundVertexOffset !== o2 || this.boundDynamicVertexBuffer !== s2 || this.boundDynamicVertexBuffer2 !== n2 || this.boundDynamicVertexBuffer3 !== l2 ? this.freshBind(t2, i2, a2, r2, o2, s2, n2, l2) : (e2.bindVertexArray.set(this.vao), s2 && s2.bind(), r2 && r2.dynamicDraw && r2.bind(), n2 && n2.bind(), l2 && l2.bind());\n }\n freshBind(e2, t2, i2, a2, r2, o2, s2, n2) {\n const l2 = e2.numAttributes, c2 = this.context, h2 = c2.gl;\n this.vao && this.destroy(), this.vao = c2.createVertexArray(), c2.bindVertexArray.set(this.vao), this.boundProgram = e2, this.boundLayoutVertexBuffer = t2, this.boundPaintVertexBuffers = i2, this.boundIndexBuffer = a2, this.boundVertexOffset = r2, this.boundDynamicVertexBuffer = o2, this.boundDynamicVertexBuffer2 = s2, this.boundDynamicVertexBuffer3 = n2, t2.enableAttributes(h2, e2);\n for (const t3 of i2) t3.enableAttributes(h2, e2);\n o2 && o2.enableAttributes(h2, e2), s2 && s2.enableAttributes(h2, e2), n2 && n2.enableAttributes(h2, e2), t2.bind(), t2.setVertexAttribPointers(h2, e2, r2);\n for (const t3 of i2) t3.bind(), t3.setVertexAttribPointers(h2, e2, r2);\n o2 && (o2.bind(), o2.setVertexAttribPointers(h2, e2, r2)), a2 && a2.bind(), s2 && (s2.bind(), s2.setVertexAttribPointers(h2, e2, r2)), n2 && (n2.bind(), n2.setVertexAttribPointers(h2, e2, r2)), c2.currentNumAttributes = l2;\n }\n destroy() {\n this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);\n }\n }\n const Oi = (e2, i2, a2, r2, o2) => ({ u_texture: 0, u_ele_delta: e2, u_fog_matrix: i2, u_fog_color: a2 ? a2.properties.get(\"fog-color\") : t.bq.white, u_fog_ground_blend: a2 ? a2.properties.get(\"fog-ground-blend\") : 1, u_fog_ground_blend_opacity: o2 ? 0 : a2 ? a2.calculateFogBlendOpacity(r2) : 0, u_horizon_color: a2 ? a2.properties.get(\"horizon-color\") : t.bq.white, u_horizon_fog_blend: a2 ? a2.properties.get(\"horizon-fog-blend\") : 1, u_is_globe_mode: o2 ? 1 : 0 }), ji = { mainMatrix: \"u_projection_matrix\", tileMercatorCoords: \"u_projection_tile_mercator_coords\", clippingPlane: \"u_projection_clipping_plane\", projectionTransition: \"u_projection_transition\", fallbackMatrix: \"u_projection_fallback_matrix\" };\n function Ni(e2) {\n const t2 = [];\n for (let i2 = 0; i2 < e2.length; i2++) {\n if (null === e2[i2]) continue;\n const a2 = e2[i2].split(\" \");\n t2.push(a2.pop());\n }\n return t2;\n }\n class Zi {\n constructor(e2, i2, a2, r2, o2, s2, n2, l2, c2 = []) {\n const h2 = e2.gl;\n this.program = h2.createProgram();\n const u2 = Ni(i2.staticAttributes), d2 = a2 ? a2.getBinderAttributes() : [], _2 = u2.concat(d2), p2 = At.prelude.staticUniforms ? Ni(At.prelude.staticUniforms) : [], m2 = n2.staticUniforms ? Ni(n2.staticUniforms) : [], f2 = i2.staticUniforms ? Ni(i2.staticUniforms) : [], g2 = a2 ? a2.getBinderUniforms() : [], v2 = p2.concat(m2).concat(f2).concat(g2), x2 = [];\n for (const e3 of v2) x2.indexOf(e3) < 0 && x2.push(e3);\n const b2 = a2 ? a2.defines() : [];\n oi(h2) && b2.unshift(\"#version 300 es\"), o2 && b2.push(\"#define OVERDRAW_INSPECTOR;\"), s2 && b2.push(\"#define TERRAIN3D;\"), l2 && b2.push(l2), c2 && b2.push(...c2);\n let y2 = b2.concat(At.prelude.fragmentSource, n2.fragmentSource, i2.fragmentSource).join(\"\\n\"), w2 = b2.concat(At.prelude.vertexSource, n2.vertexSource, i2.vertexSource).join(\"\\n\");\n oi(h2) || (y2 = (function(e3) {\n return e3.replace(/\\bin\\s/g, \"varying \").replace(\"out highp vec4 fragColor;\", \"\").replace(/fragColor/g, \"gl_FragColor\").replace(/texture\\(/g, \"texture2D(\");\n })(y2), w2 = (function(e3) {\n return e3.replace(/\\bin\\s/g, \"attribute \").replace(/\\bout\\s/g, \"varying \").replace(/texture\\(/g, \"texture2D(\");\n })(w2));\n const T2 = h2.createShader(h2.FRAGMENT_SHADER);\n if (h2.isContextLost()) return void (this.failedToCreate = true);\n if (h2.shaderSource(T2, y2), h2.compileShader(T2), !h2.getShaderParameter(T2, h2.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${h2.getShaderInfoLog(T2)}`);\n h2.attachShader(this.program, T2);\n const P2 = h2.createShader(h2.VERTEX_SHADER);\n if (h2.isContextLost()) return void (this.failedToCreate = true);\n if (h2.shaderSource(P2, w2), h2.compileShader(P2), !h2.getShaderParameter(P2, h2.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${h2.getShaderInfoLog(P2)}`);\n h2.attachShader(this.program, P2), this.attributes = {};\n const I2 = {};\n this.numAttributes = _2.length;\n for (let e3 = 0; e3 < this.numAttributes; e3++) _2[e3] && (h2.bindAttribLocation(this.program, e3, _2[e3]), this.attributes[_2[e3]] = e3);\n if (h2.linkProgram(this.program), !h2.getProgramParameter(this.program, h2.LINK_STATUS)) throw new Error(`Program failed to link: ${h2.getProgramInfoLog(this.program)}`);\n h2.deleteShader(P2), h2.deleteShader(T2);\n for (let e3 = 0; e3 < x2.length; e3++) {\n const t2 = x2[e3];\n if (t2 && !I2[t2]) {\n const e4 = h2.getUniformLocation(this.program, t2);\n e4 && (I2[t2] = e4);\n }\n }\n this.fixedUniforms = r2(e2, I2), this.terrainUniforms = ((e3, i3) => ({ u_depth: new t.b$(e3, i3.u_depth), u_terrain: new t.b$(e3, i3.u_terrain), u_terrain_dim: new t.br(e3, i3.u_terrain_dim), u_terrain_matrix: new t.c1(e3, i3.u_terrain_matrix), u_terrain_unpack: new t.c2(e3, i3.u_terrain_unpack), u_terrain_exaggeration: new t.br(e3, i3.u_terrain_exaggeration) }))(e2, I2), this.projectionUniforms = ((e3, i3) => ({ u_projection_matrix: new t.c1(e3, i3.u_projection_matrix), u_projection_tile_mercator_coords: new t.c2(e3, i3.u_projection_tile_mercator_coords), u_projection_clipping_plane: new t.c2(e3, i3.u_projection_clipping_plane), u_projection_transition: new t.br(e3, i3.u_projection_transition), u_projection_fallback_matrix: new t.c1(e3, i3.u_projection_fallback_matrix) }))(e2, I2), this.binderUniforms = a2 ? a2.getUniforms(e2, I2) : [];\n }\n draw(e2, t2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2, p2, m2, f2, g2, v2) {\n const x2 = e2.gl;\n if (this.failedToCreate) return;\n if (e2.program.set(this.program), e2.setDepthMode(i2), e2.setStencilMode(a2), e2.setColorMode(r2), e2.setCullFace(o2), n2) {\n e2.activeTexture.set(x2.TEXTURE2), x2.bindTexture(x2.TEXTURE_2D, n2.depthTexture), e2.activeTexture.set(x2.TEXTURE3), x2.bindTexture(x2.TEXTURE_2D, n2.texture);\n for (const e3 in this.terrainUniforms) this.terrainUniforms[e3].set(n2[e3]);\n }\n if (l2) for (const e3 in l2) this.projectionUniforms[ji[e3]].set(l2[e3]);\n if (s2) for (const e3 in this.fixedUniforms) this.fixedUniforms[e3].set(s2[e3]);\n m2 && m2.setUniforms(e2, this.binderUniforms, _2, { zoom: p2 });\n let b2 = 0;\n switch (t2) {\n case x2.LINES:\n b2 = 2;\n break;\n case x2.TRIANGLES:\n b2 = 3;\n break;\n case x2.LINE_STRIP:\n b2 = 1;\n }\n for (const i3 of d2.get()) {\n const a3 = i3.vaos || (i3.vaos = {});\n (a3[c2] || (a3[c2] = new Bi())).bind(e2, this, h2, m2 ? m2.getPaintVertexBuffers() : [], u2, i3.vertexOffset, f2, g2, v2), x2.drawElements(t2, i3.primitiveLength * b2, x2.UNSIGNED_SHORT, i3.primitiveOffset * b2 * 2);\n }\n }\n }\n function Gi(e2, i2, a2) {\n const r2 = 1 / t.aO(a2, 1, i2.transform.tileZoom), o2 = Math.pow(2, a2.tileID.overscaledZ), s2 = a2.tileSize * Math.pow(2, i2.transform.tileZoom) / o2, n2 = s2 * (a2.tileID.canonical.x + a2.tileID.wrap * o2), l2 = s2 * a2.tileID.canonical.y;\n return { u_image: 0, u_texsize: a2.imageAtlasTexture.size, u_scale: [r2, e2.fromScale, e2.toScale], u_fade: e2.t, u_pixel_coord_upper: [n2 >> 16, l2 >> 16], u_pixel_coord_lower: [65535 & n2, 65535 & l2] };\n }\n const Ui = (e2, i2, a2, r2) => {\n const o2 = e2.style.light, s2 = o2.properties.get(\"position\"), n2 = [s2.x, s2.y, s2.z], l2 = t.c5();\n \"viewport\" === o2.properties.get(\"anchor\") && t.c6(l2, e2.transform.bearingInRadians), t.c7(n2, n2, l2);\n const c2 = e2.transform.transformLightDirection(n2), h2 = o2.properties.get(\"color\");\n return { u_lightpos: n2, u_lightpos_globe: c2, u_lightintensity: o2.properties.get(\"intensity\"), u_lightcolor: [h2.r, h2.g, h2.b], u_vertical_gradient: +i2, u_opacity: a2, u_fill_translate: r2 };\n }, Vi = (e2, i2, a2, r2, o2, s2, n2) => t.e(Ui(e2, i2, a2, r2), Gi(s2, e2, n2), { u_height_factor: -Math.pow(2, o2.overscaledZ) / n2.tileSize / 8 }), qi = (e2, i2, a2, r2) => t.e(Gi(i2, e2, a2), { u_fill_translate: r2 }), Wi = (e2, t2) => ({ u_world: e2, u_fill_translate: t2 }), $i = (e2, i2, a2, r2, o2) => t.e(qi(e2, i2, a2, o2), { u_world: r2 }), Hi = (e2, i2, a2, r2, o2) => {\n const s2 = e2.transform;\n let n2, l2, c2 = 0;\n if (\"map\" === a2.paint.get(\"circle-pitch-alignment\")) {\n const e3 = t.aO(i2, 1, s2.zoom);\n n2 = true, l2 = [e3, e3], c2 = e3 / (t.a5 * Math.pow(2, i2.tileID.overscaledZ)) * 2 * Math.PI * o2;\n } else n2 = false, l2 = s2.pixelsToGLUnits;\n return { u_camera_to_center_distance: s2.cameraToCenterDistance, u_scale_with_map: +(\"map\" === a2.paint.get(\"circle-pitch-scale\")), u_pitch_with_map: +n2, u_device_pixel_ratio: e2.pixelRatio, u_extrude_scale: l2, u_globe_extrude_scale: c2, u_translate: r2 };\n }, Xi = (e2) => ({ u_pixel_extrude_scale: [1 / e2.width, 1 / e2.height] }), Ki = (e2) => ({ u_viewport_size: [e2.width, e2.height] }), Yi = (e2, t2 = 1) => ({ u_color: e2, u_overlay: 0, u_overlay_scale: t2 }), Qi = (e2, i2, a2, r2) => {\n const o2 = t.aO(e2, 1, i2) / (t.a5 * Math.pow(2, e2.tileID.overscaledZ)) * 2 * Math.PI * r2;\n return { u_extrude_scale: t.aO(e2, 1, i2), u_intensity: a2, u_globe_extrude_scale: o2 };\n }, Ji = (e2, i2, a2, r2) => {\n const o2 = t.N();\n t.c8(o2, 0, e2.width, e2.height, 0, 0, 1);\n const s2 = e2.context.gl;\n return { u_matrix: o2, u_world: [s2.drawingBufferWidth, s2.drawingBufferHeight], u_image: a2, u_color_ramp: r2, u_opacity: i2.paint.get(\"heatmap-opacity\") };\n }, ea = (e2, t2, i2) => {\n const a2 = i2.paint.get(\"hillshade-accent-color\");\n let r2;\n switch (i2.paint.get(\"hillshade-method\")) {\n case \"basic\":\n r2 = 4;\n break;\n case \"combined\":\n r2 = 1;\n break;\n case \"igor\":\n r2 = 2;\n break;\n case \"multidirectional\":\n r2 = 3;\n break;\n default:\n r2 = 0;\n }\n const o2 = i2.getIlluminationProperties();\n for (let t3 = 0; t3 < o2.directionRadians.length; t3++) \"viewport\" === i2.paint.get(\"hillshade-illumination-anchor\") && (o2.directionRadians[t3] += e2.transform.bearingInRadians);\n return { u_image: 0, u_latrange: ia(0, t2.tileID), u_exaggeration: i2.paint.get(\"hillshade-exaggeration\"), u_altitudes: o2.altitudeRadians, u_azimuths: o2.directionRadians, u_accent: a2, u_method: r2, u_highlights: o2.highlightColor, u_shadows: o2.shadowColor };\n }, ta = (e2, i2) => {\n const a2 = i2.stride, r2 = t.N();\n return t.c8(r2, 0, t.a5, -t.a5, 0, 0, 1), t.O(r2, r2, [0, -t.a5, 0]), { u_matrix: r2, u_image: 1, u_dimension: [a2, a2], u_zoom: e2.overscaledZ, u_unpack: i2.getUnpackVector() };\n };\n function ia(e2, i2) {\n const a2 = Math.pow(2, i2.canonical.z), r2 = i2.canonical.y;\n return [new t.ab(0, r2 / a2).toLngLat().lat, new t.ab(0, (r2 + 1) / a2).toLngLat().lat];\n }\n const aa = (e2, t2, i2 = 0) => ({ u_image: 0, u_unpack: t2.getUnpackVector(), u_dimension: [t2.stride, t2.stride], u_elevation_stops: 1, u_color_stops: 4, u_color_ramp_size: i2, u_opacity: e2.paint.get(\"color-relief-opacity\") }), ra = (e2, i2, a2, r2) => {\n const o2 = e2.transform;\n return { u_translation: ha(e2, i2, a2), u_ratio: r2 / t.aO(i2, 1, o2.zoom), u_device_pixel_ratio: e2.pixelRatio, u_units_to_pixels: [1 / o2.pixelsToGLUnits[0], 1 / o2.pixelsToGLUnits[1]] };\n }, oa = (e2, i2, a2, r2, o2) => t.e(ra(e2, i2, a2, r2), { u_image: 0, u_image_height: o2 }), sa = (e2, i2, a2, r2, o2) => {\n const s2 = e2.transform, n2 = ca(i2, s2);\n return { u_translation: ha(e2, i2, a2), u_texsize: i2.imageAtlasTexture.size, u_ratio: r2 / t.aO(i2, 1, s2.zoom), u_device_pixel_ratio: e2.pixelRatio, u_image: 0, u_scale: [n2, o2.fromScale, o2.toScale], u_fade: o2.t, u_units_to_pixels: [1 / s2.pixelsToGLUnits[0], 1 / s2.pixelsToGLUnits[1]] };\n }, na = (e2, i2, a2, r2, o2) => {\n const s2 = ca(i2, e2.transform);\n return t.e(ra(e2, i2, a2, r2), { u_tileratio: s2, u_crossfade_from: o2.fromScale, u_crossfade_to: o2.toScale, u_image: 0, u_mix: o2.t, u_lineatlas_width: e2.lineAtlas.width, u_lineatlas_height: e2.lineAtlas.height });\n }, la = (e2, i2, a2, r2, o2, s2) => {\n const n2 = ca(i2, e2.transform);\n return t.e(ra(e2, i2, a2, r2), { u_image: 0, u_image_height: s2, u_tileratio: n2, u_crossfade_from: o2.fromScale, u_crossfade_to: o2.toScale, u_image_dash: 1, u_mix: o2.t, u_lineatlas_width: e2.lineAtlas.width, u_lineatlas_height: e2.lineAtlas.height });\n };\n function ca(e2, i2) {\n return 1 / t.aO(e2, 1, i2.tileZoom);\n }\n function ha(e2, i2, a2) {\n return t.aP(e2.transform, i2, a2.paint.get(\"line-translate\"), a2.paint.get(\"line-translate-anchor\"));\n }\n const ua = (e2, t2, i2, a2, r2) => {\n return { u_tl_parent: e2, u_scale_parent: t2, u_buffer_scale: 1, u_fade_t: i2.mix, u_opacity: i2.opacity * a2.paint.get(\"raster-opacity\"), u_image0: 0, u_image1: 1, u_brightness_low: a2.paint.get(\"raster-brightness-min\"), u_brightness_high: a2.paint.get(\"raster-brightness-max\"), u_saturation_factor: (s2 = a2.paint.get(\"raster-saturation\"), s2 > 0 ? 1 - 1 / (1.001 - s2) : -s2), u_contrast_factor: (o2 = a2.paint.get(\"raster-contrast\"), o2 > 0 ? 1 / (1 - o2) : 1 + o2), u_spin_weights: da(a2.paint.get(\"raster-hue-rotate\")), u_coords_top: [r2[0].x, r2[0].y, r2[1].x, r2[1].y], u_coords_bottom: [r2[3].x, r2[3].y, r2[2].x, r2[2].y] };\n var o2, s2;\n };\n function da(e2) {\n e2 *= Math.PI / 180;\n const t2 = Math.sin(e2), i2 = Math.cos(e2);\n return [(2 * i2 + 1) / 3, (-Math.sqrt(3) * t2 - i2 + 1) / 3, (Math.sqrt(3) * t2 - i2 + 1) / 3];\n }\n const _a = (e2, t2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2) => {\n const _2 = s2.transform;\n return { u_is_size_zoom_constant: +(\"constant\" === e2 || \"source\" === e2), u_is_size_feature_constant: +(\"constant\" === e2 || \"camera\" === e2), u_size_t: t2 ? t2.uSizeT : 0, u_size: t2 ? t2.uSize : 0, u_camera_to_center_distance: _2.cameraToCenterDistance, u_pitch: _2.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +i2, u_aspect_ratio: _2.width / _2.height, u_fade_change: s2.options.fadeDuration ? s2.symbolFadeChange : 1, u_label_plane_matrix: n2, u_coord_matrix: l2, u_is_text: +h2, u_pitch_with_map: +a2, u_is_along_line: r2, u_is_variable_anchor: o2, u_texsize: u2, u_texture: 0, u_translation: c2, u_pitched_scale: d2 };\n }, pa = (e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2, p2) => {\n const m2 = n2.transform;\n return t.e(_a(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, p2), { u_gamma_scale: r2 ? Math.cos(m2.pitch * Math.PI / 180) * m2.cameraToCenterDistance : 1, u_device_pixel_ratio: n2.pixelRatio, u_is_halo: 1 });\n }, ma = (e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2) => t.e(pa(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, true, u2, 0, _2), { u_texsize_icon: d2, u_texture_icon: 1 }), fa = (e2, t2) => ({ u_opacity: e2, u_color: t2 }), ga = (e2, i2, a2, r2, o2) => t.e((function(e3, i3, a3, r3) {\n const o3 = a3.imageManager.getPattern(e3.from.toString()), s2 = a3.imageManager.getPattern(e3.to.toString()), { width: n2, height: l2 } = a3.imageManager.getPixelSize(), c2 = Math.pow(2, r3.tileID.overscaledZ), h2 = r3.tileSize * Math.pow(2, a3.transform.tileZoom) / c2, u2 = h2 * (r3.tileID.canonical.x + r3.tileID.wrap * c2), d2 = h2 * r3.tileID.canonical.y;\n return { u_image: 0, u_pattern_tl_a: o3.tl, u_pattern_br_a: o3.br, u_pattern_tl_b: s2.tl, u_pattern_br_b: s2.br, u_texsize: [n2, l2], u_mix: i3.t, u_pattern_size_a: o3.displaySize, u_pattern_size_b: s2.displaySize, u_scale_a: i3.fromScale, u_scale_b: i3.toScale, u_tile_units_to_pixels: 1 / t.aO(r3, 1, a3.transform.tileZoom), u_pixel_coord_upper: [u2 >> 16, d2 >> 16], u_pixel_coord_lower: [65535 & u2, 65535 & d2] };\n })(a2, o2, i2, r2), { u_opacity: e2 }), va = (e2, t2) => {\n }, xa = { fillExtrusion: (e2, i2) => ({ u_lightpos: new t.c3(e2, i2.u_lightpos), u_lightpos_globe: new t.c3(e2, i2.u_lightpos_globe), u_lightintensity: new t.br(e2, i2.u_lightintensity), u_lightcolor: new t.c3(e2, i2.u_lightcolor), u_vertical_gradient: new t.br(e2, i2.u_vertical_gradient), u_opacity: new t.br(e2, i2.u_opacity), u_fill_translate: new t.c4(e2, i2.u_fill_translate) }), fillExtrusionPattern: (e2, i2) => ({ u_lightpos: new t.c3(e2, i2.u_lightpos), u_lightpos_globe: new t.c3(e2, i2.u_lightpos_globe), u_lightintensity: new t.br(e2, i2.u_lightintensity), u_lightcolor: new t.c3(e2, i2.u_lightcolor), u_vertical_gradient: new t.br(e2, i2.u_vertical_gradient), u_height_factor: new t.br(e2, i2.u_height_factor), u_opacity: new t.br(e2, i2.u_opacity), u_fill_translate: new t.c4(e2, i2.u_fill_translate), u_image: new t.b$(e2, i2.u_image), u_texsize: new t.c4(e2, i2.u_texsize), u_pixel_coord_upper: new t.c4(e2, i2.u_pixel_coord_upper), u_pixel_coord_lower: new t.c4(e2, i2.u_pixel_coord_lower), u_scale: new t.c3(e2, i2.u_scale), u_fade: new t.br(e2, i2.u_fade) }), fill: (e2, i2) => ({ u_fill_translate: new t.c4(e2, i2.u_fill_translate) }), fillPattern: (e2, i2) => ({ u_image: new t.b$(e2, i2.u_image), u_texsize: new t.c4(e2, i2.u_texsize), u_pixel_coord_upper: new t.c4(e2, i2.u_pixel_coord_upper), u_pixel_coord_lower: new t.c4(e2, i2.u_pixel_coord_lower), u_scale: new t.c3(e2, i2.u_scale), u_fade: new t.br(e2, i2.u_fade), u_fill_translate: new t.c4(e2, i2.u_fill_translate) }), fillOutline: (e2, i2) => ({ u_world: new t.c4(e2, i2.u_world), u_fill_translate: new t.c4(e2, i2.u_fill_translate) }), fillOutlinePattern: (e2, i2) => ({ u_world: new t.c4(e2, i2.u_world), u_image: new t.b$(e2, i2.u_image), u_texsize: new t.c4(e2, i2.u_texsize), u_pixel_coord_upper: new t.c4(e2, i2.u_pixel_coord_upper), u_pixel_coord_lower: new t.c4(e2, i2.u_pixel_coord_lower), u_scale: new t.c3(e2, i2.u_scale), u_fade: new t.br(e2, i2.u_fade), u_fill_translate: new t.c4(e2, i2.u_fill_translate) }), circle: (e2, i2) => ({ u_camera_to_center_distance: new t.br(e2, i2.u_camera_to_center_distance), u_scale_with_map: new t.b$(e2, i2.u_scale_with_map), u_pitch_with_map: new t.b$(e2, i2.u_pitch_with_map), u_extrude_scale: new t.c4(e2, i2.u_extrude_scale), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_globe_extrude_scale: new t.br(e2, i2.u_globe_extrude_scale), u_translate: new t.c4(e2, i2.u_translate) }), collisionBox: (e2, i2) => ({ u_pixel_extrude_scale: new t.c4(e2, i2.u_pixel_extrude_scale) }), collisionCircle: (e2, i2) => ({ u_viewport_size: new t.c4(e2, i2.u_viewport_size) }), debug: (e2, i2) => ({ u_color: new t.c0(e2, i2.u_color), u_overlay: new t.b$(e2, i2.u_overlay), u_overlay_scale: new t.br(e2, i2.u_overlay_scale) }), depth: va, clippingMask: va, heatmap: (e2, i2) => ({ u_extrude_scale: new t.br(e2, i2.u_extrude_scale), u_intensity: new t.br(e2, i2.u_intensity), u_globe_extrude_scale: new t.br(e2, i2.u_globe_extrude_scale) }), heatmapTexture: (e2, i2) => ({ u_matrix: new t.c1(e2, i2.u_matrix), u_world: new t.c4(e2, i2.u_world), u_image: new t.b$(e2, i2.u_image), u_color_ramp: new t.b$(e2, i2.u_color_ramp), u_opacity: new t.br(e2, i2.u_opacity) }), hillshade: (e2, i2) => ({ u_image: new t.b$(e2, i2.u_image), u_latrange: new t.c4(e2, i2.u_latrange), u_exaggeration: new t.br(e2, i2.u_exaggeration), u_altitudes: new t.ca(e2, i2.u_altitudes), u_azimuths: new t.ca(e2, i2.u_azimuths), u_accent: new t.c0(e2, i2.u_accent), u_method: new t.b$(e2, i2.u_method), u_shadows: new t.c9(e2, i2.u_shadows), u_highlights: new t.c9(e2, i2.u_highlights) }), hillshadePrepare: (e2, i2) => ({ u_matrix: new t.c1(e2, i2.u_matrix), u_image: new t.b$(e2, i2.u_image), u_dimension: new t.c4(e2, i2.u_dimension), u_zoom: new t.br(e2, i2.u_zoom), u_unpack: new t.c2(e2, i2.u_unpack) }), colorRelief: (e2, i2) => ({ u_image: new t.b$(e2, i2.u_image), u_unpack: new t.c2(e2, i2.u_unpack), u_dimension: new t.c4(e2, i2.u_dimension), u_elevation_stops: new t.b$(e2, i2.u_elevation_stops), u_color_stops: new t.b$(e2, i2.u_color_stops), u_color_ramp_size: new t.b$(e2, i2.u_color_ramp_size), u_opacity: new t.br(e2, i2.u_opacity) }), line: (e2, i2) => ({ u_translation: new t.c4(e2, i2.u_translation), u_ratio: new t.br(e2, i2.u_ratio), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_units_to_pixels: new t.c4(e2, i2.u_units_to_pixels) }), lineGradient: (e2, i2) => ({ u_translation: new t.c4(e2, i2.u_translation), u_ratio: new t.br(e2, i2.u_ratio), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_units_to_pixels: new t.c4(e2, i2.u_units_to_pixels), u_image: new t.b$(e2, i2.u_image), u_image_height: new t.br(e2, i2.u_image_height) }), linePattern: (e2, i2) => ({ u_translation: new t.c4(e2, i2.u_translation), u_texsize: new t.c4(e2, i2.u_texsize), u_ratio: new t.br(e2, i2.u_ratio), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_image: new t.b$(e2, i2.u_image), u_units_to_pixels: new t.c4(e2, i2.u_units_to_pixels), u_scale: new t.c3(e2, i2.u_scale), u_fade: new t.br(e2, i2.u_fade) }), lineSDF: (e2, i2) => ({ u_translation: new t.c4(e2, i2.u_translation), u_ratio: new t.br(e2, i2.u_ratio), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_units_to_pixels: new t.c4(e2, i2.u_units_to_pixels), u_image: new t.b$(e2, i2.u_image), u_mix: new t.br(e2, i2.u_mix), u_tileratio: new t.br(e2, i2.u_tileratio), u_crossfade_from: new t.br(e2, i2.u_crossfade_from), u_crossfade_to: new t.br(e2, i2.u_crossfade_to), u_lineatlas_width: new t.br(e2, i2.u_lineatlas_width), u_lineatlas_height: new t.br(e2, i2.u_lineatlas_height) }), lineGradientSDF: (e2, i2) => ({ u_translation: new t.c4(e2, i2.u_translation), u_ratio: new t.br(e2, i2.u_ratio), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_units_to_pixels: new t.c4(e2, i2.u_units_to_pixels), u_image: new t.b$(e2, i2.u_image), u_image_height: new t.br(e2, i2.u_image_height), u_tileratio: new t.br(e2, i2.u_tileratio), u_crossfade_from: new t.br(e2, i2.u_crossfade_from), u_crossfade_to: new t.br(e2, i2.u_crossfade_to), u_image_dash: new t.b$(e2, i2.u_image_dash), u_mix: new t.br(e2, i2.u_mix), u_lineatlas_width: new t.br(e2, i2.u_lineatlas_width), u_lineatlas_height: new t.br(e2, i2.u_lineatlas_height) }), raster: (e2, i2) => ({ u_tl_parent: new t.c4(e2, i2.u_tl_parent), u_scale_parent: new t.br(e2, i2.u_scale_parent), u_buffer_scale: new t.br(e2, i2.u_buffer_scale), u_fade_t: new t.br(e2, i2.u_fade_t), u_opacity: new t.br(e2, i2.u_opacity), u_image0: new t.b$(e2, i2.u_image0), u_image1: new t.b$(e2, i2.u_image1), u_brightness_low: new t.br(e2, i2.u_brightness_low), u_brightness_high: new t.br(e2, i2.u_brightness_high), u_saturation_factor: new t.br(e2, i2.u_saturation_factor), u_contrast_factor: new t.br(e2, i2.u_contrast_factor), u_spin_weights: new t.c3(e2, i2.u_spin_weights), u_coords_top: new t.c2(e2, i2.u_coords_top), u_coords_bottom: new t.c2(e2, i2.u_coords_bottom) }), symbolIcon: (e2, i2) => ({ u_is_size_zoom_constant: new t.b$(e2, i2.u_is_size_zoom_constant), u_is_size_feature_constant: new t.b$(e2, i2.u_is_size_feature_constant), u_size_t: new t.br(e2, i2.u_size_t), u_size: new t.br(e2, i2.u_size), u_camera_to_center_distance: new t.br(e2, i2.u_camera_to_center_distance), u_pitch: new t.br(e2, i2.u_pitch), u_rotate_symbol: new t.b$(e2, i2.u_rotate_symbol), u_aspect_ratio: new t.br(e2, i2.u_aspect_ratio), u_fade_change: new t.br(e2, i2.u_fade_change), u_label_plane_matrix: new t.c1(e2, i2.u_label_plane_matrix), u_coord_matrix: new t.c1(e2, i2.u_coord_matrix), u_is_text: new t.b$(e2, i2.u_is_text), u_pitch_with_map: new t.b$(e2, i2.u_pitch_with_map), u_is_along_line: new t.b$(e2, i2.u_is_along_line), u_is_variable_anchor: new t.b$(e2, i2.u_is_variable_anchor), u_texsize: new t.c4(e2, i2.u_texsize), u_texture: new t.b$(e2, i2.u_texture), u_translation: new t.c4(e2, i2.u_translation), u_pitched_scale: new t.br(e2, i2.u_pitched_scale) }), symbolSDF: (e2, i2) => ({ u_is_size_zoom_constant: new t.b$(e2, i2.u_is_size_zoom_constant), u_is_size_feature_constant: new t.b$(e2, i2.u_is_size_feature_constant), u_size_t: new t.br(e2, i2.u_size_t), u_size: new t.br(e2, i2.u_size), u_camera_to_center_distance: new t.br(e2, i2.u_camera_to_center_distance), u_pitch: new t.br(e2, i2.u_pitch), u_rotate_symbol: new t.b$(e2, i2.u_rotate_symbol), u_aspect_ratio: new t.br(e2, i2.u_aspect_ratio), u_fade_change: new t.br(e2, i2.u_fade_change), u_label_plane_matrix: new t.c1(e2, i2.u_label_plane_matrix), u_coord_matrix: new t.c1(e2, i2.u_coord_matrix), u_is_text: new t.b$(e2, i2.u_is_text), u_pitch_with_map: new t.b$(e2, i2.u_pitch_with_map), u_is_along_line: new t.b$(e2, i2.u_is_along_line), u_is_variable_anchor: new t.b$(e2, i2.u_is_variable_anchor), u_texsize: new t.c4(e2, i2.u_texsize), u_texture: new t.b$(e2, i2.u_texture), u_gamma_scale: new t.br(e2, i2.u_gamma_scale), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_is_halo: new t.b$(e2, i2.u_is_halo), u_translation: new t.c4(e2, i2.u_translation), u_pitched_scale: new t.br(e2, i2.u_pitched_scale) }), symbolTextAndIcon: (e2, i2) => ({ u_is_size_zoom_constant: new t.b$(e2, i2.u_is_size_zoom_constant), u_is_size_feature_constant: new t.b$(e2, i2.u_is_size_feature_constant), u_size_t: new t.br(e2, i2.u_size_t), u_size: new t.br(e2, i2.u_size), u_camera_to_center_distance: new t.br(e2, i2.u_camera_to_center_distance), u_pitch: new t.br(e2, i2.u_pitch), u_rotate_symbol: new t.b$(e2, i2.u_rotate_symbol), u_aspect_ratio: new t.br(e2, i2.u_aspect_ratio), u_fade_change: new t.br(e2, i2.u_fade_change), u_label_plane_matrix: new t.c1(e2, i2.u_label_plane_matrix), u_coord_matrix: new t.c1(e2, i2.u_coord_matrix), u_is_text: new t.b$(e2, i2.u_is_text), u_pitch_with_map: new t.b$(e2, i2.u_pitch_with_map), u_is_along_line: new t.b$(e2, i2.u_is_along_line), u_is_variable_anchor: new t.b$(e2, i2.u_is_variable_anchor), u_texsize: new t.c4(e2, i2.u_texsize), u_texsize_icon: new t.c4(e2, i2.u_texsize_icon), u_texture: new t.b$(e2, i2.u_texture), u_texture_icon: new t.b$(e2, i2.u_texture_icon), u_gamma_scale: new t.br(e2, i2.u_gamma_scale), u_device_pixel_ratio: new t.br(e2, i2.u_device_pixel_ratio), u_is_halo: new t.b$(e2, i2.u_is_halo), u_translation: new t.c4(e2, i2.u_translation), u_pitched_scale: new t.br(e2, i2.u_pitched_scale) }), background: (e2, i2) => ({ u_opacity: new t.br(e2, i2.u_opacity), u_color: new t.c0(e2, i2.u_color) }), backgroundPattern: (e2, i2) => ({ u_opacity: new t.br(e2, i2.u_opacity), u_image: new t.b$(e2, i2.u_image), u_pattern_tl_a: new t.c4(e2, i2.u_pattern_tl_a), u_pattern_br_a: new t.c4(e2, i2.u_pattern_br_a), u_pattern_tl_b: new t.c4(e2, i2.u_pattern_tl_b), u_pattern_br_b: new t.c4(e2, i2.u_pattern_br_b), u_texsize: new t.c4(e2, i2.u_texsize), u_mix: new t.br(e2, i2.u_mix), u_pattern_size_a: new t.c4(e2, i2.u_pattern_size_a), u_pattern_size_b: new t.c4(e2, i2.u_pattern_size_b), u_scale_a: new t.br(e2, i2.u_scale_a), u_scale_b: new t.br(e2, i2.u_scale_b), u_pixel_coord_upper: new t.c4(e2, i2.u_pixel_coord_upper), u_pixel_coord_lower: new t.c4(e2, i2.u_pixel_coord_lower), u_tile_units_to_pixels: new t.br(e2, i2.u_tile_units_to_pixels) }), terrain: (e2, i2) => ({ u_texture: new t.b$(e2, i2.u_texture), u_ele_delta: new t.br(e2, i2.u_ele_delta), u_fog_matrix: new t.c1(e2, i2.u_fog_matrix), u_fog_color: new t.c0(e2, i2.u_fog_color), u_fog_ground_blend: new t.br(e2, i2.u_fog_ground_blend), u_fog_ground_blend_opacity: new t.br(e2, i2.u_fog_ground_blend_opacity), u_horizon_color: new t.c0(e2, i2.u_horizon_color), u_horizon_fog_blend: new t.br(e2, i2.u_horizon_fog_blend), u_is_globe_mode: new t.br(e2, i2.u_is_globe_mode) }), terrainDepth: (e2, i2) => ({ u_ele_delta: new t.br(e2, i2.u_ele_delta) }), terrainCoords: (e2, i2) => ({ u_texture: new t.b$(e2, i2.u_texture), u_terrain_coords_id: new t.br(e2, i2.u_terrain_coords_id), u_ele_delta: new t.br(e2, i2.u_ele_delta) }), projectionErrorMeasurement: (e2, i2) => ({ u_input: new t.br(e2, i2.u_input), u_output_expected: new t.br(e2, i2.u_output_expected) }), atmosphere: (e2, i2) => ({ u_sun_pos: new t.c3(e2, i2.u_sun_pos), u_atmosphere_blend: new t.br(e2, i2.u_atmosphere_blend), u_globe_position: new t.c3(e2, i2.u_globe_position), u_globe_radius: new t.br(e2, i2.u_globe_radius), u_inv_proj_matrix: new t.c1(e2, i2.u_inv_proj_matrix) }), sky: (e2, i2) => ({ u_sky_color: new t.c0(e2, i2.u_sky_color), u_horizon_color: new t.c0(e2, i2.u_horizon_color), u_horizon: new t.c4(e2, i2.u_horizon), u_horizon_normal: new t.c4(e2, i2.u_horizon_normal), u_sky_horizon_blend: new t.br(e2, i2.u_sky_horizon_blend), u_sky_blend: new t.br(e2, i2.u_sky_blend) }) };\n class ba {\n constructor(e2, t2, i2) {\n this.context = e2;\n const a2 = e2.gl;\n this.buffer = a2.createBuffer(), this.dynamicDraw = Boolean(i2), this.context.unbindVAO(), e2.bindElementBuffer.set(this.buffer), a2.bufferData(a2.ELEMENT_ARRAY_BUFFER, t2.arrayBuffer, this.dynamicDraw ? a2.DYNAMIC_DRAW : a2.STATIC_DRAW), this.dynamicDraw || delete t2.arrayBuffer;\n }\n bind() {\n this.context.bindElementBuffer.set(this.buffer);\n }\n updateData(e2) {\n const t2 = this.context.gl;\n if (!this.dynamicDraw) throw new Error(\"Attempted to update data while not in dynamic mode.\");\n this.context.unbindVAO(), this.bind(), t2.bufferSubData(t2.ELEMENT_ARRAY_BUFFER, 0, e2.arrayBuffer);\n }\n destroy() {\n this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer);\n }\n }\n const ya = { Int8: \"BYTE\", Uint8: \"UNSIGNED_BYTE\", Int16: \"SHORT\", Uint16: \"UNSIGNED_SHORT\", Int32: \"INT\", Uint32: \"UNSIGNED_INT\", Float32: \"FLOAT\" };\n class wa {\n constructor(e2, t2, i2, a2) {\n this.length = t2.length, this.attributes = i2, this.itemSize = t2.bytesPerElement, this.dynamicDraw = a2, this.context = e2;\n const r2 = e2.gl;\n this.buffer = r2.createBuffer(), e2.bindVertexBuffer.set(this.buffer), r2.bufferData(r2.ARRAY_BUFFER, t2.arrayBuffer, this.dynamicDraw ? r2.DYNAMIC_DRAW : r2.STATIC_DRAW), this.dynamicDraw || delete t2.arrayBuffer;\n }\n bind() {\n this.context.bindVertexBuffer.set(this.buffer);\n }\n updateData(e2) {\n if (e2.length !== this.length) throw new Error(`Length of new data is ${e2.length}, which doesn't match current length of ${this.length}`);\n const t2 = this.context.gl;\n this.bind(), t2.bufferSubData(t2.ARRAY_BUFFER, 0, e2.arrayBuffer);\n }\n enableAttributes(e2, t2) {\n for (let i2 = 0; i2 < this.attributes.length; i2++) {\n const a2 = t2.attributes[this.attributes[i2].name];\n void 0 !== a2 && e2.enableVertexAttribArray(a2);\n }\n }\n setVertexAttribPointers(e2, t2, i2) {\n for (let a2 = 0; a2 < this.attributes.length; a2++) {\n const r2 = this.attributes[a2], o2 = t2.attributes[r2.name];\n void 0 !== o2 && e2.vertexAttribPointer(o2, r2.components, e2[ya[r2.type]], false, this.itemSize, r2.offset + this.itemSize * (i2 || 0));\n }\n }\n destroy() {\n this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer);\n }\n }\n class Ta {\n constructor(e2) {\n this.gl = e2.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = false;\n }\n get() {\n return this.current;\n }\n set(e2) {\n }\n getDefault() {\n return this.default;\n }\n setDefault() {\n this.set(this.default);\n }\n }\n class Pa extends Ta {\n getDefault() {\n return t.bq.transparent;\n }\n set(e2) {\n const t2 = this.current;\n (e2.r !== t2.r || e2.g !== t2.g || e2.b !== t2.b || e2.a !== t2.a || this.dirty) && (this.gl.clearColor(e2.r, e2.g, e2.b, e2.a), this.current = e2, this.dirty = false);\n }\n }\n class Ia extends Ta {\n getDefault() {\n return 1;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.clearDepth(e2), this.current = e2, this.dirty = false);\n }\n }\n class Ca extends Ta {\n getDefault() {\n return 0;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.clearStencil(e2), this.current = e2, this.dirty = false);\n }\n }\n class Ma extends Ta {\n getDefault() {\n return [true, true, true, true];\n }\n set(e2) {\n const t2 = this.current;\n (e2[0] !== t2[0] || e2[1] !== t2[1] || e2[2] !== t2[2] || e2[3] !== t2[3] || this.dirty) && (this.gl.colorMask(e2[0], e2[1], e2[2], e2[3]), this.current = e2, this.dirty = false);\n }\n }\n class Ea extends Ta {\n getDefault() {\n return true;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.depthMask(e2), this.current = e2, this.dirty = false);\n }\n }\n class Sa extends Ta {\n getDefault() {\n return 255;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.stencilMask(e2), this.current = e2, this.dirty = false);\n }\n }\n class Ra extends Ta {\n getDefault() {\n return { func: this.gl.ALWAYS, ref: 0, mask: 255 };\n }\n set(e2) {\n const t2 = this.current;\n (e2.func !== t2.func || e2.ref !== t2.ref || e2.mask !== t2.mask || this.dirty) && (this.gl.stencilFunc(e2.func, e2.ref, e2.mask), this.current = e2, this.dirty = false);\n }\n }\n class za extends Ta {\n getDefault() {\n const e2 = this.gl;\n return [e2.KEEP, e2.KEEP, e2.KEEP];\n }\n set(e2) {\n const t2 = this.current;\n (e2[0] !== t2[0] || e2[1] !== t2[1] || e2[2] !== t2[2] || this.dirty) && (this.gl.stencilOp(e2[0], e2[1], e2[2]), this.current = e2, this.dirty = false);\n }\n }\n class Da extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n e2 ? t2.enable(t2.STENCIL_TEST) : t2.disable(t2.STENCIL_TEST), this.current = e2, this.dirty = false;\n }\n }\n class Aa extends Ta {\n getDefault() {\n return [0, 1];\n }\n set(e2) {\n const t2 = this.current;\n (e2[0] !== t2[0] || e2[1] !== t2[1] || this.dirty) && (this.gl.depthRange(e2[0], e2[1]), this.current = e2, this.dirty = false);\n }\n }\n class La extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n e2 ? t2.enable(t2.DEPTH_TEST) : t2.disable(t2.DEPTH_TEST), this.current = e2, this.dirty = false;\n }\n }\n class ka extends Ta {\n getDefault() {\n return this.gl.LESS;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.depthFunc(e2), this.current = e2, this.dirty = false);\n }\n }\n class Fa extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n e2 ? t2.enable(t2.BLEND) : t2.disable(t2.BLEND), this.current = e2, this.dirty = false;\n }\n }\n class Ba extends Ta {\n getDefault() {\n const e2 = this.gl;\n return [e2.ONE, e2.ZERO];\n }\n set(e2) {\n const t2 = this.current;\n (e2[0] !== t2[0] || e2[1] !== t2[1] || this.dirty) && (this.gl.blendFunc(e2[0], e2[1]), this.current = e2, this.dirty = false);\n }\n }\n class Oa extends Ta {\n getDefault() {\n return t.bq.transparent;\n }\n set(e2) {\n const t2 = this.current;\n (e2.r !== t2.r || e2.g !== t2.g || e2.b !== t2.b || e2.a !== t2.a || this.dirty) && (this.gl.blendColor(e2.r, e2.g, e2.b, e2.a), this.current = e2, this.dirty = false);\n }\n }\n class ja extends Ta {\n getDefault() {\n return this.gl.FUNC_ADD;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.blendEquation(e2), this.current = e2, this.dirty = false);\n }\n }\n class Na extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n e2 ? t2.enable(t2.CULL_FACE) : t2.disable(t2.CULL_FACE), this.current = e2, this.dirty = false;\n }\n }\n class Za extends Ta {\n getDefault() {\n return this.gl.BACK;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.cullFace(e2), this.current = e2, this.dirty = false);\n }\n }\n class Ga extends Ta {\n getDefault() {\n return this.gl.CCW;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.frontFace(e2), this.current = e2, this.dirty = false);\n }\n }\n class Ua extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.useProgram(e2), this.current = e2, this.dirty = false);\n }\n }\n class Va extends Ta {\n getDefault() {\n return this.gl.TEXTURE0;\n }\n set(e2) {\n (e2 !== this.current || this.dirty) && (this.gl.activeTexture(e2), this.current = e2, this.dirty = false);\n }\n }\n class qa extends Ta {\n getDefault() {\n const e2 = this.gl;\n return [0, 0, e2.drawingBufferWidth, e2.drawingBufferHeight];\n }\n set(e2) {\n const t2 = this.current;\n (e2[0] !== t2[0] || e2[1] !== t2[1] || e2[2] !== t2[2] || e2[3] !== t2[3] || this.dirty) && (this.gl.viewport(e2[0], e2[1], e2[2], e2[3]), this.current = e2, this.dirty = false);\n }\n }\n class Wa extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.bindFramebuffer(t2.FRAMEBUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n class $a extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.bindRenderbuffer(t2.RENDERBUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n class Ha extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.bindTexture(t2.TEXTURE_2D, e2), this.current = e2, this.dirty = false;\n }\n }\n class Xa extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.bindBuffer(t2.ARRAY_BUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n class Ka extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n const t2 = this.gl;\n t2.bindBuffer(t2.ELEMENT_ARRAY_BUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n class Ya extends Ta {\n getDefault() {\n return null;\n }\n set(e2) {\n var t2;\n if (e2 === this.current && !this.dirty) return;\n const i2 = this.gl;\n oi(i2) ? i2.bindVertexArray(e2) : null === (t2 = i2.getExtension(\"OES_vertex_array_object\")) || void 0 === t2 || t2.bindVertexArrayOES(e2), this.current = e2, this.dirty = false;\n }\n }\n class Qa extends Ta {\n getDefault() {\n return 4;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.pixelStorei(t2.UNPACK_ALIGNMENT, e2), this.current = e2, this.dirty = false;\n }\n }\n class Ja extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.pixelStorei(t2.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e2), this.current = e2, this.dirty = false;\n }\n }\n class er extends Ta {\n getDefault() {\n return false;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n const t2 = this.gl;\n t2.pixelStorei(t2.UNPACK_FLIP_Y_WEBGL, e2), this.current = e2, this.dirty = false;\n }\n }\n class tr extends Ta {\n constructor(e2, t2) {\n super(e2), this.context = e2, this.parent = t2;\n }\n getDefault() {\n return null;\n }\n }\n class ir extends tr {\n setDirty() {\n this.dirty = true;\n }\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n const t2 = this.gl;\n t2.framebufferTexture2D(t2.FRAMEBUFFER, t2.COLOR_ATTACHMENT0, t2.TEXTURE_2D, e2, 0), this.current = e2, this.dirty = false;\n }\n }\n class ar extends tr {\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n const t2 = this.gl;\n t2.framebufferRenderbuffer(t2.FRAMEBUFFER, t2.DEPTH_ATTACHMENT, t2.RENDERBUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n class rr extends tr {\n set(e2) {\n if (e2 === this.current && !this.dirty) return;\n this.context.bindFramebuffer.set(this.parent);\n const t2 = this.gl;\n t2.framebufferRenderbuffer(t2.FRAMEBUFFER, t2.DEPTH_STENCIL_ATTACHMENT, t2.RENDERBUFFER, e2), this.current = e2, this.dirty = false;\n }\n }\n const or = \"Framebuffer is not complete\";\n class sr {\n constructor(e2, t2, i2, a2, r2) {\n this.context = e2, this.width = t2, this.height = i2;\n const o2 = e2.gl, s2 = this.framebuffer = o2.createFramebuffer();\n if (this.colorAttachment = new ir(e2, s2), a2) this.depthAttachment = r2 ? new rr(e2, s2) : new ar(e2, s2);\n else if (r2) throw new Error(\"Stencil cannot be set without depth\");\n if (o2.checkFramebufferStatus(o2.FRAMEBUFFER) !== o2.FRAMEBUFFER_COMPLETE) throw new Error(or);\n }\n destroy() {\n const e2 = this.context.gl, t2 = this.colorAttachment.get();\n if (t2 && e2.deleteTexture(t2), this.depthAttachment) {\n const t3 = this.depthAttachment.get();\n t3 && e2.deleteRenderbuffer(t3);\n }\n e2.deleteFramebuffer(this.framebuffer);\n }\n }\n class nr {\n constructor(e2) {\n var t2, i2;\n if (this.gl = e2, this.clearColor = new Pa(this), this.clearDepth = new Ia(this), this.clearStencil = new Ca(this), this.colorMask = new Ma(this), this.depthMask = new Ea(this), this.stencilMask = new Sa(this), this.stencilFunc = new Ra(this), this.stencilOp = new za(this), this.stencilTest = new Da(this), this.depthRange = new Aa(this), this.depthTest = new La(this), this.depthFunc = new ka(this), this.blend = new Fa(this), this.blendFunc = new Ba(this), this.blendColor = new Oa(this), this.blendEquation = new ja(this), this.cullFace = new Na(this), this.cullFaceSide = new Za(this), this.frontFace = new Ga(this), this.program = new Ua(this), this.activeTexture = new Va(this), this.viewport = new qa(this), this.bindFramebuffer = new Wa(this), this.bindRenderbuffer = new $a(this), this.bindTexture = new Ha(this), this.bindVertexBuffer = new Xa(this), this.bindElementBuffer = new Ka(this), this.bindVertexArray = new Ya(this), this.pixelStoreUnpack = new Qa(this), this.pixelStoreUnpackPremultiplyAlpha = new Ja(this), this.pixelStoreUnpackFlipY = new er(this), this.extTextureFilterAnisotropic = e2.getExtension(\"EXT_texture_filter_anisotropic\") || e2.getExtension(\"MOZ_EXT_texture_filter_anisotropic\") || e2.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = e2.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = e2.getParameter(e2.MAX_TEXTURE_SIZE), oi(e2)) {\n this.HALF_FLOAT = e2.HALF_FLOAT;\n const a2 = e2.getExtension(\"EXT_color_buffer_half_float\");\n this.RGBA16F = null !== (t2 = e2.RGBA16F) && void 0 !== t2 ? t2 : null == a2 ? void 0 : a2.RGBA16F_EXT, this.RGB16F = null !== (i2 = e2.RGB16F) && void 0 !== i2 ? i2 : null == a2 ? void 0 : a2.RGB16F_EXT, e2.getExtension(\"EXT_color_buffer_float\");\n } else {\n e2.getExtension(\"EXT_color_buffer_half_float\"), e2.getExtension(\"OES_texture_half_float_linear\");\n const t3 = e2.getExtension(\"OES_texture_half_float\");\n this.HALF_FLOAT = null == t3 ? void 0 : t3.HALF_FLOAT_OES;\n }\n }\n setDefault() {\n this.unbindVAO(), this.clearColor.setDefault(), this.clearDepth.setDefault(), this.clearStencil.setDefault(), this.colorMask.setDefault(), this.depthMask.setDefault(), this.stencilMask.setDefault(), this.stencilFunc.setDefault(), this.stencilOp.setDefault(), this.stencilTest.setDefault(), this.depthRange.setDefault(), this.depthTest.setDefault(), this.depthFunc.setDefault(), this.blend.setDefault(), this.blendFunc.setDefault(), this.blendColor.setDefault(), this.blendEquation.setDefault(), this.cullFace.setDefault(), this.cullFaceSide.setDefault(), this.frontFace.setDefault(), this.program.setDefault(), this.activeTexture.setDefault(), this.bindFramebuffer.setDefault(), this.pixelStoreUnpack.setDefault(), this.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.pixelStoreUnpackFlipY.setDefault();\n }\n setDirty() {\n this.clearColor.dirty = true, this.clearDepth.dirty = true, this.clearStencil.dirty = true, this.colorMask.dirty = true, this.depthMask.dirty = true, this.stencilMask.dirty = true, this.stencilFunc.dirty = true, this.stencilOp.dirty = true, this.stencilTest.dirty = true, this.depthRange.dirty = true, this.depthTest.dirty = true, this.depthFunc.dirty = true, this.blend.dirty = true, this.blendFunc.dirty = true, this.blendColor.dirty = true, this.blendEquation.dirty = true, this.cullFace.dirty = true, this.cullFaceSide.dirty = true, this.frontFace.dirty = true, this.program.dirty = true, this.activeTexture.dirty = true, this.viewport.dirty = true, this.bindFramebuffer.dirty = true, this.bindRenderbuffer.dirty = true, this.bindTexture.dirty = true, this.bindVertexBuffer.dirty = true, this.bindElementBuffer.dirty = true, this.bindVertexArray.dirty = true, this.pixelStoreUnpack.dirty = true, this.pixelStoreUnpackPremultiplyAlpha.dirty = true, this.pixelStoreUnpackFlipY.dirty = true;\n }\n createIndexBuffer(e2, t2) {\n return new ba(this, e2, t2);\n }\n createVertexBuffer(e2, t2, i2) {\n return new wa(this, e2, t2, i2);\n }\n createRenderbuffer(e2, t2, i2) {\n const a2 = this.gl, r2 = a2.createRenderbuffer();\n return this.bindRenderbuffer.set(r2), a2.renderbufferStorage(a2.RENDERBUFFER, e2, t2, i2), this.bindRenderbuffer.set(null), r2;\n }\n createFramebuffer(e2, t2, i2, a2) {\n return new sr(this, e2, t2, i2, a2);\n }\n clear({ color: e2, depth: t2, stencil: i2 }) {\n const a2 = this.gl;\n let r2 = 0;\n e2 && (r2 |= a2.COLOR_BUFFER_BIT, this.clearColor.set(e2), this.colorMask.set([true, true, true, true])), void 0 !== t2 && (r2 |= a2.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(t2), this.depthMask.set(true)), void 0 !== i2 && (r2 |= a2.STENCIL_BUFFER_BIT, this.clearStencil.set(i2), this.stencilMask.set(255)), a2.clear(r2);\n }\n setCullFace(e2) {\n false === e2.enable ? this.cullFace.set(false) : (this.cullFace.set(true), this.cullFaceSide.set(e2.mode), this.frontFace.set(e2.frontFace));\n }\n setDepthMode(e2) {\n e2.func !== this.gl.ALWAYS || e2.mask ? (this.depthTest.set(true), this.depthFunc.set(e2.func), this.depthMask.set(e2.mask), this.depthRange.set(e2.range)) : this.depthTest.set(false);\n }\n setStencilMode(e2) {\n e2.test.func !== this.gl.ALWAYS || e2.mask ? (this.stencilTest.set(true), this.stencilMask.set(e2.mask), this.stencilOp.set([e2.fail, e2.depthFail, e2.pass]), this.stencilFunc.set({ func: e2.test.func, ref: e2.ref, mask: e2.test.mask })) : this.stencilTest.set(false);\n }\n setColorMode(e2) {\n t.bS(e2.blendFunction, Qt.Replace) ? this.blend.set(false) : (this.blend.set(true), this.blendFunc.set(e2.blendFunction), this.blendColor.set(e2.blendColor)), this.colorMask.set(e2.mask);\n }\n createVertexArray() {\n var e2;\n return oi(this.gl) ? this.gl.createVertexArray() : null === (e2 = this.gl.getExtension(\"OES_vertex_array_object\")) || void 0 === e2 ? void 0 : e2.createVertexArrayOES();\n }\n deleteVertexArray(e2) {\n var t2;\n return oi(this.gl) ? this.gl.deleteVertexArray(e2) : null === (t2 = this.gl.getExtension(\"OES_vertex_array_object\")) || void 0 === t2 ? void 0 : t2.deleteVertexArrayOES(e2);\n }\n unbindVAO() {\n this.bindVertexArray.set(null);\n }\n }\n let lr;\n function cr(e2, i2, a2, r2, o2) {\n const s2 = e2.context, n2 = e2.transform, l2 = s2.gl, c2 = e2.useProgram(\"collisionBox\"), h2 = [];\n let u2 = 0, d2 = 0;\n for (let t2 = 0; t2 < r2.length; t2++) {\n const _3 = r2[t2], p3 = i2.getTile(_3).getBucket(a2);\n if (!p3) continue;\n const m3 = o2 ? p3.textCollisionBox : p3.iconCollisionBox, f3 = p3.collisionCircleArray;\n f3.length > 0 && (h2.push({ circleArray: f3, circleOffset: d2, coord: _3 }), u2 += f3.length / 4, d2 = u2), m3 && c2.draw(s2, l2.LINES, ti.disabled, ai.disabled, e2.colorModeForRenderPass(), ei.disabled, Xi(e2.transform), e2.style.map.terrain && e2.style.map.terrain.getTerrainData(_3), n2.getProjectionData({ overscaledTileID: _3, applyGlobeMatrix: true, applyTerrainMatrix: true }), a2.id, m3.layoutVertexBuffer, m3.indexBuffer, m3.segments, null, e2.transform.zoom, null, null, m3.collisionVertexBuffer);\n }\n if (!o2 || !h2.length) return;\n const _2 = e2.useProgram(\"collisionCircle\"), p2 = new t.cb();\n p2.resize(4 * u2), p2._trim();\n let m2 = 0;\n for (const e3 of h2) for (let t2 = 0; t2 < e3.circleArray.length / 4; t2++) {\n const i3 = 4 * t2, a3 = e3.circleArray[i3 + 0], r3 = e3.circleArray[i3 + 1], o3 = e3.circleArray[i3 + 2], s3 = e3.circleArray[i3 + 3];\n p2.emplace(m2++, a3, r3, o3, s3, 0), p2.emplace(m2++, a3, r3, o3, s3, 1), p2.emplace(m2++, a3, r3, o3, s3, 2), p2.emplace(m2++, a3, r3, o3, s3, 3);\n }\n (!lr || lr.length < 2 * u2) && (lr = (function(e3) {\n const i3 = 2 * e3, a3 = new t.cd();\n a3.resize(i3), a3._trim();\n for (let e4 = 0; e4 < i3; e4++) {\n const t2 = 6 * e4;\n a3.uint16[t2 + 0] = 4 * e4 + 0, a3.uint16[t2 + 1] = 4 * e4 + 1, a3.uint16[t2 + 2] = 4 * e4 + 2, a3.uint16[t2 + 3] = 4 * e4 + 2, a3.uint16[t2 + 4] = 4 * e4 + 3, a3.uint16[t2 + 5] = 4 * e4 + 0;\n }\n return a3;\n })(u2));\n const f2 = s2.createIndexBuffer(lr, true), g2 = s2.createVertexBuffer(p2, t.cc.members, true);\n for (const i3 of h2) {\n const r3 = Ki(e2.transform);\n _2.draw(s2, l2.TRIANGLES, ti.disabled, ai.disabled, e2.colorModeForRenderPass(), ei.disabled, r3, e2.style.map.terrain && e2.style.map.terrain.getTerrainData(i3.coord), null, a2.id, g2, f2, t.aY.simpleSegment(0, 2 * i3.circleOffset, i3.circleArray.length, i3.circleArray.length / 2), null, e2.transform.zoom, null, null, null);\n }\n g2.destroy(), f2.destroy();\n }\n const hr = t.as(new Float32Array(16));\n function ur(e2, i2, a2, r2, o2, s2) {\n const { horizontalAlign: n2, verticalAlign: l2 } = t.aT(e2);\n return new t.P((-(n2 - 0.5) * i2 / o2 + r2[0]) * s2, (-(l2 - 0.5) * a2 / o2 + r2[1]) * s2);\n }\n function dr(e2, i2, a2, r2, o2, s2) {\n const n2 = i2.tileAnchorPoint.add(new t.P(i2.translation[0], i2.translation[1]));\n if (i2.pitchWithMap) {\n let e3 = r2.mult(s2);\n a2 || (e3 = e3.rotate(-o2));\n const t2 = n2.add(e3);\n return Ge(t2.x, t2.y, i2.pitchedLabelPlaneMatrix, i2.getElevation).point;\n }\n if (a2) {\n const t2 = Ye(i2.tileAnchorPoint.x + 1, i2.tileAnchorPoint.y, i2).point.sub(e2), a3 = Math.atan(t2.y / t2.x) + (t2.x < 0 ? Math.PI : 0);\n return e2.add(r2.rotate(a3));\n }\n return e2.add(r2);\n }\n function _r(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2) {\n const _2 = e2.text.placedSymbolArray, p2 = e2.text.dynamicLayoutVertexArray, m2 = e2.icon.dynamicLayoutVertexArray, f2 = {};\n p2.clear();\n for (let m3 = 0; m3 < _2.length; m3++) {\n const g2 = _2.get(m3), v2 = g2.hidden || !g2.crossTileID || e2.allowVerticalPlacement && !g2.placedOrientation ? null : r2[g2.crossTileID];\n if (v2) {\n const r3 = new t.P(g2.anchorX, g2.anchorY), _3 = { getElevation: d2, width: o2.width, height: o2.height, pitchedLabelPlaneMatrix: s2, pitchWithMap: a2, transform: o2, tileAnchorPoint: r3, translation: h2, unwrappedTileID: u2 }, m4 = a2 ? Je(r3.x, r3.y, _3) : Ye(r3.x, r3.y, _3), x2 = Ue(o2.cameraToCenterDistance, m4.signedDistanceFromCamera);\n let b2 = t.aB(e2.textSizeData, l2, g2) * x2 / t.aN;\n a2 && (b2 *= e2.tilePixelRatio / n2);\n const { width: y2, height: w2, anchor: T2, textOffset: P2, textBoxScale: I2 } = v2, C2 = ur(T2, y2, w2, P2, I2, b2), M2 = o2.getPitchedTextCorrection(r3.x + h2[0], r3.y + h2[1], u2), E2 = dr(m4.point, _3, i2, C2, -o2.bearingInRadians, M2), S2 = e2.allowVerticalPlacement && g2.placedOrientation === t.aA.vertical ? Math.PI / 2 : 0;\n for (let e3 = 0; e3 < g2.numGlyphs; e3++) t.aH(p2, E2, S2);\n c2 && g2.associatedIconIndex >= 0 && (f2[g2.associatedIconIndex] = { shiftedAnchor: E2, angle: S2 });\n } else rt(g2.numGlyphs, p2);\n }\n if (c2) {\n m2.clear();\n const i3 = e2.icon.placedSymbolArray;\n for (let e3 = 0; e3 < i3.length; e3++) {\n const a3 = i3.get(e3);\n if (a3.hidden) rt(a3.numGlyphs, m2);\n else {\n const i4 = f2[e3];\n if (i4) for (let e4 = 0; e4 < a3.numGlyphs; e4++) t.aH(m2, i4.shiftedAnchor, i4.angle);\n else rt(a3.numGlyphs, m2);\n }\n }\n e2.icon.dynamicLayoutVertexBuffer.updateData(m2);\n }\n e2.text.dynamicLayoutVertexBuffer.updateData(p2);\n }\n function pr(e2, t2, i2) {\n return i2.iconsInText && t2 ? \"symbolTextAndIcon\" : e2 ? \"symbolSDF\" : \"symbolIcon\";\n }\n function mr(e2, i2, a2, r2, o2, s2, n2, l2, c2, h2, u2, d2, _2) {\n const p2 = e2.context, m2 = p2.gl, f2 = e2.transform, g2 = \"map\" === l2, v2 = \"map\" === c2, x2 = \"viewport\" !== l2 && \"point\" !== a2.layout.get(\"symbol-placement\"), b2 = g2 && !v2 && !x2, y2 = !a2.layout.get(\"symbol-sort-key\").isConstant();\n let w2 = false;\n const T2 = e2.getDepthModeForSublayer(0, ti.ReadOnly), P2 = a2._unevaluatedLayout.hasValue(\"text-variable-anchor\") || a2._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"), I2 = [], C2 = f2.getCircleRadiusCorrection();\n for (const l3 of r2) {\n const r3 = i2.getTile(l3), c3 = r3.getBucket(a2);\n if (!c3) continue;\n const u3 = o2 ? c3.text : c3.icon;\n if (!u3 || !u3.segments.get().length || !u3.hasVisibleVertices) continue;\n const d3 = u3.programConfigurations.get(a2.id), p3 = o2 || c3.sdfIcons, T3 = o2 ? c3.textSizeData : c3.iconSizeData, M2 = v2 || 0 !== f2.pitch, E2 = e2.useProgram(pr(p3, o2, c3), d3), S2 = t.az(T3, f2.zoom), R2 = e2.style.map.terrain && e2.style.map.terrain.getTerrainData(l3);\n let z2, D2, A2, L2, k2 = [0, 0], F2 = null;\n if (o2) D2 = r3.glyphAtlasTexture, A2 = m2.LINEAR, z2 = r3.glyphAtlasTexture.size, c3.iconsInText && (k2 = r3.imageAtlasTexture.size, F2 = r3.imageAtlasTexture, L2 = M2 || e2.options.rotating || e2.options.zooming || \"composite\" === T3.kind || \"camera\" === T3.kind ? m2.LINEAR : m2.NEAREST);\n else {\n const t2 = 1 !== a2.layout.get(\"icon-size\").constantOr(0) || c3.iconsNeedLinear;\n D2 = r3.imageAtlasTexture, A2 = p3 || e2.options.rotating || e2.options.zooming || t2 || M2 ? m2.LINEAR : m2.NEAREST, z2 = r3.imageAtlasTexture.size;\n }\n const B2 = t.aO(r3, 1, e2.transform.zoom), O2 = je(g2, e2.transform, B2), j2 = t.N();\n t.aC(j2, O2);\n const N2 = Ne(v2, g2, e2.transform, B2), Z2 = t.aP(f2, r3, s2, n2), G2 = f2.getProjectionData({ overscaledTileID: l3, applyGlobeMatrix: !_2, applyTerrainMatrix: true }), U2 = P2 && c3.hasTextData(), V2 = \"none\" !== a2.layout.get(\"icon-text-fit\") && U2 && c3.hasIconData();\n if (x2) {\n const t2 = e2.style.map.terrain ? (t3, i4) => e2.style.map.terrain.getElevation(l3, t3, i4) : null, i3 = \"map\" === a2.layout.get(\"text-rotation-alignment\");\n qe(c3, e2, o2, O2, j2, v2, h2, i3, l3.toUnwrapped(), f2.width, f2.height, Z2, t2);\n }\n const q2 = o2 && P2 || V2, W2 = x2 || q2 ? hr : v2 ? O2 : e2.transform.clipSpaceToPixelsMatrix, $2 = p3 && 0 !== a2.paint.get(o2 ? \"text-halo-width\" : \"icon-halo-width\").constantOr(1);\n let H2;\n H2 = p3 ? c3.iconsInText ? ma(T3.kind, S2, b2, v2, x2, q2, e2, W2, N2, Z2, z2, k2, C2) : pa(T3.kind, S2, b2, v2, x2, q2, e2, W2, N2, Z2, o2, z2, 0, C2) : _a(T3.kind, S2, b2, v2, x2, q2, e2, W2, N2, Z2, o2, z2, C2);\n const X2 = { program: E2, buffers: u3, uniformValues: H2, projectionData: G2, atlasTexture: D2, atlasTextureIcon: F2, atlasInterpolation: A2, atlasInterpolationIcon: L2, isSDF: p3, hasHalo: $2 };\n if (y2 && c3.canOverlap) {\n w2 = true;\n const e3 = u3.segments.get();\n for (const i3 of e3) I2.push({ segments: new t.aY([i3]), sortKey: i3.sortKey, state: X2, terrainData: R2 });\n } else I2.push({ segments: u3.segments, sortKey: 0, state: X2, terrainData: R2 });\n }\n w2 && I2.sort(((e3, t2) => e3.sortKey - t2.sortKey));\n for (const t2 of I2) {\n const i3 = t2.state;\n if (p2.activeTexture.set(m2.TEXTURE0), i3.atlasTexture.bind(i3.atlasInterpolation, m2.CLAMP_TO_EDGE), i3.atlasTextureIcon && (p2.activeTexture.set(m2.TEXTURE1), i3.atlasTextureIcon && i3.atlasTextureIcon.bind(i3.atlasInterpolationIcon, m2.CLAMP_TO_EDGE)), i3.isSDF) {\n const r3 = i3.uniformValues;\n i3.hasHalo && (r3.u_is_halo = 1, fr(i3.buffers, t2.segments, a2, e2, i3.program, T2, u2, d2, r3, i3.projectionData, t2.terrainData)), r3.u_is_halo = 0;\n }\n fr(i3.buffers, t2.segments, a2, e2, i3.program, T2, u2, d2, i3.uniformValues, i3.projectionData, t2.terrainData);\n }\n }\n function fr(e2, t2, i2, a2, r2, o2, s2, n2, l2, c2, h2) {\n const u2 = a2.context;\n r2.draw(u2, u2.gl.TRIANGLES, o2, s2, n2, ei.backCCW, l2, h2, c2, i2.id, e2.layoutVertexBuffer, e2.indexBuffer, t2, i2.paint, a2.transform.zoom, e2.programConfigurations.get(i2.id), e2.dynamicLayoutVertexBuffer, e2.opacityVertexBuffer);\n }\n function gr(e2, i2, a2, r2, o2) {\n const s2 = e2.context, n2 = s2.gl, l2 = ai.disabled, c2 = new Qt([n2.ONE, n2.ONE], t.bq.transparent, [true, true, true, true]), h2 = i2.getBucket(a2);\n if (!h2) return;\n const u2 = r2.key;\n let d2 = a2.heatmapFbos.get(u2);\n d2 || (d2 = xr(s2, i2.tileSize, i2.tileSize), a2.heatmapFbos.set(u2, d2)), s2.bindFramebuffer.set(d2.framebuffer), s2.viewport.set([0, 0, i2.tileSize, i2.tileSize]), s2.clear({ color: t.bq.transparent });\n const _2 = h2.programConfigurations.get(a2.id), p2 = e2.useProgram(\"heatmap\", _2, !o2), m2 = e2.transform.getProjectionData({ overscaledTileID: i2.tileID, applyGlobeMatrix: true, applyTerrainMatrix: true }), f2 = e2.style.map.terrain.getTerrainData(r2);\n p2.draw(s2, n2.TRIANGLES, ti.disabled, l2, c2, ei.disabled, Qi(i2, e2.transform.zoom, a2.paint.get(\"heatmap-intensity\"), 1), f2, m2, a2.id, h2.layoutVertexBuffer, h2.indexBuffer, h2.segments, a2.paint, e2.transform.zoom, _2);\n }\n function vr(e2, t2, i2, a2, r2) {\n const o2 = e2.context, s2 = o2.gl, n2 = e2.transform;\n o2.setColorMode(e2.colorModeForRenderPass());\n const l2 = br(o2, t2), c2 = i2.key, h2 = t2.heatmapFbos.get(c2);\n if (!h2) return;\n o2.activeTexture.set(s2.TEXTURE0), s2.bindTexture(s2.TEXTURE_2D, h2.colorAttachment.get()), o2.activeTexture.set(s2.TEXTURE1), l2.bind(s2.LINEAR, s2.CLAMP_TO_EDGE);\n const u2 = n2.getProjectionData({ overscaledTileID: i2, applyTerrainMatrix: r2, applyGlobeMatrix: !a2 });\n e2.useProgram(\"heatmapTexture\").draw(o2, s2.TRIANGLES, ti.disabled, ai.disabled, e2.colorModeForRenderPass(), ei.disabled, Ji(e2, t2, 0, 1), null, u2, t2.id, e2.rasterBoundsBuffer, e2.quadTriangleIndexBuffer, e2.rasterBoundsSegments, t2.paint, n2.zoom), h2.destroy(), t2.heatmapFbos.delete(c2);\n }\n function xr(e2, t2, i2) {\n var a2, r2;\n const o2 = e2.gl, s2 = o2.createTexture();\n o2.bindTexture(o2.TEXTURE_2D, s2), o2.texParameteri(o2.TEXTURE_2D, o2.TEXTURE_WRAP_S, o2.CLAMP_TO_EDGE), o2.texParameteri(o2.TEXTURE_2D, o2.TEXTURE_WRAP_T, o2.CLAMP_TO_EDGE), o2.texParameteri(o2.TEXTURE_2D, o2.TEXTURE_MIN_FILTER, o2.LINEAR), o2.texParameteri(o2.TEXTURE_2D, o2.TEXTURE_MAG_FILTER, o2.LINEAR);\n const n2 = null !== (a2 = e2.HALF_FLOAT) && void 0 !== a2 ? a2 : o2.UNSIGNED_BYTE, l2 = null !== (r2 = e2.RGBA16F) && void 0 !== r2 ? r2 : o2.RGBA;\n o2.texImage2D(o2.TEXTURE_2D, 0, l2, t2, i2, 0, o2.RGBA, n2, null);\n const c2 = e2.createFramebuffer(t2, i2, false, false);\n return c2.colorAttachment.set(s2), c2;\n }\n function br(e2, i2) {\n return i2.colorRampTexture || (i2.colorRampTexture = new t.T(e2, i2.colorRamp, e2.gl.RGBA)), i2.colorRampTexture;\n }\n function yr(e2, i2, a2, r2, o2, s2, n2, l2) {\n let c2 = 256;\n if (o2.stepInterpolant) {\n const r3 = i2.getSource().maxzoom, o3 = n2.canonical.z === r3 ? Math.ceil(1 << e2.transform.maxZoom - n2.canonical.z) : 1;\n c2 = t.ao(t.cf(s2.maxLineLength / t.a5 * 1024 * o3), 256, a2.maxTextureSize);\n }\n return l2.gradient = t.cg({ expression: o2.gradientExpression(), evaluationKey: \"lineProgress\", resolution: c2, image: l2.gradient || void 0, clips: s2.lineClipsArray }), l2.texture ? l2.texture.update(l2.gradient) : l2.texture = new t.T(a2, l2.gradient, r2.RGBA), l2.version = o2.gradientVersion, l2.texture;\n }\n function wr(e2, t2, i2, a2, r2) {\n e2.activeTexture.set(t2.TEXTURE0), i2.imageAtlasTexture.bind(t2.LINEAR, t2.CLAMP_TO_EDGE), a2.updatePaintBuffers(r2);\n }\n function Tr(e2, t2, i2, a2, r2, o2) {\n (r2 || e2.lineAtlas.dirty) && (t2.activeTexture.set(i2.TEXTURE0), e2.lineAtlas.bind(t2)), a2.updatePaintBuffers(o2);\n }\n function Pr(e2, t2, i2, a2, r2, o2, s2) {\n const n2 = o2.gradients[r2.id];\n let l2 = n2.texture;\n r2.gradientVersion !== n2.version && (l2 = yr(e2, t2, i2, a2, r2, o2, s2, n2)), i2.activeTexture.set(a2.TEXTURE0), l2.bind(r2.stepInterpolant ? a2.NEAREST : a2.LINEAR, a2.CLAMP_TO_EDGE);\n }\n function Ir(e2, t2, i2, a2, r2, o2, s2, n2, l2) {\n const c2 = o2.gradients[r2.id];\n let h2 = c2.texture;\n r2.gradientVersion !== c2.version && (h2 = yr(e2, t2, i2, a2, r2, o2, s2, c2)), i2.activeTexture.set(a2.TEXTURE0), h2.bind(r2.stepInterpolant ? a2.NEAREST : a2.LINEAR, a2.CLAMP_TO_EDGE), i2.activeTexture.set(a2.TEXTURE1), e2.lineAtlas.bind(i2), n2.updatePaintBuffers(l2);\n }\n function Cr(e2, t2, i2, a2, r2) {\n if (!i2 || !a2 || !a2.imageAtlas) return;\n const o2 = a2.imageAtlas.patternPositions;\n let s2 = o2[i2.to.toString()], n2 = o2[i2.from.toString()];\n if (!s2 && n2 && (s2 = n2), !n2 && s2 && (n2 = s2), !s2 || !n2) {\n const e3 = r2.getPaintProperty(t2);\n s2 = o2[e3], n2 = o2[e3];\n }\n s2 && n2 && e2.setConstantPatternPositions(s2, n2);\n }\n function Mr(e2, i2, a2, r2, o2, s2, n2, l2) {\n const c2 = e2.context.gl, h2 = \"fill-pattern\", u2 = a2.paint.get(h2), d2 = u2 && u2.constantOr(1), _2 = a2.getCrossfadeParameters();\n let p2, m2, f2, g2, v2;\n const x2 = e2.transform, b2 = a2.paint.get(\"fill-translate\"), y2 = a2.paint.get(\"fill-translate-anchor\");\n n2 ? (m2 = d2 && !a2.getPaintProperty(\"fill-outline-color\") ? \"fillOutlinePattern\" : \"fillOutline\", p2 = c2.LINES) : (m2 = d2 ? \"fillPattern\" : \"fill\", p2 = c2.TRIANGLES);\n const w2 = u2.constantOr(null);\n for (const u3 of r2) {\n const r3 = i2.getTile(u3);\n if (d2 && !r3.patternsLoaded()) continue;\n const T2 = r3.getBucket(a2);\n if (!T2) continue;\n const P2 = T2.programConfigurations.get(a2.id), I2 = e2.useProgram(m2, P2), C2 = e2.style.map.terrain && e2.style.map.terrain.getTerrainData(u3);\n d2 && (e2.context.activeTexture.set(c2.TEXTURE0), r3.imageAtlasTexture.bind(c2.LINEAR, c2.CLAMP_TO_EDGE), P2.updatePaintBuffers(_2)), Cr(P2, h2, w2, r3, a2);\n const M2 = x2.getProjectionData({ overscaledTileID: u3, applyGlobeMatrix: !l2, applyTerrainMatrix: true }), E2 = t.aP(x2, r3, b2, y2);\n if (n2) {\n g2 = T2.indexBuffer2, v2 = T2.segments2;\n const t2 = [c2.drawingBufferWidth, c2.drawingBufferHeight];\n f2 = \"fillOutlinePattern\" === m2 && d2 ? $i(e2, _2, r3, t2, E2) : Wi(t2, E2);\n } else g2 = T2.indexBuffer, v2 = T2.segments, f2 = d2 ? qi(e2, _2, r3, E2) : { u_fill_translate: E2 };\n const S2 = e2.stencilModeForClipping(u3);\n I2.draw(e2.context, p2, o2, S2, s2, ei.backCCW, f2, C2, M2, a2.id, T2.layoutVertexBuffer, g2, v2, a2.paint, e2.transform.zoom, P2);\n }\n }\n function Er(e2, i2, a2, r2, o2, s2, n2, l2) {\n const c2 = e2.context, h2 = c2.gl, u2 = \"fill-extrusion-pattern\", d2 = a2.paint.get(u2), _2 = d2.constantOr(1), p2 = a2.getCrossfadeParameters(), m2 = a2.paint.get(\"fill-extrusion-opacity\"), f2 = d2.constantOr(null), g2 = e2.transform;\n for (const d3 of r2) {\n const r3 = i2.getTile(d3), v2 = r3.getBucket(a2);\n if (!v2) continue;\n const x2 = e2.style.map.terrain && e2.style.map.terrain.getTerrainData(d3), b2 = v2.programConfigurations.get(a2.id), y2 = e2.useProgram(_2 ? \"fillExtrusionPattern\" : \"fillExtrusion\", b2);\n _2 && (e2.context.activeTexture.set(h2.TEXTURE0), r3.imageAtlasTexture.bind(h2.LINEAR, h2.CLAMP_TO_EDGE), b2.updatePaintBuffers(p2));\n const w2 = g2.getProjectionData({ overscaledTileID: d3, applyGlobeMatrix: !l2, applyTerrainMatrix: true });\n Cr(b2, u2, f2, r3, a2);\n const T2 = t.aP(g2, r3, a2.paint.get(\"fill-extrusion-translate\"), a2.paint.get(\"fill-extrusion-translate-anchor\")), P2 = a2.paint.get(\"fill-extrusion-vertical-gradient\"), I2 = _2 ? Vi(e2, P2, m2, T2, d3, p2, r3) : Ui(e2, P2, m2, T2);\n y2.draw(c2, c2.gl.TRIANGLES, o2, s2, n2, ei.backCCW, I2, x2, w2, a2.id, v2.layoutVertexBuffer, v2.indexBuffer, v2.segments, a2.paint, e2.transform.zoom, b2, e2.style.map.terrain && v2.centroidVertexBuffer);\n }\n }\n function Sr(e2, t2, i2, a2, r2, o2, s2, n2, l2) {\n var c2;\n const h2 = e2.style.projection, u2 = e2.context, d2 = e2.transform, _2 = u2.gl, p2 = [`#define NUM_ILLUMINATION_SOURCES ${i2.paint.get(\"hillshade-highlight-color\").values.length}`], m2 = e2.useProgram(\"hillshade\", null, false, p2), f2 = !e2.options.moving;\n for (const p3 of a2) {\n const a3 = t2.getTile(p3), g2 = a3.fbo;\n if (!g2) continue;\n const v2 = h2.getMeshFromTileID(u2, p3.canonical, n2, true, \"raster\"), x2 = null === (c2 = e2.style.map.terrain) || void 0 === c2 ? void 0 : c2.getTerrainData(p3);\n u2.activeTexture.set(_2.TEXTURE0), _2.bindTexture(_2.TEXTURE_2D, g2.colorAttachment.get());\n const b2 = d2.getProjectionData({ overscaledTileID: p3, aligned: f2, applyGlobeMatrix: !l2, applyTerrainMatrix: true });\n m2.draw(u2, _2.TRIANGLES, o2, r2[p3.overscaledZ], s2, ei.backCCW, ea(e2, a3, i2), x2, b2, i2.id, v2.vertexBuffer, v2.indexBuffer, v2.segments);\n }\n }\n function Rr(e2, i2, a2, r2, o2, s2, n2, l2, c2) {\n var h2;\n const u2 = e2.style.projection, d2 = e2.context, _2 = e2.transform, p2 = d2.gl, m2 = e2.useProgram(\"colorRelief\"), f2 = !e2.options.moving;\n let g2 = true, v2 = 0;\n for (const x2 of r2) {\n const r3 = i2.getTile(x2), b2 = r3.dem;\n if (g2) {\n const e3 = p2.getParameter(p2.MAX_TEXTURE_SIZE), { elevationTexture: t2, colorTexture: i3 } = a2.getColorRampTextures(d2, e3, b2.getUnpackVector());\n d2.activeTexture.set(p2.TEXTURE1), t2.bind(p2.NEAREST, p2.CLAMP_TO_EDGE), d2.activeTexture.set(p2.TEXTURE4), i3.bind(p2.LINEAR, p2.CLAMP_TO_EDGE), g2 = false, v2 = t2.size[0];\n }\n if (!b2 || !b2.data) continue;\n const y2 = b2.stride, w2 = b2.getPixels();\n if (d2.activeTexture.set(p2.TEXTURE0), d2.pixelStoreUnpackPremultiplyAlpha.set(false), r3.demTexture = r3.demTexture || e2.getTileTexture(y2), r3.demTexture) {\n const e3 = r3.demTexture;\n e3.update(w2, { premultiply: false }), e3.bind(p2.LINEAR, p2.CLAMP_TO_EDGE);\n } else r3.demTexture = new t.T(d2, w2, p2.RGBA, { premultiply: false }), r3.demTexture.bind(p2.LINEAR, p2.CLAMP_TO_EDGE);\n const T2 = u2.getMeshFromTileID(d2, x2.canonical, l2, true, \"raster\"), P2 = null === (h2 = e2.style.map.terrain) || void 0 === h2 ? void 0 : h2.getTerrainData(x2), I2 = _2.getProjectionData({ overscaledTileID: x2, aligned: f2, applyGlobeMatrix: !c2, applyTerrainMatrix: true });\n m2.draw(d2, p2.TRIANGLES, s2, o2[x2.overscaledZ], n2, ei.backCCW, aa(a2, r3.dem, v2), P2, I2, a2.id, T2.vertexBuffer, T2.indexBuffer, T2.segments);\n }\n }\n const zr = [new t.P(0, 0), new t.P(t.a5, 0), new t.P(t.a5, t.a5), new t.P(0, t.a5)];\n function Dr(e2, t2, i2, a2, r2, o2, s2, n2, l2 = false, c2 = false) {\n const h2 = a2[a2.length - 1].overscaledZ, u2 = e2.context, d2 = u2.gl, _2 = e2.useProgram(\"raster\"), p2 = e2.transform, m2 = e2.style.projection, f2 = e2.colorModeForRenderPass(), g2 = !e2.options.moving, v2 = i2.paint.get(\"raster-opacity\"), x2 = i2.paint.get(\"raster-resampling\"), b2 = i2.paint.get(\"raster-fade-duration\"), y2 = !!e2.style.map.terrain;\n for (const w2 of a2) {\n const a3 = e2.getDepthModeForSublayer(w2.overscaledZ - h2, 1 === v2 ? ti.ReadWrite : ti.ReadOnly, d2.LESS), T2 = t2.getTile(w2), P2 = \"nearest\" === x2 ? d2.NEAREST : d2.LINEAR;\n u2.activeTexture.set(d2.TEXTURE0), T2.texture.bind(P2, d2.CLAMP_TO_EDGE, d2.LINEAR_MIPMAP_NEAREST), u2.activeTexture.set(d2.TEXTURE1);\n const { parentTile: I2, parentScaleBy: C2, parentTopLeft: M2, fadeValues: E2 } = Ar(T2, t2, b2, y2);\n T2.fadeOpacity = E2.tileOpacity, I2 ? (I2.fadeOpacity = E2.parentTileOpacity, I2.texture.bind(P2, d2.CLAMP_TO_EDGE, d2.LINEAR_MIPMAP_NEAREST)) : T2.texture.bind(P2, d2.CLAMP_TO_EDGE, d2.LINEAR_MIPMAP_NEAREST), T2.texture.useMipmap && u2.extTextureFilterAnisotropic && e2.transform.pitch > 20 && d2.texParameterf(d2.TEXTURE_2D, u2.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, u2.extTextureFilterAnisotropicMax);\n const S2 = e2.style.map.terrain && e2.style.map.terrain.getTerrainData(w2), R2 = p2.getProjectionData({ overscaledTileID: w2, aligned: g2, applyGlobeMatrix: !c2, applyTerrainMatrix: true }), z2 = ua(M2, C2, E2.fadeMix, i2, n2), D2 = m2.getMeshFromTileID(u2, w2.canonical, o2, s2, \"raster\");\n _2.draw(u2, d2.TRIANGLES, a3, r2 ? r2[w2.overscaledZ] : ai.disabled, f2, l2 ? ei.frontCCW : ei.backCCW, z2, S2, R2, i2.id, D2.vertexBuffer, D2.indexBuffer, D2.segments);\n }\n }\n function Ar(e2, i2, a2, r2) {\n const o2 = { parentTile: null, parentScaleBy: 1, parentTopLeft: [0, 0], fadeValues: { tileOpacity: 1, parentTileOpacity: 1, fadeMix: { opacity: 1, mix: 0 } } };\n if (0 === a2 || r2) return o2;\n if (e2.fadingParentID) {\n const r3 = i2.getLoadedTile(e2.fadingParentID);\n if (!r3) return o2;\n const s2 = Math.pow(2, r3.tileID.overscaledZ - e2.tileID.overscaledZ), n2 = [e2.tileID.canonical.x * s2 % 1, e2.tileID.canonical.y * s2 % 1], l2 = (function(e3, i3, a3) {\n const r4 = c(), o3 = (r4 - i3.timeAdded) / a3, s3 = e3.fadingDirection === ue.Incoming, n3 = t.ao((r4 - e3.timeAdded) / a3, 0, 1), l3 = t.ao(1 - o3, 0, 1), h2 = s3 ? n3 : l3;\n return { tileOpacity: h2, parentTileOpacity: s3 ? l3 : n3, fadeMix: { opacity: 1, mix: 1 - h2 } };\n })(e2, r3, a2);\n return { parentTile: r3, parentScaleBy: s2, parentTopLeft: n2, fadeValues: l2 };\n }\n if (e2.selfFading) {\n const i3 = (function(e3, i4) {\n const a3 = (c() - e3.timeAdded) / i4, r3 = t.ao(a3, 0, 1);\n return { tileOpacity: r3, fadeMix: { opacity: r3, mix: 0 } };\n })(e2, a2);\n return { parentTile: null, parentScaleBy: 1, parentTopLeft: [0, 0], fadeValues: i3 };\n }\n return o2;\n }\n const Lr = new t.bq(1, 0, 0, 1), kr = new t.bq(0, 1, 0, 1), Fr = new t.bq(0, 0, 1, 1), Br = new t.bq(1, 0, 1, 1), Or = new t.bq(0, 1, 1, 1);\n function jr(e2, t2, i2, a2) {\n Zr(e2, 0, t2 + i2 / 2, e2.transform.width, i2, a2);\n }\n function Nr(e2, t2, i2, a2) {\n Zr(e2, t2 - i2 / 2, 0, i2, e2.transform.height, a2);\n }\n function Zr(e2, t2, i2, a2, r2, o2) {\n const s2 = e2.context, n2 = s2.gl;\n n2.enable(n2.SCISSOR_TEST), n2.scissor(t2 * e2.pixelRatio, i2 * e2.pixelRatio, a2 * e2.pixelRatio, r2 * e2.pixelRatio), s2.clear({ color: o2 }), n2.disable(n2.SCISSOR_TEST);\n }\n function Gr(e2, i2, a2) {\n const r2 = e2.context, o2 = r2.gl, s2 = e2.useProgram(\"debug\"), n2 = ti.disabled, l2 = ai.disabled, c2 = e2.colorModeForRenderPass(), h2 = \"$debug\", u2 = e2.style.map.terrain && e2.style.map.terrain.getTerrainData(a2);\n r2.activeTexture.set(o2.TEXTURE0);\n const d2 = i2.getTileByID(a2.key).latestRawTileData, _2 = Math.floor((d2 && d2.byteLength || 0) / 1024), p2 = i2.getTile(a2).tileSize, m2 = 512 / Math.min(p2, 512) * (a2.overscaledZ / e2.transform.zoom) * 0.5;\n let f2 = a2.canonical.toString();\n a2.overscaledZ !== a2.canonical.z && (f2 += ` => ${a2.overscaledZ}`), (function(e3, t2) {\n e3.initDebugOverlayCanvas();\n const i3 = e3.debugOverlayCanvas, a3 = e3.context.gl, r3 = e3.debugOverlayCanvas.getContext(\"2d\");\n r3.clearRect(0, 0, i3.width, i3.height), r3.shadowColor = \"white\", r3.shadowBlur = 2, r3.lineWidth = 1.5, r3.strokeStyle = \"white\", r3.textBaseline = \"top\", r3.font = \"bold 36px Open Sans, sans-serif\", r3.fillText(t2, 5, 5), r3.strokeText(t2, 5, 5), e3.debugOverlayTexture.update(i3), e3.debugOverlayTexture.bind(a3.LINEAR, a3.CLAMP_TO_EDGE);\n })(e2, `${f2} ${_2}kB`);\n const g2 = e2.transform.getProjectionData({ overscaledTileID: a2, applyGlobeMatrix: true, applyTerrainMatrix: true });\n s2.draw(r2, o2.TRIANGLES, n2, l2, Qt.alphaBlended, ei.disabled, Yi(t.bq.transparent, m2), null, g2, h2, e2.debugBuffer, e2.quadTriangleIndexBuffer, e2.debugSegments), s2.draw(r2, o2.LINE_STRIP, n2, l2, c2, ei.disabled, Yi(t.bq.red), u2, g2, h2, e2.debugBuffer, e2.tileBorderIndexBuffer, e2.debugSegments);\n }\n function Ur(e2, t2, i2, a2) {\n const { isRenderingGlobe: r2 } = a2, o2 = e2.context, s2 = o2.gl, n2 = e2.transform, l2 = e2.colorModeForRenderPass(), c2 = e2.getDepthModeFor3D(), h2 = e2.useProgram(\"terrain\");\n o2.bindFramebuffer.set(null), o2.viewport.set([0, 0, e2.width, e2.height]);\n for (const a3 of i2) {\n const i3 = t2.getTerrainMesh(a3.tileID), u2 = e2.renderToTexture.getTexture(a3), d2 = t2.getTerrainData(a3.tileID);\n o2.activeTexture.set(s2.TEXTURE0), s2.bindTexture(s2.TEXTURE_2D, u2.texture);\n const _2 = t2.getMeshFrameDelta(n2.zoom), p2 = n2.calculateFogMatrix(a3.tileID.toUnwrapped()), m2 = Oi(_2, p2, e2.style.sky, n2.pitch, r2), f2 = n2.getProjectionData({ overscaledTileID: a3.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true });\n h2.draw(o2, s2.TRIANGLES, c2, ai.disabled, l2, ei.backCCW, m2, d2, f2, \"terrain\", i3.vertexBuffer, i3.indexBuffer, i3.segments);\n }\n }\n function Vr(e2, i2) {\n if (!i2.mesh) {\n const a2 = new t.aX();\n a2.emplaceBack(-1, -1), a2.emplaceBack(1, -1), a2.emplaceBack(1, 1), a2.emplaceBack(-1, 1);\n const r2 = new t.aZ();\n r2.emplaceBack(0, 1, 2), r2.emplaceBack(0, 2, 3), i2.mesh = new kt(e2.createVertexBuffer(a2, Ft.members), e2.createIndexBuffer(r2), t.aY.simpleSegment(0, 0, a2.length, r2.length));\n }\n return i2.mesh;\n }\n class qr {\n constructor(e2, i2) {\n this.context = new nr(e2), this.transform = i2, this._tileTextures = {}, this.terrainFacilitator = { dirty: true, matrix: t.as(new Float64Array(16)), renderTime: 0 }, this.setup(), this.numSublayers = ke.maxOverzooming + ke.maxUnderzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new zt();\n }\n resize(e2, t2, i2) {\n if (this.width = Math.floor(e2 * i2), this.height = Math.floor(t2 * i2), this.pixelRatio = i2, this.context.viewport.set([0, 0, this.width, this.height]), this.style) for (const e3 of this.style._order) this.style._layers[e3].resize();\n }\n setup() {\n const e2 = this.context, i2 = new t.aX();\n i2.emplaceBack(0, 0), i2.emplaceBack(t.a5, 0), i2.emplaceBack(0, t.a5), i2.emplaceBack(t.a5, t.a5), this.tileExtentBuffer = e2.createVertexBuffer(i2, Ft.members), this.tileExtentSegments = t.aY.simpleSegment(0, 0, 4, 2);\n const a2 = new t.aX();\n a2.emplaceBack(0, 0), a2.emplaceBack(t.a5, 0), a2.emplaceBack(0, t.a5), a2.emplaceBack(t.a5, t.a5), this.debugBuffer = e2.createVertexBuffer(a2, Ft.members), this.debugSegments = t.aY.simpleSegment(0, 0, 4, 5);\n const r2 = new t.ci();\n r2.emplaceBack(0, 0, 0, 0), r2.emplaceBack(t.a5, 0, t.a5, 0), r2.emplaceBack(0, t.a5, 0, t.a5), r2.emplaceBack(t.a5, t.a5, t.a5, t.a5), this.rasterBoundsBuffer = e2.createVertexBuffer(r2, Fi.members), this.rasterBoundsSegments = t.aY.simpleSegment(0, 0, 4, 2);\n const o2 = new t.aX();\n o2.emplaceBack(0, 0), o2.emplaceBack(t.a5, 0), o2.emplaceBack(0, t.a5), o2.emplaceBack(t.a5, t.a5), this.rasterBoundsBufferPosOnly = e2.createVertexBuffer(o2, Ft.members), this.rasterBoundsSegmentsPosOnly = t.aY.simpleSegment(0, 0, 4, 5);\n const s2 = new t.aX();\n s2.emplaceBack(0, 0), s2.emplaceBack(1, 0), s2.emplaceBack(0, 1), s2.emplaceBack(1, 1), this.viewportBuffer = e2.createVertexBuffer(s2, Ft.members), this.viewportSegments = t.aY.simpleSegment(0, 0, 4, 2);\n const n2 = new t.cj();\n n2.emplaceBack(0), n2.emplaceBack(1), n2.emplaceBack(3), n2.emplaceBack(2), n2.emplaceBack(0), this.tileBorderIndexBuffer = e2.createIndexBuffer(n2);\n const l2 = new t.aZ();\n l2.emplaceBack(1, 0, 2), l2.emplaceBack(1, 2, 3), this.quadTriangleIndexBuffer = e2.createIndexBuffer(l2);\n const c2 = this.context.gl;\n this.stencilClearMode = new ai({ func: c2.ALWAYS, mask: 0 }, 0, 255, c2.ZERO, c2.ZERO, c2.ZERO), this.tileExtentMesh = new kt(this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);\n }\n clearStencil() {\n const e2 = this.context, i2 = e2.gl;\n this.nextStencilID = 1, this.currentStencilSource = void 0;\n const a2 = t.N();\n t.c8(a2, 0, this.width, this.height, 0, 0, 1), t.Q(a2, a2, [i2.drawingBufferWidth, i2.drawingBufferHeight, 0]);\n const r2 = { mainMatrix: a2, tileMercatorCoords: [0, 0, 1, 1], clippingPlane: [0, 0, 0, 0], projectionTransition: 0, fallbackMatrix: a2 };\n this.useProgram(\"clippingMask\", null, true).draw(e2, i2.TRIANGLES, ti.disabled, this.stencilClearMode, Qt.disabled, ei.disabled, null, null, r2, \"$clipping\", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);\n }\n _renderTileClippingMasks(e2, t2, i2) {\n if (this.currentStencilSource === e2.source || !e2.isTileClipped() || !t2 || !t2.length) return;\n this.currentStencilSource = e2.source, this.nextStencilID + t2.length > 256 && this.clearStencil();\n const a2 = this.context;\n a2.setColorMode(Qt.disabled), a2.setDepthMode(ti.disabled);\n const r2 = {};\n for (const e3 of t2) r2[e3.key] = this.nextStencilID++;\n this._renderTileMasks(r2, t2, i2, true), this._renderTileMasks(r2, t2, i2, false), this._tileClippingMaskIDs = r2;\n }\n _renderTileMasks(e2, t2, i2, a2) {\n const r2 = this.context, o2 = r2.gl, s2 = this.style.projection, n2 = this.transform, l2 = this.useProgram(\"clippingMask\");\n for (const c2 of t2) {\n const t3 = e2[c2.key], h2 = this.style.map.terrain && this.style.map.terrain.getTerrainData(c2), u2 = s2.getMeshFromTileID(this.context, c2.canonical, a2, true, \"stencil\"), d2 = n2.getProjectionData({ overscaledTileID: c2, applyGlobeMatrix: !i2, applyTerrainMatrix: true });\n l2.draw(r2, o2.TRIANGLES, ti.disabled, new ai({ func: o2.ALWAYS, mask: 0 }, t3, 255, o2.KEEP, o2.KEEP, o2.REPLACE), Qt.disabled, i2 ? ei.disabled : ei.backCCW, null, h2, d2, \"$clipping\", u2.vertexBuffer, u2.indexBuffer, u2.segments);\n }\n }\n _renderTilesDepthBuffer() {\n const e2 = this.context, t2 = e2.gl, i2 = this.style.projection, a2 = this.transform, r2 = this.useProgram(\"depth\"), o2 = this.getDepthModeFor3D(), s2 = Ce(a2, { tileSize: a2.tileSize });\n for (const n2 of s2) {\n const s3 = this.style.map.terrain && this.style.map.terrain.getTerrainData(n2), l2 = i2.getMeshFromTileID(this.context, n2.canonical, true, true, \"raster\"), c2 = a2.getProjectionData({ overscaledTileID: n2, applyGlobeMatrix: true, applyTerrainMatrix: true });\n r2.draw(e2, t2.TRIANGLES, o2, ai.disabled, Qt.disabled, ei.backCCW, null, s3, c2, \"$clipping\", l2.vertexBuffer, l2.indexBuffer, l2.segments);\n }\n }\n stencilModeFor3D() {\n this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil();\n const e2 = this.nextStencilID++, t2 = this.context.gl;\n return new ai({ func: t2.NOTEQUAL, mask: 255 }, e2, 255, t2.KEEP, t2.KEEP, t2.REPLACE);\n }\n stencilModeForClipping(e2) {\n const t2 = this.context.gl;\n return new ai({ func: t2.EQUAL, mask: 255 }, this._tileClippingMaskIDs[e2.key], 0, t2.KEEP, t2.KEEP, t2.REPLACE);\n }\n getStencilConfigForOverlapAndUpdateStencilID(e2) {\n const t2 = this.context.gl, i2 = e2.sort(((e3, t3) => t3.overscaledZ - e3.overscaledZ)), a2 = i2[i2.length - 1].overscaledZ, r2 = i2[0].overscaledZ - a2 + 1;\n if (r2 > 1) {\n this.currentStencilSource = void 0, this.nextStencilID + r2 > 256 && this.clearStencil();\n const e3 = {};\n for (let i3 = 0; i3 < r2; i3++) e3[i3 + a2] = new ai({ func: t2.GEQUAL, mask: 255 }, i3 + this.nextStencilID, 255, t2.KEEP, t2.KEEP, t2.REPLACE);\n return this.nextStencilID += r2, [e3, i2];\n }\n return [{ [a2]: ai.disabled }, i2];\n }\n stencilConfigForOverlapTwoPass(e2) {\n const t2 = this.context.gl, i2 = e2.sort(((e3, t3) => t3.overscaledZ - e3.overscaledZ)), a2 = i2[i2.length - 1].overscaledZ, r2 = i2[0].overscaledZ - a2 + 1;\n if (this.clearStencil(), r2 > 1) {\n const e3 = {}, o2 = {};\n for (let i3 = 0; i3 < r2; i3++) e3[i3 + a2] = new ai({ func: t2.GREATER, mask: 255 }, r2 + 1 + i3, 255, t2.KEEP, t2.KEEP, t2.REPLACE), o2[i3 + a2] = new ai({ func: t2.GREATER, mask: 255 }, 1 + i3, 255, t2.KEEP, t2.KEEP, t2.REPLACE);\n return this.nextStencilID = 2 * r2 + 1, [e3, o2, i2];\n }\n return this.nextStencilID = 3, [{ [a2]: new ai({ func: t2.GREATER, mask: 255 }, 2, 255, t2.KEEP, t2.KEEP, t2.REPLACE) }, { [a2]: new ai({ func: t2.GREATER, mask: 255 }, 1, 255, t2.KEEP, t2.KEEP, t2.REPLACE) }, i2];\n }\n colorModeForRenderPass() {\n const e2 = this.context.gl;\n if (this._showOverdrawInspector) {\n const i2 = 1 / 8;\n return new Qt([e2.CONSTANT_COLOR, e2.ONE], new t.bq(i2, i2, i2, 0), [true, true, true, true]);\n }\n return \"opaque\" === this.renderPass ? Qt.unblended : Qt.alphaBlended;\n }\n getDepthModeForSublayer(e2, t2, i2) {\n if (!this.opaquePassEnabledForLayer()) return ti.disabled;\n const a2 = 1 - ((1 + this.currentLayer) * this.numSublayers + e2) * this.depthEpsilon;\n return new ti(i2 || this.context.gl.LEQUAL, t2, [a2, a2]);\n }\n getDepthModeFor3D() {\n return new ti(this.context.gl.LEQUAL, ti.ReadWrite, this.depthRangeFor3D);\n }\n opaquePassEnabledForLayer() {\n return this.currentLayer < this.opaquePassCutoff;\n }\n render(e2, i2) {\n var a2, r2;\n this.style = e2, this.options = i2, this.lineAtlas = e2.lineAtlas, this.imageManager = e2.imageManager, this.glyphManager = e2.glyphManager, this.symbolFadeChange = e2.placement.symbolFadeChange(c()), this.imageManager.beginFrame();\n const o2 = this.style._order, s2 = this.style.tileManagers, n2 = {}, l2 = {}, h2 = {}, u2 = { isRenderingToTexture: false, isRenderingGlobe: (null === (a2 = e2.projection) || void 0 === a2 ? void 0 : a2.transitionState) > 0 };\n for (const e3 in s2) {\n const t2 = s2[e3];\n t2.used && t2.prepare(this.context), n2[e3] = t2.getVisibleCoordinates(false), l2[e3] = n2[e3].slice().reverse(), h2[e3] = t2.getVisibleCoordinates(true).reverse();\n }\n this.opaquePassCutoff = 1 / 0;\n for (let e3 = 0; e3 < o2.length; e3++) if (this.style._layers[o2[e3]].is3D()) {\n this.opaquePassCutoff = e3;\n break;\n }\n this.maybeDrawDepthAndCoords(false), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = \"offscreen\";\n for (const e3 of o2) {\n const t2 = this.style._layers[e3];\n if (!t2.hasOffscreenPass() || t2.isHidden(this.transform.zoom)) continue;\n const i3 = l2[t2.source];\n (\"custom\" === t2.type || i3.length) && this.renderLayer(this, s2[t2.source], t2, i3, u2);\n }\n if (null === (r2 = this.style.projection) || void 0 === r2 || r2.updateGPUdependent({ context: this.context, useProgram: (e3) => this.useProgram(e3) }), this.context.viewport.set([0, 0, this.width, this.height]), this.context.bindFramebuffer.set(null), this.context.clear({ color: i2.showOverdrawInspector ? t.bq.black : t.bq.transparent, depth: 1 }), this.clearStencil(), this.style.sky && (function(e3, t2) {\n const i3 = e3.context, a3 = i3.gl, r3 = ((e4, t3, i4) => {\n const a4 = Math.cos(t3.rollInRadians), r4 = Math.sin(t3.rollInRadians), o4 = ge(t3), s4 = t3.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: true, applyTerrainMatrix: true }).projectionTransition;\n return { u_sky_color: e4.properties.get(\"sky-color\"), u_horizon_color: e4.properties.get(\"horizon-color\"), u_horizon: [(t3.width / 2 - o4 * r4) * i4, (t3.height / 2 + o4 * a4) * i4], u_horizon_normal: [-r4, a4], u_sky_horizon_blend: e4.properties.get(\"sky-horizon-blend\") * t3.height / 2 * i4, u_sky_blend: s4 };\n })(t2, e3.style.map.transform, e3.pixelRatio), o3 = new ti(a3.LEQUAL, ti.ReadWrite, [0, 1]), s3 = ai.disabled, n3 = e3.colorModeForRenderPass(), l3 = e3.useProgram(\"sky\"), c2 = Vr(i3, t2);\n l3.draw(i3, a3.TRIANGLES, o3, s3, n3, ei.disabled, r3, null, void 0, \"sky\", c2.vertexBuffer, c2.indexBuffer, c2.segments);\n })(this, this.style.sky), this._showOverdrawInspector = i2.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (e2._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = \"opaque\", this.currentLayer = o2.length - 1; this.currentLayer >= 0; this.currentLayer--) {\n const e3 = this.style._layers[o2[this.currentLayer]], t2 = s2[e3.source], i3 = n2[e3.source];\n this._renderTileClippingMasks(e3, i3, false), this.renderLayer(this, t2, e3, i3, u2);\n }\n this.renderPass = \"translucent\";\n let d2 = false;\n for (this.currentLayer = 0; this.currentLayer < o2.length; this.currentLayer++) {\n const e3 = this.style._layers[o2[this.currentLayer]], t2 = s2[e3.source];\n if (this.renderToTexture && this.renderToTexture.renderLayer(e3, u2)) continue;\n this.opaquePassEnabledForLayer() || d2 || (d2 = true, u2.isRenderingGlobe && !this.style.map.terrain && this._renderTilesDepthBuffer());\n const i3 = (\"symbol\" === e3.type ? h2 : l2)[e3.source];\n this._renderTileClippingMasks(e3, n2[e3.source], !!this.renderToTexture), this.renderLayer(this, t2, e3, i3, u2);\n }\n if (u2.isRenderingGlobe && (function(e3, i3, a3) {\n const r3 = e3.context, o3 = r3.gl, s3 = e3.useProgram(\"atmosphere\"), n3 = new ti(o3.LEQUAL, ti.ReadOnly, [0, 1]), l3 = e3.transform, c2 = (function(e4, i4) {\n const a4 = e4.properties.get(\"position\"), r4 = [-a4.x, -a4.y, -a4.z], o4 = t.as(new Float64Array(16));\n return \"map\" === e4.properties.get(\"anchor\") && (t.bh(o4, o4, i4.rollInRadians), t.bi(o4, o4, -i4.pitchInRadians), t.bh(o4, o4, i4.bearingInRadians), t.bi(o4, o4, i4.center.lat * Math.PI / 180), t.bK(o4, o4, -i4.center.lng * Math.PI / 180)), t.ch(r4, r4, o4), r4;\n })(a3, e3.transform), h3 = l3.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: true, applyTerrainMatrix: true }), u3 = i3.properties.get(\"atmosphere-blend\") * h3.projectionTransition;\n if (0 === u3) return;\n const d3 = fi(l3.worldSize, l3.center.lat), _2 = l3.inverseProjectionMatrix, p2 = new Float64Array(4);\n p2[3] = 1, t.aI(p2, p2, l3.modelViewProjectionMatrix), p2[0] /= p2[3], p2[1] /= p2[3], p2[2] /= p2[3], p2[3] = 1, t.aI(p2, p2, _2), p2[0] /= p2[3], p2[1] /= p2[3], p2[2] /= p2[3], p2[3] = 1;\n const m2 = /* @__PURE__ */ ((e4, t2, i4, a4, r4) => ({ u_sun_pos: e4, u_atmosphere_blend: t2, u_globe_position: i4, u_globe_radius: a4, u_inv_proj_matrix: r4 }))(c2, u3, [p2[0], p2[1], p2[2]], d3, _2), f2 = Vr(r3, i3);\n s3.draw(r3, o3.TRIANGLES, n3, ai.disabled, Qt.alphaBlended, ei.disabled, m2, null, null, \"atmosphere\", f2.vertexBuffer, f2.indexBuffer, f2.segments);\n })(this, this.style.sky, this.style.light), this.options.showTileBoundaries) {\n const e3 = (function(e4, t2) {\n let i3 = null;\n const a3 = Object.values(e4._layers).flatMap(((i4) => i4.source && !i4.isHidden(t2) ? [e4.tileManagers[i4.source]] : [])), r3 = a3.filter(((e5) => \"vector\" === e5.getSource().type)), o3 = a3.filter(((e5) => \"vector\" !== e5.getSource().type)), s3 = (e5) => {\n (!i3 || i3.getSource().maxzoom < e5.getSource().maxzoom) && (i3 = e5);\n };\n return r3.forEach(((e5) => s3(e5))), i3 || o3.forEach(((e5) => s3(e5))), i3;\n })(this.style, this.transform.zoom);\n e3 && (function(e4, t2, i3) {\n for (let a3 = 0; a3 < i3.length; a3++) Gr(e4, t2, i3[a3]);\n })(this, e3, e3.getVisibleCoordinates());\n }\n this.options.showPadding && (function(e3) {\n const t2 = e3.transform.padding;\n jr(e3, e3.transform.height - (t2.top || 0), 3, Lr), jr(e3, t2.bottom || 0, 3, kr), Nr(e3, t2.left || 0, 3, Fr), Nr(e3, e3.transform.width - (t2.right || 0), 3, Br);\n const i3 = e3.transform.centerPoint;\n !(function(e4, t3, i4, a3) {\n Zr(e4, t3 - 1, i4 - 10, 2, 20, a3), Zr(e4, t3 - 10, i4 - 1, 20, 2, a3);\n })(e3, i3.x, e3.transform.height - i3.y, Or);\n })(this), this.context.setDefault();\n }\n maybeDrawDepthAndCoords(e2) {\n if (!this.style || !this.style.map || !this.style.map.terrain) return;\n const i2 = this.terrainFacilitator.matrix, a2 = this.transform.modelViewProjectionMatrix;\n let r2 = this.terrainFacilitator.dirty;\n r2 || (r2 = e2 ? !t.ck(i2, a2) : !t.cl(i2, a2)), r2 || (r2 = this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime)), r2 && (t.cm(i2, a2), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = false, (function(e3, i3) {\n const a3 = e3.context, r3 = a3.gl, o2 = e3.transform, s2 = Qt.unblended, n2 = new ti(r3.LEQUAL, ti.ReadWrite, [0, 1]), l2 = i3.tileManager.getRenderableTiles(), c2 = e3.useProgram(\"terrainDepth\");\n a3.bindFramebuffer.set(i3.getFramebuffer(\"depth\").framebuffer), a3.viewport.set([0, 0, e3.width / devicePixelRatio, e3.height / devicePixelRatio]), a3.clear({ color: t.bq.transparent, depth: 1 });\n for (const e4 of l2) {\n const t2 = i3.getTerrainMesh(e4.tileID), l3 = i3.getTerrainData(e4.tileID), h2 = o2.getProjectionData({ overscaledTileID: e4.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true }), u2 = { u_ele_delta: i3.getMeshFrameDelta(o2.zoom) };\n c2.draw(a3, r3.TRIANGLES, n2, ai.disabled, s2, ei.backCCW, u2, l3, h2, \"terrain\", t2.vertexBuffer, t2.indexBuffer, t2.segments);\n }\n a3.bindFramebuffer.set(null), a3.viewport.set([0, 0, e3.width, e3.height]);\n })(this, this.style.map.terrain), (function(e3, i3) {\n const a3 = e3.context, r3 = a3.gl, o2 = e3.transform, s2 = Qt.unblended, n2 = new ti(r3.LEQUAL, ti.ReadWrite, [0, 1]), l2 = i3.getCoordsTexture(), c2 = i3.tileManager.getRenderableTiles(), h2 = e3.useProgram(\"terrainCoords\");\n a3.bindFramebuffer.set(i3.getFramebuffer(\"coords\").framebuffer), a3.viewport.set([0, 0, e3.width / devicePixelRatio, e3.height / devicePixelRatio]), a3.clear({ color: t.bq.transparent, depth: 1 }), i3.coordsIndex = [];\n for (const e4 of c2) {\n const t2 = i3.getTerrainMesh(e4.tileID), c3 = i3.getTerrainData(e4.tileID);\n a3.activeTexture.set(r3.TEXTURE0), r3.bindTexture(r3.TEXTURE_2D, l2.texture);\n const u2 = { u_terrain_coords_id: (255 - i3.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: i3.getMeshFrameDelta(o2.zoom) }, d2 = o2.getProjectionData({ overscaledTileID: e4.tileID, applyTerrainMatrix: false, applyGlobeMatrix: true });\n h2.draw(a3, r3.TRIANGLES, n2, ai.disabled, s2, ei.backCCW, u2, c3, d2, \"terrain\", t2.vertexBuffer, t2.indexBuffer, t2.segments), i3.coordsIndex.push(e4.tileID.key);\n }\n a3.bindFramebuffer.set(null), a3.viewport.set([0, 0, e3.width, e3.height]);\n })(this, this.style.map.terrain));\n }\n renderLayer(e2, i2, a2, r2, o2) {\n a2.isHidden(this.transform.zoom) || (\"background\" === a2.type || \"custom\" === a2.type || (r2 || []).length) && (this.id = a2.id, t.cn(a2) ? (function(e3, i3, a3, r3, o3, s2) {\n if (\"translucent\" !== e3.renderPass) return;\n const { isRenderingToTexture: n2 } = s2, l2 = ai.disabled, c2 = e3.colorModeForRenderPass();\n (a3._unevaluatedLayout.hasValue(\"text-variable-anchor\") || a3._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\")) && (function(e4, i4, a4, r4, o4, s3, n3, l3, c3) {\n const h2 = i4.transform, u2 = i4.style.map.terrain, d2 = \"map\" === o4, _2 = \"map\" === s3;\n for (const o5 of e4) {\n const e5 = r4.getTile(o5), s4 = e5.getBucket(a4);\n if (!s4 || !s4.text || !s4.text.segments.get().length) continue;\n const p2 = t.az(s4.textSizeData, h2.zoom), m2 = t.aO(e5, 1, i4.transform.zoom), f2 = je(d2, i4.transform, m2), g2 = \"none\" !== a4.layout.get(\"icon-text-fit\") && s4.hasIconData();\n if (p2) {\n const i5 = Math.pow(2, h2.zoom - e5.tileID.overscaledZ), a5 = u2 ? (e6, t2) => u2.getElevation(o5, e6, t2) : null;\n _r(s4, d2, _2, c3, h2, f2, i5, p2, g2, t.aP(h2, e5, n3, l3), o5.toUnwrapped(), a5);\n }\n }\n })(r3, e3, a3, i3, a3.layout.get(\"text-rotation-alignment\"), a3.layout.get(\"text-pitch-alignment\"), a3.paint.get(\"text-translate\"), a3.paint.get(\"text-translate-anchor\"), o3), 0 !== a3.paint.get(\"icon-opacity\").constantOr(1) && mr(e3, i3, a3, r3, false, a3.paint.get(\"icon-translate\"), a3.paint.get(\"icon-translate-anchor\"), a3.layout.get(\"icon-rotation-alignment\"), a3.layout.get(\"icon-pitch-alignment\"), a3.layout.get(\"icon-keep-upright\"), l2, c2, n2), 0 !== a3.paint.get(\"text-opacity\").constantOr(1) && mr(e3, i3, a3, r3, true, a3.paint.get(\"text-translate\"), a3.paint.get(\"text-translate-anchor\"), a3.layout.get(\"text-rotation-alignment\"), a3.layout.get(\"text-pitch-alignment\"), a3.layout.get(\"text-keep-upright\"), l2, c2, n2), i3.map.showCollisionBoxes && (cr(e3, i3, a3, r3, true), cr(e3, i3, a3, r3, false));\n })(e2, i2, a2, r2, this.style.placement.variableOffsets, o2) : t.co(a2) ? (function(e3, i3, a3, r3, o3) {\n if (\"translucent\" !== e3.renderPass) return;\n const { isRenderingToTexture: s2 } = o3, n2 = a3.paint.get(\"circle-opacity\"), l2 = a3.paint.get(\"circle-stroke-width\"), c2 = a3.paint.get(\"circle-stroke-opacity\"), h2 = !a3.layout.get(\"circle-sort-key\").isConstant();\n if (0 === n2.constantOr(1) && (0 === l2.constantOr(1) || 0 === c2.constantOr(1))) return;\n const u2 = e3.context, d2 = u2.gl, _2 = e3.transform, p2 = e3.getDepthModeForSublayer(0, ti.ReadOnly), m2 = ai.disabled, f2 = e3.colorModeForRenderPass(), g2 = [], v2 = _2.getCircleRadiusCorrection();\n for (let o4 = 0; o4 < r3.length; o4++) {\n const n3 = r3[o4], l3 = i3.getTile(n3), c3 = l3.getBucket(a3);\n if (!c3) continue;\n const u3 = a3.paint.get(\"circle-translate\"), d3 = a3.paint.get(\"circle-translate-anchor\"), p3 = t.aP(_2, l3, u3, d3), m3 = c3.programConfigurations.get(a3.id), f3 = e3.useProgram(\"circle\", m3), x2 = c3.layoutVertexBuffer, b2 = c3.indexBuffer, y2 = e3.style.map.terrain && e3.style.map.terrain.getTerrainData(n3), w2 = { programConfiguration: m3, program: f3, layoutVertexBuffer: x2, indexBuffer: b2, uniformValues: Hi(e3, l3, a3, p3, v2), terrainData: y2, projectionData: _2.getProjectionData({ overscaledTileID: n3, applyGlobeMatrix: !s2, applyTerrainMatrix: true }) };\n if (h2) {\n const e4 = c3.segments.get();\n for (const i4 of e4) g2.push({ segments: new t.aY([i4]), sortKey: i4.sortKey, state: w2 });\n } else g2.push({ segments: c3.segments, sortKey: 0, state: w2 });\n }\n h2 && g2.sort(((e4, t2) => e4.sortKey - t2.sortKey));\n for (const t2 of g2) {\n const { programConfiguration: i4, program: r4, layoutVertexBuffer: o4, indexBuffer: s3, uniformValues: n3, terrainData: l3, projectionData: c3 } = t2.state;\n r4.draw(u2, d2.TRIANGLES, p2, m2, f2, ei.backCCW, n3, l3, c3, a3.id, o4, s3, t2.segments, a3.paint, e3.transform.zoom, i4);\n }\n })(e2, i2, a2, r2, o2) : t.cp(a2) ? (function(e3, i3, a3, r3, o3) {\n if (0 === a3.paint.get(\"heatmap-opacity\")) return;\n const s2 = e3.context, { isRenderingToTexture: n2, isRenderingGlobe: l2 } = o3;\n if (e3.style.map.terrain) {\n for (const t2 of r3) {\n const r4 = i3.getTile(t2);\n i3.hasRenderableParent(t2) || (\"offscreen\" === e3.renderPass ? gr(e3, r4, a3, t2, l2) : \"translucent\" === e3.renderPass && vr(e3, a3, t2, n2, l2));\n }\n s2.viewport.set([0, 0, e3.width, e3.height]);\n } else \"offscreen\" === e3.renderPass ? (function(e4, i4, a4, r4) {\n const o4 = e4.context, s3 = o4.gl, n3 = e4.transform, l3 = ai.disabled, c2 = new Qt([s3.ONE, s3.ONE], t.bq.transparent, [true, true, true, true]);\n (function(e5, i5, a5) {\n const r5 = e5.gl;\n e5.activeTexture.set(r5.TEXTURE1), e5.viewport.set([0, 0, i5.width / 4, i5.height / 4]);\n let o5 = a5.heatmapFbos.get(t.ce);\n o5 ? (r5.bindTexture(r5.TEXTURE_2D, o5.colorAttachment.get()), e5.bindFramebuffer.set(o5.framebuffer)) : (o5 = xr(e5, i5.width / 4, i5.height / 4), a5.heatmapFbos.set(t.ce, o5));\n })(o4, e4, a4), o4.clear({ color: t.bq.transparent });\n for (let t2 = 0; t2 < r4.length; t2++) {\n const h2 = r4[t2];\n if (i4.hasRenderableParent(h2)) continue;\n const u2 = i4.getTile(h2), d2 = u2.getBucket(a4);\n if (!d2) continue;\n const _2 = d2.programConfigurations.get(a4.id), p2 = e4.useProgram(\"heatmap\", _2), m2 = n3.getProjectionData({ overscaledTileID: h2, applyGlobeMatrix: true, applyTerrainMatrix: false }), f2 = n3.getCircleRadiusCorrection();\n p2.draw(o4, s3.TRIANGLES, ti.disabled, l3, c2, ei.backCCW, Qi(u2, n3.zoom, a4.paint.get(\"heatmap-intensity\"), f2), null, m2, a4.id, d2.layoutVertexBuffer, d2.indexBuffer, d2.segments, a4.paint, n3.zoom, _2);\n }\n o4.viewport.set([0, 0, e4.width, e4.height]);\n })(e3, i3, a3, r3) : \"translucent\" === e3.renderPass && (function(e4, i4) {\n const a4 = e4.context, r4 = a4.gl;\n a4.setColorMode(e4.colorModeForRenderPass());\n const o4 = i4.heatmapFbos.get(t.ce);\n o4 && (a4.activeTexture.set(r4.TEXTURE0), r4.bindTexture(r4.TEXTURE_2D, o4.colorAttachment.get()), a4.activeTexture.set(r4.TEXTURE1), br(a4, i4).bind(r4.LINEAR, r4.CLAMP_TO_EDGE), e4.useProgram(\"heatmapTexture\").draw(a4, r4.TRIANGLES, ti.disabled, ai.disabled, e4.colorModeForRenderPass(), ei.disabled, Ji(e4, i4, 0, 1), null, null, i4.id, e4.viewportBuffer, e4.quadTriangleIndexBuffer, e4.viewportSegments, i4.paint, e4.transform.zoom));\n })(e3, a3);\n })(e2, i2, a2, r2, o2) : t.cq(a2) ? (function(e3, t2, i3, a3, r3) {\n if (\"translucent\" !== e3.renderPass) return;\n const { isRenderingToTexture: o3 } = r3, s2 = i3.paint.get(\"line-opacity\"), n2 = i3.paint.get(\"line-width\");\n if (0 === s2.constantOr(1) || 0 === n2.constantOr(1)) return;\n const l2 = e3.getDepthModeForSublayer(0, ti.ReadOnly), c2 = e3.colorModeForRenderPass(), h2 = i3.paint.get(\"line-dasharray\"), u2 = h2.constantOr(1), d2 = i3.paint.get(\"line-pattern\"), _2 = d2.constantOr(1), p2 = i3.paint.get(\"line-gradient\"), m2 = i3.getCrossfadeParameters();\n let f2;\n f2 = _2 ? \"linePattern\" : u2 && p2 ? \"lineGradientSDF\" : u2 ? \"lineSDF\" : p2 ? \"lineGradient\" : \"line\";\n const g2 = e3.context, v2 = g2.gl, x2 = e3.transform;\n let b2 = true;\n for (const r4 of a3) {\n const a4 = t2.getTile(r4);\n if (_2 && !a4.patternsLoaded()) continue;\n const s3 = a4.getBucket(i3);\n if (!s3) continue;\n const n3 = s3.programConfigurations.get(i3.id), y2 = e3.context.program.get(), w2 = e3.useProgram(f2, n3), T2 = b2 || w2.program !== y2, P2 = e3.style.map.terrain && e3.style.map.terrain.getTerrainData(r4), I2 = d2.constantOr(null), C2 = h2 && h2.constantOr(null);\n if (I2 && a4.imageAtlas) {\n const e4 = a4.imageAtlas, t3 = e4.patternPositions[I2.to.toString()], i4 = e4.patternPositions[I2.from.toString()];\n t3 && i4 && n3.setConstantPatternPositions(t3, i4);\n } else if (C2) {\n const t3 = \"round\" === i3.layout.get(\"line-cap\"), a5 = e3.lineAtlas.getDash(C2.to, t3), r5 = e3.lineAtlas.getDash(C2.from, t3);\n n3.setConstantDashPositions(a5, r5);\n }\n const M2 = x2.getProjectionData({ overscaledTileID: r4, applyGlobeMatrix: !o3, applyTerrainMatrix: true }), E2 = x2.getPixelScale();\n let S2;\n _2 ? (S2 = sa(e3, a4, i3, E2, m2), wr(g2, v2, a4, n3, m2)) : u2 && p2 ? (S2 = la(e3, a4, i3, E2, m2, s3.lineClipsArray.length), Ir(e3, t2, g2, v2, i3, s3, r4, n3, m2)) : u2 ? (S2 = na(e3, a4, i3, E2, m2), Tr(e3, g2, v2, n3, T2, m2)) : p2 ? (S2 = oa(e3, a4, i3, E2, s3.lineClipsArray.length), Pr(e3, t2, g2, v2, i3, s3, r4)) : S2 = ra(e3, a4, i3, E2);\n const R2 = e3.stencilModeForClipping(r4);\n w2.draw(g2, v2.TRIANGLES, l2, R2, c2, ei.disabled, S2, P2, M2, i3.id, s3.layoutVertexBuffer, s3.indexBuffer, s3.segments, i3.paint, e3.transform.zoom, n3, s3.layoutVertexBuffer2), b2 = false;\n }\n })(e2, i2, a2, r2, o2) : t.cr(a2) ? (function(e3, i3, a3, r3, o3) {\n const s2 = a3.paint.get(\"fill-color\"), n2 = a3.paint.get(\"fill-opacity\");\n if (0 === n2.constantOr(1)) return;\n const { isRenderingToTexture: l2 } = o3, c2 = e3.colorModeForRenderPass(), h2 = a3.paint.get(\"fill-pattern\"), u2 = e3.opaquePassEnabledForLayer() && !h2.constantOr(1) && 1 === s2.constantOr(t.bq.transparent).a && 1 === n2.constantOr(0) ? \"opaque\" : \"translucent\";\n if (e3.renderPass === u2) {\n const t2 = e3.getDepthModeForSublayer(1, \"opaque\" === e3.renderPass ? ti.ReadWrite : ti.ReadOnly);\n Mr(e3, i3, a3, r3, t2, c2, false, l2);\n }\n if (\"translucent\" === e3.renderPass && a3.paint.get(\"fill-antialias\")) {\n const t2 = e3.getDepthModeForSublayer(a3.getPaintProperty(\"fill-outline-color\") ? 2 : 0, ti.ReadOnly);\n Mr(e3, i3, a3, r3, t2, c2, true, l2);\n }\n })(e2, i2, a2, r2, o2) : t.cs(a2) ? (function(e3, t2, i3, a3, r3) {\n const o3 = i3.paint.get(\"fill-extrusion-opacity\");\n if (0 === o3) return;\n const { isRenderingToTexture: s2 } = r3;\n if (\"translucent\" === e3.renderPass) {\n const r4 = new ti(e3.context.gl.LEQUAL, ti.ReadWrite, e3.depthRangeFor3D);\n if (1 !== o3 || i3.paint.get(\"fill-extrusion-pattern\").constantOr(1)) Er(e3, t2, i3, a3, r4, ai.disabled, Qt.disabled, s2), Er(e3, t2, i3, a3, r4, e3.stencilModeFor3D(), e3.colorModeForRenderPass(), s2);\n else {\n const o4 = e3.colorModeForRenderPass();\n Er(e3, t2, i3, a3, r4, ai.disabled, o4, s2);\n }\n }\n })(e2, i2, a2, r2, o2) : t.ct(a2) ? (function(e3, i3, a3, r3, o3) {\n if (\"offscreen\" !== e3.renderPass && \"translucent\" !== e3.renderPass) return;\n const { isRenderingToTexture: s2 } = o3, n2 = e3.context, l2 = e3.style.projection.useSubdivision, c2 = e3.getDepthModeForSublayer(0, ti.ReadOnly), h2 = e3.colorModeForRenderPass();\n if (\"offscreen\" === e3.renderPass) !(function(e4, i4, a4, r4, o4, s3, n3) {\n const l3 = e4.context, c3 = l3.gl;\n for (const h3 of a4) {\n const a5 = i4.getTile(h3), u2 = a5.dem;\n if (!u2 || !u2.data) continue;\n if (!a5.needsHillshadePrepare) continue;\n const d2 = u2.dim, _2 = u2.stride, p2 = u2.getPixels();\n if (l3.activeTexture.set(c3.TEXTURE1), l3.pixelStoreUnpackPremultiplyAlpha.set(false), a5.demTexture = a5.demTexture || e4.getTileTexture(_2), a5.demTexture) {\n const e5 = a5.demTexture;\n e5.update(p2, { premultiply: false }), e5.bind(c3.NEAREST, c3.CLAMP_TO_EDGE);\n } else a5.demTexture = new t.T(l3, p2, c3.RGBA, { premultiply: false }), a5.demTexture.bind(c3.NEAREST, c3.CLAMP_TO_EDGE);\n l3.activeTexture.set(c3.TEXTURE0);\n let m2 = a5.fbo;\n if (!m2) {\n const e5 = new t.T(l3, { width: d2, height: d2, data: null }, c3.RGBA);\n e5.bind(c3.LINEAR, c3.CLAMP_TO_EDGE), m2 = a5.fbo = l3.createFramebuffer(d2, d2, true, false), m2.colorAttachment.set(e5.texture);\n }\n l3.bindFramebuffer.set(m2.framebuffer), l3.viewport.set([0, 0, d2, d2]), e4.useProgram(\"hillshadePrepare\").draw(l3, c3.TRIANGLES, o4, s3, n3, ei.disabled, ta(a5.tileID, u2), null, null, r4.id, e4.rasterBoundsBuffer, e4.quadTriangleIndexBuffer, e4.rasterBoundsSegments), a5.needsHillshadePrepare = false;\n }\n })(e3, i3, r3, a3, c2, ai.disabled, h2), n2.viewport.set([0, 0, e3.width, e3.height]);\n else if (\"translucent\" === e3.renderPass) if (l2) {\n const [t2, o4, n3] = e3.stencilConfigForOverlapTwoPass(r3);\n Sr(e3, i3, a3, n3, t2, c2, h2, false, s2), Sr(e3, i3, a3, n3, o4, c2, h2, true, s2);\n } else {\n const [t2, o4] = e3.getStencilConfigForOverlapAndUpdateStencilID(r3);\n Sr(e3, i3, a3, o4, t2, c2, h2, false, s2);\n }\n })(e2, i2, a2, r2, o2) : t.cu(a2) ? (function(e3, t2, i3, a3, r3) {\n if (\"translucent\" !== e3.renderPass) return;\n if (!a3.length) return;\n const { isRenderingToTexture: o3 } = r3, s2 = e3.style.projection.useSubdivision, n2 = e3.getDepthModeForSublayer(0, ti.ReadOnly), l2 = e3.colorModeForRenderPass();\n if (s2) {\n const [r4, s3, c2] = e3.stencilConfigForOverlapTwoPass(a3);\n Rr(e3, t2, i3, c2, r4, n2, l2, false, o3), Rr(e3, t2, i3, c2, s3, n2, l2, true, o3);\n } else {\n const [r4, s3] = e3.getStencilConfigForOverlapAndUpdateStencilID(a3);\n Rr(e3, t2, i3, s3, r4, n2, l2, false, o3);\n }\n })(e2, i2, a2, r2, o2) : t.bV(a2) ? (function(e3, t2, i3, a3, r3) {\n if (\"translucent\" !== e3.renderPass) return;\n if (0 === i3.paint.get(\"raster-opacity\")) return;\n if (!a3.length) return;\n const { isRenderingToTexture: o3 } = r3, s2 = t2.getSource(), n2 = e3.style.projection.useSubdivision;\n if (s2 instanceof te) Dr(e3, t2, i3, a3, null, false, false, s2.tileCoords, s2.flippedWindingOrder, o3);\n else if (n2) {\n const [r4, s3, n3] = e3.stencilConfigForOverlapTwoPass(a3);\n Dr(e3, t2, i3, n3, r4, false, true, zr, false, o3), Dr(e3, t2, i3, n3, s3, true, true, zr, false, o3);\n } else {\n const [r4, s3] = e3.getStencilConfigForOverlapAndUpdateStencilID(a3);\n Dr(e3, t2, i3, s3, r4, false, true, zr, false, o3);\n }\n })(e2, i2, a2, r2, o2) : t.cv(a2) ? (function(e3, t2, i3, a3, r3) {\n const o3 = i3.paint.get(\"background-color\"), s2 = i3.paint.get(\"background-opacity\");\n if (0 === s2) return;\n const { isRenderingToTexture: n2 } = r3, l2 = e3.context, c2 = l2.gl, h2 = e3.style.projection, u2 = e3.transform, d2 = u2.tileSize, _2 = i3.paint.get(\"background-pattern\");\n if (e3.isPatternMissing(_2)) return;\n const p2 = !_2 && 1 === o3.a && 1 === s2 && e3.opaquePassEnabledForLayer() ? \"opaque\" : \"translucent\";\n if (e3.renderPass !== p2) return;\n const m2 = ai.disabled, f2 = e3.getDepthModeForSublayer(0, \"opaque\" === p2 ? ti.ReadWrite : ti.ReadOnly), g2 = e3.colorModeForRenderPass(), v2 = e3.useProgram(_2 ? \"backgroundPattern\" : \"background\"), x2 = a3 || Ce(u2, { tileSize: d2, terrain: e3.style.map.terrain });\n _2 && (l2.activeTexture.set(c2.TEXTURE0), e3.imageManager.bind(e3.context));\n const b2 = i3.getCrossfadeParameters();\n for (const t3 of x2) {\n const a4 = u2.getProjectionData({ overscaledTileID: t3, applyGlobeMatrix: !n2, applyTerrainMatrix: true }), r4 = _2 ? ga(s2, e3, _2, { tileID: t3, tileSize: d2 }, b2) : fa(s2, o3), p3 = e3.style.map.terrain && e3.style.map.terrain.getTerrainData(t3), x3 = h2.getMeshFromTileID(l2, t3.canonical, false, true, \"raster\");\n v2.draw(l2, c2.TRIANGLES, f2, m2, g2, ei.backCCW, r4, p3, a4, i3.id, x3.vertexBuffer, x3.indexBuffer, x3.segments);\n }\n })(e2, 0, a2, r2, o2) : t.cw(a2) && (function(e3, t2, i3, a3) {\n const { isRenderingGlobe: r3 } = a3, o3 = e3.context, s2 = i3.implementation, n2 = e3.style.projection, l2 = e3.transform, c2 = l2.getProjectionDataForCustomLayer(r3), h2 = { farZ: l2.farZ, nearZ: l2.nearZ, fov: l2.fov * Math.PI / 180, modelViewProjectionMatrix: l2.modelViewProjectionMatrix, projectionMatrix: l2.projectionMatrix, shaderData: { variantName: n2.shaderVariantName, vertexShaderPrelude: `const float PI = 3.141592653589793;\nuniform mat4 u_projection_matrix;\n${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProjectionData: c2 }, u2 = s2.renderingMode ? s2.renderingMode : \"2d\";\n if (\"offscreen\" === e3.renderPass) {\n const t3 = s2.prerender;\n t3 && (e3.setCustomLayerDefaults(), o3.setColorMode(e3.colorModeForRenderPass()), t3.call(s2, o3.gl, h2), o3.setDirty(), e3.setBaseState());\n } else if (\"translucent\" === e3.renderPass) {\n e3.setCustomLayerDefaults(), o3.setColorMode(e3.colorModeForRenderPass()), o3.setStencilMode(ai.disabled);\n const t3 = \"3d\" === u2 ? e3.getDepthModeFor3D() : e3.getDepthModeForSublayer(0, ti.ReadOnly);\n o3.setDepthMode(t3), s2.render(o3.gl, h2), o3.setDirty(), e3.setBaseState(), o3.bindFramebuffer.set(null);\n }\n })(e2, 0, a2, o2));\n }\n saveTileTexture(e2) {\n const t2 = this._tileTextures[e2.size[0]];\n t2 ? t2.push(e2) : this._tileTextures[e2.size[0]] = [e2];\n }\n getTileTexture(e2) {\n const t2 = this._tileTextures[e2];\n return t2 && t2.length > 0 ? t2.pop() : null;\n }\n isPatternMissing(e2) {\n if (!e2) return false;\n if (!e2.from || !e2.to) return true;\n const t2 = this.imageManager.getPattern(e2.from.toString()), i2 = this.imageManager.getPattern(e2.to.toString());\n return !t2 || !i2;\n }\n useProgram(e2, t2, i2 = false, a2 = []) {\n this.cache = this.cache || {};\n const r2 = !!this.style.map.terrain, o2 = this.style.projection, s2 = i2 ? At.projectionMercator : o2.shaderPreludeCode, n2 = i2 ? Bt : o2.shaderDefine, l2 = e2 + (t2 ? t2.cacheKey : \"\") + `/${i2 ? Ot : o2.shaderVariantName}` + (this._showOverdrawInspector ? \"/overdraw\" : \"\") + (r2 ? \"/terrain\" : \"\") + (a2 ? `/${a2.join(\"/\")}` : \"\");\n return this.cache[l2] || (this.cache[l2] = new Zi(this.context, At[e2], t2, xa[e2], this._showOverdrawInspector, r2, s2, n2, a2)), this.cache[l2];\n }\n setCustomLayerDefaults() {\n this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();\n }\n setBaseState() {\n const e2 = this.context.gl;\n this.context.cullFace.set(false), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(e2.FUNC_ADD);\n }\n initDebugOverlayCanvas() {\n null == this.debugOverlayCanvas && (this.debugOverlayCanvas = document.createElement(\"canvas\"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512, this.debugOverlayTexture = new t.T(this.context, this.debugOverlayCanvas, this.context.gl.RGBA));\n }\n destroy() {\n var e2, t2;\n if (this._tileTextures) {\n for (const e3 in this._tileTextures) {\n const t3 = this._tileTextures[e3];\n if (t3) for (const e4 of t3) e4.destroy();\n }\n this._tileTextures = {};\n }\n if (this.tileExtentBuffer && this.tileExtentBuffer.destroy(), this.debugBuffer && this.debugBuffer.destroy(), this.rasterBoundsBuffer && this.rasterBoundsBuffer.destroy(), this.rasterBoundsBufferPosOnly && this.rasterBoundsBufferPosOnly.destroy(), this.viewportBuffer && this.viewportBuffer.destroy(), this.tileBorderIndexBuffer && this.tileBorderIndexBuffer.destroy(), this.quadTriangleIndexBuffer && this.quadTriangleIndexBuffer.destroy(), this.tileExtentMesh && (null === (e2 = this.tileExtentMesh.vertexBuffer) || void 0 === e2 || e2.destroy()), this.tileExtentMesh && (null === (t2 = this.tileExtentMesh.indexBuffer) || void 0 === t2 || t2.destroy()), this.debugOverlayTexture && this.debugOverlayTexture.destroy(), this.cache) {\n for (const e3 in this.cache) {\n const t3 = this.cache[e3];\n t3 && t3.program && this.context.gl.deleteProgram(t3.program);\n }\n this.cache = {};\n }\n this.context && this.context.setDefault();\n }\n overLimit() {\n const { drawingBufferWidth: e2, drawingBufferHeight: t2 } = this.context.gl;\n return this.width !== e2 || this.height !== t2;\n }\n }\n function Wr(e2, t2) {\n let i2, a2 = false, r2 = null, o2 = null;\n const s2 = () => {\n r2 = null, a2 && (e2.apply(o2, i2), r2 = setTimeout(s2, t2), a2 = false);\n };\n return (...e3) => (a2 = true, o2 = this, i2 = e3, r2 || s2(), r2);\n }\n class $r {\n constructor(e2) {\n this._getCurrentHash = () => {\n const e3 = window.location.hash.replace(\"#\", \"\");\n if (this._hashName) {\n let t2;\n return e3.split(\"&\").map(((e4) => e4.split(\"=\"))).forEach(((e4) => {\n e4[0] === this._hashName && (t2 = e4);\n })), (t2 && t2[1] || \"\").split(\"/\");\n }\n return e3.split(\"/\");\n }, this._onHashChange = () => {\n const e3 = this._getCurrentHash();\n if (!this._isValidHash(e3)) return false;\n const t2 = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(e3[3] || 0) : this._map.getBearing();\n return this._map.jumpTo({ center: [+e3[2], +e3[1]], zoom: +e3[0], bearing: t2, pitch: +(e3[4] || 0) }), true;\n }, this._updateHashUnthrottled = () => {\n const e3 = window.location.href.replace(/(#.*)?$/, this.getHashString());\n window.history.replaceState(window.history.state, null, e3);\n }, this._removeHash = () => {\n const e3 = this._getCurrentHash();\n if (0 === e3.length) return;\n const t2 = e3.join(\"/\");\n let i2 = t2;\n i2.split(\"&\").length > 0 && (i2 = i2.split(\"&\")[0]), this._hashName && (i2 = `${this._hashName}=${t2}`);\n let a2 = window.location.hash.replace(i2, \"\");\n a2.startsWith(\"#&\") ? a2 = a2.slice(0, 1) + a2.slice(2) : \"#\" === a2 && (a2 = \"\");\n let r2 = window.location.href.replace(/(#.+)?$/, a2);\n r2 = r2.replace(\"&&\", \"&\"), window.history.replaceState(window.history.state, null, r2);\n }, this._updateHash = Wr(this._updateHashUnthrottled, 300), this._hashName = e2 && encodeURIComponent(e2);\n }\n addTo(e2) {\n return this._map = e2, addEventListener(\"hashchange\", this._onHashChange, false), this._map.on(\"moveend\", this._updateHash), this;\n }\n remove() {\n return removeEventListener(\"hashchange\", this._onHashChange, false), this._map.off(\"moveend\", this._updateHash), clearTimeout(this._updateHash()), this._removeHash(), delete this._map, this;\n }\n getHashString(e2) {\n const t2 = this._map.getCenter(), i2 = Math.round(100 * this._map.getZoom()) / 100, a2 = Math.ceil((i2 * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), r2 = Math.pow(10, a2), o2 = Math.round(t2.lng * r2) / r2, s2 = Math.round(t2.lat * r2) / r2, n2 = this._map.getBearing(), l2 = this._map.getPitch();\n let c2 = \"\";\n if (c2 += e2 ? `/${o2}/${s2}/${i2}` : `${i2}/${s2}/${o2}`, (n2 || l2) && (c2 += \"/\" + Math.round(10 * n2) / 10), l2 && (c2 += `/${Math.round(l2)}`), this._hashName) {\n const e3 = this._hashName;\n let t3 = false;\n const i3 = window.location.hash.slice(1).split(\"&\").map(((i4) => {\n const a3 = i4.split(\"=\")[0];\n return a3 === e3 ? (t3 = true, `${a3}=${c2}`) : i4;\n })).filter(((e4) => e4));\n return t3 || i3.push(`${e3}=${c2}`), `#${i3.join(\"&\")}`;\n }\n return `#${c2}`;\n }\n _isValidHash(e2) {\n if (e2.length < 3 || e2.some(isNaN)) return false;\n try {\n new t.V(+e2[2], +e2[1]);\n } catch (e3) {\n return false;\n }\n const i2 = +e2[0], a2 = +(e2[3] || 0), r2 = +(e2[4] || 0);\n return i2 >= this._map.getMinZoom() && i2 <= this._map.getMaxZoom() && a2 >= -180 && a2 <= 180 && r2 >= this._map.getMinPitch() && r2 <= this._map.getMaxPitch();\n }\n }\n const Hr = { linearity: 0.3, easing: t.cx(0, 0, 0.3, 1) }, Xr = t.e({ deceleration: 2500, maxSpeed: 1400 }, Hr), Kr = t.e({ deceleration: 20, maxSpeed: 1400 }, Hr), Yr = t.e({ deceleration: 1e3, maxSpeed: 360 }, Hr), Qr = t.e({ deceleration: 1e3, maxSpeed: 90 }, Hr), Jr = t.e({ deceleration: 1e3, maxSpeed: 360 }, Hr);\n class eo {\n constructor(e2) {\n this._map = e2, this.clear();\n }\n clear() {\n this._inertiaBuffer = [];\n }\n record(e2) {\n this._drainInertiaBuffer(), this._inertiaBuffer.push({ time: c(), settings: e2 });\n }\n _drainInertiaBuffer() {\n const e2 = this._inertiaBuffer, t2 = c();\n for (; e2.length > 0 && t2 - e2[0].time > 160; ) e2.shift();\n }\n _onMoveEnd(e2) {\n if (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) return;\n const i2 = { zoom: 0, bearing: 0, pitch: 0, roll: 0, pan: new t.P(0, 0), pinchAround: void 0, around: void 0 };\n for (const { settings: e3 } of this._inertiaBuffer) i2.zoom += e3.zoomDelta || 0, i2.bearing += e3.bearingDelta || 0, i2.pitch += e3.pitchDelta || 0, i2.roll += e3.rollDelta || 0, e3.panDelta && i2.pan._add(e3.panDelta), e3.around && (i2.around = e3.around), e3.pinchAround && (i2.pinchAround = e3.pinchAround);\n const a2 = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, r2 = {};\n if (i2.pan.mag()) {\n const o2 = io(i2.pan.mag(), a2, t.e({}, Xr, e2 || {})), s2 = i2.pan.mult(o2.amount / i2.pan.mag()), n2 = this._map.cameraHelper.handlePanInertia(s2, this._map.transform);\n r2.center = n2.easingCenter, r2.offset = n2.easingOffset, to(r2, o2);\n }\n if (i2.zoom) {\n const e3 = io(i2.zoom, a2, Kr);\n r2.zoom = this._map.transform.zoom + e3.amount, to(r2, e3);\n }\n if (i2.bearing) {\n const e3 = io(i2.bearing, a2, Yr);\n r2.bearing = this._map.transform.bearing + t.ao(e3.amount, -179, 179), to(r2, e3);\n }\n if (i2.pitch) {\n const e3 = io(i2.pitch, a2, Qr);\n r2.pitch = this._map.transform.pitch + e3.amount, to(r2, e3);\n }\n if (i2.roll) {\n const e3 = io(i2.roll, a2, Jr);\n r2.roll = this._map.transform.roll + t.ao(e3.amount, -179, 179), to(r2, e3);\n }\n if (r2.zoom || r2.bearing) {\n const e3 = void 0 === i2.pinchAround ? i2.around : i2.pinchAround;\n r2.around = e3 ? this._map.unproject(e3) : this._map.getCenter();\n }\n return this.clear(), t.e(r2, { noMoveStart: true });\n }\n }\n function to(e2, t2) {\n (!e2.duration || e2.duration < t2.duration) && (e2.duration = t2.duration, e2.easing = t2.easing);\n }\n function io(e2, i2, a2) {\n const { maxSpeed: r2, linearity: o2, deceleration: s2 } = a2, n2 = t.ao(e2 * o2 / (i2 / 1e3), -r2, r2), l2 = Math.abs(n2) / (s2 * o2);\n return { easing: a2.easing, duration: 1e3 * l2, amount: n2 * (l2 / 2) };\n }\n class ao extends t.l {\n preventDefault() {\n this._defaultPrevented = true;\n }\n get defaultPrevented() {\n return this._defaultPrevented;\n }\n constructor(e2, i2, a2, r2 = {}) {\n a2 = a2 instanceof MouseEvent ? a2 : new MouseEvent(e2, a2);\n const o2 = h.mousePos(i2.getCanvas(), a2), s2 = i2.unproject(o2);\n super(e2, t.e({ point: o2, lngLat: s2, originalEvent: a2 }, r2)), this._defaultPrevented = false, this.target = i2;\n }\n }\n class ro extends t.l {\n preventDefault() {\n this._defaultPrevented = true;\n }\n get defaultPrevented() {\n return this._defaultPrevented;\n }\n constructor(e2, i2, a2) {\n const r2 = \"touchend\" === e2 ? a2.changedTouches : a2.touches, o2 = h.touchPos(i2.getCanvasContainer(), r2), s2 = o2.map(((e3) => i2.unproject(e3))), n2 = o2.reduce(((e3, t2, i3, a3) => e3.add(t2.div(a3.length))), new t.P(0, 0));\n super(e2, { points: o2, point: n2, lngLats: s2, lngLat: i2.unproject(n2), originalEvent: a2 }), this._defaultPrevented = false;\n }\n }\n class oo extends t.l {\n preventDefault() {\n this._defaultPrevented = true;\n }\n get defaultPrevented() {\n return this._defaultPrevented;\n }\n constructor(e2, t2, i2) {\n super(e2, { originalEvent: i2 }), this._defaultPrevented = false;\n }\n }\n class so {\n constructor(e2, t2) {\n this._map = e2, this._clickTolerance = t2.clickTolerance;\n }\n reset() {\n delete this._mousedownPos;\n }\n wheel(e2) {\n return this._firePreventable(new oo(e2.type, this._map, e2));\n }\n mousedown(e2, t2) {\n return this._mousedownPos = t2, this._firePreventable(new ao(e2.type, this._map, e2));\n }\n mouseup(e2) {\n this._map.fire(new ao(e2.type, this._map, e2));\n }\n click(e2, t2) {\n this._mousedownPos && this._mousedownPos.dist(t2) >= this._clickTolerance || this._map.fire(new ao(e2.type, this._map, e2));\n }\n dblclick(e2) {\n return this._firePreventable(new ao(e2.type, this._map, e2));\n }\n mouseover(e2) {\n this._map.fire(new ao(e2.type, this._map, e2));\n }\n mouseout(e2) {\n this._map.fire(new ao(e2.type, this._map, e2));\n }\n touchstart(e2) {\n return this._firePreventable(new ro(e2.type, this._map, e2));\n }\n touchmove(e2) {\n this._map.fire(new ro(e2.type, this._map, e2));\n }\n touchend(e2) {\n this._map.fire(new ro(e2.type, this._map, e2));\n }\n touchcancel(e2) {\n this._map.fire(new ro(e2.type, this._map, e2));\n }\n _firePreventable(e2) {\n if (this._map.fire(e2), e2.defaultPrevented) return {};\n }\n isEnabled() {\n return true;\n }\n isActive() {\n return false;\n }\n enable() {\n }\n disable() {\n }\n }\n class no {\n constructor(e2) {\n this._map = e2;\n }\n reset() {\n this._delayContextMenu = false, this._ignoreContextMenu = true, delete this._contextMenuEvent;\n }\n mousemove(e2) {\n this._map.fire(new ao(e2.type, this._map, e2));\n }\n mousedown() {\n this._delayContextMenu = true, this._ignoreContextMenu = false;\n }\n mouseup() {\n this._delayContextMenu = false, this._contextMenuEvent && (this._map.fire(new ao(\"contextmenu\", this._map, this._contextMenuEvent)), delete this._contextMenuEvent);\n }\n contextmenu(e2) {\n this._delayContextMenu ? this._contextMenuEvent = e2 : this._ignoreContextMenu || this._map.fire(new ao(e2.type, this._map, e2)), this._map.listens(\"contextmenu\") && e2.preventDefault();\n }\n isEnabled() {\n return true;\n }\n isActive() {\n return false;\n }\n enable() {\n }\n disable() {\n }\n }\n class lo {\n constructor(e2) {\n this._map = e2;\n }\n get transform() {\n return this._map._requestedCameraState || this._map.transform;\n }\n get center() {\n return { lng: this.transform.center.lng, lat: this.transform.center.lat };\n }\n get zoom() {\n return this.transform.zoom;\n }\n get pitch() {\n return this.transform.pitch;\n }\n get bearing() {\n return this.transform.bearing;\n }\n unproject(e2) {\n return this.transform.screenPointToLocation(t.P.convert(e2), this._map.terrain);\n }\n }\n class co {\n constructor(e2, t2) {\n this._map = e2, this._tr = new lo(e2), this._el = e2.getCanvasContainer(), this._container = e2.getContainer(), this._clickTolerance = t2.clickTolerance || 1;\n }\n isEnabled() {\n return !!this._enabled;\n }\n isActive() {\n return !!this._active;\n }\n enable() {\n this.isEnabled() || (this._enabled = true);\n }\n disable() {\n this.isEnabled() && (this._enabled = false);\n }\n mousedown(e2, t2) {\n this.isEnabled() && e2.shiftKey && 0 === e2.button && (h.disableDrag(), this._startPos = this._lastPos = t2, this._active = true);\n }\n mousemoveWindow(e2, t2) {\n if (!this._active) return;\n const i2 = t2;\n if (this._lastPos.equals(i2) || !this._box && i2.dist(this._startPos) < this._clickTolerance) return;\n const a2 = this._startPos;\n this._lastPos = i2, this._box || (this._box = h.create(\"div\", \"maplibregl-boxzoom\", this._container), this._container.classList.add(\"maplibregl-crosshair\"), this._fireEvent(\"boxzoomstart\", e2));\n const r2 = Math.min(a2.x, i2.x), o2 = Math.max(a2.x, i2.x), s2 = Math.min(a2.y, i2.y), n2 = Math.max(a2.y, i2.y);\n h.setTransform(this._box, `translate(${r2}px,${s2}px)`), this._box.style.width = o2 - r2 + \"px\", this._box.style.height = n2 - s2 + \"px\";\n }\n mouseupWindow(e2, i2) {\n if (!this._active) return;\n if (0 !== e2.button) return;\n const a2 = this._startPos, r2 = i2;\n if (this.reset(), h.suppressClick(), a2.x !== r2.x || a2.y !== r2.y) return this._map.fire(new t.l(\"boxzoomend\", { originalEvent: e2 })), { cameraAnimation: (e3) => e3.fitScreenCoordinates(a2, r2, this._tr.bearing, { linear: true }) };\n this._fireEvent(\"boxzoomcancel\", e2);\n }\n keydown(e2) {\n this._active && 27 === e2.keyCode && (this.reset(), this._fireEvent(\"boxzoomcancel\", e2));\n }\n reset() {\n this._active = false, this._container.classList.remove(\"maplibregl-crosshair\"), this._box && (h.remove(this._box), this._box = null), h.enableDrag(), delete this._startPos, delete this._lastPos;\n }\n _fireEvent(e2, i2) {\n return this._map.fire(new t.l(e2, { originalEvent: i2 }));\n }\n }\n function ho(e2, t2) {\n if (e2.length !== t2.length) throw new Error(`The number of touches and points are not equal - touches ${e2.length}, points ${t2.length}`);\n const i2 = {};\n for (let a2 = 0; a2 < e2.length; a2++) i2[e2[a2].identifier] = t2[a2];\n return i2;\n }\n class uo {\n constructor(e2) {\n this.reset(), this.numTouches = e2.numTouches;\n }\n reset() {\n delete this.centroid, delete this.startTime, delete this.touches, this.aborted = false;\n }\n touchstart(e2, i2, a2) {\n (this.centroid || a2.length > this.numTouches) && (this.aborted = true), this.aborted || (void 0 === this.startTime && (this.startTime = e2.timeStamp), a2.length === this.numTouches && (this.centroid = (function(e3) {\n const i3 = new t.P(0, 0);\n for (const t2 of e3) i3._add(t2);\n return i3.div(e3.length);\n })(i2), this.touches = ho(a2, i2)));\n }\n touchmove(e2, t2, i2) {\n if (this.aborted || !this.centroid) return;\n const a2 = ho(i2, t2);\n for (const e3 in this.touches) {\n const t3 = a2[e3];\n (!t3 || t3.dist(this.touches[e3]) > 30) && (this.aborted = true);\n }\n }\n touchend(e2, t2, i2) {\n if ((!this.centroid || e2.timeStamp - this.startTime > 500) && (this.aborted = true), 0 === i2.length) {\n const e3 = !this.aborted && this.centroid;\n if (this.reset(), e3) return e3;\n }\n }\n }\n class _o {\n constructor(e2) {\n this.singleTap = new uo(e2), this.numTaps = e2.numTaps, this.reset();\n }\n reset() {\n this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset();\n }\n touchstart(e2, t2, i2) {\n this.singleTap.touchstart(e2, t2, i2);\n }\n touchmove(e2, t2, i2) {\n this.singleTap.touchmove(e2, t2, i2);\n }\n touchend(e2, t2, i2) {\n const a2 = this.singleTap.touchend(e2, t2, i2);\n if (a2) {\n const t3 = e2.timeStamp - this.lastTime < 500, i3 = !this.lastTap || this.lastTap.dist(a2) < 30;\n if (t3 && i3 || this.reset(), this.count++, this.lastTime = e2.timeStamp, this.lastTap = a2, this.count === this.numTaps) return this.reset(), a2;\n }\n }\n }\n class po {\n constructor(e2) {\n this._tr = new lo(e2), this._zoomIn = new _o({ numTouches: 1, numTaps: 2 }), this._zoomOut = new _o({ numTouches: 2, numTaps: 1 }), this.reset();\n }\n reset() {\n this._active = false, this._zoomIn.reset(), this._zoomOut.reset();\n }\n touchstart(e2, t2, i2) {\n this._zoomIn.touchstart(e2, t2, i2), this._zoomOut.touchstart(e2, t2, i2);\n }\n touchmove(e2, t2, i2) {\n this._zoomIn.touchmove(e2, t2, i2), this._zoomOut.touchmove(e2, t2, i2);\n }\n touchend(e2, t2, i2) {\n const a2 = this._zoomIn.touchend(e2, t2, i2), r2 = this._zoomOut.touchend(e2, t2, i2), o2 = this._tr;\n return a2 ? (this._active = true, e2.preventDefault(), setTimeout((() => this.reset()), 0), { cameraAnimation: (t3) => t3.easeTo({ duration: 300, zoom: o2.zoom + 1, around: o2.unproject(a2) }, { originalEvent: e2 }) }) : r2 ? (this._active = true, e2.preventDefault(), setTimeout((() => this.reset()), 0), { cameraAnimation: (t3) => t3.easeTo({ duration: 300, zoom: o2.zoom - 1, around: o2.unproject(r2) }, { originalEvent: e2 }) }) : void 0;\n }\n touchcancel() {\n this.reset();\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n }\n class mo {\n constructor(e2) {\n this._enabled = !!e2.enable, this._moveStateManager = e2.moveStateManager, this._clickTolerance = e2.clickTolerance || 1, this._moveFunction = e2.move, this._activateOnStart = !!e2.activateOnStart, e2.assignEvents(this), this.reset();\n }\n reset(e2) {\n this._active = false, this._moved = false, delete this._lastPoint, this._moveStateManager.endMove(e2);\n }\n _move(...e2) {\n const t2 = this._moveFunction(...e2);\n if (t2.bearingDelta || t2.pitchDelta || t2.rollDelta || t2.around || t2.panDelta) return this._active = true, t2;\n }\n dragStart(e2, t2) {\n this.isEnabled() && !this._lastPoint && this._moveStateManager.isValidStartEvent(e2) && (this._moveStateManager.startMove(e2), this._lastPoint = Array.isArray(t2) ? t2[0] : t2, this._activateOnStart && this._lastPoint && (this._active = true));\n }\n dragMove(e2, t2) {\n if (!this.isEnabled()) return;\n const i2 = this._lastPoint;\n if (!i2) return;\n if (e2.preventDefault(), !this._moveStateManager.isValidMoveEvent(e2)) return void this.reset(e2);\n const a2 = Array.isArray(t2) ? t2[0] : t2;\n return !this._moved && a2.dist(i2) < this._clickTolerance ? void 0 : (this._moved = true, this._lastPoint = a2, this._move(i2, a2));\n }\n dragEnd(e2) {\n this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(e2) && (this._moved && h.suppressClick(), this.reset(e2));\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n getClickTolerance() {\n return this._clickTolerance;\n }\n }\n const fo = 0, go = 2, vo = { [fo]: 1, [go]: 2 };\n class xo {\n constructor(e2) {\n this._correctEvent = e2.checkCorrectEvent;\n }\n startMove(e2) {\n const t2 = h.mouseButton(e2);\n this._eventButton = t2;\n }\n endMove(e2) {\n delete this._eventButton;\n }\n isValidStartEvent(e2) {\n return this._correctEvent(e2);\n }\n isValidMoveEvent(e2) {\n return !(function(e3, t2) {\n const i2 = vo[t2];\n return void 0 === e3.buttons || (e3.buttons & i2) !== i2;\n })(e2, this._eventButton);\n }\n isValidEndEvent(e2) {\n return h.mouseButton(e2) === this._eventButton;\n }\n }\n class bo {\n constructor() {\n this._firstTouch = void 0;\n }\n _isOneFingerTouch(e2) {\n return 1 === e2.targetTouches.length;\n }\n _isSameTouchEvent(e2) {\n return e2.targetTouches[0].identifier === this._firstTouch;\n }\n startMove(e2) {\n this._firstTouch = e2.targetTouches[0].identifier;\n }\n endMove(e2) {\n delete this._firstTouch;\n }\n isValidStartEvent(e2) {\n return this._isOneFingerTouch(e2);\n }\n isValidMoveEvent(e2) {\n return this._isOneFingerTouch(e2) && this._isSameTouchEvent(e2);\n }\n isValidEndEvent(e2) {\n return this._isOneFingerTouch(e2) && this._isSameTouchEvent(e2);\n }\n }\n class yo {\n constructor(e2 = new xo({ checkCorrectEvent: () => true }), t2 = new bo()) {\n this.mouseMoveStateManager = e2, this.oneFingerTouchMoveStateManager = t2;\n }\n _executeRelevantHandler(e2, t2, i2) {\n return e2 instanceof MouseEvent ? t2(e2) : \"undefined\" != typeof TouchEvent && e2 instanceof TouchEvent ? i2(e2) : void 0;\n }\n startMove(e2) {\n this._executeRelevantHandler(e2, ((e3) => this.mouseMoveStateManager.startMove(e3)), ((e3) => this.oneFingerTouchMoveStateManager.startMove(e3)));\n }\n endMove(e2) {\n this._executeRelevantHandler(e2, ((e3) => this.mouseMoveStateManager.endMove(e3)), ((e3) => this.oneFingerTouchMoveStateManager.endMove(e3)));\n }\n isValidStartEvent(e2) {\n return this._executeRelevantHandler(e2, ((e3) => this.mouseMoveStateManager.isValidStartEvent(e3)), ((e3) => this.oneFingerTouchMoveStateManager.isValidStartEvent(e3)));\n }\n isValidMoveEvent(e2) {\n return this._executeRelevantHandler(e2, ((e3) => this.mouseMoveStateManager.isValidMoveEvent(e3)), ((e3) => this.oneFingerTouchMoveStateManager.isValidMoveEvent(e3)));\n }\n isValidEndEvent(e2) {\n return this._executeRelevantHandler(e2, ((e3) => this.mouseMoveStateManager.isValidEndEvent(e3)), ((e3) => this.oneFingerTouchMoveStateManager.isValidEndEvent(e3)));\n }\n }\n const wo = (e2) => {\n e2.mousedown = e2.dragStart, e2.mousemoveWindow = e2.dragMove, e2.mouseup = e2.dragEnd, e2.contextmenu = (e3) => {\n e3.preventDefault();\n };\n };\n class To {\n constructor(e2, t2) {\n this._clickTolerance = e2.clickTolerance || 1, this._map = t2, this.reset();\n }\n reset() {\n this._active = false, this._touches = {}, this._sum = new t.P(0, 0);\n }\n _shouldBePrevented(e2) {\n return e2 < (this._map.cooperativeGestures.isEnabled() ? 2 : 1);\n }\n touchstart(e2, t2, i2) {\n return this._calculateTransform(e2, t2, i2);\n }\n touchmove(e2, t2, i2) {\n if (this._active) {\n if (!this._shouldBePrevented(i2.length)) return e2.preventDefault(), this._calculateTransform(e2, t2, i2);\n this._map.cooperativeGestures.notifyGestureBlocked(\"touch_pan\", e2);\n }\n }\n touchend(e2, t2, i2) {\n this._calculateTransform(e2, t2, i2), this._active && this._shouldBePrevented(i2.length) && this.reset();\n }\n touchcancel() {\n this.reset();\n }\n _calculateTransform(e2, i2, a2) {\n a2.length > 0 && (this._active = true);\n const r2 = ho(a2, i2), o2 = new t.P(0, 0), s2 = new t.P(0, 0);\n let n2 = 0;\n for (const e3 in r2) {\n const t2 = r2[e3], i3 = this._touches[e3];\n i3 && (o2._add(t2), s2._add(t2.sub(i3)), n2++, r2[e3] = t2);\n }\n if (this._touches = r2, this._shouldBePrevented(n2) || !s2.mag()) return;\n const l2 = s2.div(n2);\n return this._sum._add(l2), this._sum.mag() < this._clickTolerance ? void 0 : { around: o2.div(n2), panDelta: l2 };\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n }\n class Po {\n constructor() {\n this.reset();\n }\n reset() {\n this._active = false, delete this._firstTwoTouches;\n }\n touchstart(e2, t2, i2) {\n this._firstTwoTouches || i2.length < 2 || (this._firstTwoTouches = [i2[0].identifier, i2[1].identifier], this._start([t2[0], t2[1]]));\n }\n touchmove(e2, t2, i2) {\n if (!this._firstTwoTouches) return;\n e2.preventDefault();\n const [a2, r2] = this._firstTwoTouches, o2 = Io(i2, t2, a2), s2 = Io(i2, t2, r2);\n if (!o2 || !s2) return;\n const n2 = this._aroundCenter ? null : o2.add(s2).div(2);\n return this._move([o2, s2], n2, e2);\n }\n touchend(e2, t2, i2) {\n if (!this._firstTwoTouches) return;\n const [a2, r2] = this._firstTwoTouches, o2 = Io(i2, t2, a2), s2 = Io(i2, t2, r2);\n o2 && s2 || (this._active && h.suppressClick(), this.reset());\n }\n touchcancel() {\n this.reset();\n }\n enable(e2) {\n this._enabled = true, this._aroundCenter = !!e2 && \"center\" === e2.around;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return !!this._enabled;\n }\n isActive() {\n return !!this._active;\n }\n }\n function Io(e2, t2, i2) {\n for (let a2 = 0; a2 < e2.length; a2++) if (e2[a2].identifier === i2) return t2[a2];\n }\n function Co(e2, t2) {\n return Math.log(e2 / t2) / Math.LN2;\n }\n class Mo extends Po {\n reset() {\n super.reset(), delete this._distance, delete this._startDistance;\n }\n _start(e2) {\n this._startDistance = this._distance = e2[0].dist(e2[1]);\n }\n _move(e2, t2) {\n const i2 = this._distance;\n if (this._distance = e2[0].dist(e2[1]), this._active || !(Math.abs(Co(this._distance, this._startDistance)) < 0.1)) return this._active = true, { zoomDelta: Co(this._distance, i2), pinchAround: t2 };\n }\n }\n function Eo(e2, t2) {\n return 180 * e2.angleWith(t2) / Math.PI;\n }\n class So extends Po {\n reset() {\n super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;\n }\n _start(e2) {\n this._startVector = this._vector = e2[0].sub(e2[1]), this._minDiameter = e2[0].dist(e2[1]);\n }\n _move(e2, t2, i2) {\n const a2 = this._vector;\n if (this._vector = e2[0].sub(e2[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = true, { bearingDelta: Eo(this._vector, a2), pinchAround: t2 };\n }\n _isBelowThreshold(e2) {\n this._minDiameter = Math.min(this._minDiameter, e2.mag());\n const t2 = 25 / (Math.PI * this._minDiameter) * 360, i2 = Eo(e2, this._startVector);\n return Math.abs(i2) < t2;\n }\n }\n function Ro(e2) {\n return Math.abs(e2.y) > Math.abs(e2.x);\n }\n class zo extends Po {\n constructor(e2) {\n super(), this._currentTouchCount = 0, this._map = e2;\n }\n reset() {\n super.reset(), this._valid = void 0, delete this._firstMove, delete this._lastPoints;\n }\n touchstart(e2, t2, i2) {\n super.touchstart(e2, t2, i2), this._currentTouchCount = i2.length;\n }\n _start(e2) {\n this._lastPoints = e2, Ro(e2[0].sub(e2[1])) && (this._valid = false);\n }\n _move(e2, t2, i2) {\n if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) return;\n const a2 = e2[0].sub(this._lastPoints[0]), r2 = e2[1].sub(this._lastPoints[1]);\n return this._valid = this.gestureBeginsVertically(a2, r2, i2.timeStamp), this._valid ? (this._lastPoints = e2, this._active = true, { pitchDelta: (a2.y + r2.y) / 2 * -0.5 }) : void 0;\n }\n gestureBeginsVertically(e2, t2, i2) {\n if (void 0 !== this._valid) return this._valid;\n const a2 = e2.mag() >= 2, r2 = t2.mag() >= 2;\n if (!a2 && !r2) return;\n if (!a2 || !r2) return void 0 === this._firstMove && (this._firstMove = i2), i2 - this._firstMove < 100 && void 0;\n const o2 = e2.y > 0 == t2.y > 0;\n return Ro(e2) && Ro(t2) && o2;\n }\n }\n const Do = { panStep: 100, bearingStep: 15, pitchStep: 10 };\n class Ao {\n constructor(e2) {\n this._tr = new lo(e2);\n const t2 = Do;\n this._panStep = t2.panStep, this._bearingStep = t2.bearingStep, this._pitchStep = t2.pitchStep, this._rotationDisabled = false;\n }\n reset() {\n this._active = false;\n }\n keydown(e2) {\n if (e2.altKey || e2.ctrlKey || e2.metaKey) return;\n let t2 = 0, i2 = 0, a2 = 0, r2 = 0, o2 = 0;\n switch (e2.keyCode) {\n case 61:\n case 107:\n case 171:\n case 187:\n t2 = 1;\n break;\n case 189:\n case 109:\n case 173:\n t2 = -1;\n break;\n case 37:\n e2.shiftKey ? i2 = -1 : (e2.preventDefault(), r2 = -1);\n break;\n case 39:\n e2.shiftKey ? i2 = 1 : (e2.preventDefault(), r2 = 1);\n break;\n case 38:\n e2.shiftKey ? a2 = 1 : (e2.preventDefault(), o2 = -1);\n break;\n case 40:\n e2.shiftKey ? a2 = -1 : (e2.preventDefault(), o2 = 1);\n break;\n default:\n return;\n }\n return this._rotationDisabled && (i2 = 0, a2 = 0), { cameraAnimation: (s2) => {\n const n2 = this._tr;\n s2.easeTo({ duration: 300, easeId: \"keyboardHandler\", easing: Lo, zoom: t2 ? Math.round(n2.zoom) + t2 * (e2.shiftKey ? 2 : 1) : n2.zoom, bearing: n2.bearing + i2 * this._bearingStep, pitch: n2.pitch + a2 * this._pitchStep, offset: [-r2 * this._panStep, -o2 * this._panStep], center: n2.center }, { originalEvent: e2 });\n } };\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n disableRotation() {\n this._rotationDisabled = true;\n }\n enableRotation() {\n this._rotationDisabled = false;\n }\n }\n function Lo(e2) {\n return e2 * (2 - e2);\n }\n const ko = 4.000244140625, Fo = 1 / 450;\n class Bo {\n constructor(e2, t2) {\n this._onTimeout = (e3) => {\n this._type = \"wheel\", this._delta -= this._lastValue, this._active || this._start(e3);\n }, this._map = e2, this._tr = new lo(e2), this._triggerRenderFrame = t2, this._delta = 0, this._defaultZoomRate = 0.01, this._wheelZoomRate = Fo;\n }\n setZoomRate(e2) {\n this._defaultZoomRate = e2;\n }\n setWheelZoomRate(e2) {\n this._wheelZoomRate = e2;\n }\n isEnabled() {\n return !!this._enabled;\n }\n isActive() {\n return !!this._active || void 0 !== this._finishTimeout;\n }\n isZooming() {\n return !!this._zooming;\n }\n enable(e2) {\n this.isEnabled() || (this._enabled = true, this._aroundCenter = !!e2 && \"center\" === e2.around);\n }\n disable() {\n this.isEnabled() && (this._enabled = false);\n }\n _shouldBePrevented(e2) {\n return !!this._map.cooperativeGestures.isEnabled() && !(e2.ctrlKey || this._map.cooperativeGestures.isBypassed(e2));\n }\n wheel(e2) {\n if (!this.isEnabled()) return;\n if (this._shouldBePrevented(e2)) return void this._map.cooperativeGestures.notifyGestureBlocked(\"wheel_zoom\", e2);\n let t2 = e2.deltaMode === WheelEvent.DOM_DELTA_LINE ? 40 * e2.deltaY : e2.deltaY;\n const i2 = c(), a2 = i2 - (this._lastWheelEventTime || 0);\n this._lastWheelEventTime = i2, 0 !== t2 && t2 % ko == 0 ? this._type = \"wheel\" : 0 !== t2 && Math.abs(t2) < 4 ? this._type = \"trackpad\" : a2 > 400 ? (this._type = null, this._lastValue = t2, this._timeout = setTimeout(this._onTimeout, 40, e2)) : this._type || (this._type = Math.abs(a2 * t2) < 200 ? \"trackpad\" : \"wheel\", this._timeout && (clearTimeout(this._timeout), this._timeout = null, t2 += this._lastValue)), e2.shiftKey && t2 && (t2 /= 4), this._type && (this._lastWheelEvent = e2, this._delta -= t2, this._active || this._start(e2)), e2.preventDefault();\n }\n _start(e2) {\n if (!this._delta) return;\n this._frameId && (this._frameId = null), this._active = true, this.isZooming() || (this._zooming = true), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);\n const i2 = h.mousePos(this._map.getCanvas(), e2), a2 = this._tr;\n this._aroundPoint = this._aroundCenter ? a2.transform.locationToScreenPoint(t.V.convert(a2.center)) : i2, this._frameId || (this._frameId = true, this._triggerRenderFrame());\n }\n renderFrame() {\n if (!this._frameId) return;\n if (this._frameId = null, !this.isActive()) return;\n const e2 = this._tr.transform;\n if (\"number\" == typeof this._lastExpectedZoom) {\n const t2 = e2.zoom - this._lastExpectedZoom;\n \"number\" == typeof this._startZoom && (this._startZoom += t2), \"number\" == typeof this._targetZoom && (this._targetZoom += t2);\n }\n if (0 !== this._delta) {\n const i3 = \"wheel\" === this._type && Math.abs(this._delta) > ko ? this._wheelZoomRate : this._defaultZoomRate;\n let a3 = 2 / (1 + Math.exp(-Math.abs(this._delta * i3)));\n this._delta < 0 && 0 !== a3 && (a3 = 1 / a3);\n const r3 = \"number\" != typeof this._targetZoom ? e2.scale : t.ar(this._targetZoom);\n this._targetZoom = e2.applyConstrain(e2.getCameraLngLat(), t.au(r3 * a3)).zoom, \"wheel\" === this._type && (this._startZoom = e2.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;\n }\n const i2 = \"number\" != typeof this._targetZoom ? e2.zoom : this._targetZoom, a2 = this._startZoom, r2 = this._easing;\n let o2, s2 = false;\n if (\"wheel\" === this._type && a2 && r2) {\n const e3 = c() - this._lastWheelEventTime, n2 = Math.min((e3 + 5) / 200, 1), l2 = r2(n2);\n o2 = t.G.number(a2, i2, l2), n2 < 1 ? this._frameId || (this._frameId = true) : s2 = true;\n } else o2 = i2, s2 = true;\n return this._active = true, s2 && (this._active = false, this._finishTimeout = setTimeout((() => {\n this._zooming = false, this._triggerRenderFrame(), delete this._targetZoom, delete this._lastExpectedZoom, delete this._finishTimeout;\n }), 200)), this._lastExpectedZoom = o2, { noInertia: true, needsRenderFrame: !s2, zoomDelta: o2 - e2.zoom, around: this._aroundPoint, originalEvent: this._lastWheelEvent };\n }\n _smoothOutEasing(e2) {\n let i2 = t.cz;\n if (this._prevEase) {\n const e3 = this._prevEase, a2 = (c() - e3.start) / e3.duration, r2 = e3.easing(a2 + 0.01) - e3.easing(a2), o2 = 0.27 / Math.sqrt(r2 * r2 + 1e-4) * 0.01, s2 = Math.sqrt(0.0729 - o2 * o2);\n i2 = t.cx(o2, s2, 0.25, 1);\n }\n return this._prevEase = { start: c(), duration: e2, easing: i2 }, i2;\n }\n reset() {\n this._active = false, this._zooming = false, delete this._targetZoom, delete this._lastExpectedZoom, this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);\n }\n }\n class Oo {\n constructor(e2, t2) {\n this._clickZoom = e2, this._tapZoom = t2;\n }\n enable() {\n this._clickZoom.enable(), this._tapZoom.enable();\n }\n disable() {\n this._clickZoom.disable(), this._tapZoom.disable();\n }\n isEnabled() {\n return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();\n }\n isActive() {\n return this._clickZoom.isActive() || this._tapZoom.isActive();\n }\n }\n class jo {\n constructor(e2) {\n this._tr = new lo(e2), this.reset();\n }\n reset() {\n this._active = false;\n }\n dblclick(e2, t2) {\n return e2.preventDefault(), { cameraAnimation: (i2) => {\n i2.easeTo({ duration: 300, zoom: this._tr.zoom + (e2.shiftKey ? -1 : 1), around: this._tr.unproject(t2) }, { originalEvent: e2 });\n } };\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n }\n class No {\n constructor() {\n this._tap = new _o({ numTouches: 1, numTaps: 1 }), this.reset();\n }\n reset() {\n this._active = false, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, delete this._tapPoint, this._tap.reset();\n }\n touchstart(e2, t2, i2) {\n if (!this._swipePoint) if (this._tapTime) {\n const a2 = t2[0], r2 = e2.timeStamp - this._tapTime < 500, o2 = this._tapPoint.dist(a2) < 30;\n r2 && o2 ? i2.length > 0 && (this._swipePoint = a2, this._swipeTouch = i2[0].identifier) : this.reset();\n } else this._tap.touchstart(e2, t2, i2);\n }\n touchmove(e2, t2, i2) {\n if (this._tapTime) {\n if (this._swipePoint) {\n if (i2[0].identifier !== this._swipeTouch) return;\n const a2 = t2[0], r2 = a2.y - this._swipePoint.y;\n return this._swipePoint = a2, e2.preventDefault(), this._active = true, { zoomDelta: r2 / 128 };\n }\n } else this._tap.touchmove(e2, t2, i2);\n }\n touchend(e2, t2, i2) {\n if (this._tapTime) this._swipePoint && 0 === i2.length && this.reset();\n else {\n const a2 = this._tap.touchend(e2, t2, i2);\n a2 && (this._tapTime = e2.timeStamp, this._tapPoint = a2);\n }\n }\n touchcancel() {\n this.reset();\n }\n enable() {\n this._enabled = true;\n }\n disable() {\n this._enabled = false, this.reset();\n }\n isEnabled() {\n return this._enabled;\n }\n isActive() {\n return this._active;\n }\n }\n class Zo {\n constructor(e2, t2, i2) {\n this._el = e2, this._mousePan = t2, this._touchPan = i2;\n }\n enable(e2) {\n this._inertiaOptions = e2 || {}, this._mousePan.enable(), this._touchPan.enable(), this._el.classList.add(\"maplibregl-touch-drag-pan\");\n }\n disable() {\n this._mousePan.disable(), this._touchPan.disable(), this._el.classList.remove(\"maplibregl-touch-drag-pan\");\n }\n isEnabled() {\n return this._mousePan.isEnabled() && this._touchPan.isEnabled();\n }\n isActive() {\n return this._mousePan.isActive() || this._touchPan.isActive();\n }\n }\n class Go {\n constructor(e2, t2, i2, a2) {\n this._pitchWithRotate = e2.pitchWithRotate, this._rollEnabled = e2.rollEnabled, this._mouseRotate = t2, this._mousePitch = i2, this._mouseRoll = a2;\n }\n enable() {\n this._mouseRotate.enable(), this._pitchWithRotate && this._mousePitch.enable(), this._rollEnabled && this._mouseRoll.enable();\n }\n disable() {\n this._mouseRotate.disable(), this._mousePitch.disable(), this._mouseRoll.disable();\n }\n isEnabled() {\n return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled()) && (!this._rollEnabled || this._mouseRoll.isEnabled());\n }\n isActive() {\n return this._mouseRotate.isActive() || this._mousePitch.isActive() || this._mouseRoll.isActive();\n }\n }\n class Uo {\n constructor(e2, t2, i2, a2) {\n this._el = e2, this._touchZoom = t2, this._touchRotate = i2, this._tapDragZoom = a2, this._rotationDisabled = false, this._enabled = true;\n }\n enable(e2) {\n this._touchZoom.enable(e2), this._rotationDisabled || this._touchRotate.enable(e2), this._tapDragZoom.enable(), this._el.classList.add(\"maplibregl-touch-zoom-rotate\");\n }\n disable() {\n this._touchZoom.disable(), this._touchRotate.disable(), this._tapDragZoom.disable(), this._el.classList.remove(\"maplibregl-touch-zoom-rotate\");\n }\n isEnabled() {\n return this._touchZoom.isEnabled() && (this._rotationDisabled || this._touchRotate.isEnabled()) && this._tapDragZoom.isEnabled();\n }\n isActive() {\n return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();\n }\n disableRotation() {\n this._rotationDisabled = true, this._touchRotate.disable();\n }\n enableRotation() {\n this._rotationDisabled = false, this._touchZoom.isEnabled() && this._touchRotate.enable();\n }\n }\n class Vo {\n constructor(e2, t2) {\n this._bypassKey = -1 !== navigator.userAgent.indexOf(\"Mac\") ? \"metaKey\" : \"ctrlKey\", this._map = e2, this._options = t2, this._enabled = false;\n }\n isActive() {\n return false;\n }\n reset() {\n }\n _setupUI() {\n if (this._container) return;\n const e2 = this._map.getCanvasContainer();\n e2.classList.add(\"maplibregl-cooperative-gestures\"), this._container = h.create(\"div\", \"maplibregl-cooperative-gesture-screen\", e2);\n let t2 = this._map._getUIString(\"CooperativeGesturesHandler.WindowsHelpText\");\n \"metaKey\" === this._bypassKey && (t2 = this._map._getUIString(\"CooperativeGesturesHandler.MacHelpText\"));\n const i2 = this._map._getUIString(\"CooperativeGesturesHandler.MobileHelpText\"), a2 = document.createElement(\"div\");\n a2.className = \"maplibregl-desktop-message\", a2.textContent = t2, this._container.appendChild(a2);\n const r2 = document.createElement(\"div\");\n r2.className = \"maplibregl-mobile-message\", r2.textContent = i2, this._container.appendChild(r2), this._container.setAttribute(\"aria-hidden\", \"true\");\n }\n _destroyUI() {\n this._container && (h.remove(this._container), this._map.getCanvasContainer().classList.remove(\"maplibregl-cooperative-gestures\")), delete this._container;\n }\n enable() {\n this._setupUI(), this._enabled = true;\n }\n disable() {\n this._enabled = false, this._destroyUI();\n }\n isEnabled() {\n return this._enabled;\n }\n isBypassed(e2) {\n return e2[this._bypassKey];\n }\n notifyGestureBlocked(e2, i2) {\n this._enabled && (this._map.fire(new t.l(\"cooperativegestureprevented\", { gestureType: e2, originalEvent: i2 })), this._container.classList.add(\"maplibregl-show\"), setTimeout((() => {\n this._container.classList.remove(\"maplibregl-show\");\n }), 100));\n }\n }\n const qo = (e2) => e2.zoom || e2.drag || e2.roll || e2.pitch || e2.rotate;\n class Wo extends t.l {\n }\n function $o(e2) {\n return e2.panDelta && e2.panDelta.mag() || e2.zoomDelta || e2.bearingDelta || e2.pitchDelta || e2.rollDelta;\n }\n class Ho {\n constructor(e2, i2) {\n this.handleWindowEvent = (e3) => {\n this.handleEvent(e3, `${e3.type}Window`);\n }, this.handleEvent = (e3, i3) => {\n if (\"blur\" === e3.type) return void this.stop(true);\n this._updatingCamera = true;\n const a3 = \"renderFrame\" === e3.type ? void 0 : e3, r2 = { needsRenderFrame: false }, o2 = {}, s2 = {};\n for (const { handlerName: n3, handler: l3, allowed: c2 } of this._handlers) {\n if (!l3.isEnabled()) continue;\n let u2;\n if (this._blockedByActive(s2, c2, n3)) l3.reset();\n else if (l3[i3 || e3.type]) {\n if (t.cA(e3, i3 || e3.type)) {\n const t2 = h.mousePos(this._map.getCanvas(), e3);\n u2 = l3[i3 || e3.type](e3, t2);\n } else if (t.cB(e3, i3 || e3.type)) {\n const t2 = this._getMapTouches(e3.touches), a4 = h.touchPos(this._map.getCanvas(), t2);\n u2 = l3[i3 || e3.type](e3, a4, t2);\n } else t.cC(i3 || e3.type) || (u2 = l3[i3 || e3.type](e3));\n this.mergeHandlerResult(r2, o2, u2, n3, a3), u2 && u2.needsRenderFrame && this._triggerRenderFrame();\n }\n (u2 || l3.isActive()) && (s2[n3] = l3);\n }\n const n2 = {};\n for (const e4 in this._previousActiveHandlers) s2[e4] || (n2[e4] = a3);\n this._previousActiveHandlers = s2, (Object.keys(n2).length || $o(r2)) && (this._changes.push([r2, o2, n2]), this._triggerRenderFrame()), (Object.keys(s2).length || $o(r2)) && this._map._stop(true), this._updatingCamera = false;\n const { cameraAnimation: l2 } = r2;\n l2 && (this._inertia.clear(), this._fireEvents({}, {}, true), this._changes = [], l2(this._map));\n }, this._map = e2, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new eo(e2), this._bearingSnap = i2.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(i2);\n const a2 = this._el;\n this._listeners = [[a2, \"touchstart\", { passive: true }], [a2, \"touchmove\", { passive: false }], [a2, \"touchend\", void 0], [a2, \"touchcancel\", void 0], [a2, \"mousedown\", void 0], [a2, \"mousemove\", void 0], [a2, \"mouseup\", void 0], [document, \"mousemove\", { capture: true }], [document, \"mouseup\", void 0], [a2, \"mouseover\", void 0], [a2, \"mouseout\", void 0], [a2, \"dblclick\", void 0], [a2, \"click\", void 0], [a2, \"keydown\", { capture: false }], [a2, \"keyup\", void 0], [a2, \"wheel\", { passive: false }], [a2, \"contextmenu\", void 0], [window, \"blur\", void 0]];\n for (const [e3, t2, i3] of this._listeners) h.addEventListener(e3, t2, e3 === document ? this.handleWindowEvent : this.handleEvent, i3);\n }\n destroy() {\n for (const [e2, t2, i2] of this._listeners) h.removeEventListener(e2, t2, e2 === document ? this.handleWindowEvent : this.handleEvent, i2);\n }\n _addDefaultHandlers(e2) {\n const i2 = this._map, a2 = i2.getCanvasContainer();\n this._add(\"mapEvent\", new so(i2, e2));\n const r2 = i2.boxZoom = new co(i2, e2);\n this._add(\"boxZoom\", r2), e2.interactive && e2.boxZoom && r2.enable();\n const o2 = i2.cooperativeGestures = new Vo(i2, e2.cooperativeGestures);\n this._add(\"cooperativeGestures\", o2), e2.cooperativeGestures && o2.enable();\n const s2 = new po(i2), n2 = new jo(i2);\n i2.doubleClickZoom = new Oo(n2, s2), this._add(\"tapZoom\", s2), this._add(\"clickZoom\", n2), e2.interactive && e2.doubleClickZoom && i2.doubleClickZoom.enable();\n const l2 = new No();\n this._add(\"tapDragZoom\", l2);\n const c2 = i2.touchPitch = new zo(i2);\n this._add(\"touchPitch\", c2), e2.interactive && e2.touchPitch && i2.touchPitch.enable(e2.touchPitch);\n const u2 = () => i2.project(i2.getCenter()), d2 = (function({ enable: e3, clickTolerance: i3, aroundCenter: a3 = true, minPixelCenterThreshold: r3 = 100, rotateDegreesPerPixelMoved: o3 = 0.8 }, s3) {\n const n3 = new xo({ checkCorrectEvent: (e4) => 0 === h.mouseButton(e4) && e4.ctrlKey || 2 === h.mouseButton(e4) && !e4.ctrlKey });\n return new mo({ clickTolerance: i3, move: (e4, i4) => {\n const n4 = s3();\n if (a3 && Math.abs(n4.y - e4.y) > r3) return { bearingDelta: t.cy(new t.P(e4.x, i4.y), i4, n4) };\n let l3 = (i4.x - e4.x) * o3;\n return a3 && i4.y < n4.y && (l3 = -l3), { bearingDelta: l3 };\n }, moveStateManager: n3, enable: e3, assignEvents: wo });\n })(e2, u2), _2 = (function({ enable: e3, clickTolerance: t2, pitchDegreesPerPixelMoved: i3 = -0.5 }) {\n const a3 = new xo({ checkCorrectEvent: (e4) => 0 === h.mouseButton(e4) && e4.ctrlKey || 2 === h.mouseButton(e4) });\n return new mo({ clickTolerance: t2, move: (e4, t3) => ({ pitchDelta: (t3.y - e4.y) * i3 }), moveStateManager: a3, enable: e3, assignEvents: wo });\n })(e2), p2 = (function({ enable: e3, clickTolerance: t2, rollDegreesPerPixelMoved: i3 = 0.3 }, a3) {\n const r3 = new xo({ checkCorrectEvent: (e4) => 2 === h.mouseButton(e4) && e4.ctrlKey });\n return new mo({ clickTolerance: t2, move: (e4, t3) => {\n const r4 = a3();\n let o3 = (t3.x - e4.x) * i3;\n return t3.y < r4.y && (o3 = -o3), { rollDelta: o3 };\n }, moveStateManager: r3, enable: e3, assignEvents: wo });\n })(e2, u2);\n i2.dragRotate = new Go(e2, d2, _2, p2), this._add(\"mouseRotate\", d2, [\"mousePitch\"]), this._add(\"mousePitch\", _2, [\"mouseRotate\", \"mouseRoll\"]), this._add(\"mouseRoll\", p2, [\"mousePitch\"]), e2.interactive && e2.dragRotate && i2.dragRotate.enable();\n const m2 = (function({ enable: e3, clickTolerance: t2 }) {\n const i3 = new xo({ checkCorrectEvent: (e4) => 0 === h.mouseButton(e4) && !e4.ctrlKey });\n return new mo({ clickTolerance: t2, move: (e4, t3) => ({ around: t3, panDelta: t3.sub(e4) }), activateOnStart: true, moveStateManager: i3, enable: e3, assignEvents: wo });\n })(e2), f2 = new To(e2, i2);\n i2.dragPan = new Zo(a2, m2, f2), this._add(\"mousePan\", m2), this._add(\"touchPan\", f2, [\"touchZoom\", \"touchRotate\"]), e2.interactive && e2.dragPan && i2.dragPan.enable(e2.dragPan);\n const g2 = new So(), v2 = new Mo();\n i2.touchZoomRotate = new Uo(a2, v2, g2, l2), this._add(\"touchRotate\", g2, [\"touchPan\", \"touchZoom\"]), this._add(\"touchZoom\", v2, [\"touchPan\", \"touchRotate\"]), e2.interactive && e2.touchZoomRotate && i2.touchZoomRotate.enable(e2.touchZoomRotate), this._add(\"blockableMapEvent\", new no(i2));\n const x2 = i2.scrollZoom = new Bo(i2, (() => this._triggerRenderFrame()));\n this._add(\"scrollZoom\", x2, [\"mousePan\"]), e2.interactive && e2.scrollZoom && i2.scrollZoom.enable(e2.scrollZoom);\n const b2 = i2.keyboard = new Ao(i2);\n this._add(\"keyboard\", b2), e2.interactive && e2.keyboard && i2.keyboard.enable();\n }\n _add(e2, t2, i2) {\n this._handlers.push({ handlerName: e2, handler: t2, allowed: i2 }), this._handlersById[e2] = t2;\n }\n stop(e2) {\n if (!this._updatingCamera) {\n for (const { handler: e3 } of this._handlers) e3.reset();\n this._inertia.clear(), this._fireEvents({}, {}, e2), this._changes = [];\n }\n }\n isActive() {\n for (const { handler: e2 } of this._handlers) if (e2.isActive()) return true;\n return false;\n }\n isZooming() {\n return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();\n }\n isRotating() {\n return !!this._eventsInProgress.rotate;\n }\n isMoving() {\n return Boolean(qo(this._eventsInProgress)) || this.isZooming();\n }\n _blockedByActive(e2, t2, i2) {\n for (const a2 in e2) if (a2 !== i2 && (!t2 || t2.indexOf(a2) < 0)) return true;\n return false;\n }\n _getMapTouches(e2) {\n const t2 = [];\n for (const i2 of e2) this._el.contains(i2.target) && t2.push(i2);\n return t2;\n }\n mergeHandlerResult(e2, i2, a2, r2, o2) {\n if (!a2) return;\n t.e(e2, a2);\n const s2 = { handlerName: r2, originalEvent: a2.originalEvent || o2 };\n void 0 !== a2.zoomDelta && (i2.zoom = s2), void 0 !== a2.panDelta && (i2.drag = s2), void 0 !== a2.rollDelta && (i2.roll = s2), void 0 !== a2.pitchDelta && (i2.pitch = s2), void 0 !== a2.bearingDelta && (i2.rotate = s2);\n }\n _applyChanges() {\n const e2 = {}, i2 = {}, a2 = {};\n for (const [r2, o2, s2] of this._changes) r2.panDelta && (e2.panDelta = (e2.panDelta || new t.P(0, 0))._add(r2.panDelta)), r2.zoomDelta && (e2.zoomDelta = (e2.zoomDelta || 0) + r2.zoomDelta), r2.bearingDelta && (e2.bearingDelta = (e2.bearingDelta || 0) + r2.bearingDelta), r2.pitchDelta && (e2.pitchDelta = (e2.pitchDelta || 0) + r2.pitchDelta), r2.rollDelta && (e2.rollDelta = (e2.rollDelta || 0) + r2.rollDelta), void 0 !== r2.around && (e2.around = r2.around), void 0 !== r2.pinchAround && (e2.pinchAround = r2.pinchAround), r2.noInertia && (e2.noInertia = r2.noInertia), t.e(i2, o2), t.e(a2, s2);\n this._updateMapTransform(e2, i2, a2), this._changes = [];\n }\n _updateMapTransform(e2, t2, i2) {\n const a2 = this._map, r2 = a2._getTransformForUpdate(), o2 = a2.terrain;\n if (!($o(e2) || o2 && this._terrainMovement)) return this._fireEvents(t2, i2, true);\n a2._stop(true);\n let { panDelta: s2, zoomDelta: n2, bearingDelta: l2, pitchDelta: c2, rollDelta: h2, around: u2, pinchAround: d2 } = e2;\n void 0 !== d2 && (u2 = d2), u2 = u2 || a2.transform.centerPoint, o2 && !r2.isPointOnMapSurface(u2) && (u2 = r2.centerPoint);\n const _2 = { panDelta: s2, zoomDelta: n2, rollDelta: h2, pitchDelta: c2, bearingDelta: l2, around: u2 };\n this._map.cameraHelper.useGlobeControls && !r2.isPointOnMapSurface(u2) && (u2 = r2.centerPoint);\n const p2 = u2.distSqr(r2.centerPoint) < 0.01 ? r2.center : r2.screenPointToLocation(s2 ? u2.sub(s2) : u2);\n this._handleMapControls({ terrain: o2, tr: r2, deltasForHelper: _2, preZoomAroundLoc: p2, combinedEventsInProgress: t2, panDelta: s2 }), a2._applyUpdatedTransform(r2), this._map._update(), e2.noInertia || this._inertia.record(e2), this._fireEvents(t2, i2, true);\n }\n _handleMapControls({ terrain: e2, tr: t2, deltasForHelper: i2, preZoomAroundLoc: a2, combinedEventsInProgress: r2, panDelta: o2 }) {\n const s2 = this._map.cameraHelper;\n if (s2.handleMapControlsRollPitchBearingZoom(i2, t2), e2) return s2.useGlobeControls ? (this._terrainMovement || !r2.drag && !r2.zoom || (this._terrainMovement = true, this._map._elevationFreeze = true), void s2.handleMapControlsPan(i2, t2, a2)) : this._terrainMovement || !r2.drag && !r2.zoom ? void (r2.drag && this._terrainMovement && o2 ? t2.setCenter(t2.screenPointToLocation(t2.centerPoint.sub(o2))) : s2.handleMapControlsPan(i2, t2, a2)) : (this._terrainMovement = true, this._map._elevationFreeze = true, void s2.handleMapControlsPan(i2, t2, a2));\n s2.handleMapControlsPan(i2, t2, a2);\n }\n _fireEvents(e2, i2, a2) {\n const r2 = qo(this._eventsInProgress), o2 = qo(e2), s2 = {};\n for (const t2 in e2) {\n const { originalEvent: i3 } = e2[t2];\n this._eventsInProgress[t2] || (s2[`${t2}start`] = i3), this._eventsInProgress[t2] = e2[t2];\n }\n !r2 && o2 && this._fireEvent(\"movestart\", o2.originalEvent);\n for (const e3 in s2) this._fireEvent(e3, s2[e3]);\n o2 && this._fireEvent(\"move\", o2.originalEvent);\n for (const t2 in e2) {\n const { originalEvent: i3 } = e2[t2];\n this._fireEvent(t2, i3);\n }\n const l2 = {};\n let c2;\n for (const e3 in this._eventsInProgress) {\n const { handlerName: t2, originalEvent: a3 } = this._eventsInProgress[e3];\n this._handlersById[t2].isActive() || (delete this._eventsInProgress[e3], c2 = i2[t2] || a3, l2[`${e3}end`] = c2);\n }\n for (const e3 in l2) this._fireEvent(e3, l2[e3]);\n const h2 = qo(this._eventsInProgress), u2 = (r2 || o2) && !h2;\n if (u2 && this._terrainMovement) {\n this._map._elevationFreeze = false, this._terrainMovement = false;\n const e3 = this._map._getTransformForUpdate();\n this._map.getCenterClampedToGround() && e3.recalculateZoomAndCenter(this._map.terrain), this._map._applyUpdatedTransform(e3);\n }\n if (a2 && u2) {\n this._updatingCamera = true;\n const e3 = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), i3 = (e4) => 0 !== e4 && -this._bearingSnap < e4 && e4 < this._bearingSnap;\n !e3 || !e3.essential && n.prefersReducedMotion ? (this._map.fire(new t.l(\"moveend\", { originalEvent: c2 })), i3(this._map.getBearing()) && this._map.resetNorth()) : (i3(e3.bearing || this._map.getBearing()) && (e3.bearing = 0), e3.freezeElevation = true, this._map.easeTo(e3, { originalEvent: c2 })), this._updatingCamera = false;\n }\n }\n _fireEvent(e2, i2) {\n this._map.fire(new t.l(e2, i2 ? { originalEvent: i2 } : {}));\n }\n _requestFrame() {\n return this._map.triggerRepaint(), this._map._renderTaskQueue.add(((e2) => {\n delete this._frameId, this.handleEvent(new Wo(\"renderFrame\", { timeStamp: e2 })), this._applyChanges();\n }));\n }\n _triggerRenderFrame() {\n void 0 === this._frameId && (this._frameId = this._requestFrame());\n }\n }\n class Xo extends t.E {\n constructor(e2, t2, i2) {\n super(), this._renderFrameCallback = () => {\n const e3 = Math.min((c() - this._easeStart) / this._easeOptions.duration, 1);\n this._onEaseFrame(this._easeOptions.easing(e3)), e3 < 1 && this._easeFrameId ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop();\n }, this._moving = false, this._zooming = false, this.transform = e2, this._bearingSnap = i2.bearingSnap, this.cameraHelper = t2, this.on(\"moveend\", (() => {\n delete this._requestedCameraState;\n }));\n }\n migrateProjection(e2, t2) {\n e2.apply(this.transform), this.transform = e2, this.cameraHelper = t2;\n }\n getCenter() {\n return new t.V(this.transform.center.lng, this.transform.center.lat);\n }\n setCenter(e2, t2) {\n return this.jumpTo({ center: e2 }, t2);\n }\n getCenterElevation() {\n return this.transform.elevation;\n }\n setCenterElevation(e2, t2) {\n return this.jumpTo({ elevation: e2 }, t2), this;\n }\n getCenterClampedToGround() {\n return this._centerClampedToGround;\n }\n setCenterClampedToGround(e2) {\n this._centerClampedToGround = e2;\n }\n panBy(e2, i2, a2) {\n return e2 = t.P.convert(e2).mult(-1), this.panTo(this.transform.center, t.e({ offset: e2 }, i2), a2);\n }\n panTo(e2, i2, a2) {\n return this.easeTo(t.e({ center: e2 }, i2), a2);\n }\n getZoom() {\n return this.transform.zoom;\n }\n setZoom(e2, t2) {\n return this.jumpTo({ zoom: e2 }, t2), this;\n }\n zoomTo(e2, i2, a2) {\n return this.easeTo(t.e({ zoom: e2 }, i2), a2);\n }\n zoomIn(e2, t2) {\n return this.zoomTo(this.getZoom() + 1, e2, t2), this;\n }\n zoomOut(e2, t2) {\n return this.zoomTo(this.getZoom() - 1, e2, t2), this;\n }\n getVerticalFieldOfView() {\n return this.transform.fov;\n }\n setVerticalFieldOfView(e2, i2) {\n return e2 != this.transform.fov && (this.transform.setFov(e2), this.fire(new t.l(\"movestart\", i2)).fire(new t.l(\"move\", i2)).fire(new t.l(\"moveend\", i2))), this;\n }\n getBearing() {\n return this.transform.bearing;\n }\n setBearing(e2, t2) {\n return this.jumpTo({ bearing: e2 }, t2), this;\n }\n getPadding() {\n return this.transform.padding;\n }\n setPadding(e2, t2) {\n return this.jumpTo({ padding: e2 }, t2), this;\n }\n rotateTo(e2, i2, a2) {\n return this.easeTo(t.e({ bearing: e2 }, i2), a2);\n }\n resetNorth(e2, i2) {\n return this.rotateTo(0, t.e({ duration: 1e3 }, e2), i2), this;\n }\n resetNorthPitch(e2, i2) {\n return this.easeTo(t.e({ bearing: 0, pitch: 0, roll: 0, duration: 1e3 }, e2), i2), this;\n }\n snapToNorth(e2, t2) {\n return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(e2, t2) : this;\n }\n getPitch() {\n return this.transform.pitch;\n }\n setPitch(e2, t2) {\n return this.jumpTo({ pitch: e2 }, t2), this;\n }\n getRoll() {\n return this.transform.roll;\n }\n setRoll(e2, t2) {\n return this.jumpTo({ roll: e2 }, t2), this;\n }\n cameraForBounds(e2, t2) {\n e2 = $.convert(e2).adjustAntiMeridian();\n const i2 = t2 && t2.bearing || 0;\n return this._cameraForBoxAndBearing(e2.getNorthWest(), e2.getSouthEast(), i2, t2);\n }\n _cameraForBoxAndBearing(e2, i2, a2, r2) {\n const o2 = { top: 0, bottom: 0, right: 0, left: 0 };\n if (\"number\" == typeof (r2 = t.e({ padding: o2, offset: [0, 0], maxZoom: this.transform.maxZoom }, r2)).padding) {\n const e3 = r2.padding;\n r2.padding = { top: e3, bottom: e3, right: e3, left: e3 };\n }\n const s2 = t.e(o2, r2.padding);\n r2.padding = s2;\n const n2 = this.transform, l2 = new $(e2, i2);\n return this.cameraHelper.cameraForBoxAndBearing(r2, s2, l2, a2, n2);\n }\n fitBounds(e2, t2, i2) {\n return this._fitInternal(this.cameraForBounds(e2, t2), t2, i2);\n }\n fitScreenCoordinates(e2, i2, a2, r2, o2) {\n return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(t.P.convert(e2)), this.transform.screenPointToLocation(t.P.convert(i2)), a2, r2), r2, o2);\n }\n _fitInternal(e2, i2, a2) {\n return e2 ? (delete (i2 = t.e(e2, i2)).padding, i2.linear ? this.easeTo(i2, a2) : this.flyTo(i2, a2)) : this;\n }\n jumpTo(e2, i2) {\n this.stop();\n const a2 = this._getTransformForUpdate();\n let r2 = false, o2 = false, s2 = false;\n const n2 = a2.zoom;\n this.cameraHelper.handleJumpToCenterZoom(a2, e2);\n const l2 = a2.zoom !== n2;\n return \"elevation\" in e2 && a2.elevation !== +e2.elevation && a2.setElevation(+e2.elevation), \"bearing\" in e2 && a2.bearing !== +e2.bearing && (r2 = true, a2.setBearing(+e2.bearing)), \"pitch\" in e2 && a2.pitch !== +e2.pitch && (o2 = true, a2.setPitch(+e2.pitch)), \"roll\" in e2 && a2.roll !== +e2.roll && (s2 = true, a2.setRoll(+e2.roll)), null == e2.padding || a2.isPaddingEqual(e2.padding) || a2.setPadding(e2.padding), this._applyUpdatedTransform(a2), this.fire(new t.l(\"movestart\", i2)).fire(new t.l(\"move\", i2)), l2 && this.fire(new t.l(\"zoomstart\", i2)).fire(new t.l(\"zoom\", i2)).fire(new t.l(\"zoomend\", i2)), r2 && this.fire(new t.l(\"rotatestart\", i2)).fire(new t.l(\"rotate\", i2)).fire(new t.l(\"rotateend\", i2)), o2 && this.fire(new t.l(\"pitchstart\", i2)).fire(new t.l(\"pitch\", i2)).fire(new t.l(\"pitchend\", i2)), s2 && this.fire(new t.l(\"rollstart\", i2)).fire(new t.l(\"roll\", i2)).fire(new t.l(\"rollend\", i2)), this.fire(new t.l(\"moveend\", i2));\n }\n calculateCameraOptionsFromTo(e2, i2, a2, r2 = 0) {\n const o2 = t.ab.fromLngLat(e2, i2), s2 = t.ab.fromLngLat(a2, r2), n2 = s2.x - o2.x, l2 = s2.y - o2.y, c2 = s2.z - o2.z, h2 = Math.hypot(n2, l2, c2);\n if (0 === h2) throw new Error(\"Can't calculate camera options with same From and To\");\n const u2 = Math.hypot(n2, l2), d2 = t.au(this.transform.cameraToCenterDistance / h2 / this.transform.tileSize), _2 = 180 * Math.atan2(n2, -l2) / Math.PI;\n let p2 = 180 * Math.acos(u2 / h2) / Math.PI;\n return p2 = c2 < 0 ? 90 - p2 : 90 + p2, { center: s2.toLngLat(), elevation: r2, zoom: d2, pitch: p2, bearing: _2 };\n }\n calculateCameraOptionsFromCameraLngLatAltRotation(e2, t2, i2, a2, r2) {\n const o2 = this.transform.calculateCenterFromCameraLngLatAlt(e2, t2, i2, a2);\n return { center: o2.center, elevation: o2.elevation, zoom: o2.zoom, bearing: i2, pitch: a2, roll: r2 };\n }\n easeTo(e2, i2) {\n this._stop(false, e2.easeId), (false === (e2 = t.e({ offset: [0, 0], duration: 500, easing: t.cz }, e2)).animate || !e2.essential && n.prefersReducedMotion) && (e2.duration = 0);\n const a2 = this._getTransformForUpdate(), r2 = this.getBearing(), o2 = a2.pitch, s2 = a2.roll, l2 = \"bearing\" in e2 ? this._normalizeBearing(e2.bearing, r2) : r2, c2 = \"pitch\" in e2 ? +e2.pitch : o2, h2 = \"roll\" in e2 ? this._normalizeBearing(e2.roll, s2) : s2, u2 = \"padding\" in e2 ? e2.padding : a2.padding, d2 = t.P.convert(e2.offset);\n let _2, p2;\n e2.around && (_2 = t.V.convert(e2.around), p2 = a2.locationToScreenPoint(_2));\n const m2 = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching, rolling: this._rolling }, f2 = this.cameraHelper.handleEaseTo(a2, { bearing: l2, pitch: c2, roll: h2, padding: u2, around: _2, aroundPoint: p2, offsetAsPoint: d2, offset: e2.offset, zoom: e2.zoom, center: e2.center });\n return this._rotating = this._rotating || r2 !== l2, this._pitching = this._pitching || c2 !== o2, this._rolling = this._rolling || h2 !== s2, this._padding = !a2.isPaddingEqual(u2), this._zooming = this._zooming || f2.isZooming, this._easeId = e2.easeId, this._prepareEase(i2, e2.noMoveStart, m2), this.terrain && this._prepareElevation(f2.elevationCenter), this._ease(((t2) => {\n f2.easeFunc(t2), this.terrain && !e2.freezeElevation && this._updateElevation(t2), this._applyUpdatedTransform(a2), this._fireMoveEvents(i2);\n }), ((t2) => {\n this.terrain && e2.freezeElevation && this._finalizeElevation(), this._afterEase(i2, t2);\n }), e2), this;\n }\n _prepareEase(e2, i2, a2 = {}) {\n this._moving = true, i2 || a2.moving || this.fire(new t.l(\"movestart\", e2)), this._zooming && !a2.zooming && this.fire(new t.l(\"zoomstart\", e2)), this._rotating && !a2.rotating && this.fire(new t.l(\"rotatestart\", e2)), this._pitching && !a2.pitching && this.fire(new t.l(\"pitchstart\", e2)), this._rolling && !a2.rolling && this.fire(new t.l(\"rollstart\", e2));\n }\n _prepareElevation(e2) {\n this._elevationCenter = e2, this._elevationStart = this.transform.elevation, this._elevationTarget = this.terrain.getElevationForLngLatZoom(e2, this.transform.tileZoom), this._elevationFreeze = true;\n }\n _updateElevation(e2) {\n void 0 !== this._elevationStart && void 0 !== this._elevationCenter || this._prepareElevation(this.transform.center), this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom));\n const i2 = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);\n if (e2 < 1 && i2 !== this._elevationTarget) {\n const t2 = this._elevationTarget - this._elevationStart;\n this._elevationStart += e2 * (t2 - (i2 - (t2 * e2 + this._elevationStart)) / (1 - e2)), this._elevationTarget = i2;\n }\n this.transform.setElevation(t.G.number(this._elevationStart, this._elevationTarget, e2));\n }\n _finalizeElevation() {\n this._elevationFreeze = false, this.getCenterClampedToGround() && this.transform.recalculateZoomAndCenter(this.terrain);\n }\n _getTransformForUpdate() {\n return this.transformCameraUpdate || this.terrain ? (this._requestedCameraState || (this._requestedCameraState = this.transform.clone()), this._requestedCameraState) : this.transform;\n }\n _elevateCameraIfInsideTerrain(e2) {\n if (!this.terrain && e2.elevation >= 0 && e2.pitch <= 90) return {};\n const t2 = e2.getCameraLngLat(), i2 = e2.getCameraAltitude(), a2 = this.terrain ? this.terrain.getElevationForLngLatZoom(t2, e2.zoom) : 0;\n if (i2 < a2) {\n const i3 = this.calculateCameraOptionsFromTo(t2, a2, e2.center, e2.elevation);\n return { pitch: i3.pitch, zoom: i3.zoom };\n }\n return {};\n }\n _applyUpdatedTransform(e2) {\n const t2 = [];\n if (t2.push(((e3) => this._elevateCameraIfInsideTerrain(e3))), this.transformCameraUpdate && t2.push(((e3) => this.transformCameraUpdate(e3))), !t2.length) return;\n const i2 = e2.clone();\n for (const e3 of t2) {\n const t3 = i2.clone(), { center: a2, zoom: r2, roll: o2, pitch: s2, bearing: n2, elevation: l2 } = e3(t3);\n a2 && t3.setCenter(a2), void 0 !== l2 && t3.setElevation(l2), void 0 !== r2 && t3.setZoom(r2), void 0 !== o2 && t3.setRoll(o2), void 0 !== s2 && t3.setPitch(s2), void 0 !== n2 && t3.setBearing(n2), i2.apply(t3);\n }\n this.transform.apply(i2);\n }\n _fireMoveEvents(e2) {\n this.fire(new t.l(\"move\", e2)), this._zooming && this.fire(new t.l(\"zoom\", e2)), this._rotating && this.fire(new t.l(\"rotate\", e2)), this._pitching && this.fire(new t.l(\"pitch\", e2)), this._rolling && this.fire(new t.l(\"roll\", e2));\n }\n _afterEase(e2, i2) {\n if (this._easeId && i2 && this._easeId === i2) return;\n delete this._easeId;\n const a2 = this._zooming, r2 = this._rotating, o2 = this._pitching, s2 = this._rolling;\n this._moving = false, this._zooming = false, this._rotating = false, this._pitching = false, this._rolling = false, this._padding = false, a2 && this.fire(new t.l(\"zoomend\", e2)), r2 && this.fire(new t.l(\"rotateend\", e2)), o2 && this.fire(new t.l(\"pitchend\", e2)), s2 && this.fire(new t.l(\"rollend\", e2)), this.fire(new t.l(\"moveend\", e2));\n }\n flyTo(e2, i2) {\n if (!e2.essential && n.prefersReducedMotion) {\n const a3 = t.U(e2, [\"center\", \"zoom\", \"bearing\", \"pitch\", \"roll\", \"elevation\", \"padding\"]);\n return this.jumpTo(a3, i2);\n }\n this.stop(), e2 = t.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: t.cz }, e2);\n const a2 = this._getTransformForUpdate(), r2 = a2.bearing, o2 = a2.pitch, s2 = a2.roll, l2 = a2.padding, c2 = \"bearing\" in e2 ? this._normalizeBearing(e2.bearing, r2) : r2, h2 = \"pitch\" in e2 ? +e2.pitch : o2, u2 = \"roll\" in e2 ? this._normalizeBearing(e2.roll, s2) : s2, d2 = \"padding\" in e2 ? e2.padding : a2.padding, _2 = t.P.convert(e2.offset);\n let p2 = a2.centerPoint.add(_2);\n const m2 = a2.screenPointToLocation(p2), f2 = this.cameraHelper.handleFlyTo(a2, { bearing: c2, pitch: h2, roll: u2, padding: d2, locationAtOffset: m2, offsetAsPoint: _2, center: e2.center, minZoom: e2.minZoom, zoom: e2.zoom });\n let g2 = e2.curve;\n const v2 = Math.max(a2.width, a2.height), x2 = v2 / f2.scaleOfZoom, b2 = f2.pixelPathLength;\n \"number\" == typeof f2.scaleOfMinZoom && (g2 = Math.sqrt(v2 / f2.scaleOfMinZoom / b2 * 2));\n const y2 = g2 * g2;\n function w2(e3) {\n const t2 = (x2 * x2 - v2 * v2 + (e3 ? -1 : 1) * y2 * y2 * b2 * b2) / (2 * (e3 ? x2 : v2) * y2 * b2);\n return Math.log(Math.sqrt(t2 * t2 + 1) - t2);\n }\n function T2(e3) {\n return (Math.exp(e3) - Math.exp(-e3)) / 2;\n }\n function P2(e3) {\n return (Math.exp(e3) + Math.exp(-e3)) / 2;\n }\n const I2 = w2(false);\n let C2 = function(e3) {\n return P2(I2) / P2(I2 + g2 * e3);\n }, M2 = function(e3) {\n return v2 * ((P2(I2) * (T2(t2 = I2 + g2 * e3) / P2(t2)) - T2(I2)) / y2) / b2;\n var t2;\n }, E2 = (w2(true) - I2) / g2;\n if (Math.abs(b2) < 2e-6 || !isFinite(E2)) {\n if (Math.abs(v2 - x2) < 1e-6) return this.easeTo(e2, i2);\n const t2 = x2 < v2 ? -1 : 1;\n E2 = Math.abs(Math.log(x2 / v2)) / g2, M2 = () => 0, C2 = (e3) => Math.exp(t2 * g2 * e3);\n }\n return e2.duration = \"duration\" in e2 ? +e2.duration : 1e3 * E2 / (\"screenSpeed\" in e2 ? +e2.screenSpeed / g2 : +e2.speed), e2.maxDuration && e2.duration > e2.maxDuration && (e2.duration = 0), this._zooming = true, this._rotating = r2 !== c2, this._pitching = h2 !== o2, this._rolling = u2 !== s2, this._padding = !a2.isPaddingEqual(d2), this._prepareEase(i2, false), this.terrain && this._prepareElevation(f2.targetCenter), this._ease(((n2) => {\n const m3 = n2 * E2, g3 = 1 / C2(m3), v3 = M2(m3);\n this._rotating && a2.setBearing(t.G.number(r2, c2, n2)), this._pitching && a2.setPitch(t.G.number(o2, h2, n2)), this._rolling && a2.setRoll(t.G.number(s2, u2, n2)), this._padding && (a2.interpolatePadding(l2, d2, n2), p2 = a2.centerPoint.add(_2)), f2.easeFunc(n2, g3, v3, p2), this.terrain && !e2.freezeElevation && this._updateElevation(n2), this._applyUpdatedTransform(a2), this._fireMoveEvents(i2);\n }), (() => {\n this.terrain && e2.freezeElevation && this._finalizeElevation(), this._afterEase(i2);\n }), e2), this;\n }\n isEasing() {\n return !!this._easeFrameId;\n }\n stop() {\n return this._stop();\n }\n _stop(e2, t2) {\n var i2;\n if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) {\n const e3 = this._onEaseEnd;\n delete this._onEaseEnd, e3.call(this, t2);\n }\n return e2 || null === (i2 = this.handlers) || void 0 === i2 || i2.stop(false), this;\n }\n _ease(e2, t2, i2) {\n false === i2.animate || 0 === i2.duration ? (e2(1), t2()) : (this._easeStart = c(), this._easeOptions = i2, this._onEaseFrame = e2, this._onEaseEnd = t2, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback));\n }\n _normalizeBearing(e2, i2) {\n e2 = t.W(e2, -180, 180);\n const a2 = Math.abs(e2 - i2);\n return Math.abs(e2 - 360 - i2) < a2 && (e2 -= 360), Math.abs(e2 + 360 - i2) < a2 && (e2 += 360), e2;\n }\n queryTerrainElevation(e2) {\n return this.terrain ? this.terrain.getElevationForLngLat(t.V.convert(e2)) : null;\n }\n }\n const Ko = { compact: true, customAttribution: '<a href=\"https://maplibre.org/\" target=\"_blank\">MapLibre</a>' };\n class Yo {\n constructor(e2 = Ko) {\n this._toggleAttribution = () => {\n this._container.classList.contains(\"maplibregl-compact\") && (this._container.classList.contains(\"maplibregl-compact-show\") ? (this._container.setAttribute(\"open\", \"\"), this._container.classList.remove(\"maplibregl-compact-show\")) : (this._container.classList.add(\"maplibregl-compact-show\"), this._container.removeAttribute(\"open\")));\n }, this._updateData = (e3) => {\n !e3 || \"metadata\" !== e3.sourceDataType && \"visibility\" !== e3.sourceDataType && \"style\" !== e3.dataType && \"terrain\" !== e3.type || this._updateAttributions();\n }, this._updateCompact = () => {\n this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? false === this._compact ? this._container.setAttribute(\"open\", \"\") : this._container.classList.contains(\"maplibregl-compact\") || this._container.classList.contains(\"maplibregl-attrib-empty\") || (this._container.setAttribute(\"open\", \"\"), this._container.classList.add(\"maplibregl-compact\", \"maplibregl-compact-show\")) : (this._container.setAttribute(\"open\", \"\"), this._container.classList.contains(\"maplibregl-compact\") && this._container.classList.remove(\"maplibregl-compact\", \"maplibregl-compact-show\"));\n }, this._updateCompactMinimize = () => {\n this._container.classList.contains(\"maplibregl-compact\") && this._container.classList.contains(\"maplibregl-compact-show\") && this._container.classList.remove(\"maplibregl-compact-show\");\n }, this.options = e2;\n }\n getDefaultPosition() {\n return \"bottom-right\";\n }\n onAdd(e2) {\n return this._map = e2, this._compact = this.options.compact, this._container = h.create(\"details\", \"maplibregl-ctrl maplibregl-ctrl-attrib\"), this._compactButton = h.create(\"summary\", \"maplibregl-ctrl-attrib-button\", this._container), this._compactButton.addEventListener(\"click\", this._toggleAttribution), this._setElementTitle(this._compactButton, \"ToggleAttribution\"), this._innerContainer = h.create(\"div\", \"maplibregl-ctrl-attrib-inner\", this._container), this._updateAttributions(), this._updateCompact(), this._map.on(\"styledata\", this._updateData), this._map.on(\"sourcedata\", this._updateData), this._map.on(\"terrain\", this._updateData), this._map.on(\"resize\", this._updateCompact), this._map.on(\"drag\", this._updateCompactMinimize), this._container;\n }\n onRemove() {\n h.remove(this._container), this._map.off(\"styledata\", this._updateData), this._map.off(\"sourcedata\", this._updateData), this._map.off(\"terrain\", this._updateData), this._map.off(\"resize\", this._updateCompact), this._map.off(\"drag\", this._updateCompactMinimize), this._map = void 0, this._compact = void 0, this._attribHTML = void 0;\n }\n _setElementTitle(e2, t2) {\n const i2 = this._map._getUIString(`AttributionControl.${t2}`);\n e2.title = i2, e2.setAttribute(\"aria-label\", i2);\n }\n _updateAttributions() {\n if (!this._map.style) return;\n let e2 = [];\n if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? e2 = e2.concat(this.options.customAttribution.map(((e3) => \"string\" != typeof e3 ? \"\" : e3))) : \"string\" == typeof this.options.customAttribution && e2.push(this.options.customAttribution)), this._map.style.stylesheet) {\n const e3 = this._map.style.stylesheet;\n this.styleOwner = e3.owner, this.styleId = e3.id;\n }\n const t2 = this._map.style.tileManagers;\n for (const i3 in t2) {\n const a2 = t2[i3];\n if (a2.used || a2.usedForTerrain) {\n const t3 = a2.getSource();\n t3.attribution && e2.indexOf(t3.attribution) < 0 && e2.push(t3.attribution);\n }\n }\n e2 = e2.filter(((e3) => String(e3).trim())), e2.sort(((e3, t3) => e3.length - t3.length)), e2 = e2.filter(((t3, i3) => {\n for (let a2 = i3 + 1; a2 < e2.length; a2++) if (e2[a2].indexOf(t3) >= 0) return false;\n return true;\n }));\n const i2 = e2.join(\" | \");\n i2 !== this._attribHTML && (this._attribHTML = i2, e2.length ? (this._innerContainer.innerHTML = h.sanitize(i2), this._container.classList.remove(\"maplibregl-attrib-empty\")) : this._container.classList.add(\"maplibregl-attrib-empty\"), this._updateCompact(), this._editLink = null);\n }\n }\n class Qo {\n constructor(e2 = {}) {\n this._updateCompact = () => {\n const e3 = this._container.children;\n if (e3.length) {\n const t2 = e3[0];\n this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? false !== this._compact && t2.classList.add(\"maplibregl-compact\") : t2.classList.remove(\"maplibregl-compact\");\n }\n }, this.options = e2;\n }\n getDefaultPosition() {\n return \"bottom-left\";\n }\n onAdd(e2) {\n this._map = e2, this._compact = this.options && this.options.compact, this._container = h.create(\"div\", \"maplibregl-ctrl\");\n const t2 = h.create(\"a\", \"maplibregl-ctrl-logo\");\n return t2.target = \"_blank\", t2.rel = \"noopener nofollow\", t2.href = \"https://maplibre.org/\", t2.setAttribute(\"aria-label\", this._map._getUIString(\"LogoControl.Title\")), t2.setAttribute(\"rel\", \"noopener nofollow\"), this._container.appendChild(t2), this._container.style.display = \"block\", this._map.on(\"resize\", this._updateCompact), this._updateCompact(), this._container;\n }\n onRemove() {\n h.remove(this._container), this._map.off(\"resize\", this._updateCompact), this._map = void 0, this._compact = void 0;\n }\n }\n class Jo {\n constructor() {\n this._queue = [], this._id = 0, this._cleared = false, this._currentlyRunning = false;\n }\n add(e2) {\n const t2 = ++this._id;\n return this._queue.push({ callback: e2, id: t2, cancelled: false }), t2;\n }\n remove(e2) {\n const t2 = this._currentlyRunning, i2 = t2 ? this._queue.concat(t2) : this._queue;\n for (const t3 of i2) if (t3.id === e2) return void (t3.cancelled = true);\n }\n run(e2 = 0) {\n if (this._currentlyRunning) throw new Error(\"Attempting to run(), but is already running.\");\n const t2 = this._currentlyRunning = this._queue;\n this._queue = [];\n for (const i2 of t2) if (!i2.cancelled && (i2.callback(e2), this._cleared)) break;\n this._cleared = false, this._currentlyRunning = false;\n }\n clear() {\n this._currentlyRunning && (this._cleared = true), this._queue = [];\n }\n }\n var es = t.aV([{ name: \"a_pos3d\", type: \"Int16\", components: 3 }]);\n class ts extends t.E {\n constructor(e2) {\n super(), this._lastTilesetChange = c(), this.tileManager = e2, this._tiles = {}, this._renderableTilesKeys = [], this._sourceTileCache = {}, this.minzoom = 0, this.maxzoom = 22, this.deltaZoom = 1, this.tileSize = e2._source.tileSize * 2 ** this.deltaZoom, e2.usedForTerrain = true, e2.tileSize = this.tileSize;\n }\n destruct() {\n this.tileManager.usedForTerrain = false, this.tileManager.tileSize = null;\n }\n getSource() {\n return this.tileManager._source;\n }\n update(e2, i2) {\n this.tileManager.update(e2, i2), this._renderableTilesKeys = [];\n const a2 = {};\n for (const r2 of Ce(e2, { tileSize: this.tileSize, minzoom: this.minzoom, maxzoom: this.maxzoom, reparseOverscaled: false, terrain: i2, calculateTileZoom: this.tileManager._source.calculateTileZoom })) a2[r2.key] = true, this._renderableTilesKeys.push(r2.key), this._tiles[r2.key] || (r2.terrainRttPosMatrix32f = new Float64Array(16), t.c8(r2.terrainRttPosMatrix32f, 0, t.a5, t.a5, 0, 0, 1), this._tiles[r2.key] = new de(r2, this.tileSize), this._lastTilesetChange = c());\n for (const e3 in this._tiles) a2[e3] || delete this._tiles[e3];\n }\n freeRtt(e2) {\n for (const t2 in this._tiles) {\n const i2 = this._tiles[t2];\n (!e2 || i2.tileID.equals(e2) || i2.tileID.isChildOf(e2) || e2.isChildOf(i2.tileID)) && (i2.rtt = []);\n }\n }\n getRenderableTiles() {\n return this._renderableTilesKeys.map(((e2) => this.getTileByID(e2)));\n }\n getTileByID(e2) {\n return this._tiles[e2];\n }\n getTerrainCoords(e2, t2) {\n return t2 ? this._getTerrainCoordsForTileRanges(e2, t2) : this._getTerrainCoordsForRegularTile(e2);\n }\n _getTerrainCoordsForRegularTile(e2) {\n const i2 = {};\n for (const a2 of this._renderableTilesKeys) {\n const r2 = this._tiles[a2].tileID, o2 = e2.clone(), s2 = t.bl();\n if (r2.canonical.equals(e2.canonical)) t.c8(s2, 0, t.a5, t.a5, 0, 0, 1);\n else if (r2.canonical.isChildOf(e2.canonical)) {\n const i3 = r2.canonical.z - e2.canonical.z, a3 = r2.canonical.x - (r2.canonical.x >> i3 << i3), o3 = r2.canonical.y - (r2.canonical.y >> i3 << i3), n2 = t.a5 >> i3;\n t.c8(s2, 0, n2, n2, 0, 0, 1), t.O(s2, s2, [-a3 * n2, -o3 * n2, 0]);\n } else {\n if (!e2.canonical.isChildOf(r2.canonical)) continue;\n {\n const i3 = e2.canonical.z - r2.canonical.z, a3 = e2.canonical.x - (e2.canonical.x >> i3 << i3), o3 = e2.canonical.y - (e2.canonical.y >> i3 << i3), n2 = t.a5 >> i3;\n t.c8(s2, 0, t.a5, t.a5, 0, 0, 1), t.O(s2, s2, [a3 * n2, o3 * n2, 0]), t.Q(s2, s2, [1 / 2 ** i3, 1 / 2 ** i3, 0]);\n }\n }\n o2.terrainRttPosMatrix32f = new Float32Array(s2), i2[a2] = o2;\n }\n return i2;\n }\n _getTerrainCoordsForTileRanges(e2, i2) {\n const a2 = {};\n for (const r2 of this._renderableTilesKeys) {\n const o2 = this._tiles[r2].tileID;\n if (!this._isWithinTileRanges(o2, i2)) continue;\n const s2 = e2.clone(), n2 = t.bl();\n if (o2.canonical.z === e2.canonical.z) {\n const i3 = e2.canonical.x - o2.canonical.x, a3 = e2.canonical.y - o2.canonical.y;\n t.c8(n2, 0, t.a5, t.a5, 0, 0, 1), t.O(n2, n2, [i3 * t.a5, a3 * t.a5, 0]);\n } else if (o2.canonical.z > e2.canonical.z) {\n const i3 = o2.canonical.z - e2.canonical.z, a3 = o2.canonical.x - (o2.canonical.x >> i3 << i3), r3 = o2.canonical.y - (o2.canonical.y >> i3 << i3), s3 = e2.canonical.x - (o2.canonical.x >> i3), l2 = e2.canonical.y - (o2.canonical.y >> i3), c2 = t.a5 >> i3;\n t.c8(n2, 0, c2, c2, 0, 0, 1), t.O(n2, n2, [-a3 * c2 + s3 * t.a5, -r3 * c2 + l2 * t.a5, 0]);\n } else {\n const i3 = e2.canonical.z - o2.canonical.z, a3 = e2.canonical.x - (e2.canonical.x >> i3 << i3), r3 = e2.canonical.y - (e2.canonical.y >> i3 << i3), s3 = (e2.canonical.x >> i3) - o2.canonical.x, l2 = (e2.canonical.y >> i3) - o2.canonical.y, c2 = t.a5 << i3;\n t.c8(n2, 0, c2, c2, 0, 0, 1), t.O(n2, n2, [a3 * t.a5 + s3 * c2, r3 * t.a5 + l2 * c2, 0]);\n }\n s2.terrainRttPosMatrix32f = new Float32Array(n2), a2[r2] = s2;\n }\n return a2;\n }\n getSourceTile(e2, t2) {\n const i2 = this.tileManager._source;\n let a2 = e2.overscaledZ - this.deltaZoom;\n if (a2 > i2.maxzoom && (a2 = i2.maxzoom), a2 < i2.minzoom) return;\n this._sourceTileCache[e2.key] || (this._sourceTileCache[e2.key] = e2.scaledTo(a2).key);\n let r2 = this.findTileInCaches(this._sourceTileCache[e2.key]);\n if (!(null == r2 ? void 0 : r2.dem) && t2) for (; a2 >= i2.minzoom && !(null == r2 ? void 0 : r2.dem); ) r2 = this.findTileInCaches(e2.scaledTo(a2--).key);\n return r2;\n }\n findTileInCaches(e2) {\n let t2 = this.tileManager.getTileByID(e2);\n return t2 || (t2 = this.tileManager._outOfViewCache.getByKey(e2), t2);\n }\n anyTilesAfterTime(e2 = Date.now()) {\n return this._lastTilesetChange >= e2;\n }\n _isWithinTileRanges(e2, t2) {\n return t2[e2.canonical.z] && e2.canonical.x >= t2[e2.canonical.z].minTileX && e2.canonical.x <= t2[e2.canonical.z].maxTileX && e2.canonical.y >= t2[e2.canonical.z].minTileY && e2.canonical.y <= t2[e2.canonical.z].maxTileY;\n }\n }\n class is {\n constructor(e2, t2, i2) {\n this._meshCache = {}, this.painter = e2, this.tileManager = new ts(t2), this.options = i2, this.exaggeration = \"number\" == typeof i2.exaggeration ? i2.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024;\n }\n getDEMElevation(e2, i2, a2, r2 = t.a5) {\n var o2;\n if (!(i2 >= 0 && i2 < r2 && a2 >= 0 && a2 < r2)) return 0;\n const s2 = this.getTerrainData(e2), n2 = null === (o2 = s2.tile) || void 0 === o2 ? void 0 : o2.dem;\n if (!n2) return 0;\n const l2 = t.cD([], [i2 / r2 * t.a5, a2 / r2 * t.a5], s2.u_terrain_matrix), c2 = [l2[0] * n2.dim, l2[1] * n2.dim], h2 = Math.floor(c2[0]), u2 = Math.floor(c2[1]), d2 = c2[0] - h2, _2 = c2[1] - u2;\n return n2.get(h2, u2) * (1 - d2) * (1 - _2) + n2.get(h2 + 1, u2) * d2 * (1 - _2) + n2.get(h2, u2 + 1) * (1 - d2) * _2 + n2.get(h2 + 1, u2 + 1) * d2 * _2;\n }\n getElevationForLngLatZoom(e2, i2) {\n if (!t.cE(i2, e2.wrap())) return 0;\n const { tileID: a2, mercatorX: r2, mercatorY: o2 } = this._getOverscaledTileIDFromLngLatZoom(e2, i2);\n return this.getElevation(a2, r2 % t.a5, o2 % t.a5, t.a5);\n }\n getElevationForLngLat(e2) {\n return this.getElevationForLngLatZoom(e2, this.tileManager.maxzoom);\n }\n getElevation(e2, i2, a2, r2 = t.a5) {\n return this.getDEMElevation(e2, i2, a2, r2) * this.exaggeration;\n }\n getTerrainData(e2) {\n if (!this._emptyDemTexture) {\n const e3 = this.painter.context, i3 = new t.R({ width: 1, height: 1 }, new Uint8Array(4));\n this._emptyDepthTexture = new t.T(e3, i3, e3.gl.RGBA, { premultiply: false }), this._emptyDemUnpack = [0, 0, 0, 0], this._emptyDemTexture = new t.T(e3, new t.R({ width: 1, height: 1 }), e3.gl.RGBA, { premultiply: false }), this._emptyDemTexture.bind(e3.gl.NEAREST, e3.gl.CLAMP_TO_EDGE), this._emptyDemMatrix = t.as([]);\n }\n const i2 = this.tileManager.getSourceTile(e2, true);\n if (i2 && i2.dem && (!i2.demTexture || i2.needsTerrainPrepare)) {\n const e3 = this.painter.context;\n i2.demTexture = this.painter.getTileTexture(i2.dem.stride), i2.demTexture ? i2.demTexture.update(i2.dem.getPixels(), { premultiply: false }) : i2.demTexture = new t.T(e3, i2.dem.getPixels(), e3.gl.RGBA, { premultiply: false }), i2.demTexture.bind(e3.gl.NEAREST, e3.gl.CLAMP_TO_EDGE), i2.needsTerrainPrepare = false;\n }\n const a2 = i2 && i2 + i2.tileID.key + e2.key;\n if (a2 && !this._demMatrixCache[a2]) {\n const a3 = this.tileManager.getSource().maxzoom;\n let r2 = e2.canonical.z - i2.tileID.canonical.z;\n e2.overscaledZ > e2.canonical.z && (e2.canonical.z >= a3 ? r2 = e2.canonical.z - a3 : t.w(\"cannot calculate elevation if elevation maxzoom > source.maxzoom\"));\n const o2 = e2.canonical.x - (e2.canonical.x >> r2 << r2), s2 = e2.canonical.y - (e2.canonical.y >> r2 << r2), n2 = t.cF(new Float64Array(16), [1 / (t.a5 << r2), 1 / (t.a5 << r2), 0]);\n t.O(n2, n2, [o2 * t.a5, s2 * t.a5, 0]), this._demMatrixCache[e2.key] = { matrix: n2, coord: e2 };\n }\n return { u_depth: 2, u_terrain: 3, u_terrain_dim: i2 && i2.dem && i2.dem.dim || 1, u_terrain_matrix: a2 ? this._demMatrixCache[e2.key].matrix : this._emptyDemMatrix, u_terrain_unpack: i2 && i2.dem && i2.dem.getUnpackVector() || this._emptyDemUnpack, u_terrain_exaggeration: this.exaggeration, texture: (i2 && i2.demTexture || this._emptyDemTexture).texture, depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture, tile: i2 };\n }\n getFramebuffer(e2) {\n const i2 = this.painter, a2 = i2.width / devicePixelRatio, r2 = i2.height / devicePixelRatio;\n return !this._fbo || this._fbo.width === a2 && this._fbo.height === r2 || (this._fbo.destroy(), this._fboCoordsTexture.destroy(), this._fboDepthTexture.destroy(), delete this._fbo, delete this._fboDepthTexture, delete this._fboCoordsTexture), this._fboCoordsTexture || (this._fboCoordsTexture = new t.T(i2.context, { width: a2, height: r2, data: null }, i2.context.gl.RGBA, { premultiply: false }), this._fboCoordsTexture.bind(i2.context.gl.NEAREST, i2.context.gl.CLAMP_TO_EDGE)), this._fboDepthTexture || (this._fboDepthTexture = new t.T(i2.context, { width: a2, height: r2, data: null }, i2.context.gl.RGBA, { premultiply: false }), this._fboDepthTexture.bind(i2.context.gl.NEAREST, i2.context.gl.CLAMP_TO_EDGE)), this._fbo || (this._fbo = i2.context.createFramebuffer(a2, r2, true, false), this._fbo.depthAttachment.set(i2.context.createRenderbuffer(i2.context.gl.DEPTH_COMPONENT16, a2, r2))), this._fbo.colorAttachment.set(\"coords\" === e2 ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture), this._fbo;\n }\n getCoordsTexture() {\n const e2 = this.painter.context;\n if (this._coordsTexture) return this._coordsTexture;\n const i2 = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4);\n for (let e3 = 0, t2 = 0; e3 < this._coordsTextureSize; e3++) for (let a3 = 0; a3 < this._coordsTextureSize; a3++, t2 += 4) i2[t2 + 0] = 255 & a3, i2[t2 + 1] = 255 & e3, i2[t2 + 2] = a3 >> 8 << 4 | e3 >> 8, i2[t2 + 3] = 0;\n const a2 = new t.R({ width: this._coordsTextureSize, height: this._coordsTextureSize }, new Uint8Array(i2.buffer)), r2 = new t.T(e2, a2, e2.gl.RGBA, { premultiply: false });\n return r2.bind(e2.gl.NEAREST, e2.gl.CLAMP_TO_EDGE), this._coordsTexture = r2, r2;\n }\n pointCoordinate(e2) {\n this.painter.maybeDrawDepthAndCoords(true);\n const i2 = new Uint8Array(4), a2 = this.painter.context, r2 = a2.gl, o2 = Math.round(e2.x * this.painter.pixelRatio / devicePixelRatio), s2 = Math.round(e2.y * this.painter.pixelRatio / devicePixelRatio), n2 = Math.round(this.painter.height / devicePixelRatio);\n a2.bindFramebuffer.set(this.getFramebuffer(\"coords\").framebuffer), r2.readPixels(o2, n2 - s2 - 1, 1, 1, r2.RGBA, r2.UNSIGNED_BYTE, i2), a2.bindFramebuffer.set(null);\n const l2 = i2[0] + (i2[2] >> 4 << 8), c2 = i2[1] + ((15 & i2[2]) << 8), h2 = this.coordsIndex[255 - i2[3]], u2 = h2 && this.tileManager.getTileByID(h2);\n if (!u2) return null;\n const d2 = this._coordsTextureSize, _2 = (1 << u2.tileID.canonical.z) * d2;\n return new t.ab((u2.tileID.canonical.x * d2 + l2) / _2 + u2.tileID.wrap, (u2.tileID.canonical.y * d2 + c2) / _2, this.getElevation(u2.tileID, l2, c2, d2));\n }\n depthAtPoint(e2) {\n const t2 = new Uint8Array(4), i2 = this.painter.context, a2 = i2.gl;\n return i2.bindFramebuffer.set(this.getFramebuffer(\"depth\").framebuffer), a2.readPixels(e2.x, this.painter.height / devicePixelRatio - e2.y - 1, 1, 1, a2.RGBA, a2.UNSIGNED_BYTE, t2), i2.bindFramebuffer.set(null), (t2[0] / 16777216 + t2[1] / 65536 + t2[2] / 256 + t2[3]) / 256;\n }\n getTerrainMesh(e2) {\n var i2;\n const a2 = (null === (i2 = this.painter.style.projection) || void 0 === i2 ? void 0 : i2.transitionState) > 0, r2 = a2 && 0 === e2.canonical.y, o2 = a2 && e2.canonical.y === (1 << e2.canonical.z) - 1, s2 = `m_${r2 ? \"n\" : \"\"}_${o2 ? \"s\" : \"\"}`;\n if (this._meshCache[s2]) return this._meshCache[s2];\n const n2 = this.painter.context, l2 = new t.cG(), c2 = new t.aZ(), h2 = this.meshSize, u2 = t.a5 / h2, d2 = h2 * h2;\n for (let e3 = 0; e3 <= h2; e3++) for (let t2 = 0; t2 <= h2; t2++) l2.emplaceBack(t2 * u2, e3 * u2, 0);\n for (let e3 = 0; e3 < d2; e3 += h2 + 1) for (let t2 = 0; t2 < h2; t2++) c2.emplaceBack(t2 + e3, h2 + t2 + e3 + 1, h2 + t2 + e3 + 2), c2.emplaceBack(t2 + e3, h2 + t2 + e3 + 2, t2 + e3 + 1);\n const _2 = l2.length, p2 = _2 + (h2 + 1), m2 = (h2 + 1) * h2, f2 = r2 ? t.bs : 0, g2 = r2 ? 0 : 1, v2 = o2 ? t.bt : t.a5, x2 = o2 ? 0 : 1;\n for (let e3 = 0; e3 <= h2; e3++) l2.emplaceBack(e3 * u2, f2, g2);\n for (let e3 = 0; e3 <= h2; e3++) l2.emplaceBack(e3 * u2, v2, x2);\n for (let e3 = 0; e3 < h2; e3++) c2.emplaceBack(m2 + e3, p2 + e3, p2 + e3 + 1), c2.emplaceBack(m2 + e3, p2 + e3 + 1, m2 + e3 + 1), c2.emplaceBack(0 + e3, _2 + e3 + 1, _2 + e3), c2.emplaceBack(0 + e3, 0 + e3 + 1, _2 + e3 + 1);\n const b2 = l2.length, y2 = b2 + 2 * (h2 + 1);\n for (const e3 of [0, 1]) for (let i3 = 0; i3 <= h2; i3++) for (const a3 of [0, 1]) l2.emplaceBack(e3 * t.a5, i3 * u2, a3);\n for (let e3 = 0; e3 < 2 * h2; e3 += 2) c2.emplaceBack(b2 + e3, b2 + e3 + 1, b2 + e3 + 3), c2.emplaceBack(b2 + e3, b2 + e3 + 3, b2 + e3 + 2), c2.emplaceBack(y2 + e3, y2 + e3 + 3, y2 + e3 + 1), c2.emplaceBack(y2 + e3, y2 + e3 + 2, y2 + e3 + 3);\n const w2 = new kt(n2.createVertexBuffer(l2, es.members), n2.createIndexBuffer(c2), t.aY.simpleSegment(0, 0, l2.length, c2.length));\n return this._meshCache[s2] = w2, w2;\n }\n getMeshFrameDelta(e2) {\n return 2 * Math.PI * t.bF / Math.pow(2, Math.max(e2, 0)) / 5;\n }\n getMinTileElevationForLngLatZoom(e2, i2) {\n var a2;\n if (!t.cE(i2, e2.wrap())) return 0;\n const { tileID: r2 } = this._getOverscaledTileIDFromLngLatZoom(e2, i2);\n return null !== (a2 = this.getMinMaxElevation(r2).minElevation) && void 0 !== a2 ? a2 : 0;\n }\n getMinMaxElevation(e2) {\n const t2 = this.getTerrainData(e2).tile, i2 = { minElevation: null, maxElevation: null };\n return t2 && t2.dem && (i2.minElevation = t2.dem.min * this.exaggeration, i2.maxElevation = t2.dem.max * this.exaggeration), i2;\n }\n _getOverscaledTileIDFromLngLatZoom(e2, i2) {\n const a2 = t.ab.fromLngLat(e2.wrap()), r2 = (1 << i2) * t.a5, o2 = a2.x * r2, s2 = a2.y * r2, n2 = Math.floor(o2 / t.a5), l2 = Math.floor(s2 / t.a5);\n return { tileID: new t.a2(i2, 0, i2, n2, l2), mercatorX: o2, mercatorY: s2 };\n }\n }\n class as {\n constructor(e2, t2, i2) {\n this._context = e2, this._size = t2, this._tileSize = i2, this._objects = [], this._recentlyUsed = [], this._stamp = 0;\n }\n destruct() {\n for (const e2 of this._objects) e2.texture.destroy(), e2.fbo.destroy();\n }\n _createObject(e2) {\n const i2 = this._context.createFramebuffer(this._tileSize, this._tileSize, true, true), a2 = new t.T(this._context, { width: this._tileSize, height: this._tileSize, data: null }, this._context.gl.RGBA);\n return a2.bind(this._context.gl.LINEAR, this._context.gl.CLAMP_TO_EDGE), this._context.extTextureFilterAnisotropic && this._context.gl.texParameterf(this._context.gl.TEXTURE_2D, this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, this._context.extTextureFilterAnisotropicMax), i2.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize)), i2.colorAttachment.set(a2.texture), { id: e2, fbo: i2, texture: a2, stamp: -1, inUse: false };\n }\n getObjectForId(e2) {\n return this._objects[e2];\n }\n useObject(e2) {\n e2.inUse = true, this._recentlyUsed = this._recentlyUsed.filter(((t2) => e2.id !== t2)), this._recentlyUsed.push(e2.id);\n }\n stampObject(e2) {\n e2.stamp = ++this._stamp;\n }\n getOrCreateFreeObject() {\n for (const e3 of this._recentlyUsed) if (!this._objects[e3].inUse) return this._objects[e3];\n if (this._objects.length >= this._size) throw new Error(\"No free RenderPool available, call freeAllObjects() required!\");\n const e2 = this._createObject(this._objects.length);\n return this._objects.push(e2), e2;\n }\n freeObject(e2) {\n e2.inUse = false;\n }\n freeAllObjects() {\n for (const e2 of this._objects) this.freeObject(e2);\n }\n isFull() {\n return !(this._objects.length < this._size) && false === this._objects.some(((e2) => !e2.inUse));\n }\n }\n const rs = { background: true, fill: true, line: true, raster: true, hillshade: true, \"color-relief\": true };\n class os {\n constructor(e2, t2) {\n this.painter = e2, this.terrain = t2, this.pool = new as(e2.context, 30, t2.tileManager.tileSize * t2.qualityFactor);\n }\n destruct() {\n this.pool.destruct();\n }\n getTexture(e2) {\n return this.pool.getObjectForId(e2.rtt[this._stacks.length - 1].id).texture;\n }\n prepareForRender(e2, t2) {\n this._stacks = [], this._prevType = null, this._rttTiles = [], this._renderableTiles = this.terrain.tileManager.getRenderableTiles(), this._renderableLayerIds = e2._order.filter(((i2) => !e2._layers[i2].isHidden(t2))), this._coordsAscending = {};\n for (const t3 in e2.tileManagers) {\n this._coordsAscending[t3] = {};\n const i2 = e2.tileManagers[t3].getVisibleCoordinates(), a2 = e2.tileManagers[t3].getSource(), r2 = a2 instanceof te ? a2.terrainTileRanges : null;\n for (const e3 of i2) {\n const i3 = this.terrain.tileManager.getTerrainCoords(e3, r2);\n for (const e4 in i3) this._coordsAscending[t3][e4] || (this._coordsAscending[t3][e4] = []), this._coordsAscending[t3][e4].push(i3[e4]);\n }\n }\n this._coordsAscendingStr = {};\n for (const t3 of e2._order) {\n const i2 = e2._layers[t3], a2 = i2.source;\n if (rs[i2.type] && !this._coordsAscendingStr[a2]) {\n this._coordsAscendingStr[a2] = {};\n for (const e3 in this._coordsAscending[a2]) this._coordsAscendingStr[a2][e3] = this._coordsAscending[a2][e3].map(((e4) => e4.key)).sort().join();\n }\n }\n for (const e3 of this._renderableTiles) for (const t3 in this._coordsAscendingStr) {\n const i2 = this._coordsAscendingStr[t3][e3.tileID.key];\n i2 && i2 !== e3.rttCoords[t3] && (e3.rtt = []);\n }\n }\n renderLayer(e2, i2) {\n if (e2.isHidden(this.painter.transform.zoom)) return false;\n const a2 = Object.assign(Object.assign({}, i2), { isRenderingToTexture: true }), r2 = e2.type, o2 = this.painter, s2 = this._renderableLayerIds[this._renderableLayerIds.length - 1] === e2.id;\n if (rs[r2] && (this._prevType && rs[this._prevType] || this._stacks.push([]), this._prevType = r2, this._stacks[this._stacks.length - 1].push(e2.id), !s2)) return true;\n if (rs[this._prevType] || rs[r2] && s2) {\n this._prevType = r2;\n const e3 = this._stacks.length - 1, i3 = this._stacks[e3] || [];\n for (const r3 of this._renderableTiles) {\n if (this.pool.isFull() && (Ur(this.painter, this.terrain, this._rttTiles, a2), this._rttTiles = [], this.pool.freeAllObjects()), this._rttTiles.push(r3), r3.rtt[e3]) {\n const t2 = this.pool.getObjectForId(r3.rtt[e3].id);\n if (t2.stamp === r3.rtt[e3].stamp) {\n this.pool.useObject(t2);\n continue;\n }\n }\n const s3 = this.pool.getOrCreateFreeObject();\n this.pool.useObject(s3), this.pool.stampObject(s3), r3.rtt[e3] = { id: s3.id, stamp: s3.stamp }, o2.context.bindFramebuffer.set(s3.fbo.framebuffer), o2.context.clear({ color: t.bq.transparent, stencil: 0 }), o2.currentStencilSource = void 0;\n for (let e4 = 0; e4 < i3.length; e4++) {\n const t2 = o2.style._layers[i3[e4]], n2 = t2.source ? this._coordsAscending[t2.source][r3.tileID.key] : [r3.tileID];\n o2.context.viewport.set([0, 0, s3.fbo.width, s3.fbo.height]), o2._renderTileClippingMasks(t2, n2, true), o2.renderLayer(o2, o2.style.tileManagers[t2.source], t2, n2, a2), t2.source && (r3.rttCoords[t2.source] = this._coordsAscendingStr[t2.source][r3.tileID.key]);\n }\n }\n return Ur(this.painter, this.terrain, this._rttTiles, a2), this._rttTiles = [], this.pool.freeAllObjects(), rs[r2];\n }\n return false;\n }\n }\n const ss = { \"AttributionControl.ToggleAttribution\": \"Toggle attribution\", \"AttributionControl.MapFeedback\": \"Map feedback\", \"FullscreenControl.Enter\": \"Enter fullscreen\", \"FullscreenControl.Exit\": \"Exit fullscreen\", \"GeolocateControl.FindMyLocation\": \"Find my location\", \"GeolocateControl.LocationNotAvailable\": \"Location not available\", \"LogoControl.Title\": \"MapLibre logo\", \"Map.Title\": \"Map\", \"Marker.Title\": \"Map marker\", \"NavigationControl.ResetBearing\": \"Reset bearing to north\", \"NavigationControl.ZoomIn\": \"Zoom in\", \"NavigationControl.ZoomOut\": \"Zoom out\", \"Popup.Close\": \"Close popup\", \"ScaleControl.Feet\": \"ft\", \"ScaleControl.Meters\": \"m\", \"ScaleControl.Kilometers\": \"km\", \"ScaleControl.Miles\": \"mi\", \"ScaleControl.NauticalMiles\": \"nm\", \"GlobeControl.Enable\": \"Enable globe\", \"GlobeControl.Disable\": \"Disable globe\", \"TerrainControl.Enable\": \"Enable terrain\", \"TerrainControl.Disable\": \"Disable terrain\", \"CooperativeGesturesHandler.WindowsHelpText\": \"Use Ctrl + scroll to zoom the map\", \"CooperativeGesturesHandler.MacHelpText\": \"Use \\u2318 + scroll to zoom the map\", \"CooperativeGesturesHandler.MobileHelpText\": \"Use two fingers to move the map\" }, ns = i, ls = { hash: false, interactive: true, bearingSnap: 7, attributionControl: Ko, maplibreLogo: false, refreshExpiredTiles: true, canvasContextAttributes: { antialias: false, preserveDrawingBuffer: false, powerPreference: \"high-performance\", failIfMajorPerformanceCaveat: false, desynchronized: false, contextType: void 0 }, scrollZoom: true, minZoom: -2, maxZoom: 22, minPitch: 0, maxPitch: 60, boxZoom: true, dragRotate: true, dragPan: true, keyboard: true, doubleClickZoom: true, touchZoomRotate: true, touchPitch: true, cooperativeGestures: false, trackResize: true, center: [0, 0], elevation: 0, zoom: 0, bearing: 0, pitch: 0, roll: 0, renderWorldCopies: true, maxTileCacheSize: null, maxTileCacheZoomLevels: t.c.MAX_TILE_CACHE_ZOOM_LEVELS, transformRequest: null, transformCameraUpdate: null, transformConstrain: null, fadeDuration: 300, crossSourceCollisions: true, clickTolerance: 3, localIdeographFontFamily: \"sans-serif\", pitchWithRotate: true, rollEnabled: false, reduceMotion: void 0, validateStyle: true, maxCanvasSize: [4096, 4096], cancelPendingTileRequestsWhileZooming: true, centerClampedToGround: true, experimentalZoomLevelsToOverscale: void 0 }, cs = { showCompass: true, showZoom: true, visualizePitch: false, visualizeRoll: true };\n class hs {\n constructor(e2, i2, a2 = false) {\n this.mousedown = (e3) => {\n this.startMove(e3, h.mousePos(this.element, e3)), h.addEventListener(window, \"mousemove\", this.mousemove), h.addEventListener(window, \"mouseup\", this.mouseup);\n }, this.mousemove = (e3) => {\n this.move(e3, h.mousePos(this.element, e3));\n }, this.mouseup = (e3) => {\n this._rotatePitchHandler.dragEnd(e3), this.offTemp();\n }, this.touchstart = (e3) => {\n 1 !== e3.targetTouches.length ? this.reset() : (this._startPos = this._lastPos = h.touchPos(this.element, e3.targetTouches)[0], this.startMove(e3, this._startPos), h.addEventListener(window, \"touchmove\", this.touchmove, { passive: false }), h.addEventListener(window, \"touchend\", this.touchend));\n }, this.touchmove = (e3) => {\n 1 !== e3.targetTouches.length ? this.reset() : (this._lastPos = h.touchPos(this.element, e3.targetTouches)[0], this.move(e3, this._lastPos));\n }, this.touchend = (e3) => {\n 0 === e3.targetTouches.length && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), delete this._startPos, delete this._lastPos, this.offTemp();\n }, this.reset = () => {\n this._rotatePitchHandler.reset(), delete this._startPos, delete this._lastPos, this.offTemp();\n }, this._clickTolerance = 10, this.element = i2;\n const r2 = new yo();\n this._rotatePitchHandler = new mo({ clickTolerance: 3, move: (e3, r3) => {\n const o2 = i2.getBoundingClientRect(), s2 = new t.P((o2.bottom - o2.top) / 2, (o2.right - o2.left) / 2);\n return { bearingDelta: t.cy(new t.P(e3.x, r3.y), r3, s2), pitchDelta: a2 ? -0.5 * (r3.y - e3.y) : void 0 };\n }, moveStateManager: r2, enable: true, assignEvents: () => {\n } }), this.map = e2, h.addEventListener(i2, \"mousedown\", this.mousedown), h.addEventListener(i2, \"touchstart\", this.touchstart, { passive: false }), h.addEventListener(i2, \"touchcancel\", this.reset);\n }\n startMove(e2, t2) {\n this._rotatePitchHandler.dragStart(e2, t2), h.disableDrag();\n }\n move(e2, t2) {\n const i2 = this.map, { bearingDelta: a2, pitchDelta: r2 } = this._rotatePitchHandler.dragMove(e2, t2) || {};\n a2 && i2.setBearing(i2.getBearing() + a2), r2 && i2.setPitch(i2.getPitch() + r2);\n }\n off() {\n const e2 = this.element;\n h.removeEventListener(e2, \"mousedown\", this.mousedown), h.removeEventListener(e2, \"touchstart\", this.touchstart, { passive: false }), h.removeEventListener(window, \"touchmove\", this.touchmove, { passive: false }), h.removeEventListener(window, \"touchend\", this.touchend), h.removeEventListener(e2, \"touchcancel\", this.reset), this.offTemp();\n }\n offTemp() {\n h.enableDrag(), h.removeEventListener(window, \"mousemove\", this.mousemove), h.removeEventListener(window, \"mouseup\", this.mouseup), h.removeEventListener(window, \"touchmove\", this.touchmove, { passive: false }), h.removeEventListener(window, \"touchend\", this.touchend);\n }\n }\n let us;\n function ds(e2, i2, a2, r2 = false) {\n if (r2 || !a2.getCoveringTilesDetailsProvider().allowWorldCopies()) return null == e2 ? void 0 : e2.wrap();\n const o2 = new t.V(e2.lng, e2.lat);\n if (e2 = new t.V(e2.lng, e2.lat), i2) {\n const r3 = new t.V(e2.lng - 360, e2.lat), o3 = new t.V(e2.lng + 360, e2.lat), s2 = a2.locationToScreenPoint(e2).distSqr(i2);\n a2.locationToScreenPoint(r3).distSqr(i2) < s2 ? e2 = r3 : a2.locationToScreenPoint(o3).distSqr(i2) < s2 && (e2 = o3);\n }\n for (; Math.abs(e2.lng - a2.center.lng) > 180; ) {\n const t2 = a2.locationToScreenPoint(e2);\n if (t2.x >= 0 && t2.y >= 0 && t2.x <= a2.width && t2.y <= a2.height) break;\n e2.lng > a2.center.lng ? e2.lng -= 360 : e2.lng += 360;\n }\n return e2.lng !== o2.lng && a2.isPointOnMapSurface(a2.locationToScreenPoint(e2)) ? e2 : o2;\n }\n const _s = { center: \"translate(-50%,-50%)\", top: \"translate(-50%,0)\", \"top-left\": \"translate(0,0)\", \"top-right\": \"translate(-100%,0)\", bottom: \"translate(-50%,-100%)\", \"bottom-left\": \"translate(0,-100%)\", \"bottom-right\": \"translate(-100%,-100%)\", left: \"translate(0,-50%)\", right: \"translate(-100%,-50%)\" };\n function ps(e2, t2, i2) {\n const a2 = e2.classList;\n for (const e3 in _s) a2.remove(`maplibregl-${i2}-anchor-${e3}`);\n a2.add(`maplibregl-${i2}-anchor-${t2}`);\n }\n class ms extends t.E {\n constructor(e2) {\n if (super(), this._onKeyPress = (e3) => {\n const t2 = e3.code, i2 = e3.charCode || e3.keyCode;\n \"Space\" !== t2 && \"Enter\" !== t2 && 32 !== i2 && 13 !== i2 || this.togglePopup();\n }, this._onMapClick = (e3) => {\n const t2 = e3.originalEvent.target, i2 = this._element;\n this._popup && (t2 === i2 || i2.contains(t2)) && this.togglePopup();\n }, this._update = (e3) => {\n if (!this._map) return;\n const t2 = this._map.loaded() && !this._map.isMoving();\n (\"terrain\" === (null == e3 ? void 0 : e3.type) || \"render\" === (null == e3 ? void 0 : e3.type) && !t2) && this._map.once(\"render\", this._update), this._lngLat = ds(this._lngLat, this._flatPos, this._map.transform), this._flatPos = this._pos = this._map.project(this._lngLat)._add(this._offset), this._map.terrain && (this._flatPos = this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));\n let i2 = \"\";\n \"viewport\" === this._rotationAlignment || \"auto\" === this._rotationAlignment ? i2 = `rotateZ(${this._rotation}deg)` : \"map\" === this._rotationAlignment && (i2 = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);\n let a2 = \"\";\n \"viewport\" === this._pitchAlignment || \"auto\" === this._pitchAlignment ? a2 = \"rotateX(0deg)\" : \"map\" === this._pitchAlignment && (a2 = `rotateX(${this._map.getPitch()}deg)`), this._subpixelPositioning || e3 && \"moveend\" !== e3.type || (this._pos = this._pos.round()), h.setTransform(this._element, `${_s[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${a2} ${i2}`), n.frameAsync(new AbortController()).then((() => {\n this._updateOpacity(e3 && \"moveend\" === e3.type);\n })).catch((() => {\n }));\n }, this._onMove = (e3) => {\n if (!this._isDragging) {\n const t2 = this._clickTolerance || this._map._clickTolerance;\n this._isDragging = e3.point.dist(this._pointerdownPos) >= t2;\n }\n this._isDragging && (this._pos = e3.point.sub(this._positionDelta), this._lngLat = this._map.unproject(this._pos), this.setLngLat(this._lngLat), this._element.style.pointerEvents = \"none\", \"pending\" === this._state && (this._state = \"active\", this.fire(new t.l(\"dragstart\"))), this.fire(new t.l(\"drag\")));\n }, this._onUp = () => {\n this._element.style.pointerEvents = \"auto\", this._positionDelta = null, this._pointerdownPos = null, this._isDragging = false, this._map.off(\"mousemove\", this._onMove), this._map.off(\"touchmove\", this._onMove), \"active\" === this._state && this.fire(new t.l(\"dragend\")), this._state = \"inactive\";\n }, this._addDragHandler = (e3) => {\n this._element.contains(e3.originalEvent.target) && (e3.preventDefault(), this._positionDelta = e3.point.sub(this._pos).add(this._offset), this._pointerdownPos = e3.point, this._state = \"pending\", this._map.on(\"mousemove\", this._onMove), this._map.on(\"touchmove\", this._onMove), this._map.once(\"mouseup\", this._onUp), this._map.once(\"touchend\", this._onUp));\n }, this._anchor = e2 && e2.anchor || \"center\", this._color = e2 && e2.color || \"#3FB1CE\", this._scale = e2 && e2.scale || 1, this._draggable = e2 && e2.draggable || false, this._clickTolerance = e2 && e2.clickTolerance || 0, this._subpixelPositioning = e2 && e2.subpixelPositioning || false, this._isDragging = false, this._state = \"inactive\", this._rotation = e2 && e2.rotation || 0, this._rotationAlignment = e2 && e2.rotationAlignment || \"auto\", this._pitchAlignment = e2 && e2.pitchAlignment && \"auto\" !== e2.pitchAlignment ? e2.pitchAlignment : this._rotationAlignment, this.setOpacity(null == e2 ? void 0 : e2.opacity, null == e2 ? void 0 : e2.opacityWhenCovered), e2 && e2.element) this._element = e2.element, this._offset = t.P.convert(e2 && e2.offset || [0, 0]);\n else {\n this._defaultMarker = true, this._element = h.create(\"div\");\n const i2 = h.createNS(\"http://www.w3.org/2000/svg\", \"svg\"), a2 = 41, r2 = 27;\n i2.setAttributeNS(null, \"display\", \"block\"), i2.setAttributeNS(null, \"height\", `${a2}px`), i2.setAttributeNS(null, \"width\", `${r2}px`), i2.setAttributeNS(null, \"viewBox\", `0 0 ${r2} ${a2}`);\n const o2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n o2.setAttributeNS(null, \"stroke\", \"none\"), o2.setAttributeNS(null, \"stroke-width\", \"1\"), o2.setAttributeNS(null, \"fill\", \"none\"), o2.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n const s2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n s2.setAttributeNS(null, \"fill-rule\", \"nonzero\");\n const n2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n n2.setAttributeNS(null, \"transform\", \"translate(3.0, 29.0)\"), n2.setAttributeNS(null, \"fill\", \"#000000\");\n const l2 = [{ rx: \"10.5\", ry: \"5.25002273\" }, { rx: \"10.5\", ry: \"5.25002273\" }, { rx: \"9.5\", ry: \"4.77275007\" }, { rx: \"8.5\", ry: \"4.29549936\" }, { rx: \"7.5\", ry: \"3.81822308\" }, { rx: \"6.5\", ry: \"3.34094679\" }, { rx: \"5.5\", ry: \"2.86367051\" }, { rx: \"4.5\", ry: \"2.38636864\" }];\n for (const e3 of l2) {\n const t2 = h.createNS(\"http://www.w3.org/2000/svg\", \"ellipse\");\n t2.setAttributeNS(null, \"opacity\", \"0.04\"), t2.setAttributeNS(null, \"cx\", \"10.5\"), t2.setAttributeNS(null, \"cy\", \"5.80029008\"), t2.setAttributeNS(null, \"rx\", e3.rx), t2.setAttributeNS(null, \"ry\", e3.ry), n2.appendChild(t2);\n }\n const c2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n c2.setAttributeNS(null, \"fill\", this._color);\n const u2 = h.createNS(\"http://www.w3.org/2000/svg\", \"path\");\n u2.setAttributeNS(null, \"d\", \"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\"), c2.appendChild(u2);\n const d2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n d2.setAttributeNS(null, \"opacity\", \"0.25\"), d2.setAttributeNS(null, \"fill\", \"#000000\");\n const _2 = h.createNS(\"http://www.w3.org/2000/svg\", \"path\");\n _2.setAttributeNS(null, \"d\", \"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\"), d2.appendChild(_2);\n const p2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n p2.setAttributeNS(null, \"transform\", \"translate(6.0, 7.0)\"), p2.setAttributeNS(null, \"fill\", \"#FFFFFF\");\n const m2 = h.createNS(\"http://www.w3.org/2000/svg\", \"g\");\n m2.setAttributeNS(null, \"transform\", \"translate(8.0, 8.0)\");\n const f2 = h.createNS(\"http://www.w3.org/2000/svg\", \"circle\");\n f2.setAttributeNS(null, \"fill\", \"#000000\"), f2.setAttributeNS(null, \"opacity\", \"0.25\"), f2.setAttributeNS(null, \"cx\", \"5.5\"), f2.setAttributeNS(null, \"cy\", \"5.5\"), f2.setAttributeNS(null, \"r\", \"5.4999962\");\n const g2 = h.createNS(\"http://www.w3.org/2000/svg\", \"circle\");\n g2.setAttributeNS(null, \"fill\", \"#FFFFFF\"), g2.setAttributeNS(null, \"cx\", \"5.5\"), g2.setAttributeNS(null, \"cy\", \"5.5\"), g2.setAttributeNS(null, \"r\", \"5.4999962\"), m2.appendChild(f2), m2.appendChild(g2), s2.appendChild(n2), s2.appendChild(c2), s2.appendChild(d2), s2.appendChild(p2), s2.appendChild(m2), i2.appendChild(s2), i2.setAttributeNS(null, \"height\", a2 * this._scale + \"px\"), i2.setAttributeNS(null, \"width\", r2 * this._scale + \"px\"), this._element.appendChild(i2), this._offset = t.P.convert(e2 && e2.offset || [0, -14]);\n }\n if (this._element.classList.add(\"maplibregl-marker\"), this._element.addEventListener(\"dragstart\", ((e3) => {\n e3.preventDefault();\n })), this._element.addEventListener(\"mousedown\", ((e3) => {\n e3.preventDefault();\n })), ps(this._element, this._anchor, \"marker\"), e2 && e2.className) for (const t2 of e2.className.split(\" \")) this._element.classList.add(t2);\n this._popup = null;\n }\n addTo(e2) {\n return this.remove(), this._map = e2, this._element.hasAttribute(\"aria-label\") || this._element.setAttribute(\"aria-label\", e2._getUIString(\"Marker.Title\")), this._element.hasAttribute(\"role\") || this._element.setAttribute(\"role\", \"button\"), e2.getCanvasContainer().appendChild(this._element), e2.on(\"move\", this._update), e2.on(\"moveend\", this._update), e2.on(\"terrain\", this._update), e2.on(\"projectiontransition\", this._update), this.setDraggable(this._draggable), this._update(), this._map.on(\"click\", this._onMapClick), this;\n }\n remove() {\n return this._opacityTimeout && (clearTimeout(this._opacityTimeout), delete this._opacityTimeout), this._map && (this._map.off(\"click\", this._onMapClick), this._map.off(\"move\", this._update), this._map.off(\"moveend\", this._update), this._map.off(\"terrain\", this._update), this._map.off(\"projectiontransition\", this._update), this._map.off(\"mousedown\", this._addDragHandler), this._map.off(\"touchstart\", this._addDragHandler), this._map.off(\"mouseup\", this._onUp), this._map.off(\"touchend\", this._onUp), this._map.off(\"mousemove\", this._onMove), this._map.off(\"touchmove\", this._onMove), delete this._map), h.remove(this._element), this._popup && this._popup.remove(), this;\n }\n getLngLat() {\n return this._lngLat;\n }\n setLngLat(e2) {\n return this._lngLat = t.V.convert(e2), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this;\n }\n getElement() {\n return this._element;\n }\n setPopup(e2) {\n if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener(\"keypress\", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute(\"tabindex\")), e2) {\n if (!(\"offset\" in e2.options)) {\n const t2 = 38.1, i2 = 13.5, a2 = Math.abs(i2) / Math.SQRT2;\n e2.options.offset = this._defaultMarker ? { top: [0, 0], \"top-left\": [0, 0], \"top-right\": [0, 0], bottom: [0, -t2], \"bottom-left\": [a2, -1 * (t2 - i2 + a2)], \"bottom-right\": [-a2, -1 * (t2 - i2 + a2)], left: [i2, -1 * (t2 - i2)], right: [-i2, -1 * (t2 - i2)] } : this._offset;\n }\n this._popup = e2, this._originalTabIndex = this._element.getAttribute(\"tabindex\"), this._originalTabIndex || this._element.setAttribute(\"tabindex\", \"0\"), this._element.addEventListener(\"keypress\", this._onKeyPress);\n }\n return this;\n }\n setSubpixelPositioning(e2) {\n return this._subpixelPositioning = e2, this;\n }\n getPopup() {\n return this._popup;\n }\n togglePopup() {\n const e2 = this._popup;\n return this._element.style.opacity === this._opacityWhenCovered ? this : e2 ? (e2.isOpen() ? e2.remove() : (e2.setLngLat(this._lngLat), e2.addTo(this._map)), this) : this;\n }\n _updateOpacity(e2 = false) {\n var i2, a2;\n const r2 = null === (i2 = this._map) || void 0 === i2 ? void 0 : i2.terrain, o2 = this._map.transform.isLocationOccluded(this._lngLat);\n if (!r2 || o2) {\n const e3 = o2 ? this._opacityWhenCovered : this._opacity;\n return void (this._element.style.opacity !== e3 && (this._element.style.opacity = e3));\n }\n if (e2) this._opacityTimeout = null;\n else {\n if (this._opacityTimeout) return;\n this._opacityTimeout = setTimeout((() => {\n this._opacityTimeout = null;\n }), 100);\n }\n const s2 = this._map, n2 = s2.terrain.depthAtPoint(this._pos), l2 = s2.terrain.getElevationForLngLat(this._lngLat);\n if (s2.transform.lngLatToCameraDepth(this._lngLat, l2) - n2 < 6e-3) return void (this._element.style.opacity = this._opacity);\n const c2 = -this._offset.y / s2.transform.pixelsPerMeter, h2 = Math.sin(s2.getPitch() * Math.PI / 180) * c2, u2 = s2.terrain.depthAtPoint(new t.P(this._pos.x, this._pos.y - this._offset.y)), d2 = s2.transform.lngLatToCameraDepth(this._lngLat, l2 + h2) - u2 > 6e-3;\n (null === (a2 = this._popup) || void 0 === a2 ? void 0 : a2.isOpen()) && d2 && this._popup.remove(), this._element.style.opacity = d2 ? this._opacityWhenCovered : this._opacity;\n }\n getOffset() {\n return this._offset;\n }\n setOffset(e2) {\n return this._offset = t.P.convert(e2), this._update(), this;\n }\n addClassName(e2) {\n this._element.classList.add(e2);\n }\n removeClassName(e2) {\n this._element.classList.remove(e2);\n }\n toggleClassName(e2) {\n return this._element.classList.toggle(e2);\n }\n setDraggable(e2) {\n return this._draggable = !!e2, this._map && (e2 ? (this._map.on(\"mousedown\", this._addDragHandler), this._map.on(\"touchstart\", this._addDragHandler)) : (this._map.off(\"mousedown\", this._addDragHandler), this._map.off(\"touchstart\", this._addDragHandler))), this;\n }\n isDraggable() {\n return this._draggable;\n }\n setRotation(e2) {\n return this._rotation = e2 || 0, this._update(), this;\n }\n getRotation() {\n return this._rotation;\n }\n setRotationAlignment(e2) {\n return this._rotationAlignment = e2 || \"auto\", this._update(), this;\n }\n getRotationAlignment() {\n return this._rotationAlignment;\n }\n setPitchAlignment(e2) {\n return this._pitchAlignment = e2 && \"auto\" !== e2 ? e2 : this._rotationAlignment, this._update(), this;\n }\n getPitchAlignment() {\n return this._pitchAlignment;\n }\n setOpacity(e2, t2) {\n return (void 0 === this._opacity || void 0 === e2 && void 0 === t2) && (this._opacity = \"1\", this._opacityWhenCovered = \"0.2\"), void 0 !== e2 && (this._opacity = e2), void 0 !== t2 && (this._opacityWhenCovered = t2), this._map && this._updateOpacity(true), this;\n }\n }\n const fs = { positionOptions: { enableHighAccuracy: false, maximumAge: 0, timeout: 6e3 }, fitBoundsOptions: { maxZoom: 15 }, trackUserLocation: false, showAccuracyCircle: true, showUserLocation: true };\n let gs = 0, vs = false;\n const xs = { maxWidth: 100, unit: \"metric\" };\n function bs(e2, t2, i2) {\n const a2 = i2 && i2.maxWidth || 100, r2 = e2._container.clientHeight / 2, o2 = e2._container.clientWidth / 2, s2 = e2.unproject([o2 - a2 / 2, r2]), n2 = e2.unproject([o2 + a2 / 2, r2]), l2 = Math.round(e2.project(n2).x - e2.project(s2).x), c2 = Math.min(a2, l2, e2._container.clientWidth), h2 = s2.distanceTo(n2);\n if (i2 && \"imperial\" === i2.unit) {\n const i3 = 3.2808 * h2;\n i3 > 5280 ? ys(t2, c2, i3 / 5280, e2._getUIString(\"ScaleControl.Miles\")) : ys(t2, c2, i3, e2._getUIString(\"ScaleControl.Feet\"));\n } else i2 && \"nautical\" === i2.unit ? ys(t2, c2, h2 / 1852, e2._getUIString(\"ScaleControl.NauticalMiles\")) : h2 >= 1e3 ? ys(t2, c2, h2 / 1e3, e2._getUIString(\"ScaleControl.Kilometers\")) : ys(t2, c2, h2, e2._getUIString(\"ScaleControl.Meters\"));\n }\n function ys(e2, t2, i2, a2) {\n const r2 = (function(e3) {\n const t3 = Math.pow(10, `${Math.floor(e3)}`.length - 1);\n let i3 = e3 / t3;\n return i3 = i3 >= 10 ? 10 : i3 >= 5 ? 5 : i3 >= 3 ? 3 : i3 >= 2 ? 2 : i3 >= 1 ? 1 : (function(e4) {\n const t4 = Math.pow(10, Math.ceil(-Math.log(e4) / Math.LN10));\n return Math.round(e4 * t4) / t4;\n })(i3), t3 * i3;\n })(i2);\n e2.style.width = t2 * (r2 / i2) + \"px\", e2.innerHTML = `${r2}&nbsp;${a2}`;\n }\n const ws = { closeButton: true, closeOnClick: true, focusAfterOpen: true, className: \"\", maxWidth: \"240px\", subpixelPositioning: false, locationOccludedOpacity: void 0 }, Ts = [\"a[href]\", \"[tabindex]:not([tabindex='-1'])\", \"[contenteditable]:not([contenteditable='false'])\", \"button:not([disabled])\", \"input:not([disabled])\", \"select:not([disabled])\", \"textarea:not([disabled])\"].join(\", \");\n function Ps(e2) {\n if (e2) {\n if (\"number\" == typeof e2) {\n const i2 = Math.round(Math.abs(e2) / Math.SQRT2);\n return { center: new t.P(0, 0), top: new t.P(0, e2), \"top-left\": new t.P(i2, i2), \"top-right\": new t.P(-i2, i2), bottom: new t.P(0, -e2), \"bottom-left\": new t.P(i2, -i2), \"bottom-right\": new t.P(-i2, -i2), left: new t.P(e2, 0), right: new t.P(-e2, 0) };\n }\n if (e2 instanceof t.P || Array.isArray(e2)) {\n const i2 = t.P.convert(e2);\n return { center: i2, top: i2, \"top-left\": i2, \"top-right\": i2, bottom: i2, \"bottom-left\": i2, \"bottom-right\": i2, left: i2, right: i2 };\n }\n return { center: t.P.convert(e2.center || [0, 0]), top: t.P.convert(e2.top || [0, 0]), \"top-left\": t.P.convert(e2[\"top-left\"] || [0, 0]), \"top-right\": t.P.convert(e2[\"top-right\"] || [0, 0]), bottom: t.P.convert(e2.bottom || [0, 0]), \"bottom-left\": t.P.convert(e2[\"bottom-left\"] || [0, 0]), \"bottom-right\": t.P.convert(e2[\"bottom-right\"] || [0, 0]), left: t.P.convert(e2.left || [0, 0]), right: t.P.convert(e2.right || [0, 0]) };\n }\n return Ps(new t.P(0, 0));\n }\n const Is = i;\n e.AJAXError = t.cJ, e.Event = t.l, e.Evented = t.E, e.LngLat = t.V, e.MercatorCoordinate = t.ab, e.Point = t.P, e.addProtocol = t.cK, e.config = t.c, e.removeProtocol = t.cL, e.AttributionControl = Yo, e.BoxZoomHandler = co, e.CanvasSource = ae, e.CooperativeGesturesHandler = Vo, e.DoubleClickZoomHandler = Oo, e.DragPanHandler = Zo, e.DragRotateHandler = Go, e.EdgeInsets = Nt, e.FullscreenControl = class extends t.E {\n constructor(e2 = {}) {\n super(), this._onFullscreenChange = () => {\n var e3;\n let t2 = window.document.fullscreenElement || window.document.mozFullScreenElement || window.document.webkitFullscreenElement || window.document.msFullscreenElement;\n for (; null === (e3 = null == t2 ? void 0 : t2.shadowRoot) || void 0 === e3 ? void 0 : e3.fullscreenElement; ) t2 = t2.shadowRoot.fullscreenElement;\n t2 === this._container !== this._fullscreen && this._handleFullscreenChange();\n }, this._onClickFullscreen = () => {\n this._isFullscreen() ? this._exitFullscreen() : this._requestFullscreen();\n }, this._fullscreen = false, e2 && e2.container && (e2.container instanceof HTMLElement ? this._container = e2.container : t.w(\"Full screen control 'container' must be a DOM element.\")), \"onfullscreenchange\" in document ? this._fullscreenchange = \"fullscreenchange\" : \"onmozfullscreenchange\" in document ? this._fullscreenchange = \"mozfullscreenchange\" : \"onwebkitfullscreenchange\" in document ? this._fullscreenchange = \"webkitfullscreenchange\" : \"onmsfullscreenchange\" in document && (this._fullscreenchange = \"MSFullscreenChange\");\n }\n onAdd(e2) {\n return this._map = e2, this._container || (this._container = this._map.getContainer()), this._controlContainer = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-group\"), this._setupUI(), this._controlContainer;\n }\n onRemove() {\n h.remove(this._controlContainer), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);\n }\n _setupUI() {\n const e2 = this._fullscreenButton = h.create(\"button\", \"maplibregl-ctrl-fullscreen\", this._controlContainer);\n h.create(\"span\", \"maplibregl-ctrl-icon\", e2).setAttribute(\"aria-hidden\", \"true\"), e2.type = \"button\", this._updateTitle(), this._fullscreenButton.addEventListener(\"click\", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);\n }\n _updateTitle() {\n const e2 = this._getTitle();\n this._fullscreenButton.setAttribute(\"aria-label\", e2), this._fullscreenButton.title = e2;\n }\n _getTitle() {\n return this._map._getUIString(this._isFullscreen() ? \"FullscreenControl.Exit\" : \"FullscreenControl.Enter\");\n }\n _isFullscreen() {\n return this._fullscreen;\n }\n _handleFullscreenChange() {\n this._fullscreen = !this._fullscreen, this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-shrink\"), this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-fullscreen\"), this._updateTitle(), this._fullscreen ? (this.fire(new t.l(\"fullscreenstart\")), this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled(), this._map.cooperativeGestures.disable()) : (this.fire(new t.l(\"fullscreenend\")), this._prevCooperativeGesturesEnabled && this._map.cooperativeGestures.enable());\n }\n _exitFullscreen() {\n window.document.exitFullscreen ? window.document.exitFullscreen() : window.document.mozCancelFullScreen ? window.document.mozCancelFullScreen() : window.document.msExitFullscreen ? window.document.msExitFullscreen() : window.document.webkitCancelFullScreen ? window.document.webkitCancelFullScreen() : this._togglePseudoFullScreen();\n }\n _requestFullscreen() {\n this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen ? this._container.webkitRequestFullscreen() : this._togglePseudoFullScreen();\n }\n _togglePseudoFullScreen() {\n this._container.classList.toggle(\"maplibregl-pseudo-fullscreen\"), this._handleFullscreenChange(), this._map.resize();\n }\n }, e.GeoJSONSource = ee, e.GeolocateControl = class extends t.E {\n constructor(e2) {\n super(), this._onSuccess = (e3) => {\n if (this._map) {\n if (this._isOutOfMapMaxBounds(e3)) return this._setErrorState(), this.fire(new t.l(\"outofmaxbounds\", e3)), this._updateMarker(), void this._finish();\n if (this.options.trackUserLocation) switch (this._lastKnownPosition = e3, this._watchState) {\n case \"WAITING_ACTIVE\":\n case \"ACTIVE_LOCK\":\n case \"ACTIVE_ERROR\":\n this._watchState = \"ACTIVE_LOCK\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");\n break;\n case \"BACKGROUND\":\n case \"BACKGROUND_ERROR\":\n this._watchState = \"BACKGROUND\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\");\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n this.options.showUserLocation && \"OFF\" !== this._watchState && this._updateMarker(e3), this.options.trackUserLocation && \"ACTIVE_LOCK\" !== this._watchState || this._updateCamera(e3), this.options.showUserLocation && this._dotElement.classList.remove(\"maplibregl-user-location-dot-stale\"), this.fire(new t.l(\"geolocate\", e3)), this._finish();\n }\n }, this._updateCamera = (e3) => {\n const i2 = new t.V(e3.coords.longitude, e3.coords.latitude), a2 = e3.coords.accuracy, r2 = this._map.getBearing(), o2 = t.e({ bearing: r2 }, this.options.fitBoundsOptions), s2 = $.fromLngLat(i2, a2);\n this._map.fitBounds(s2, o2, { geolocateSource: true });\n }, this._updateMarker = (e3) => {\n if (e3) {\n const i2 = new t.V(e3.coords.longitude, e3.coords.latitude);\n this._accuracyCircleMarker.setLngLat(i2).addTo(this._map), this._userLocationDotMarker.setLngLat(i2).addTo(this._map), this._accuracy = e3.coords.accuracy, this._updateCircleRadiusIfNeeded();\n } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove();\n }, this._onUpdate = () => {\n this._updateCircleRadiusIfNeeded();\n }, this._onError = (e3) => {\n if (this._map) {\n if (1 === e3.code) {\n this._watchState = \"OFF\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"), this._geolocateButton.disabled = true;\n const e4 = this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");\n this._geolocateButton.title = e4, this._geolocateButton.setAttribute(\"aria-label\", e4), void 0 !== this._geolocationWatchID && this._clearWatch();\n } else {\n if (3 === e3.code && vs) return;\n this._setErrorState();\n }\n \"OFF\" !== this._watchState && this.options.showUserLocation && this._dotElement.classList.add(\"maplibregl-user-location-dot-stale\"), this.fire(new t.l(\"error\", e3)), this._finish();\n }\n }, this._finish = () => {\n this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0;\n }, this._setupUI = () => {\n this._map && (this._container.addEventListener(\"contextmenu\", ((e3) => e3.preventDefault())), this._geolocateButton = h.create(\"button\", \"maplibregl-ctrl-geolocate\", this._container), h.create(\"span\", \"maplibregl-ctrl-icon\", this._geolocateButton).setAttribute(\"aria-hidden\", \"true\"), this._geolocateButton.type = \"button\", this._geolocateButton.disabled = true);\n }, this._finishSetupUI = (e3) => {\n if (this._map) {\n if (false === e3) {\n t.w(\"Geolocation support is not available so the GeolocateControl will be disabled.\");\n const e4 = this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");\n this._geolocateButton.disabled = true, this._geolocateButton.title = e4, this._geolocateButton.setAttribute(\"aria-label\", e4);\n } else {\n const e4 = this._map._getUIString(\"GeolocateControl.FindMyLocation\");\n this._geolocateButton.disabled = false, this._geolocateButton.title = e4, this._geolocateButton.setAttribute(\"aria-label\", e4);\n }\n this.options.trackUserLocation && (this._geolocateButton.setAttribute(\"aria-pressed\", \"false\"), this._watchState = \"OFF\"), this.options.showUserLocation && (this._dotElement = h.create(\"div\", \"maplibregl-user-location-dot\"), this._userLocationDotMarker = new ms({ element: this._dotElement }), this._circleElement = h.create(\"div\", \"maplibregl-user-location-accuracy-circle\"), this._accuracyCircleMarker = new ms({ element: this._circleElement, pitchAlignment: \"map\" }), this.options.trackUserLocation && (this._watchState = \"OFF\"), this._map.on(\"zoom\", this._onUpdate), this._map.on(\"move\", this._onUpdate), this._map.on(\"rotate\", this._onUpdate), this._map.on(\"pitch\", this._onUpdate)), this._geolocateButton.addEventListener(\"click\", (() => this.trigger())), this._setup = true, this.options.trackUserLocation && this._map.on(\"movestart\", ((e4) => {\n const i2 = (null == e4 ? void 0 : e4[0]) instanceof ResizeObserverEntry;\n e4.geolocateSource || \"ACTIVE_LOCK\" !== this._watchState || i2 || this._map.isZooming() || (this._watchState = \"BACKGROUND\", this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"), this.fire(new t.l(\"trackuserlocationend\")), this.fire(new t.l(\"userlocationlostfocus\")));\n }));\n }\n }, this.options = t.e({}, fs, e2);\n }\n onAdd(e2) {\n return this._map = e2, this._container = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-group\"), this._setupUI(), (function() {\n return t._(this, arguments, void 0, (function* (e3 = false) {\n if (void 0 !== us && !e3) return us;\n if (void 0 === window.navigator.permissions) return us = !!window.navigator.geolocation, us;\n try {\n const e4 = yield window.navigator.permissions.query({ name: \"geolocation\" });\n us = \"denied\" !== e4.state;\n } catch (e4) {\n us = !!window.navigator.geolocation;\n }\n return us;\n }));\n })().then(((e3) => this._finishSetupUI(e3))), this._container;\n }\n onRemove() {\n void 0 !== this._geolocationWatchID && (window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0), this.options.showUserLocation && this._userLocationDotMarker && this._userLocationDotMarker.remove(), this.options.showAccuracyCircle && this._accuracyCircleMarker && this._accuracyCircleMarker.remove(), h.remove(this._container), this._map.off(\"zoom\", this._onUpdate), this._map.off(\"move\", this._onUpdate), this._map.off(\"rotate\", this._onUpdate), this._map.off(\"pitch\", this._onUpdate), this._map = void 0, gs = 0, vs = false;\n }\n _isOutOfMapMaxBounds(e2) {\n const t2 = this._map.getMaxBounds(), i2 = e2.coords;\n return t2 && (i2.longitude < t2.getWest() || i2.longitude > t2.getEast() || i2.latitude < t2.getSouth() || i2.latitude > t2.getNorth());\n }\n _setErrorState() {\n switch (this._watchState) {\n case \"WAITING_ACTIVE\":\n this._watchState = \"ACTIVE_ERROR\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\");\n break;\n case \"ACTIVE_LOCK\":\n this._watchState = \"ACTIVE_ERROR\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");\n break;\n case \"BACKGROUND\":\n this._watchState = \"BACKGROUND_ERROR\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background-error\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");\n break;\n case \"ACTIVE_ERROR\":\n case \"BACKGROUND_ERROR\":\n case \"OFF\":\n case void 0:\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n }\n _updateCircleRadiusIfNeeded() {\n const e2 = this._userLocationDotMarker.getLngLat();\n if (!(this.options.showUserLocation && this.options.showAccuracyCircle && this._accuracy && e2)) return;\n const t2 = this._map.project(e2), i2 = this._map.unproject([t2.x + 100, t2.y]), a2 = e2.distanceTo(i2) / 100, r2 = 2 * this._accuracy / a2;\n this._circleElement.style.width = `${r2.toFixed(2)}px`, this._circleElement.style.height = `${r2.toFixed(2)}px`;\n }\n trigger() {\n if (!this._setup) return t.w(\"Geolocate control triggered before added to a map\"), false;\n if (this.options.trackUserLocation) {\n switch (this._watchState) {\n case \"OFF\":\n this._watchState = \"WAITING_ACTIVE\", this.fire(new t.l(\"trackuserlocationstart\"));\n break;\n case \"WAITING_ACTIVE\":\n case \"ACTIVE_LOCK\":\n case \"ACTIVE_ERROR\":\n case \"BACKGROUND_ERROR\":\n gs--, vs = false, this._watchState = \"OFF\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"), this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"), this.fire(new t.l(\"trackuserlocationend\"));\n break;\n case \"BACKGROUND\":\n this._watchState = \"ACTIVE_LOCK\", this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"), this._lastKnownPosition && this._updateCamera(this._lastKnownPosition), this.fire(new t.l(\"trackuserlocationstart\")), this.fire(new t.l(\"userlocationfocus\"));\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n switch (this._watchState) {\n case \"WAITING_ACTIVE\":\n this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");\n break;\n case \"ACTIVE_LOCK\":\n this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");\n break;\n case \"OFF\":\n break;\n default:\n throw new Error(`Unexpected watchState ${this._watchState}`);\n }\n if (\"OFF\" === this._watchState && void 0 !== this._geolocationWatchID) this._clearWatch();\n else if (void 0 === this._geolocationWatchID) {\n let e2;\n this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.setAttribute(\"aria-pressed\", \"true\"), gs++, gs > 1 ? (e2 = { maximumAge: 6e5, timeout: 0 }, vs = true) : (e2 = this.options.positionOptions, vs = false), this._geolocationWatchID = window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, e2);\n }\n } else window.navigator.geolocation.getCurrentPosition(this._onSuccess, this._onError, this.options.positionOptions), this._timeoutId = setTimeout(this._finish, 1e4);\n return true;\n }\n _clearWatch() {\n window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0, this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"), this._geolocateButton.setAttribute(\"aria-pressed\", \"false\"), this.options.showUserLocation && this._updateMarker(null);\n }\n }, e.GlobeControl = class {\n constructor() {\n this._toggleProjection = () => {\n var e2;\n const t2 = null === (e2 = this._map.getProjection()) || void 0 === e2 ? void 0 : e2.type;\n this._map.setProjection(\"mercator\" !== t2 && t2 ? { type: \"mercator\" } : { type: \"globe\" }), this._updateGlobeIcon();\n }, this._updateGlobeIcon = () => {\n var e2;\n this._globeButton.classList.remove(\"maplibregl-ctrl-globe\"), this._globeButton.classList.remove(\"maplibregl-ctrl-globe-enabled\"), \"globe\" === (null === (e2 = this._map.getProjection()) || void 0 === e2 ? void 0 : e2.type) ? (this._globeButton.classList.add(\"maplibregl-ctrl-globe-enabled\"), this._globeButton.title = this._map._getUIString(\"GlobeControl.Disable\")) : (this._globeButton.classList.add(\"maplibregl-ctrl-globe\"), this._globeButton.title = this._map._getUIString(\"GlobeControl.Enable\"));\n };\n }\n onAdd(e2) {\n return this._map = e2, this._container = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-group\"), this._globeButton = h.create(\"button\", \"maplibregl-ctrl-globe\", this._container), h.create(\"span\", \"maplibregl-ctrl-icon\", this._globeButton).setAttribute(\"aria-hidden\", \"true\"), this._globeButton.type = \"button\", this._globeButton.addEventListener(\"click\", this._toggleProjection), this._updateGlobeIcon(), this._map.on(\"styledata\", this._updateGlobeIcon), this._container;\n }\n onRemove() {\n h.remove(this._container), this._map.off(\"styledata\", this._updateGlobeIcon), this._globeButton.removeEventListener(\"click\", this._toggleProjection), this._map = void 0;\n }\n }, e.Hash = $r, e.ImageSource = te, e.KeyboardHandler = Ao, e.LngLatBounds = $, e.LogoControl = Qo, e.Map = class extends Xo {\n constructor(e2) {\n var i2, a2;\n t.cH.mark(t.cI.create);\n const r2 = Object.assign(Object.assign(Object.assign({}, ls), e2), { canvasContextAttributes: Object.assign(Object.assign({}, ls.canvasContextAttributes), e2.canvasContextAttributes) });\n if (null != r2.minZoom && null != r2.maxZoom && r2.minZoom > r2.maxZoom) throw new Error(\"maxZoom must be greater than or equal to minZoom\");\n if (null != r2.minPitch && null != r2.maxPitch && r2.minPitch > r2.maxPitch) throw new Error(\"maxPitch must be greater than or equal to minPitch\");\n if (null != r2.minPitch && r2.minPitch < 0) throw new Error(\"minPitch must be greater than or equal to 0\");\n if (null != r2.maxPitch && r2.maxPitch > 180) throw new Error(\"maxPitch must be less than or equal to 180\");\n const o2 = new $t(), s2 = new Yt();\n if (void 0 !== r2.minZoom && o2.setMinZoom(r2.minZoom), void 0 !== r2.maxZoom && o2.setMaxZoom(r2.maxZoom), void 0 !== r2.minPitch && o2.setMinPitch(r2.minPitch), void 0 !== r2.maxPitch && o2.setMaxPitch(r2.maxPitch), void 0 !== r2.renderWorldCopies && o2.setRenderWorldCopies(r2.renderWorldCopies), null !== r2.transformConstrain && o2.setConstrainOverride(r2.transformConstrain), super(o2, s2, { bearingSnap: r2.bearingSnap }), this._idleTriggered = false, this._crossFadingFactor = 1, this._renderTaskQueue = new Jo(), this._controls = [], this._mapId = t.ah(), this._lostContextStyle = { style: null, images: null }, this._contextLost = (e3) => {\n e3.preventDefault(), this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this.painter.destroy();\n for (const e4 of Object.values(this.style._layers)) if (\"custom\" === e4.type && console.warn(`Custom layer with id '${e4.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`), e4._listeners) for (const [t2] of Object.entries(e4._listeners)) console.warn(`Custom layer with id '${e4.id}' had event listeners for event '${t2}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);\n this._lostContextStyle = this._getStyleAndImages(), this.style.destroy(), this.style = null, this.fire(new t.l(\"webglcontextlost\", { originalEvent: e3 }));\n }, this._contextRestored = (e3) => {\n this._lostContextStyle.style && this.setStyle(this._lostContextStyle.style, { diff: false }), this._lostContextStyle.images && (this.style.imageManager.images = this._lostContextStyle.images), this._setupPainter(), this.resize(), this._update(), this.fire(new t.l(\"webglcontextrestored\", { originalEvent: e3 }));\n }, this._onMapScroll = (e3) => {\n if (e3.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, false;\n }, this._onWindowOnline = () => {\n this._update();\n }, this._interactive = r2.interactive, this._maxTileCacheSize = r2.maxTileCacheSize, this._maxTileCacheZoomLevels = r2.maxTileCacheZoomLevels, this._canvasContextAttributes = Object.assign({}, r2.canvasContextAttributes), this._trackResize = true === r2.trackResize, this._bearingSnap = r2.bearingSnap, this._centerClampedToGround = r2.centerClampedToGround, this._refreshExpiredTiles = true === r2.refreshExpiredTiles, this._fadeDuration = r2.fadeDuration, this._crossSourceCollisions = true === r2.crossSourceCollisions, this._collectResourceTiming = true === r2.collectResourceTiming, this._locale = Object.assign(Object.assign({}, ss), r2.locale), this._clickTolerance = r2.clickTolerance, this._overridePixelRatio = r2.pixelRatio, this._maxCanvasSize = r2.maxCanvasSize, this._zoomLevelsToOverscale = r2.experimentalZoomLevelsToOverscale, this.transformCameraUpdate = r2.transformCameraUpdate, this.transformConstrain = r2.transformConstrain, this.cancelPendingTileRequestsWhileZooming = true === r2.cancelPendingTileRequestsWhileZooming, void 0 !== r2.reduceMotion && (n.prefersReducedMotion = r2.reduceMotion), this._imageQueueHandle = g.addThrottleControl((() => this.isMoving())), this._requestManager = new v(r2.transformRequest), \"string\" == typeof r2.container) {\n if (this._container = document.getElementById(r2.container), !this._container) throw new Error(`Container '${r2.container}' not found.`);\n } else {\n if (!(r2.container instanceof HTMLElement)) throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");\n this._container = r2.container;\n }\n if (r2.maxBounds && this.setMaxBounds(r2.maxBounds), this._setupContainer(), this._setupPainter(), this.on(\"move\", (() => this._update(false))), this.on(\"moveend\", (() => this._update(false))), this.on(\"zoom\", (() => this._update(true))), this.on(\"terrain\", (() => {\n this.painter.terrainFacilitator.dirty = true, this._update(true);\n })), this.once(\"idle\", (() => {\n this._idleTriggered = true;\n })), \"undefined\" != typeof window) {\n addEventListener(\"online\", this._onWindowOnline, false);\n let e3 = false;\n const t2 = Wr(((e4) => {\n this._trackResize && !this._removed && (this.resize(e4), this.redraw());\n }), 50);\n this._resizeObserver = new ResizeObserver(((i3) => {\n e3 ? t2(i3) : e3 = true;\n })), this._resizeObserver.observe(this._container);\n }\n this.handlers = new Ho(this, r2), this._hash = r2.hash && new $r(\"string\" == typeof r2.hash && r2.hash || void 0).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ center: r2.center, elevation: r2.elevation, zoom: r2.zoom, bearing: r2.bearing, pitch: r2.pitch, roll: r2.roll }), r2.bounds && (this.resize(), this.fitBounds(r2.bounds, t.e({}, r2.fitBoundsOptions, { duration: 0 }))));\n const l2 = \"string\" == typeof r2.style || !(\"globe\" === (null === (a2 = null === (i2 = r2.style) || void 0 === i2 ? void 0 : i2.projection) || void 0 === a2 ? void 0 : a2.type));\n this.resize(null, l2), this._localIdeographFontFamily = r2.localIdeographFontFamily, this._validateStyle = r2.validateStyle, r2.style && this.setStyle(r2.style, { localIdeographFontFamily: r2.localIdeographFontFamily }), r2.attributionControl && this.addControl(new Yo(\"boolean\" == typeof r2.attributionControl ? void 0 : r2.attributionControl)), r2.maplibreLogo && this.addControl(new Qo(), r2.logoPosition), this.on(\"style.load\", (() => {\n if (l2 || this._resizeTransform(), this.transform.unmodified) {\n const e3 = t.U(this.style.stylesheet, [\"center\", \"zoom\", \"bearing\", \"pitch\", \"roll\"]);\n this.jumpTo(e3);\n }\n })), this.on(\"data\", ((e3) => {\n this._update(\"style\" === e3.dataType), this.fire(new t.l(`${e3.dataType}data`, e3));\n })), this.on(\"dataloading\", ((e3) => {\n this.fire(new t.l(`${e3.dataType}dataloading`, e3));\n })), this.on(\"dataabort\", ((e3) => {\n this.fire(new t.l(\"sourcedataabort\", e3));\n }));\n }\n _getMapId() {\n return this._mapId;\n }\n setGlobalStateProperty(e2, t2) {\n return this.style.setGlobalStateProperty(e2, t2), this._update(true);\n }\n getGlobalState() {\n return this.style.getGlobalState();\n }\n addControl(e2, i2) {\n if (void 0 === i2 && (i2 = e2.getDefaultPosition ? e2.getDefaultPosition() : \"top-right\"), !e2 || !e2.onAdd) return this.fire(new t.k(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));\n const a2 = e2.onAdd(this);\n this._controls.push(e2);\n const r2 = this._controlPositions[i2];\n return -1 !== i2.indexOf(\"bottom\") ? r2.insertBefore(a2, r2.firstChild) : r2.appendChild(a2), this;\n }\n removeControl(e2) {\n if (!e2 || !e2.onRemove) return this.fire(new t.k(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));\n const i2 = this._controls.indexOf(e2);\n return i2 > -1 && this._controls.splice(i2, 1), e2.onRemove(this), this;\n }\n hasControl(e2) {\n return this._controls.indexOf(e2) > -1;\n }\n coveringTiles(e2) {\n return Ce(this.transform, e2);\n }\n calculateCameraOptionsFromTo(e2, t2, i2, a2) {\n return null == a2 && this.terrain && (a2 = this.terrain.getElevationForLngLat(i2)), super.calculateCameraOptionsFromTo(e2, t2, i2, a2);\n }\n resize(e2, i2 = true) {\n const [a2, r2] = this._containerDimensions(), o2 = this._getClampedPixelRatio(a2, r2);\n if (this._resizeCanvas(a2, r2, o2), this.painter.resize(a2, r2, o2), this.painter.overLimit()) {\n const e3 = this.painter.context.gl;\n this._maxCanvasSize = [e3.drawingBufferWidth, e3.drawingBufferHeight];\n const t2 = this._getClampedPixelRatio(a2, r2);\n this._resizeCanvas(a2, r2, t2), this.painter.resize(a2, r2, t2);\n }\n this._resizeTransform(i2);\n const s2 = !this._moving;\n return s2 && (this.stop(), this.fire(new t.l(\"movestart\", e2)).fire(new t.l(\"move\", e2))), this.fire(new t.l(\"resize\", e2)), s2 && this.fire(new t.l(\"moveend\", e2)), this;\n }\n _resizeTransform(e2 = true) {\n var t2;\n const [i2, a2] = this._containerDimensions();\n this.transform.resize(i2, a2, e2), null === (t2 = this._requestedCameraState) || void 0 === t2 || t2.resize(i2, a2, e2);\n }\n _getClampedPixelRatio(e2, t2) {\n const { 0: i2, 1: a2 } = this._maxCanvasSize, r2 = this.getPixelRatio(), o2 = e2 * r2, s2 = t2 * r2;\n return Math.min(o2 > i2 ? i2 / o2 : 1, s2 > a2 ? a2 / s2 : 1) * r2;\n }\n getPixelRatio() {\n var e2;\n return null !== (e2 = this._overridePixelRatio) && void 0 !== e2 ? e2 : devicePixelRatio;\n }\n setPixelRatio(e2) {\n this._overridePixelRatio = e2, this.resize();\n }\n getBounds() {\n return this.transform.getBounds();\n }\n getMaxBounds() {\n return this.transform.getMaxBounds();\n }\n setMaxBounds(e2) {\n return this.transform.setMaxBounds($.convert(e2)), this._update();\n }\n setMinZoom(e2) {\n if ((e2 = null == e2 ? -2 : e2) >= -2 && e2 <= this.transform.maxZoom) return this.transform.setMinZoom(e2), this._update(), this.getZoom() < e2 && this.setZoom(e2), this;\n throw new Error(\"minZoom must be between -2 and the current maxZoom, inclusive\");\n }\n getMinZoom() {\n return this.transform.minZoom;\n }\n setMaxZoom(e2) {\n if ((e2 = null == e2 ? 22 : e2) >= this.transform.minZoom) return this.transform.setMaxZoom(e2), this._update(), this.getZoom() > e2 && this.setZoom(e2), this;\n throw new Error(\"maxZoom must be greater than the current minZoom\");\n }\n getMaxZoom() {\n return this.transform.maxZoom;\n }\n setMinPitch(e2) {\n if ((e2 = null == e2 ? 0 : e2) < 0) throw new Error(\"minPitch must be greater than or equal to 0\");\n if (e2 >= 0 && e2 <= this.transform.maxPitch) return this.transform.setMinPitch(e2), this._update(), this.getPitch() < e2 && this.setPitch(e2), this;\n throw new Error(\"minPitch must be between 0 and the current maxPitch, inclusive\");\n }\n getMinPitch() {\n return this.transform.minPitch;\n }\n setMaxPitch(e2) {\n if ((e2 = null == e2 ? 60 : e2) > 180) throw new Error(\"maxPitch must be less than or equal to 180\");\n if (e2 >= this.transform.minPitch) return this.transform.setMaxPitch(e2), this._update(), this.getPitch() > e2 && this.setPitch(e2), this;\n throw new Error(\"maxPitch must be greater than the current minPitch\");\n }\n getMaxPitch() {\n return this.transform.maxPitch;\n }\n getRenderWorldCopies() {\n return this.transform.renderWorldCopies;\n }\n setRenderWorldCopies(e2) {\n return this.transform.setRenderWorldCopies(e2), this._update();\n }\n setTransformConstrain(e2) {\n return this.transform.setConstrainOverride(e2), this._update();\n }\n project(e2) {\n return this.transform.locationToScreenPoint(t.V.convert(e2), this.style && this.terrain);\n }\n unproject(e2) {\n return this.transform.screenPointToLocation(t.P.convert(e2), this.terrain);\n }\n isMoving() {\n var e2;\n return this._moving || (null === (e2 = this.handlers) || void 0 === e2 ? void 0 : e2.isMoving());\n }\n isZooming() {\n var e2;\n return this._zooming || (null === (e2 = this.handlers) || void 0 === e2 ? void 0 : e2.isZooming());\n }\n isRotating() {\n var e2;\n return this._rotating || (null === (e2 = this.handlers) || void 0 === e2 ? void 0 : e2.isRotating());\n }\n _createDelegatedListener(e2, t2, i2) {\n if (\"mouseenter\" === e2 || \"mouseover\" === e2) {\n let a2 = false;\n const r2 = (r3) => {\n const o2 = t2.filter(((e3) => this.getLayer(e3))), s2 = 0 !== o2.length ? this.queryRenderedFeatures(r3.point, { layers: o2 }) : [];\n s2.length ? a2 || (a2 = true, i2.call(this, new ao(e2, this, r3.originalEvent, { features: s2 }))) : a2 = false;\n };\n return { layers: t2, listener: i2, delegates: { mousemove: r2, mouseout: () => {\n a2 = false;\n } } };\n }\n if (\"mouseleave\" === e2 || \"mouseout\" === e2) {\n let a2 = false;\n const r2 = (r3) => {\n const o3 = t2.filter(((e3) => this.getLayer(e3)));\n (0 !== o3.length ? this.queryRenderedFeatures(r3.point, { layers: o3 }) : []).length ? a2 = true : a2 && (a2 = false, i2.call(this, new ao(e2, this, r3.originalEvent)));\n }, o2 = (t3) => {\n a2 && (a2 = false, i2.call(this, new ao(e2, this, t3.originalEvent)));\n };\n return { layers: t2, listener: i2, delegates: { mousemove: r2, mouseout: o2 } };\n }\n {\n const a2 = (e3) => {\n const a3 = t2.filter(((e4) => this.getLayer(e4))), r2 = 0 !== a3.length ? this.queryRenderedFeatures(e3.point, { layers: a3 }) : [];\n r2.length && (e3.features = r2, i2.call(this, e3), delete e3.features);\n };\n return { layers: t2, listener: i2, delegates: { [e2]: a2 } };\n }\n }\n _saveDelegatedListener(e2, t2) {\n this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[e2] = this._delegatedListeners[e2] || [], this._delegatedListeners[e2].push(t2);\n }\n _removeDelegatedListener(e2, t2, i2) {\n if (!this._delegatedListeners || !this._delegatedListeners[e2]) return;\n const a2 = this._delegatedListeners[e2];\n for (let e3 = 0; e3 < a2.length; e3++) {\n const r2 = a2[e3];\n if (r2.listener === i2 && r2.layers.length === t2.length && r2.layers.every(((e4) => t2.includes(e4)))) {\n for (const e4 in r2.delegates) this.off(e4, r2.delegates[e4]);\n return void a2.splice(e3, 1);\n }\n }\n }\n on(e2, t2, i2) {\n if (void 0 === i2) return super.on(e2, t2);\n const a2 = \"string\" == typeof t2 ? [t2] : t2, r2 = this._createDelegatedListener(e2, a2, i2);\n this._saveDelegatedListener(e2, r2);\n for (const e3 in r2.delegates) this.on(e3, r2.delegates[e3]);\n return { unsubscribe: () => {\n this._removeDelegatedListener(e2, a2, i2);\n } };\n }\n once(e2, t2, i2) {\n if (void 0 === i2) return super.once(e2, t2);\n const a2 = \"string\" == typeof t2 ? [t2] : t2, r2 = this._createDelegatedListener(e2, a2, i2);\n for (const t3 in r2.delegates) {\n const o2 = r2.delegates[t3];\n r2.delegates[t3] = (...t4) => {\n this._removeDelegatedListener(e2, a2, i2), o2(...t4);\n };\n }\n this._saveDelegatedListener(e2, r2);\n for (const e3 in r2.delegates) this.once(e3, r2.delegates[e3]);\n return this;\n }\n off(e2, t2, i2) {\n return void 0 === i2 ? super.off(e2, t2) : (this._removeDelegatedListener(e2, \"string\" == typeof t2 ? [t2] : t2, i2), this);\n }\n queryRenderedFeatures(e2, i2) {\n if (!this.style) return [];\n let a2;\n const r2 = e2 instanceof t.P || Array.isArray(e2), o2 = r2 ? e2 : [[0, 0], [this.transform.width, this.transform.height]];\n if (i2 = i2 || (r2 ? {} : e2) || {}, o2 instanceof t.P || \"number\" == typeof o2[0]) a2 = [t.P.convert(o2)];\n else {\n const e3 = t.P.convert(o2[0]), i3 = t.P.convert(o2[1]);\n a2 = [e3, new t.P(i3.x, e3.y), i3, new t.P(e3.x, i3.y), e3];\n }\n return this.style.queryRenderedFeatures(a2, i2, this.transform);\n }\n querySourceFeatures(e2, t2) {\n return this.style.querySourceFeatures(e2, t2);\n }\n setStyle(e2, i2) {\n return false !== (i2 = t.e({}, { localIdeographFontFamily: this._localIdeographFontFamily, validate: this._validateStyle }, i2)).diff && i2.localIdeographFontFamily === this._localIdeographFontFamily && this.style && e2 ? (this._diffStyle(e2, i2), this) : (this._localIdeographFontFamily = i2.localIdeographFontFamily, this._updateStyle(e2, i2));\n }\n setTransformRequest(e2) {\n return this._requestManager.setTransformRequest(e2), this;\n }\n _getUIString(e2) {\n const t2 = this._locale[e2];\n if (null == t2) throw new Error(`Missing UI string '${e2}'`);\n return t2;\n }\n _updateStyle(e2, t2) {\n var i2, a2;\n if (t2.transformStyle && this.style && !this.style._loaded) return void this.style.once(\"style.load\", (() => this._updateStyle(e2, t2)));\n const r2 = this.style && t2.transformStyle ? this.style.serialize() : void 0;\n return this.style && (this.style.setEventedParent(null), this.style._remove(!e2)), e2 ? (this.style = new ki(this, t2 || {}), this.style.setEventedParent(this, { style: this.style }), \"string\" == typeof e2 ? this.style.loadURL(e2, t2, r2) : this.style.loadJSON(e2, t2, r2), this) : (null === (a2 = null === (i2 = this.style) || void 0 === i2 ? void 0 : i2.projection) || void 0 === a2 || a2.destroy(), delete this.style, this);\n }\n _lazyInitEmptyStyle() {\n this.style || (this.style = new ki(this, {}), this.style.setEventedParent(this, { style: this.style }), this.style.loadEmpty());\n }\n _diffStyle(e2, i2) {\n if (\"string\" == typeof e2) {\n const a2 = this._requestManager.transformRequest(e2, \"Style\");\n t.j(a2, new AbortController()).then(((e3) => {\n this._updateDiff(e3.data, i2);\n })).catch(((e3) => {\n e3 && this.fire(new t.k(e3));\n }));\n } else \"object\" == typeof e2 && this._updateDiff(e2, i2);\n }\n _updateDiff(e2, i2) {\n try {\n this.style.setState(e2, i2) && this._update(true);\n } catch (a2) {\n t.w(`Unable to perform style diff: ${a2.message || a2.error || a2}. Rebuilding the style from scratch.`), this._updateStyle(e2, i2);\n }\n }\n getStyle() {\n if (this.style) return this.style.serialize();\n }\n _getStyleAndImages() {\n return this.style ? { style: this.style.serialize(), images: this.style.imageManager.cloneImages() } : { style: null, images: {} };\n }\n isStyleLoaded() {\n return this.style ? this.style.loaded() : t.w(\"There is no style added to the map.\");\n }\n addSource(e2, t2) {\n return this._lazyInitEmptyStyle(), this.style.addSource(e2, t2), this._update(true);\n }\n isSourceLoaded(e2) {\n const i2 = this.style && this.style.tileManagers[e2];\n if (void 0 !== i2) return i2.loaded();\n this.fire(new t.k(new Error(`There is no tile manager with ID '${e2}'`)));\n }\n setTerrain(e2) {\n if (this.style._checkLoaded(), this._terrainDataCallback && this.style.off(\"data\", this._terrainDataCallback), e2) {\n const i2 = this.style.tileManagers[e2.source];\n if (!i2) throw new Error(`cannot load terrain, because there exists no source with ID: ${e2.source}`);\n null === this.terrain && i2.reload();\n for (const i3 in this.style._layers) {\n const a2 = this.style._layers[i3];\n \"hillshade\" === a2.type && a2.source === e2.source && t.w(\"You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.\"), \"color-relief\" === a2.type && a2.source === e2.source && t.w(\"You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.\");\n }\n this.terrain = new is(this.painter, i2, e2), this.painter.renderToTexture = new os(this.painter, this.terrain), this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._terrainDataCallback = (t2) => {\n var i3;\n \"style\" === t2.dataType ? this.terrain.tileManager.freeRtt() : \"source\" === t2.dataType && t2.tile && (t2.sourceId !== e2.source || this._elevationFreeze || (this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this._centerClampedToGround && this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom))), \"image\" === (null === (i3 = t2.source) || void 0 === i3 ? void 0 : i3.type) ? this.terrain.tileManager.freeRtt() : this.terrain.tileManager.freeRtt(t2.tile.tileID));\n }, this.style.on(\"data\", this._terrainDataCallback);\n } else this.terrain && this.terrain.tileManager.destruct(), this.terrain = null, this.painter.renderToTexture && this.painter.renderToTexture.destruct(), this.painter.renderToTexture = null, this.transform.setMinElevationForCurrentTile(0), this._centerClampedToGround && this.transform.setElevation(0);\n return this.fire(new t.l(\"terrain\", { terrain: e2 })), this;\n }\n getTerrain() {\n var e2, t2;\n return null !== (t2 = null === (e2 = this.terrain) || void 0 === e2 ? void 0 : e2.options) && void 0 !== t2 ? t2 : null;\n }\n areTilesLoaded() {\n const e2 = this.style && this.style.tileManagers;\n for (const t2 of Object.values(e2)) if (!t2.areTilesLoaded()) return false;\n return true;\n }\n removeSource(e2) {\n return this.style.removeSource(e2), this._update(true);\n }\n getSource(e2) {\n return this.style.getSource(e2);\n }\n setSourceTileLodParams(e2, t2, i2) {\n if (i2) {\n const a2 = this.getSource(i2);\n if (!a2) throw new Error(`There is no source with ID \"${i2}\", cannot set LOD parameters`);\n a2.calculateTileZoom = Te(Math.max(1, e2), Math.max(1, t2));\n } else for (const i3 in this.style.tileManagers) this.style.tileManagers[i3].getSource().calculateTileZoom = Te(Math.max(1, e2), Math.max(1, t2));\n return this._update(true), this;\n }\n refreshTiles(e2, i2) {\n const a2 = this.style.tileManagers[e2];\n if (!a2) throw new Error(`There is no tile manager with ID \"${e2}\", cannot refresh tile`);\n void 0 === i2 ? a2.reload(true) : a2.refreshTiles(i2.map(((e3) => new t.ae(e3.z, e3.x, e3.y))));\n }\n addImage(e2, i2, a2 = {}) {\n const { pixelRatio: r2 = 1, sdf: o2 = false, stretchX: s2, stretchY: l2, content: c2, textFitWidth: h2, textFitHeight: u2 } = a2;\n if (this._lazyInitEmptyStyle(), !(i2 instanceof HTMLImageElement || t.b(i2))) {\n if (void 0 === i2.width || void 0 === i2.height) return this.fire(new t.k(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));\n {\n const { width: a3, height: n2, data: d2 } = i2, _2 = i2;\n return this.style.addImage(e2, { data: new t.R({ width: a3, height: n2 }, new Uint8Array(d2)), pixelRatio: r2, stretchX: s2, stretchY: l2, content: c2, textFitWidth: h2, textFitHeight: u2, sdf: o2, version: 0, userImage: _2 }), _2.onAdd && _2.onAdd(this, e2), this;\n }\n }\n {\n const { width: a3, height: d2, data: _2 } = n.getImageData(i2);\n this.style.addImage(e2, { data: new t.R({ width: a3, height: d2 }, _2), pixelRatio: r2, stretchX: s2, stretchY: l2, content: c2, textFitWidth: h2, textFitHeight: u2, sdf: o2, version: 0 });\n }\n }\n updateImage(e2, i2) {\n const a2 = this.style.getImage(e2);\n if (!a2) return this.fire(new t.k(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));\n const r2 = i2 instanceof HTMLImageElement || t.b(i2) ? n.getImageData(i2) : i2, { width: o2, height: s2, data: l2 } = r2;\n if (void 0 === o2 || void 0 === s2) return this.fire(new t.k(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));\n if (o2 !== a2.data.width || s2 !== a2.data.height) return this.fire(new t.k(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));\n const c2 = !(i2 instanceof HTMLImageElement || t.b(i2));\n return a2.data.replace(l2, c2), this.style.updateImage(e2, a2), this;\n }\n getImage(e2) {\n return this.style.getImage(e2);\n }\n hasImage(e2) {\n return e2 ? !!this.style.getImage(e2) : (this.fire(new t.k(new Error(\"Missing required image id\"))), false);\n }\n removeImage(e2) {\n this.style.removeImage(e2);\n }\n loadImage(e2) {\n return g.getImage(this._requestManager.transformRequest(e2, \"Image\"), new AbortController());\n }\n listImages() {\n return this.style.listImages();\n }\n addLayer(e2, t2) {\n return this._lazyInitEmptyStyle(), this.style.addLayer(e2, t2), this._update(true);\n }\n moveLayer(e2, t2) {\n return this.style.moveLayer(e2, t2), this._update(true);\n }\n removeLayer(e2) {\n return this.style.removeLayer(e2), this._update(true);\n }\n getLayer(e2) {\n return this.style.getLayer(e2);\n }\n getLayersOrder() {\n return this.style.getLayersOrder();\n }\n setLayerZoomRange(e2, t2, i2) {\n return this.style.setLayerZoomRange(e2, t2, i2), this._update(true);\n }\n setFilter(e2, t2, i2 = {}) {\n return this.style.setFilter(e2, t2, i2), this._update(true);\n }\n getFilter(e2) {\n return this.style.getFilter(e2);\n }\n setPaintProperty(e2, t2, i2, a2 = {}) {\n return this.style.setPaintProperty(e2, t2, i2, a2), this._update(true);\n }\n getPaintProperty(e2, t2) {\n return this.style.getPaintProperty(e2, t2);\n }\n setLayoutProperty(e2, t2, i2, a2 = {}) {\n return this.style.setLayoutProperty(e2, t2, i2, a2), this._update(true);\n }\n getLayoutProperty(e2, t2) {\n return this.style.getLayoutProperty(e2, t2);\n }\n setGlyphs(e2, t2 = {}) {\n return this._lazyInitEmptyStyle(), this.style.setGlyphs(e2, t2), this._update(true);\n }\n getGlyphs() {\n return this.style.getGlyphsUrl();\n }\n addSprite(e2, t2, i2 = {}) {\n return this._lazyInitEmptyStyle(), this.style.addSprite(e2, t2, i2, ((e3) => {\n e3 || this._update(true);\n })), this;\n }\n removeSprite(e2) {\n return this._lazyInitEmptyStyle(), this.style.removeSprite(e2), this._update(true);\n }\n getSprite() {\n return this.style.getSprite();\n }\n setSprite(e2, t2 = {}) {\n return this._lazyInitEmptyStyle(), this.style.setSprite(e2, t2, ((e3) => {\n e3 || this._update(true);\n })), this;\n }\n setLight(e2, t2 = {}) {\n return this._lazyInitEmptyStyle(), this.style.setLight(e2, t2), this._update(true);\n }\n getLight() {\n return this.style.getLight();\n }\n setSky(e2, t2 = {}) {\n return this._lazyInitEmptyStyle(), this.style.setSky(e2, t2), this._update(true);\n }\n getSky() {\n return this.style.getSky();\n }\n setFeatureState(e2, t2) {\n return this.style.setFeatureState(e2, t2), this._update();\n }\n removeFeatureState(e2, t2) {\n return this.style.removeFeatureState(e2, t2), this._update();\n }\n getFeatureState(e2) {\n return this.style.getFeatureState(e2);\n }\n getContainer() {\n return this._container;\n }\n getCanvasContainer() {\n return this._canvasContainer;\n }\n getCanvas() {\n return this._canvas;\n }\n _containerDimensions() {\n let e2 = 0, t2 = 0;\n return this._container && (e2 = this._container.clientWidth || 400, t2 = this._container.clientHeight || 300), [e2, t2];\n }\n _setupContainer() {\n const e2 = this._container;\n e2.classList.add(\"maplibregl-map\");\n const t2 = this._canvasContainer = h.create(\"div\", \"maplibregl-canvas-container\", e2);\n this._interactive && t2.classList.add(\"maplibregl-interactive\"), this._canvas = h.create(\"canvas\", \"maplibregl-canvas\", t2), this._canvas.addEventListener(\"webglcontextlost\", this._contextLost, false), this._canvas.addEventListener(\"webglcontextrestored\", this._contextRestored, false), this._canvas.setAttribute(\"tabindex\", this._interactive ? \"0\" : \"-1\"), this._canvas.setAttribute(\"aria-label\", this._getUIString(\"Map.Title\")), this._canvas.setAttribute(\"role\", \"region\");\n const i2 = this._containerDimensions(), a2 = this._getClampedPixelRatio(i2[0], i2[1]);\n this._resizeCanvas(i2[0], i2[1], a2);\n const r2 = this._controlContainer = h.create(\"div\", \"maplibregl-control-container\", e2), o2 = this._controlPositions = {};\n [\"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"].forEach(((e3) => {\n o2[e3] = h.create(\"div\", `maplibregl-ctrl-${e3} `, r2);\n })), this._container.addEventListener(\"scroll\", this._onMapScroll, false);\n }\n _resizeCanvas(e2, t2, i2) {\n this._canvas.width = Math.floor(i2 * e2), this._canvas.height = Math.floor(i2 * t2), this._canvas.style.width = `${e2}px`, this._canvas.style.height = `${t2}px`;\n }\n _setupPainter() {\n const e2 = Object.assign(Object.assign({}, this._canvasContextAttributes), { alpha: true, depth: true, stencil: true, premultipliedAlpha: true });\n let t2 = null;\n this._canvas.addEventListener(\"webglcontextcreationerror\", ((i3) => {\n t2 = { requestedAttributes: e2 }, i3 && (t2.statusMessage = i3.statusMessage, t2.type = i3.type);\n }), { once: true });\n let i2 = null;\n if (i2 = this._canvasContextAttributes.contextType ? this._canvas.getContext(this._canvasContextAttributes.contextType, e2) : this._canvas.getContext(\"webgl2\", e2) || this._canvas.getContext(\"webgl\", e2), !i2) {\n const e3 = \"Failed to initialize WebGL\";\n throw t2 ? (t2.message = e3, new Error(JSON.stringify(t2))) : new Error(e3);\n }\n this.painter = new qr(i2, this.transform), u.testSupport(i2);\n }\n migrateProjection(e2, i2) {\n super.migrateProjection(e2, i2), this.painter.transform = e2, this.fire(new t.l(\"projectiontransition\", { newProjection: this.style.projection.name }));\n }\n loaded() {\n return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();\n }\n _update(e2) {\n return this.style && this.style._loaded ? (this._styleDirty = this._styleDirty || e2, this._sourcesDirty = true, this.triggerRepaint(), this) : this;\n }\n _requestRenderFrame(e2) {\n return this._update(), this._renderTaskQueue.add(e2);\n }\n _cancelRenderFrame(e2) {\n this._renderTaskQueue.remove(e2);\n }\n _render(e2) {\n var i2, a2, r2, o2, s2;\n const n2 = this._idleTriggered ? this._fadeDuration : 0, l2 = (null === (i2 = this.style.projection) || void 0 === i2 ? void 0 : i2.transitionState) > 0;\n if (this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(e2), this._removed) return;\n let h2 = false;\n if (this.style && this._styleDirty) {\n this._styleDirty = false;\n const e3 = this.transform.zoom, i3 = c();\n this.style.zoomHistory.update(e3, i3);\n const a3 = new t.H(e3, { now: i3, fadeDuration: n2, zoomHistory: this.style.zoomHistory, transition: this.style.getTransition() }), r3 = a3.crossFadingFactor();\n 1 === r3 && r3 === this._crossFadingFactor || (h2 = true, this._crossFadingFactor = r3), this.style.update(a3);\n }\n const u2 = (null === (a2 = this.style.projection) || void 0 === a2 ? void 0 : a2.transitionState) > 0 !== l2;\n null === (r2 = this.style.projection) || void 0 === r2 || r2.setErrorQueryLatitudeDegrees(this.transform.center.lat), this.transform.setTransitionState(null === (o2 = this.style.projection) || void 0 === o2 ? void 0 : o2.transitionState, null === (s2 = this.style.projection) || void 0 === s2 ? void 0 : s2.latitudeErrorCorrectionRadians), this.style && (this._sourcesDirty || u2) && (this._sourcesDirty = false, this.style._updateSources(this.transform)), this.terrain ? (this.terrain.tileManager.update(this.transform, this.terrain), this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), !this._elevationFreeze && this._centerClampedToGround && this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom))) : (this.transform.setMinElevationForCurrentTile(0), this._centerClampedToGround && this.transform.setElevation(0)), this._placementDirty = this.style && this.style._updatePlacement(this.transform, this.showCollisionBoxes, n2, this._crossSourceCollisions, u2), this.painter.render(this.style, { showTileBoundaries: this.showTileBoundaries, showOverdrawInspector: this._showOverdrawInspector, rotating: this.isRotating(), zooming: this.isZooming(), moving: this.isMoving(), fadeDuration: n2, showPadding: this.showPadding }), this.fire(new t.l(\"render\")), this.loaded() && !this._loaded && (this._loaded = true, t.cH.mark(t.cI.load), this.fire(new t.l(\"load\"))), this.style && (this.style.hasTransitions() || h2) && (this._styleDirty = true), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles();\n const d2 = this._sourcesDirty || this._styleDirty || this._placementDirty;\n return d2 || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new t.l(\"idle\")), !this._loaded || this._fullyLoaded || d2 || (this._fullyLoaded = true, t.cH.mark(t.cI.fullLoad)), this;\n }\n redraw() {\n return this.style && (this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._render(0)), this;\n }\n remove() {\n var e2;\n this._hash && this._hash.remove();\n for (const e3 of this._controls) e3.onRemove(this);\n this._controls = [], this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), \"undefined\" != typeof window && removeEventListener(\"online\", this._onWindowOnline, false), g.removeThrottleControl(this._imageQueueHandle), null === (e2 = this._resizeObserver) || void 0 === e2 || e2.disconnect();\n const i2 = this.painter.context.gl.getExtension(\"WEBGL_lose_context\");\n (null == i2 ? void 0 : i2.loseContext) && i2.loseContext(), this._canvas.removeEventListener(\"webglcontextrestored\", this._contextRestored, false), this._canvas.removeEventListener(\"webglcontextlost\", this._contextLost, false), h.remove(this._canvasContainer), h.remove(this._controlContainer), this._container.removeEventListener(\"scroll\", this._onMapScroll, false), this._container.classList.remove(\"maplibregl-map\"), t.cH.clearMetrics(), this._removed = true, this.fire(new t.l(\"remove\"));\n }\n triggerRepaint() {\n this.style && !this._frameRequest && (this._frameRequest = new AbortController(), n.frame(this._frameRequest, ((e2) => {\n t.cH.frame(e2), this._frameRequest = null;\n try {\n this._render(e2);\n } catch (e3) {\n if (!t.Z(e3) && !(function(e4) {\n return e4.message === or;\n })(e3)) throw e3;\n }\n }), (() => {\n })));\n }\n get showTileBoundaries() {\n return !!this._showTileBoundaries;\n }\n set showTileBoundaries(e2) {\n this._showTileBoundaries !== e2 && (this._showTileBoundaries = e2, this._update());\n }\n get showPadding() {\n return !!this._showPadding;\n }\n set showPadding(e2) {\n this._showPadding !== e2 && (this._showPadding = e2, this._update());\n }\n get showCollisionBoxes() {\n return !!this._showCollisionBoxes;\n }\n set showCollisionBoxes(e2) {\n this._showCollisionBoxes !== e2 && (this._showCollisionBoxes = e2, e2 ? this.style._generateCollisionBoxes() : this._update());\n }\n get showOverdrawInspector() {\n return !!this._showOverdrawInspector;\n }\n set showOverdrawInspector(e2) {\n this._showOverdrawInspector !== e2 && (this._showOverdrawInspector = e2, this._update());\n }\n get repaint() {\n return !!this._repaint;\n }\n set repaint(e2) {\n this._repaint !== e2 && (this._repaint = e2, this.triggerRepaint());\n }\n get vertices() {\n return !!this._vertices;\n }\n set vertices(e2) {\n this._vertices = e2, this._update();\n }\n get version() {\n return ns;\n }\n getCameraTargetElevation() {\n return this.transform.elevation;\n }\n getProjection() {\n return this.style.getProjection();\n }\n setProjection(e2) {\n return this._lazyInitEmptyStyle(), this.style.setProjection(e2), this._update(true);\n }\n }, e.MapMouseEvent = ao, e.MapTouchEvent = ro, e.MapWheelEvent = oo, e.Marker = ms, e.NavigationControl = class {\n constructor(e2) {\n this._updateZoomButtons = () => {\n const e3 = this._map.getZoom(), t2 = e3 === this._map.getMaxZoom(), i2 = e3 === this._map.getMinZoom();\n this._zoomInButton.disabled = t2, this._zoomOutButton.disabled = i2, this._zoomInButton.setAttribute(\"aria-disabled\", t2.toString()), this._zoomOutButton.setAttribute(\"aria-disabled\", i2.toString());\n }, this._rotateCompassArrow = () => {\n this._compassIcon.style.transform = this.options.visualizePitch && this.options.visualizeRoll ? `scale(${1 / Math.pow(Math.cos(this._map.transform.pitchInRadians), 0.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)` : this.options.visualizePitch ? `scale(${1 / Math.pow(Math.cos(this._map.transform.pitchInRadians), 0.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)` : this.options.visualizeRoll ? `rotate(${-this._map.transform.bearing - this._map.transform.roll}deg)` : `rotate(${-this._map.transform.bearing}deg)`;\n }, this._setButtonTitle = (e3, t2) => {\n const i2 = this._map._getUIString(`NavigationControl.${t2}`);\n e3.title = i2, e3.setAttribute(\"aria-label\", i2);\n }, this.options = t.e({}, cs, e2), this._container = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-group\"), this._container.addEventListener(\"contextmenu\", ((e3) => e3.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton(\"maplibregl-ctrl-zoom-in\", ((e3) => this._map.zoomIn({}, { originalEvent: e3 }))), h.create(\"span\", \"maplibregl-ctrl-icon\", this._zoomInButton).setAttribute(\"aria-hidden\", \"true\"), this._zoomOutButton = this._createButton(\"maplibregl-ctrl-zoom-out\", ((e3) => this._map.zoomOut({}, { originalEvent: e3 }))), h.create(\"span\", \"maplibregl-ctrl-icon\", this._zoomOutButton).setAttribute(\"aria-hidden\", \"true\")), this.options.showCompass && (this._compass = this._createButton(\"maplibregl-ctrl-compass\", ((e3) => {\n this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: e3 }) : this._map.resetNorth({}, { originalEvent: e3 });\n })), this._compassIcon = h.create(\"span\", \"maplibregl-ctrl-icon\", this._compass), this._compassIcon.setAttribute(\"aria-hidden\", \"true\"));\n }\n onAdd(e2) {\n return this._map = e2, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, \"ZoomIn\"), this._setButtonTitle(this._zoomOutButton, \"ZoomOut\"), this._map.on(\"zoom\", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, \"ResetBearing\"), this.options.visualizePitch && this._map.on(\"pitch\", this._rotateCompassArrow), this.options.visualizeRoll && this._map.on(\"roll\", this._rotateCompassArrow), this._map.on(\"rotate\", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new hs(this._map, this._compass, this.options.visualizePitch)), this._container;\n }\n onRemove() {\n h.remove(this._container), this.options.showZoom && this._map.off(\"zoom\", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off(\"pitch\", this._rotateCompassArrow), this.options.visualizeRoll && this._map.off(\"roll\", this._rotateCompassArrow), this._map.off(\"rotate\", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;\n }\n _createButton(e2, t2) {\n const i2 = h.create(\"button\", e2, this._container);\n return i2.type = \"button\", i2.addEventListener(\"click\", t2), i2;\n }\n }, e.Popup = class extends t.E {\n constructor(e2) {\n super(), this._updateOpacity = () => {\n void 0 !== this.options.locationOccludedOpacity && (this._container.style.opacity = this._map.transform.isLocationOccluded(this.getLngLat()) ? `${this.options.locationOccludedOpacity}` : \"\");\n }, this.remove = () => (this._content && h.remove(this._content), this._container && (h.remove(this._container), delete this._container), this._map && (this._map.off(\"move\", this._update), this._map.off(\"move\", this._onClose), this._map.off(\"click\", this._onClose), this._map.off(\"remove\", this.remove), this._map.off(\"mousemove\", this._onMouseMove), this._map.off(\"mouseup\", this._onMouseUp), this._map.off(\"drag\", this._onDrag), this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\"), delete this._map, this.fire(new t.l(\"close\"))), this), this._onMouseUp = (e3) => {\n this._update(e3.point);\n }, this._onMouseMove = (e3) => {\n this._update(e3.point);\n }, this._onDrag = (e3) => {\n this._update(e3.point);\n }, this._update = (e3) => {\n if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return;\n if (!this._container) {\n if (this._container = h.create(\"div\", \"maplibregl-popup\", this._map.getContainer()), this._tip = h.create(\"div\", \"maplibregl-popup-tip\", this._container), this._container.appendChild(this._content), this.options.className) for (const e4 of this.options.className.split(\" \")) this._container.classList.add(e4);\n this._closeButton && this._closeButton.setAttribute(\"aria-label\", this._map._getUIString(\"Popup.Close\")), this._trackPointer && this._container.classList.add(\"maplibregl-popup-track-pointer\");\n }\n if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._lngLat = ds(this._lngLat, this._flatPos, this._map.transform, this._trackPointer), this._trackPointer && !e3) return;\n const t2 = this._flatPos = this._pos = this._trackPointer && e3 ? e3 : this._map.project(this._lngLat);\n this._map.terrain && (this._flatPos = this._trackPointer && e3 ? e3 : this._map.transform.locationToScreenPoint(this._lngLat));\n let i2 = this.options.anchor;\n const a2 = Ps(this.options.offset);\n if (!i2) {\n const e4 = this._container.offsetWidth, r3 = this._container.offsetHeight;\n let o2;\n o2 = t2.y + a2.bottom.y < r3 ? [\"top\"] : t2.y > this._map.transform.height - r3 ? [\"bottom\"] : [], t2.x < e4 / 2 ? o2.push(\"left\") : t2.x > this._map.transform.width - e4 / 2 && o2.push(\"right\"), i2 = 0 === o2.length ? \"bottom\" : o2.join(\"-\");\n }\n let r2 = t2.add(a2[i2]);\n this.options.subpixelPositioning || (r2 = r2.round()), h.setTransform(this._container, `${_s[i2]} translate(${r2.x}px,${r2.y}px)`), ps(this._container, i2, \"popup\"), this._updateOpacity();\n }, this._onClose = () => {\n this.remove();\n }, this.options = t.e(Object.create(ws), e2);\n }\n addTo(e2) {\n return this._map && this.remove(), this._map = e2, this.options.closeOnClick && this._map.on(\"click\", this._onClose), this.options.closeOnMove && this._map.on(\"move\", this._onClose), this._map.on(\"remove\", this.remove), this._update(), this._focusFirstElement(), this._trackPointer ? (this._map.on(\"mousemove\", this._onMouseMove), this._map.on(\"mouseup\", this._onMouseUp), this._container && this._container.classList.add(\"maplibregl-popup-track-pointer\"), this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")) : this._map.on(\"move\", this._update), this.fire(new t.l(\"open\")), this;\n }\n isOpen() {\n return !!this._map;\n }\n getLngLat() {\n return this._lngLat;\n }\n setLngLat(e2) {\n return this._lngLat = t.V.convert(e2), this._pos = null, this._flatPos = null, this._trackPointer = false, this._update(), this._map && (this._map.on(\"move\", this._update), this._map.off(\"mousemove\", this._onMouseMove), this._container && this._container.classList.remove(\"maplibregl-popup-track-pointer\"), this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\")), this;\n }\n trackPointer() {\n return this._trackPointer = true, this._pos = null, this._flatPos = null, this._update(), this._map && (this._map.off(\"move\", this._update), this._map.on(\"mousemove\", this._onMouseMove), this._map.on(\"drag\", this._onDrag), this._container && this._container.classList.add(\"maplibregl-popup-track-pointer\"), this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")), this;\n }\n getElement() {\n return this._container;\n }\n setText(e2) {\n return this.setDOMContent(document.createTextNode(e2));\n }\n setHTML(e2) {\n const t2 = document.createDocumentFragment(), i2 = document.createElement(\"body\");\n let a2;\n for (i2.innerHTML = e2; a2 = i2.firstChild, a2; ) t2.appendChild(a2);\n return this.setDOMContent(t2);\n }\n getMaxWidth() {\n var e2;\n return null === (e2 = this._container) || void 0 === e2 ? void 0 : e2.style.maxWidth;\n }\n setMaxWidth(e2) {\n return this.options.maxWidth = e2, this._update(), this;\n }\n setDOMContent(e2) {\n if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);\n else this._content = h.create(\"div\", \"maplibregl-popup-content\", this._container);\n return this._content.appendChild(e2), this._createCloseButton(), this._update(), this._focusFirstElement(), this;\n }\n addClassName(e2) {\n return this._container && this._container.classList.add(e2), this;\n }\n removeClassName(e2) {\n return this._container && this._container.classList.remove(e2), this;\n }\n setOffset(e2) {\n return this.options.offset = e2, this._update(), this;\n }\n toggleClassName(e2) {\n if (this._container) return this._container.classList.toggle(e2);\n }\n setSubpixelPositioning(e2) {\n this.options.subpixelPositioning = e2;\n }\n _createCloseButton() {\n this.options.closeButton && (this._closeButton = h.create(\"button\", \"maplibregl-popup-close-button\", this._content), this._closeButton.type = \"button\", this._closeButton.innerHTML = \"&#215;\", this._closeButton.addEventListener(\"click\", this._onClose));\n }\n _focusFirstElement() {\n if (!this.options.focusAfterOpen || !this._container) return;\n const e2 = this._container.querySelector(Ts);\n e2 && e2.focus();\n }\n }, e.RasterDEMTileSource = Y, e.RasterTileSource = K, e.ScaleControl = class {\n constructor(e2) {\n this._onMove = () => {\n bs(this._map, this._container, this.options);\n }, this.setUnit = (e3) => {\n this.options.unit = e3, bs(this._map, this._container, this.options);\n }, this.options = Object.assign(Object.assign({}, xs), e2);\n }\n getDefaultPosition() {\n return \"bottom-left\";\n }\n onAdd(e2) {\n return this._map = e2, this._container = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-scale\", e2.getContainer()), this._map.on(\"move\", this._onMove), this._onMove(), this._container;\n }\n onRemove() {\n h.remove(this._container), this._map.off(\"move\", this._onMove), this._map = void 0;\n }\n }, e.ScrollZoomHandler = Bo, e.Style = ki, e.TerrainControl = class {\n constructor(e2) {\n this._toggleTerrain = () => {\n this._map.getTerrain() ? this._map.setTerrain(null) : this._map.setTerrain(this.options), this._updateTerrainIcon();\n }, this._updateTerrainIcon = () => {\n this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain\"), this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain-enabled\"), this._map.terrain ? (this._terrainButton.classList.add(\"maplibregl-ctrl-terrain-enabled\"), this._terrainButton.title = this._map._getUIString(\"TerrainControl.Disable\")) : (this._terrainButton.classList.add(\"maplibregl-ctrl-terrain\"), this._terrainButton.title = this._map._getUIString(\"TerrainControl.Enable\"));\n }, this.options = e2;\n }\n onAdd(e2) {\n return this._map = e2, this._container = h.create(\"div\", \"maplibregl-ctrl maplibregl-ctrl-group\"), this._terrainButton = h.create(\"button\", \"maplibregl-ctrl-terrain\", this._container), h.create(\"span\", \"maplibregl-ctrl-icon\", this._terrainButton).setAttribute(\"aria-hidden\", \"true\"), this._terrainButton.type = \"button\", this._terrainButton.addEventListener(\"click\", this._toggleTerrain), this._updateTerrainIcon(), this._map.on(\"terrain\", this._updateTerrainIcon), this._container;\n }\n onRemove() {\n h.remove(this._container), this._map.off(\"terrain\", this._updateTerrainIcon), this._map = void 0;\n }\n }, e.TwoFingersTouchPitchHandler = zo, e.TwoFingersTouchRotateHandler = So, e.TwoFingersTouchZoomHandler = Mo, e.TwoFingersTouchZoomRotateHandler = Uo, e.VectorTileSource = X, e.VideoSource = ie, e.addSourceType = (e2, i2) => t._(void 0, void 0, void 0, (function* () {\n if (oe(e2)) throw new Error(`A source type called \"${e2}\" already exists.`);\n ((e3, t2) => {\n re[e3] = t2;\n })(e2, i2);\n })), e.clearPrewarmedResources = function() {\n const e2 = B;\n e2 && (e2.isPreloaded() && 1 === e2.numActive() ? (e2.release(L), B = null) : console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"));\n }, e.createTileMesh = li, e.getMaxParallelImageRequests = function() {\n return t.c.MAX_PARALLEL_IMAGE_REQUESTS;\n }, e.getRTLTextPluginStatus = function() {\n return ce().getRTLTextPluginStatus();\n }, e.getVersion = function() {\n return Is;\n }, e.getWorkerCount = function() {\n return k.workerCount;\n }, e.getWorkerUrl = function() {\n return t.c.WORKER_URL;\n }, e.importScriptInWorkers = function(e2) {\n return Z().broadcast(\"IS\", e2);\n }, e.isTimeFrozen = function() {\n return l.isFrozen();\n }, e.now = c, e.prewarm = function() {\n j().acquire(L);\n }, e.restoreNow = function() {\n l.restoreNow();\n }, e.setMaxParallelImageRequests = function(e2) {\n t.c.MAX_PARALLEL_IMAGE_REQUESTS = e2;\n }, e.setNow = function(e2) {\n l.setNow(e2);\n }, e.setRTLTextPlugin = function(e2, t2) {\n return ce().setRTLTextPlugin(e2, t2);\n }, e.setWorkerCount = function(e2) {\n k.workerCount = e2;\n }, e.setWorkerUrl = function(e2) {\n t.c.WORKER_URL = e2;\n };\n }));\n var maplibregl$1 = maplibregl2;\n return maplibregl$1;\n }));\n }\n });\n\n // src/web/logger/web-logger.ts\n var __DEV__ = true;\n var createLoggerMethod = (level) => {\n if (!__DEV__) {\n return () => {\n };\n }\n return (func, ...args) => {\n try {\n const message = {\n type: \"console\",\n payload: {\n level,\n args: [func, ...args]\n }\n };\n window.ReactNativeWebView?.postMessage(JSON.stringify(message));\n } catch {\n }\n };\n };\n var WebLogger = {\n debug: createLoggerMethod(\"debug\"),\n info: createLoggerMethod(\"info\"),\n error: createLoggerMethod(\"error\")\n };\n var web_logger_default = WebLogger;\n\n // src/web/bridge/ReactNativeBridge.ts\n var ReactNativeBridge = class {\n #mapController;\n constructor() {\n const messageHandler = (raw) => {\n try {\n web_logger_default.debug(this.constructor.name, raw?.data);\n const data = typeof raw?.data === \"string\" ? raw.data : raw;\n const message = JSON.parse(data);\n this.mapController?.handleMessage(message);\n } catch (error) {\n web_logger_default.error(this.constructor.name, error.message);\n }\n };\n document.addEventListener?.(\"message\", messageHandler);\n window.addEventListener?.(\"message\", messageHandler);\n }\n set mapController(controller) {\n this.#mapController = controller;\n }\n get mapController() {\n return this.#mapController;\n }\n postMessage(message) {\n web_logger_default.debug(this.postMessage.name, message);\n window.ReactNativeWebView?.postMessage(JSON.stringify(message));\n }\n };\n\n // src/web/maplibre-gl-js/MapController.ts\n var import_maplibre_gl = __toESM(require_maplibre_gl());\n\n // src/communication/messages.utils.ts\n var isWebObjectListenerOnObject = (listener) => {\n if (!listener) {\n return false;\n }\n return \"objectListener\" in listener;\n };\n var isWebObjectListenerOnMapLayer = (listener) => {\n if (!listener) {\n return false;\n }\n return \"layerListener\" in listener;\n };\n var isWebObjectListenerOnHTMLElement = (listener) => {\n if (!listener) {\n return false;\n }\n return \"elementListener\" in listener;\n };\n\n // src/web/maplibre-gl-js/MapController.ts\n var MapController = class {\n #reactNativeBridge;\n #objects = /* @__PURE__ */ new Map();\n #mapId;\n get reactNativeBridge() {\n if (!this.#reactNativeBridge) {\n throw new Error(\"React Native bridge not available\");\n }\n return this.#reactNativeBridge;\n }\n set reactNativeBridge(bridge) {\n this.#reactNativeBridge = bridge;\n }\n get map() {\n const map = this.#objects.get(this.#mapId ?? \"\");\n if (!map) {\n throw new Error(\"Map not available\");\n }\n return map;\n }\n handleMessage = (message) => {\n web_logger_default.info(this.handleMessage.name, message);\n switch (message.type) {\n case \"webObjectMount\": {\n this.#handleWebObjectMountMessage(message);\n break;\n }\n case \"webObjectUnmount\": {\n this.#handleWebObjectUnmountMessage(message);\n break;\n }\n case \"webObjectMethodCall\": {\n this.#handleWebObjectMethodCall(message).then();\n break;\n }\n }\n };\n #handleWebObjectMountMessage = (message) => {\n switch (message.payload.objectType) {\n case \"map\": {\n const container = document.getElementById(\"app\");\n const map = new import_maplibre_gl.default.Map({\n ...message.payload.options,\n container\n });\n this.#objects.set(message.payload.objectId, map);\n this.#mapId = message.payload.objectId;\n this.#setObjectListeners(\n map,\n message.payload.objectId,\n message.payload.listeners\n );\n break;\n }\n case \"marker\": {\n const element = this.#buildHTMLElement(message.payload.options.element);\n const marker = new import_maplibre_gl.default.Marker({\n ...message.payload.options,\n element\n }).setLngLat([0, 0]).addTo(this.map);\n this.#objects.set(message.payload.objectId, marker);\n this.#setObjectListeners(\n marker,\n message.payload.objectId,\n message.payload.listeners\n );\n break;\n }\n case \"popup\": {\n const popup = new import_maplibre_gl.default.Popup({\n ...message.payload.options\n });\n this.#objects.set(message.payload.objectId, popup);\n this.#setObjectListeners(\n popup,\n message.payload.objectId,\n message.payload.listeners\n );\n break;\n }\n }\n this.reactNativeBridge.postMessage({\n type: \"webObjectListenerEvent\",\n payload: {\n objectId: message.payload.objectId,\n eventName: \"mount\"\n }\n });\n };\n #handleWebObjectUnmountMessage = (message) => {\n const object = this.#objects.get(message.payload.objectId);\n if (!object) {\n return;\n }\n object.remove();\n this.#objects.delete(message.payload.objectId);\n this.reactNativeBridge.postMessage({\n type: \"webObjectListenerEvent\",\n payload: {\n objectId: message.payload.objectId,\n eventName: \"unmount\"\n }\n });\n };\n #handleWebObjectMethodCall = async (message) => {\n const object = this.#objects.get(message.payload.objectId);\n if (!object) {\n return;\n }\n let result;\n if (!this.#runIfSpecialMethod(message, object)) {\n result = await this.#runNormalMethod(message, object);\n }\n if (!(object instanceof import_maplibre_gl.default.Map)) {\n object.addTo(this.map);\n }\n this.reactNativeBridge.postMessage({\n type: \"webObjectMethodResponse\",\n payload: { requestId: message.payload.requestId, result }\n });\n };\n #runIfSpecialMethod = (message, object) => {\n if (object instanceof import_maplibre_gl.default.Marker) {\n switch (message.payload.method) {\n case \"addTo\": {\n object.addTo(this.map);\n return true;\n }\n case \"setEventedParent\": {\n const parentId = message.payload.args[0];\n const parent = this.#objects.get(parentId) ?? null;\n if (parent) {\n object.setEventedParent(parent);\n }\n return true;\n }\n case \"setPopup\": {\n const popupId = message.payload.args[0];\n const popup = this.#objects.get(popupId) ?? null;\n if (popup && popup instanceof import_maplibre_gl.default.Popup) {\n object.setPopup(popup);\n }\n return true;\n }\n }\n }\n if (object instanceof import_maplibre_gl.default.Popup) {\n switch (message.payload.method) {\n case \"addTo\": {\n object.addTo(this.map);\n return true;\n }\n case \"setEventedParent\": {\n const parentId = message.payload.args[0];\n const parent = this.#objects.get(parentId) ?? null;\n if (parent) {\n object.setEventedParent(parent);\n }\n return true;\n }\n }\n }\n return false;\n };\n #runNormalMethod = async (message, object) => {\n return await object[message.payload.method]?.(\n ...message.payload.args\n );\n };\n #buildHTMLElement = (descriptor) => {\n if (!descriptor) {\n return void 0;\n }\n const element = document.createElement(descriptor.tagName ?? \"div\");\n element.className = descriptor.className ?? \"\";\n if (descriptor.attributes) {\n for (const [name, value] of Object.entries(descriptor.attributes)) {\n element.setAttribute(name, value);\n }\n }\n if (descriptor.style) {\n Object.assign(element.style, descriptor.style);\n }\n if (descriptor.dataset) {\n for (const [name, value] of Object.entries(descriptor.dataset)) {\n ;\n element.dataset[name] = value;\n }\n }\n if (descriptor.innerHTML !== void 0) {\n element.innerHTML = descriptor.innerHTML;\n }\n return element;\n };\n #setObjectListeners = (object, objectId, listeners) => {\n if (!listeners) {\n return;\n }\n Object.entries(listeners).forEach(([eventName, listener]) => {\n const sendEventToReactNative = (event) => {\n delete event.target;\n this.reactNativeBridge.postMessage({\n type: \"webObjectListenerEvent\",\n payload: {\n objectId,\n eventName,\n event\n }\n });\n };\n if (isWebObjectListenerOnObject(listener)) {\n object.on(eventName, sendEventToReactNative);\n }\n if (isWebObjectListenerOnMapLayer(listener)) {\n if (object instanceof import_maplibre_gl.default.Map) {\n object.on(\n eventName,\n listener.layerId,\n sendEventToReactNative\n );\n }\n }\n if (isWebObjectListenerOnHTMLElement(listener)) {\n if (!(object instanceof import_maplibre_gl.default.Map)) {\n object.getElement().addEventListener(eventName, sendEventToReactNative);\n }\n }\n });\n };\n };\n\n // src/web/generated/index.ts\n var main = () => {\n const controller = new MapController();\n const bridge = new ReactNativeBridge();\n controller.reactNativeBridge = bridge;\n bridge.mapController = controller;\n bridge.postMessage({ type: \"ready\" });\n };\n main();\n})();\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl.js:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.14.0/LICENSE.txt\n *)\n*/\n</script></body>\n</html>\n";
2
+ //# sourceMappingURL=webview_static_html.d.ts.map