@vcmap/ui 5.0.0-rc.22 → 5.0.0-rc.24

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 (425) hide show
  1. package/README.md +38 -20
  2. package/app.config.json +3 -0
  3. package/build/.eslintrc +3 -0
  4. package/build/build.js +184 -174
  5. package/build/buildCesium.js +32 -19
  6. package/build/buildHelpers.js +117 -48
  7. package/build/buildPreview.js +9 -6
  8. package/build/commonViteConfig.js +1 -3
  9. package/build/determineHost.js +17 -4
  10. package/build/generateOLLib.js +13 -16
  11. package/build/getPluginProxies.js +16 -3
  12. package/build/info/conf.json +21 -21
  13. package/build/info/publish.js +15 -4
  14. package/config/aerowest.config.json +18 -44
  15. package/config/base.config.json +72 -246
  16. package/config/codes.config.json +4 -0
  17. package/config/dev.config.json +11 -13
  18. package/config/graphFeatureInfo.config.json +58 -17
  19. package/config/projects.config.json +30 -0
  20. package/config/www.config.json +98 -297
  21. package/dist/assets/cesium/Workers/{ArcType-ce2e50ab.js → ArcType-2d9abbbc.js} +4 -4
  22. package/dist/assets/cesium/Workers/{AttributeCompression-b646d393.js → AttributeCompression-f9f6c717.js} +24 -24
  23. package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-ff186ccc.js → AxisAlignedBoundingBox-85d9e53a.js} +3 -3
  24. package/dist/assets/cesium/Workers/{BoundingRectangle-be5924f4.js → BoundingRectangle-1ee7eb47.js} +18 -18
  25. package/dist/assets/cesium/Workers/{BoxGeometry-12eeccaf.js → BoxGeometry-3b2be784.js} +9 -9
  26. package/dist/assets/cesium/Workers/{Check-666ab1a0.js → Check-6ede7e26.js} +22 -22
  27. package/dist/assets/cesium/Workers/{Color-a84038cb.js → Color-f107c84d.js} +59 -59
  28. package/dist/assets/cesium/Workers/{ComponentDatatype-f7b11d02.js → ComponentDatatype-cf1fa08e.js} +16 -16
  29. package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-3272c1b3.js → CoplanarPolygonGeometryLibrary-78d71993.js} +1 -1
  30. package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-0170e093.js → CorridorGeometryLibrary-50d99b33.js} +1 -1
  31. package/dist/assets/cesium/Workers/{CylinderGeometry-7c5da648.js → CylinderGeometry-51b0d9bf.js} +12 -12
  32. package/dist/assets/cesium/Workers/{CylinderGeometryLibrary-372c07d8.js → CylinderGeometryLibrary-7bf291b4.js} +1 -1
  33. package/dist/assets/cesium/Workers/{EllipseGeometry-797d580e.js → EllipseGeometry-bcfb5d87.js} +20 -20
  34. package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-2939e1dc.js → EllipseGeometryLibrary-e94f8472.js} +1 -1
  35. package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-8b50870f.js → EllipseOutlineGeometry-28e3a1bb.js} +15 -15
  36. package/dist/assets/cesium/Workers/{EllipsoidGeodesic-98c62a56.js → EllipsoidGeodesic-5b3623dc.js} +6 -6
  37. package/dist/assets/cesium/Workers/{EllipsoidGeometry-21c0e3a5.js → EllipsoidGeometry-b222fa63.js} +14 -14
  38. package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-eff247c8.js → EllipsoidOutlineGeometry-38a3fb5b.js} +15 -15
  39. package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-19756602.js → EllipsoidRhumbLine-ef872433.js} +9 -9
  40. package/dist/assets/cesium/Workers/{EllipsoidTangentPlane-214683dc.js → EllipsoidTangentPlane-8c89f28c.js} +1 -1
  41. package/dist/assets/cesium/Workers/{EncodedCartesian3-81f70735.js → EncodedCartesian3-57415c8a.js} +6 -6
  42. package/dist/assets/cesium/Workers/{FrustumGeometry-ac42a6d9.js → FrustumGeometry-bdd3a04d.js} +139 -111
  43. package/dist/assets/cesium/Workers/{GeometryAttribute-7d6f1732.js → GeometryAttribute-153115c5.js} +20 -20
  44. package/dist/assets/cesium/Workers/{GeometryAttributes-f06a2792.js → GeometryAttributes-ad136444.js} +1 -1
  45. package/dist/assets/cesium/Workers/{GeometryInstance-451dc1cd.js → GeometryInstance-34d9e21e.js} +6 -6
  46. package/dist/assets/cesium/Workers/{GeometryPipeline-ce4339ed.js → GeometryPipeline-acb2399c.js} +22 -22
  47. package/dist/assets/cesium/Workers/{IndexDatatype-a55ceaa1.js → IndexDatatype-2643aa47.js} +13 -13
  48. package/dist/assets/cesium/Workers/{IntersectionTests-f6e6bd8a.js → IntersectionTests-271e513e.js} +37 -37
  49. package/dist/assets/cesium/Workers/{Math-2dbd6b93.js → Math-0a2ac845.js} +149 -139
  50. package/dist/assets/cesium/Workers/{Matrix2-13178034.js → Matrix2-e1298525.js} +256 -256
  51. package/dist/assets/cesium/Workers/{Matrix3-315394f6.js → Matrix3-41c58dde.js} +150 -150
  52. package/dist/assets/cesium/Workers/{OrientedBoundingBox-04920dc7.js → OrientedBoundingBox-5e04e31f.js} +19 -17
  53. package/dist/assets/cesium/Workers/{Plane-900aa728.js → Plane-4c3d403b.js} +5 -5
  54. package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-a8680d96.js → PolygonGeometryLibrary-6762b65b.js} +6 -6
  55. package/dist/assets/cesium/Workers/PolygonPipeline-7dc7a431.js +1344 -0
  56. package/dist/assets/cesium/Workers/{PolylinePipeline-32f36d2a.js → PolylinePipeline-15fde655.js} +16 -16
  57. package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-a510d657.js → PolylineVolumeGeometryLibrary-ba7dfed5.js} +7 -7
  58. package/dist/assets/cesium/Workers/{PrimitivePipeline-ba38434a.js → PrimitivePipeline-68f0b9a2.js} +6 -6
  59. package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-bdba697e.js → RectangleGeometryLibrary-8eaf23da.js} +1 -1
  60. package/dist/assets/cesium/Workers/{RuntimeError-06c93819.js → RuntimeError-ef395448.js} +5 -5
  61. package/dist/assets/cesium/Workers/{TerrainEncoding-833187da.js → TerrainEncoding-eb8a645a.js} +30 -30
  62. package/dist/assets/cesium/Workers/Transforms-f6451f99.js +14698 -0
  63. package/dist/assets/cesium/Workers/{VertexFormat-6b480673.js → VertexFormat-030f11ff.js} +14 -14
  64. package/dist/assets/cesium/Workers/{WallGeometryLibrary-919eed92.js → WallGeometryLibrary-feef3109.js} +1 -1
  65. package/dist/assets/cesium/Workers/{WebGLConstants-a8cc3e8c.js → WebGLConstants-0b1ce7ba.js} +1 -1
  66. package/dist/assets/cesium/Workers/{WebMercatorProjection-13a90d41.js → WebMercatorProjection-13ed1a6e.js} +6 -6
  67. package/dist/assets/cesium/Workers/{arrayRemoveDuplicates-c2038105.js → arrayRemoveDuplicates-d2061e85.js} +5 -5
  68. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +5 -5
  69. package/dist/assets/cesium/Workers/{combine-ca22a614.js → combine-d9581036.js} +5 -5
  70. package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
  71. package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
  72. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +9 -9
  73. package/dist/assets/cesium/Workers/createCircleGeometry.js +13 -13
  74. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +13 -13
  75. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +11 -11
  76. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +9 -9
  77. package/dist/assets/cesium/Workers/createCorridorGeometry.js +14 -14
  78. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +12 -12
  79. package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
  80. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +13 -13
  81. package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
  82. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  83. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
  84. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  85. package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
  86. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +8 -8
  87. package/dist/assets/cesium/Workers/createGeometry.js +1 -1
  88. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +33 -33
  89. package/dist/assets/cesium/Workers/createPlaneGeometry.js +8 -8
  90. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +6 -6
  91. package/dist/assets/cesium/Workers/createPolygonGeometry.js +25 -25
  92. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +17 -17
  93. package/dist/assets/cesium/Workers/createPolylineGeometry.js +11 -11
  94. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +9 -9
  95. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +9 -9
  96. package/dist/assets/cesium/Workers/createRectangleGeometry.js +16 -16
  97. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +12 -12
  98. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +10 -10
  99. package/dist/assets/cesium/Workers/createSphereGeometry.js +11 -11
  100. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +12 -12
  101. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +2 -2
  102. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
  103. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +8 -8
  104. package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
  105. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
  106. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
  107. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  108. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +27 -28
  109. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +33 -38
  110. package/dist/assets/cesium/Workers/createWallGeometry.js +14 -14
  111. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +14 -14
  112. package/dist/assets/cesium/Workers/decodeDraco.js +10 -2
  113. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +15 -15
  114. package/dist/assets/cesium/Workers/decodeI3S.js +1 -1
  115. package/dist/assets/cesium/Workers/{defaultValue-0a909f67.js → defaultValue-fe22d8c0.js} +2 -2
  116. package/dist/assets/cesium/Workers/package.js +1 -1
  117. package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -26
  118. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  119. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +24 -24
  120. package/dist/assets/{cesium.88cffd.js → cesium.253914.js} +36578 -33768
  121. package/dist/assets/cesium.js +1 -1
  122. package/dist/assets/{core.a66593.js → core.3a8205.js} +7824 -5377
  123. package/dist/assets/core.js +1 -1
  124. package/dist/assets/index.91ae2d55.js +1 -0
  125. package/dist/assets/{ol.d4539f.js → ol.1c946a.js} +5550 -5491
  126. package/dist/assets/ol.js +1 -1
  127. package/dist/assets/ui.0025be.css +5 -0
  128. package/dist/assets/{ui.d760e4.js → ui.0025be.js} +6260 -5164
  129. package/dist/assets/ui.js +1 -1
  130. package/dist/assets/vue.js +2 -2
  131. package/dist/assets/{vuetify.427322.css → vuetify.6efa21.css} +2 -2
  132. package/dist/assets/{vuetify.427322.js → vuetify.6efa21.js} +1 -1
  133. package/dist/assets/vuetify.js +2 -2
  134. package/dist/index.html +27 -7
  135. package/index.html +26 -6
  136. package/index.js +68 -15
  137. package/lib/cesium.js +1 -1
  138. package/lib/core.js +1 -1
  139. package/lib/ui.js +1 -1
  140. package/lib/vue.js +2 -2
  141. package/lib/vuetify.js +2 -2
  142. package/package.json +19 -10
  143. package/plugins/.eslintrc +9 -0
  144. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +13 -9
  145. package/plugins/@vcmap/create-link/index.js +15 -6
  146. package/plugins/@vcmap/project-selector/{ContextsListComponent.vue → ModulesListComponent.vue} +14 -18
  147. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +19 -24
  148. package/plugins/@vcmap/project-selector/README.md +16 -20
  149. package/plugins/@vcmap/project-selector/config.json +13 -13
  150. package/plugins/@vcmap/project-selector/de.json +4 -1
  151. package/plugins/@vcmap/project-selector/en.json +4 -1
  152. package/plugins/@vcmap/project-selector/index.js +117 -107
  153. package/plugins/@vcmap/search-nominatim/LICENSE.md +5 -6
  154. package/plugins/@vcmap/search-nominatim/README.md +2 -1
  155. package/plugins/@vcmap/search-nominatim/config.json +1 -2
  156. package/plugins/@vcmap/search-nominatim/index.js +7 -4
  157. package/plugins/@vcmap/search-nominatim/nominatim.js +7 -2
  158. package/plugins/@vcmap/search-nominatim/package.json +2 -36
  159. package/plugins/@vcmap/simple-graph/README.md +29 -9
  160. package/plugins/@vcmap/simple-graph/SimpleGraphComponent.vue +2 -7
  161. package/plugins/@vcmap/simple-graph/index.js +2 -2
  162. package/plugins/@vcmap/simple-graph/simpleGraphView.js +3 -1
  163. package/plugins/@vcmap/theme-changer/README.md +5 -3
  164. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +6 -10
  165. package/plugins/@vcmap/theme-changer/config.json +67 -67
  166. package/plugins/@vcmap/theme-changer/index.js +11 -5
  167. package/plugins/@vcmap-show-case/buttons-example/ButtonsExample.vue +76 -11
  168. package/plugins/@vcmap-show-case/buttons-example/index.js +10 -8
  169. package/plugins/@vcmap-show-case/category-tester/Categories.vue +144 -117
  170. package/plugins/@vcmap-show-case/category-tester/Category.vue +46 -29
  171. package/plugins/@vcmap-show-case/category-tester/index.js +9 -3
  172. package/plugins/@vcmap-show-case/config-editor/ConfigEditor.vue +62 -0
  173. package/plugins/@vcmap-show-case/config-editor/index.js +13 -11
  174. package/plugins/@vcmap-show-case/context-menu-tester/index.js +18 -10
  175. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +97 -109
  176. package/plugins/@vcmap-show-case/form-inputs-example/config.json +3 -3
  177. package/plugins/@vcmap-show-case/form-inputs-example/exampleActions.js +14 -4
  178. package/plugins/@vcmap-show-case/form-inputs-example/index.js +42 -19
  179. package/plugins/@vcmap-show-case/form-inputs-example/validation.js +2 -1
  180. package/plugins/@vcmap-show-case/icons-example/README.md +1 -1
  181. package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +10 -10
  182. package/plugins/@vcmap-show-case/icons-example/index.js +10 -8
  183. package/plugins/@vcmap-show-case/list-example/ListExample.vue +221 -103
  184. package/plugins/@vcmap-show-case/list-example/index.js +10 -8
  185. package/plugins/@vcmap-show-case/notifier-tester/index.js +9 -3
  186. package/plugins/@vcmap-show-case/notifier-tester/notifierTester.vue +15 -21
  187. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +183 -0
  188. package/plugins/@vcmap-show-case/table-example/README.md +3 -0
  189. package/plugins/@vcmap-show-case/table-example/index.js +49 -0
  190. package/plugins/@vcmap-show-case/table-example/package.json +5 -0
  191. package/plugins/@vcmap-show-case/textfields-example/TextfieldsExample.vue +7 -30
  192. package/plugins/@vcmap-show-case/textfields-example/index.js +10 -4
  193. package/plugins/@vcmap-show-case/window-tester/WindowExample.vue +16 -13
  194. package/plugins/@vcmap-show-case/window-tester/emptyComponent.vue +4 -7
  195. package/plugins/@vcmap-show-case/window-tester/index.js +26 -20
  196. package/plugins/@vcmap-show-case/window-tester/myCustomHeader.vue +7 -3
  197. package/plugins/@vcmap-show-case/window-tester/toolbox-data.js +82 -5
  198. package/plugins/@vcmap-show-case/window-tester/windowExampleContent.vue +3 -7
  199. package/plugins/@vcmap-show-case/wizard-example/index.js +9 -3
  200. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +36 -38
  201. package/src/actions/actionHelper.js +64 -37
  202. package/src/actions/styleSelector.vue +40 -24
  203. package/src/application/VcsApp.vue +117 -80
  204. package/src/application/VcsAttributions.vue +8 -9
  205. package/src/application/VcsAttributionsFooter.vue +12 -9
  206. package/src/application/VcsMap.vue +9 -5
  207. package/src/application/VcsNavbar.vue +44 -27
  208. package/src/application/VcsSettings.vue +5 -12
  209. package/src/application/attributionsHelper.js +23 -11
  210. package/src/application/vcsAppWrapper.vue +1 -3
  211. package/src/components/buttons/VcsActionButtonList.vue +20 -17
  212. package/src/components/buttons/VcsButton.vue +19 -23
  213. package/src/components/buttons/VcsFormButton.vue +176 -0
  214. package/src/components/form-inputs-controls/VcsCheckbox.vue +6 -7
  215. package/src/components/form-inputs-controls/VcsDatePicker.vue +142 -0
  216. package/src/components/form-inputs-controls/VcsFormSection.vue +11 -12
  217. package/src/components/form-inputs-controls/VcsLabel.vue +9 -10
  218. package/src/components/form-inputs-controls/VcsRadio.vue +44 -44
  219. package/src/components/form-inputs-controls/VcsSelect.vue +16 -13
  220. package/src/components/form-inputs-controls/VcsTextArea.vue +21 -14
  221. package/src/components/form-inputs-controls/VcsTextField.vue +44 -19
  222. package/src/components/form-inputs-controls/VcsWizard.vue +79 -77
  223. package/src/components/form-inputs-controls/VcsWizardStep.vue +20 -20
  224. package/src/components/form-inputs-controls/composables.js +13 -8
  225. package/src/components/form-output/VcsFormattedNumber.vue +26 -26
  226. package/src/components/icons/+all.js +13 -5
  227. package/src/components/icons/2DAreaIcon.vue +62 -10
  228. package/src/components/icons/2DDistanceIcon.vue +14 -2
  229. package/src/components/icons/3DAreaIcon.vue +62 -10
  230. package/src/components/icons/3DDistanceIcon.vue +14 -2
  231. package/src/components/icons/3DHeightIcon.vue +14 -2
  232. package/src/components/icons/AngleIcon.vue +12 -3
  233. package/src/components/icons/AssociationsIcon.vue +6 -1
  234. package/src/components/icons/AxisIcon.vue +34 -5
  235. package/src/components/icons/BoundingBoxIcon.vue +31 -5
  236. package/src/components/icons/CheckboxCheckedIcon.vue +4 -1
  237. package/src/components/icons/CheckboxIcon.vue +1 -8
  238. package/src/components/icons/CheckboxIndeterminateIcon.vue +9 -2
  239. package/src/components/icons/CircleIcon.vue +24 -4
  240. package/src/components/icons/ClippingHorizontalIcon.vue +14 -2
  241. package/src/components/icons/ClippingIcon.vue +13 -2
  242. package/src/components/icons/ClippingVerticalIcon.vue +14 -2
  243. package/src/components/icons/ColorPickerIcon.vue +13 -2
  244. package/src/components/icons/ColorSwatchIcon.vue +7 -1
  245. package/src/components/icons/CommentIcon.vue +6 -1
  246. package/src/components/icons/CompassIcon.vue +21 -3
  247. package/src/components/icons/ComponentsIcon.vue +14 -2
  248. package/src/components/icons/ConeIcon.vue +26 -4
  249. package/src/components/icons/DimensionsHouseIcon.vue +7 -1
  250. package/src/components/icons/EditIcon.vue +13 -2
  251. package/src/components/icons/ElevationProfileIcon.vue +6 -1
  252. package/src/components/icons/ExportAreaIcon.vue +13 -2
  253. package/src/components/icons/ExportFlightIcon.vue +13 -2
  254. package/src/components/icons/ExportIcon.vue +14 -2
  255. package/src/components/icons/ExternalLinkIcon.vue +18 -3
  256. package/src/components/icons/EyeIcon.vue +12 -2
  257. package/src/components/icons/FastForwardIcon.vue +13 -2
  258. package/src/components/icons/FilterIcon.vue +13 -2
  259. package/src/components/icons/GlobalTerrainIcon.vue +12 -2
  260. package/src/components/icons/GlobeNatureIcon.vue +7 -1
  261. package/src/components/icons/GroundIcon.vue +12 -2
  262. package/src/components/icons/HealthCareIndustriesIcon.vue +6 -1
  263. package/src/components/icons/HelpIcon.vue +12 -2
  264. package/src/components/icons/HideIcon.vue +17 -3
  265. package/src/components/icons/HomePointIcon.vue +13 -3
  266. package/src/components/icons/HospitalsIcon.vue +6 -1
  267. package/src/components/icons/HouseIcon.vue +20 -3
  268. package/src/components/icons/ImportIcon.vue +21 -3
  269. package/src/components/icons/InfoIcon.vue +19 -3
  270. package/src/components/icons/KebabIcon.vue +12 -2
  271. package/src/components/icons/LabelIcon.vue +21 -3
  272. package/src/components/icons/LayersIcon.vue +12 -2
  273. package/src/components/icons/LegendIcon.vue +20 -60
  274. package/src/components/icons/LineIcon.vue +20 -3
  275. package/src/components/icons/LinkIcon.vue +13 -2
  276. package/src/components/icons/LogoutIcon.vue +13 -2
  277. package/src/components/icons/MapIcon.vue +14 -2
  278. package/src/components/icons/MenuIcon.vue +7 -1
  279. package/src/components/icons/MinusIcon.vue +14 -2
  280. package/src/components/icons/ObjectAttributeIcon.vue +13 -2
  281. package/src/components/icons/ObjectSelectIcon.vue +14 -2
  282. package/src/components/icons/ObliqueViewIcon.vue +11 -2
  283. package/src/components/icons/PdfIcon.vue +12 -2
  284. package/src/components/icons/PedestrianIcon.vue +13 -2
  285. package/src/components/icons/PenIcon.vue +13 -3
  286. package/src/components/icons/PlayCircleIcon.vue +20 -3
  287. package/src/components/icons/PlusIcon.vue +14 -3
  288. package/src/components/icons/PoiIcon.vue +17 -3
  289. package/src/components/icons/PointSelectIcon.vue +12 -2
  290. package/src/components/icons/PolygonIcon.vue +7 -1
  291. package/src/components/icons/PresentationModeIcon.vue +13 -2
  292. package/src/components/icons/ProgressIcon.vue +8 -6
  293. package/src/components/icons/QueryIcon.vue +31 -5
  294. package/src/components/icons/RectangleIcon.vue +24 -4
  295. package/src/components/icons/ReturnIcon.vue +13 -2
  296. package/src/components/icons/RewindIcon.vue +13 -2
  297. package/src/components/icons/RotateLeftIcon.vue +13 -2
  298. package/src/components/icons/RotateRightIcon.vue +13 -2
  299. package/src/components/icons/ScreenshotIcon.vue +52 -10
  300. package/src/components/icons/SearchIcon.vue +13 -3
  301. package/src/components/icons/ShadowIcon.vue +14 -3
  302. package/src/components/icons/ShapesIcon.vue +13 -3
  303. package/src/components/icons/ShareIcon.vue +17 -4
  304. package/src/components/icons/SimpleCircleFilledIcon.vue +14 -10
  305. package/src/components/icons/SimpleCircleHalfFilledIcon.vue +6 -1
  306. package/src/components/icons/SimpleCircleOutlinedIcon.vue +14 -10
  307. package/src/components/icons/SkipNextIcon.vue +11 -2
  308. package/src/components/icons/SkipPreviousIcon.vue +17 -3
  309. package/src/components/icons/SplitViewIcon.vue +6 -1
  310. package/src/components/icons/TerrainBoxIcon.vue +12 -2
  311. package/src/components/icons/TextStyleIcon.vue +7 -1
  312. package/src/components/icons/ThreeDimensionsIcon.vue +13 -2
  313. package/src/components/icons/ToolsIcon.vue +12 -2
  314. package/src/components/icons/TouchIcon.vue +13 -2
  315. package/src/components/icons/TrashCanIcon.vue +13 -2
  316. package/src/components/icons/TriangleIcon.vue +6 -2
  317. package/src/components/icons/TwoDimensionsIcon.vue +14 -2
  318. package/src/components/icons/UploadIcon.vue +13 -2
  319. package/src/components/icons/UserProfileIcon.vue +13 -2
  320. package/src/components/icons/UserShareIcon.vue +12 -2
  321. package/src/components/icons/VideoRecorderIcon.vue +16 -3
  322. package/src/components/icons/ViewpointFlightIcon.vue +22 -4
  323. package/src/components/icons/ViewpointIcon.vue +22 -4
  324. package/src/components/icons/Viewshed360Icon.vue +14 -2
  325. package/src/components/icons/ViewshedConeIcon.vue +13 -2
  326. package/src/components/icons/ViewshedIcon.vue +14 -2
  327. package/src/components/icons/WalkingIcon.vue +13 -2
  328. package/src/components/icons/WallIcon.vue +19 -3
  329. package/src/components/icons/WandIcon.vue +129 -21
  330. package/src/components/imageElementInjector.vue +1 -3
  331. package/src/components/lists/VcsActionList.vue +21 -18
  332. package/src/components/lists/VcsList.vue +226 -97
  333. package/src/components/lists/VcsTreeview.vue +30 -26
  334. package/src/components/lists/VcsTreeviewLeaf.vue +23 -22
  335. package/src/components/lists/VcsTreeviewSearchbar.vue +19 -15
  336. package/src/components/notification/VcsBadge.vue +4 -6
  337. package/src/components/notification/VcsTooltip.vue +95 -94
  338. package/src/components/notification/validation.js +1 -1
  339. package/src/components/tables/VcsDataTable.vue +398 -0
  340. package/src/components/tables/VcsTable.vue +63 -300
  341. package/src/contentTree/LayerTree.vue +2 -3
  342. package/src/contentTree/contentTreeCollection.js +49 -23
  343. package/src/contentTree/contentTreeItem.js +36 -14
  344. package/src/contentTree/groupContentTreeItem.js +44 -22
  345. package/src/contentTree/layerContentTreeItem.js +45 -20
  346. package/src/contentTree/layerGroupContentTreeItem.js +53 -31
  347. package/src/contentTree/nodeContentTreeItem.js +18 -7
  348. package/src/contentTree/obliqueCollectionContentTreeItem.js +45 -20
  349. package/src/contentTree/subContentTreeItem.js +13 -4
  350. package/src/contentTree/vcsObjectContentTreeItem.js +24 -15
  351. package/src/contentTree/viewpointContentTreeItem.js +19 -6
  352. package/src/downloadHelper.js +52 -0
  353. package/src/featureInfo/AddressBalloonComponent.vue +11 -16
  354. package/src/featureInfo/BalloonComponent.vue +41 -31
  355. package/src/featureInfo/abstractFeatureInfoView.js +30 -14
  356. package/src/featureInfo/addressBalloonFeatureInfoView.js +19 -7
  357. package/src/featureInfo/balloonFeatureInfoView.js +22 -9
  358. package/src/featureInfo/balloonHelper.js +61 -42
  359. package/src/featureInfo/featureInfo.js +74 -34
  360. package/src/featureInfo/featureInfoInteraction.js +13 -7
  361. package/src/featureInfo/iframeFeatureInfoView.js +3 -1
  362. package/src/featureInfo/tableFeatureInfoView.js +15 -5
  363. package/src/i18n/de.js +8 -0
  364. package/src/i18n/en.js +8 -0
  365. package/src/i18n/i18nCollection.js +183 -155
  366. package/src/init.js +124 -38
  367. package/src/legend/legendHelper.js +11 -6
  368. package/src/legend/styleLegendItem.vue +18 -12
  369. package/src/legend/vcsLegend.vue +15 -17
  370. package/src/manager/buttonManager.js +6 -3
  371. package/src/manager/categoryManager/CategoryComponent.vue +99 -63
  372. package/src/manager/categoryManager/CategoryComponentList.vue +33 -8
  373. package/src/manager/categoryManager/CategoryManager.vue +23 -11
  374. package/src/manager/categoryManager/categoryManager.js +90 -45
  375. package/src/manager/contextMenu/contextMenuComponent.vue +2 -6
  376. package/src/manager/contextMenu/contextMenuInteraction.js +6 -1
  377. package/src/manager/contextMenu/contextMenuManager.js +37 -22
  378. package/src/manager/navbarManager.js +28 -3
  379. package/src/manager/toolbox/GroupToolboxComponent.vue +22 -21
  380. package/src/manager/toolbox/SelectToolboxComponent.vue +36 -35
  381. package/src/manager/toolbox/ToolboxManager.vue +18 -10
  382. package/src/manager/toolbox/toolboxManager.js +30 -12
  383. package/src/manager/window/WindowComponent.vue +24 -32
  384. package/src/manager/window/WindowComponentHeader.vue +38 -28
  385. package/src/manager/window/WindowManager.vue +45 -35
  386. package/src/manager/window/windowHelper.js +80 -24
  387. package/src/manager/window/windowManager.js +79 -39
  388. package/src/navigation/mapNavCompass.vue +18 -4
  389. package/src/navigation/mapNavigation.vue +65 -46
  390. package/src/navigation/obliqueRotation.vue +34 -13
  391. package/src/navigation/orientationToolsButton.vue +6 -10
  392. package/src/navigation/overviewMap.js +76 -45
  393. package/src/navigation/overviewMapClickedInteraction.js +6 -1
  394. package/src/navigation/tiltSlider.vue +6 -10
  395. package/src/navigation/vcsCompass.vue +1 -9
  396. package/src/navigation/vcsZoomButton.vue +36 -11
  397. package/src/notifier/notifier.js +22 -13
  398. package/src/notifier/notifierComponent.vue +21 -21
  399. package/src/pluginHelper.js +39 -5
  400. package/src/search/resultItem.vue +10 -15
  401. package/src/search/resultsComponent.vue +30 -24
  402. package/src/search/search.js +48 -22
  403. package/src/search/searchComponent.vue +35 -10
  404. package/src/setup.js +9 -9
  405. package/src/state.js +28 -12
  406. package/src/styles/_typography.scss +0 -1
  407. package/src/styles/shades.scss +4 -2
  408. package/src/styles/utils/_border.scss +1 -1
  409. package/src/styles/utils/_display.scss +1 -1
  410. package/src/styles/variables.scss +39 -34
  411. package/src/styles/vcsFont.scss +6 -5
  412. package/src/styles/vcsGrid.scss +9 -0
  413. package/src/uiConfig.js +6 -4
  414. package/src/vcsUiApp.js +192 -91
  415. package/src/vuePlugins/i18n.js +5 -4
  416. package/src/vuePlugins/vuetify.js +4 -0
  417. package/start.js +8 -2
  418. package/dist/assets/cesium/Workers/PolygonPipeline-844aab0a.js +0 -1345
  419. package/dist/assets/cesium/Workers/Transforms-40229881.js +0 -14696
  420. package/dist/assets/index.8b833ead.js +0 -1
  421. package/dist/assets/ui.d760e4.css +0 -5
  422. package/map.config.json +0 -44
  423. package/plugins/@vcmap-show-case/config-editor/editor.vue +0 -66
  424. /package/dist/assets/cesium/Workers/{GeometryOffsetAttribute-04332ce7.js → GeometryOffsetAttribute-9ad0019c.js} +0 -0
  425. /package/dist/assets/{vue.db5102.js → vue.c1ece7.js} +0 -0
@@ -0,0 +1,1344 @@
1
+ define(['exports', './Math-0a2ac845', './Matrix2-e1298525', './Matrix3-41c58dde', './Check-6ede7e26', './ComponentDatatype-cf1fa08e', './defaultValue-fe22d8c0', './EllipsoidRhumbLine-ef872433', './GeometryAttribute-153115c5', './WebGLConstants-0b1ce7ba'], (function (exports, Math$1, Matrix2, Matrix3, Check, ComponentDatatype, defaultValue, EllipsoidRhumbLine, GeometryAttribute, WebGLConstants) { 'use strict';
2
+
3
+ var earcut$2 = {exports: {}};
4
+
5
+ earcut$2.exports = earcut;
6
+ earcut$2.exports.default = earcut;
7
+
8
+ function earcut(data, holeIndices, dim) {
9
+
10
+ dim = dim || 2;
11
+
12
+ var hasHoles = holeIndices && holeIndices.length,
13
+ outerLen = hasHoles ? holeIndices[0] * dim : data.length,
14
+ outerNode = linkedList(data, 0, outerLen, dim, true),
15
+ triangles = [];
16
+
17
+ if (!outerNode || outerNode.next === outerNode.prev) return triangles;
18
+
19
+ var minX, minY, maxX, maxY, x, y, invSize;
20
+
21
+ if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
22
+
23
+ // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
24
+ if (data.length > 80 * dim) {
25
+ minX = maxX = data[0];
26
+ minY = maxY = data[1];
27
+
28
+ for (var i = dim; i < outerLen; i += dim) {
29
+ x = data[i];
30
+ y = data[i + 1];
31
+ if (x < minX) minX = x;
32
+ if (y < minY) minY = y;
33
+ if (x > maxX) maxX = x;
34
+ if (y > maxY) maxY = y;
35
+ }
36
+
37
+ // minX, minY and invSize are later used to transform coords into integers for z-order calculation
38
+ invSize = Math.max(maxX - minX, maxY - minY);
39
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
40
+ }
41
+
42
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
43
+
44
+ return triangles;
45
+ }
46
+
47
+ // create a circular doubly linked list from polygon points in the specified winding order
48
+ function linkedList(data, start, end, dim, clockwise) {
49
+ var i, last;
50
+
51
+ if (clockwise === (signedArea(data, start, end, dim) > 0)) {
52
+ for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
53
+ } else {
54
+ for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
55
+ }
56
+
57
+ if (last && equals(last, last.next)) {
58
+ removeNode(last);
59
+ last = last.next;
60
+ }
61
+
62
+ return last;
63
+ }
64
+
65
+ // eliminate colinear or duplicate points
66
+ function filterPoints(start, end) {
67
+ if (!start) return start;
68
+ if (!end) end = start;
69
+
70
+ var p = start,
71
+ again;
72
+ do {
73
+ again = false;
74
+
75
+ if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
76
+ removeNode(p);
77
+ p = end = p.prev;
78
+ if (p === p.next) break;
79
+ again = true;
80
+
81
+ } else {
82
+ p = p.next;
83
+ }
84
+ } while (again || p !== end);
85
+
86
+ return end;
87
+ }
88
+
89
+ // main ear slicing loop which triangulates a polygon (given as a linked list)
90
+ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
91
+ if (!ear) return;
92
+
93
+ // interlink polygon nodes in z-order
94
+ if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
95
+
96
+ var stop = ear,
97
+ prev, next;
98
+
99
+ // iterate through ears, slicing them one by one
100
+ while (ear.prev !== ear.next) {
101
+ prev = ear.prev;
102
+ next = ear.next;
103
+
104
+ if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
105
+ // cut off the triangle
106
+ triangles.push(prev.i / dim | 0);
107
+ triangles.push(ear.i / dim | 0);
108
+ triangles.push(next.i / dim | 0);
109
+
110
+ removeNode(ear);
111
+
112
+ // skipping the next vertex leads to less sliver triangles
113
+ ear = next.next;
114
+ stop = next.next;
115
+
116
+ continue;
117
+ }
118
+
119
+ ear = next;
120
+
121
+ // if we looped through the whole remaining polygon and can't find any more ears
122
+ if (ear === stop) {
123
+ // try filtering points and slicing again
124
+ if (!pass) {
125
+ earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
126
+
127
+ // if this didn't work, try curing all small self-intersections locally
128
+ } else if (pass === 1) {
129
+ ear = cureLocalIntersections(filterPoints(ear), triangles, dim);
130
+ earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
131
+
132
+ // as a last resort, try splitting the remaining polygon into two
133
+ } else if (pass === 2) {
134
+ splitEarcut(ear, triangles, dim, minX, minY, invSize);
135
+ }
136
+
137
+ break;
138
+ }
139
+ }
140
+ }
141
+
142
+ // check whether a polygon node forms a valid ear with adjacent nodes
143
+ function isEar(ear) {
144
+ var a = ear.prev,
145
+ b = ear,
146
+ c = ear.next;
147
+
148
+ if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
149
+
150
+ // now make sure we don't have other points inside the potential ear
151
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
152
+
153
+ // triangle bbox; min & max are calculated like this for speed
154
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
155
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
156
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
157
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
158
+
159
+ var p = c.next;
160
+ while (p !== a) {
161
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&
162
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&
163
+ area(p.prev, p, p.next) >= 0) return false;
164
+ p = p.next;
165
+ }
166
+
167
+ return true;
168
+ }
169
+
170
+ function isEarHashed(ear, minX, minY, invSize) {
171
+ var a = ear.prev,
172
+ b = ear,
173
+ c = ear.next;
174
+
175
+ if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
176
+
177
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
178
+
179
+ // triangle bbox; min & max are calculated like this for speed
180
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
181
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
182
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
183
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
184
+
185
+ // z-order range for the current triangle bbox;
186
+ var minZ = zOrder(x0, y0, minX, minY, invSize),
187
+ maxZ = zOrder(x1, y1, minX, minY, invSize);
188
+
189
+ var p = ear.prevZ,
190
+ n = ear.nextZ;
191
+
192
+ // look for points inside the triangle in both directions
193
+ while (p && p.z >= minZ && n && n.z <= maxZ) {
194
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
195
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
196
+ p = p.prevZ;
197
+
198
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
199
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
200
+ n = n.nextZ;
201
+ }
202
+
203
+ // look for remaining points in decreasing z-order
204
+ while (p && p.z >= minZ) {
205
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
206
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
207
+ p = p.prevZ;
208
+ }
209
+
210
+ // look for remaining points in increasing z-order
211
+ while (n && n.z <= maxZ) {
212
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
213
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
214
+ n = n.nextZ;
215
+ }
216
+
217
+ return true;
218
+ }
219
+
220
+ // go through all polygon nodes and cure small local self-intersections
221
+ function cureLocalIntersections(start, triangles, dim) {
222
+ var p = start;
223
+ do {
224
+ var a = p.prev,
225
+ b = p.next.next;
226
+
227
+ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
228
+
229
+ triangles.push(a.i / dim | 0);
230
+ triangles.push(p.i / dim | 0);
231
+ triangles.push(b.i / dim | 0);
232
+
233
+ // remove two nodes involved
234
+ removeNode(p);
235
+ removeNode(p.next);
236
+
237
+ p = start = b;
238
+ }
239
+ p = p.next;
240
+ } while (p !== start);
241
+
242
+ return filterPoints(p);
243
+ }
244
+
245
+ // try splitting polygon into two and triangulate them independently
246
+ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
247
+ // look for a valid diagonal that divides the polygon into two
248
+ var a = start;
249
+ do {
250
+ var b = a.next.next;
251
+ while (b !== a.prev) {
252
+ if (a.i !== b.i && isValidDiagonal(a, b)) {
253
+ // split the polygon in two by the diagonal
254
+ var c = splitPolygon(a, b);
255
+
256
+ // filter colinear points around the cuts
257
+ a = filterPoints(a, a.next);
258
+ c = filterPoints(c, c.next);
259
+
260
+ // run earcut on each half
261
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
262
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
263
+ return;
264
+ }
265
+ b = b.next;
266
+ }
267
+ a = a.next;
268
+ } while (a !== start);
269
+ }
270
+
271
+ // link every hole into the outer loop, producing a single-ring polygon without holes
272
+ function eliminateHoles(data, holeIndices, outerNode, dim) {
273
+ var queue = [],
274
+ i, len, start, end, list;
275
+
276
+ for (i = 0, len = holeIndices.length; i < len; i++) {
277
+ start = holeIndices[i] * dim;
278
+ end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
279
+ list = linkedList(data, start, end, dim, false);
280
+ if (list === list.next) list.steiner = true;
281
+ queue.push(getLeftmost(list));
282
+ }
283
+
284
+ queue.sort(compareX);
285
+
286
+ // process holes from left to right
287
+ for (i = 0; i < queue.length; i++) {
288
+ outerNode = eliminateHole(queue[i], outerNode);
289
+ }
290
+
291
+ return outerNode;
292
+ }
293
+
294
+ function compareX(a, b) {
295
+ return a.x - b.x;
296
+ }
297
+
298
+ // find a bridge between vertices that connects hole with an outer ring and and link it
299
+ function eliminateHole(hole, outerNode) {
300
+ var bridge = findHoleBridge(hole, outerNode);
301
+ if (!bridge) {
302
+ return outerNode;
303
+ }
304
+
305
+ var bridgeReverse = splitPolygon(bridge, hole);
306
+
307
+ // filter collinear points around the cuts
308
+ filterPoints(bridgeReverse, bridgeReverse.next);
309
+ return filterPoints(bridge, bridge.next);
310
+ }
311
+
312
+ // David Eberly's algorithm for finding a bridge between hole and outer polygon
313
+ function findHoleBridge(hole, outerNode) {
314
+ var p = outerNode,
315
+ hx = hole.x,
316
+ hy = hole.y,
317
+ qx = -Infinity,
318
+ m;
319
+
320
+ // find a segment intersected by a ray from the hole's leftmost point to the left;
321
+ // segment's endpoint with lesser x will be potential connection point
322
+ do {
323
+ if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
324
+ var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
325
+ if (x <= hx && x > qx) {
326
+ qx = x;
327
+ m = p.x < p.next.x ? p : p.next;
328
+ if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint
329
+ }
330
+ }
331
+ p = p.next;
332
+ } while (p !== outerNode);
333
+
334
+ if (!m) return null;
335
+
336
+ // look for points inside the triangle of hole point, segment intersection and endpoint;
337
+ // if there are no points found, we have a valid connection;
338
+ // otherwise choose the point of the minimum angle with the ray as connection point
339
+
340
+ var stop = m,
341
+ mx = m.x,
342
+ my = m.y,
343
+ tanMin = Infinity,
344
+ tan;
345
+
346
+ p = m;
347
+
348
+ do {
349
+ if (hx >= p.x && p.x >= mx && hx !== p.x &&
350
+ pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
351
+
352
+ tan = Math.abs(hy - p.y) / (hx - p.x); // tangential
353
+
354
+ if (locallyInside(p, hole) &&
355
+ (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {
356
+ m = p;
357
+ tanMin = tan;
358
+ }
359
+ }
360
+
361
+ p = p.next;
362
+ } while (p !== stop);
363
+
364
+ return m;
365
+ }
366
+
367
+ // whether sector in vertex m contains sector in vertex p in the same coordinates
368
+ function sectorContainsSector(m, p) {
369
+ return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
370
+ }
371
+
372
+ // interlink polygon nodes in z-order
373
+ function indexCurve(start, minX, minY, invSize) {
374
+ var p = start;
375
+ do {
376
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
377
+ p.prevZ = p.prev;
378
+ p.nextZ = p.next;
379
+ p = p.next;
380
+ } while (p !== start);
381
+
382
+ p.prevZ.nextZ = null;
383
+ p.prevZ = null;
384
+
385
+ sortLinked(p);
386
+ }
387
+
388
+ // Simon Tatham's linked list merge sort algorithm
389
+ // http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
390
+ function sortLinked(list) {
391
+ var i, p, q, e, tail, numMerges, pSize, qSize,
392
+ inSize = 1;
393
+
394
+ do {
395
+ p = list;
396
+ list = null;
397
+ tail = null;
398
+ numMerges = 0;
399
+
400
+ while (p) {
401
+ numMerges++;
402
+ q = p;
403
+ pSize = 0;
404
+ for (i = 0; i < inSize; i++) {
405
+ pSize++;
406
+ q = q.nextZ;
407
+ if (!q) break;
408
+ }
409
+ qSize = inSize;
410
+
411
+ while (pSize > 0 || (qSize > 0 && q)) {
412
+
413
+ if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
414
+ e = p;
415
+ p = p.nextZ;
416
+ pSize--;
417
+ } else {
418
+ e = q;
419
+ q = q.nextZ;
420
+ qSize--;
421
+ }
422
+
423
+ if (tail) tail.nextZ = e;
424
+ else list = e;
425
+
426
+ e.prevZ = tail;
427
+ tail = e;
428
+ }
429
+
430
+ p = q;
431
+ }
432
+
433
+ tail.nextZ = null;
434
+ inSize *= 2;
435
+
436
+ } while (numMerges > 1);
437
+
438
+ return list;
439
+ }
440
+
441
+ // z-order of a point given coords and inverse of the longer side of data bbox
442
+ function zOrder(x, y, minX, minY, invSize) {
443
+ // coords are transformed into non-negative 15-bit integer range
444
+ x = (x - minX) * invSize | 0;
445
+ y = (y - minY) * invSize | 0;
446
+
447
+ x = (x | (x << 8)) & 0x00FF00FF;
448
+ x = (x | (x << 4)) & 0x0F0F0F0F;
449
+ x = (x | (x << 2)) & 0x33333333;
450
+ x = (x | (x << 1)) & 0x55555555;
451
+
452
+ y = (y | (y << 8)) & 0x00FF00FF;
453
+ y = (y | (y << 4)) & 0x0F0F0F0F;
454
+ y = (y | (y << 2)) & 0x33333333;
455
+ y = (y | (y << 1)) & 0x55555555;
456
+
457
+ return x | (y << 1);
458
+ }
459
+
460
+ // find the leftmost node of a polygon ring
461
+ function getLeftmost(start) {
462
+ var p = start,
463
+ leftmost = start;
464
+ do {
465
+ if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;
466
+ p = p.next;
467
+ } while (p !== start);
468
+
469
+ return leftmost;
470
+ }
471
+
472
+ // check if a point lies within a convex triangle
473
+ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
474
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&
475
+ (ax - px) * (by - py) >= (bx - px) * (ay - py) &&
476
+ (bx - px) * (cy - py) >= (cx - px) * (by - py);
477
+ }
478
+
479
+ // check if a diagonal between two polygon nodes is valid (lies in polygon interior)
480
+ function isValidDiagonal(a, b) {
481
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
482
+ (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
483
+ (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
484
+ equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
485
+ }
486
+
487
+ // signed area of a triangle
488
+ function area(p, q, r) {
489
+ return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
490
+ }
491
+
492
+ // check if two points are equal
493
+ function equals(p1, p2) {
494
+ return p1.x === p2.x && p1.y === p2.y;
495
+ }
496
+
497
+ // check if two segments intersect
498
+ function intersects(p1, q1, p2, q2) {
499
+ var o1 = sign(area(p1, q1, p2));
500
+ var o2 = sign(area(p1, q1, q2));
501
+ var o3 = sign(area(p2, q2, p1));
502
+ var o4 = sign(area(p2, q2, q1));
503
+
504
+ if (o1 !== o2 && o3 !== o4) return true; // general case
505
+
506
+ if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1
507
+ if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1
508
+ if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2
509
+ if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2
510
+
511
+ return false;
512
+ }
513
+
514
+ // for collinear points p, q, r, check if point q lies on segment pr
515
+ function onSegment(p, q, r) {
516
+ return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
517
+ }
518
+
519
+ function sign(num) {
520
+ return num > 0 ? 1 : num < 0 ? -1 : 0;
521
+ }
522
+
523
+ // check if a polygon diagonal intersects any polygon segments
524
+ function intersectsPolygon(a, b) {
525
+ var p = a;
526
+ do {
527
+ if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
528
+ intersects(p, p.next, a, b)) return true;
529
+ p = p.next;
530
+ } while (p !== a);
531
+
532
+ return false;
533
+ }
534
+
535
+ // check if a polygon diagonal is locally inside the polygon
536
+ function locallyInside(a, b) {
537
+ return area(a.prev, a, a.next) < 0 ?
538
+ area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
539
+ area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
540
+ }
541
+
542
+ // check if the middle point of a polygon diagonal is inside the polygon
543
+ function middleInside(a, b) {
544
+ var p = a,
545
+ inside = false,
546
+ px = (a.x + b.x) / 2,
547
+ py = (a.y + b.y) / 2;
548
+ do {
549
+ if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&
550
+ (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))
551
+ inside = !inside;
552
+ p = p.next;
553
+ } while (p !== a);
554
+
555
+ return inside;
556
+ }
557
+
558
+ // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;
559
+ // if one belongs to the outer ring and another to a hole, it merges it into a single ring
560
+ function splitPolygon(a, b) {
561
+ var a2 = new Node(a.i, a.x, a.y),
562
+ b2 = new Node(b.i, b.x, b.y),
563
+ an = a.next,
564
+ bp = b.prev;
565
+
566
+ a.next = b;
567
+ b.prev = a;
568
+
569
+ a2.next = an;
570
+ an.prev = a2;
571
+
572
+ b2.next = a2;
573
+ a2.prev = b2;
574
+
575
+ bp.next = b2;
576
+ b2.prev = bp;
577
+
578
+ return b2;
579
+ }
580
+
581
+ // create a node and optionally link it with previous one (in a circular doubly linked list)
582
+ function insertNode(i, x, y, last) {
583
+ var p = new Node(i, x, y);
584
+
585
+ if (!last) {
586
+ p.prev = p;
587
+ p.next = p;
588
+
589
+ } else {
590
+ p.next = last.next;
591
+ p.prev = last;
592
+ last.next.prev = p;
593
+ last.next = p;
594
+ }
595
+ return p;
596
+ }
597
+
598
+ function removeNode(p) {
599
+ p.next.prev = p.prev;
600
+ p.prev.next = p.next;
601
+
602
+ if (p.prevZ) p.prevZ.nextZ = p.nextZ;
603
+ if (p.nextZ) p.nextZ.prevZ = p.prevZ;
604
+ }
605
+
606
+ function Node(i, x, y) {
607
+ // vertex index in coordinates array
608
+ this.i = i;
609
+
610
+ // vertex coordinates
611
+ this.x = x;
612
+ this.y = y;
613
+
614
+ // previous and next vertex nodes in a polygon ring
615
+ this.prev = null;
616
+ this.next = null;
617
+
618
+ // z-order curve value
619
+ this.z = 0;
620
+
621
+ // previous and next nodes in z-order
622
+ this.prevZ = null;
623
+ this.nextZ = null;
624
+
625
+ // indicates whether this is a steiner point
626
+ this.steiner = false;
627
+ }
628
+
629
+ // return a percentage difference between the polygon area and its triangulation area;
630
+ // used to verify correctness of triangulation
631
+ earcut.deviation = function (data, holeIndices, dim, triangles) {
632
+ var hasHoles = holeIndices && holeIndices.length;
633
+ var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
634
+
635
+ var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
636
+ if (hasHoles) {
637
+ for (var i = 0, len = holeIndices.length; i < len; i++) {
638
+ var start = holeIndices[i] * dim;
639
+ var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
640
+ polygonArea -= Math.abs(signedArea(data, start, end, dim));
641
+ }
642
+ }
643
+
644
+ var trianglesArea = 0;
645
+ for (i = 0; i < triangles.length; i += 3) {
646
+ var a = triangles[i] * dim;
647
+ var b = triangles[i + 1] * dim;
648
+ var c = triangles[i + 2] * dim;
649
+ trianglesArea += Math.abs(
650
+ (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -
651
+ (data[a] - data[b]) * (data[c + 1] - data[a + 1]));
652
+ }
653
+
654
+ return polygonArea === 0 && trianglesArea === 0 ? 0 :
655
+ Math.abs((trianglesArea - polygonArea) / polygonArea);
656
+ };
657
+
658
+ function signedArea(data, start, end, dim) {
659
+ var sum = 0;
660
+ for (var i = start, j = end - dim; i < end; i += dim) {
661
+ sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
662
+ j = i;
663
+ }
664
+ return sum;
665
+ }
666
+
667
+ // turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
668
+ earcut.flatten = function (data) {
669
+ var dim = data[0][0].length,
670
+ result = {vertices: [], holes: [], dimensions: dim},
671
+ holeIndex = 0;
672
+
673
+ for (var i = 0; i < data.length; i++) {
674
+ for (var j = 0; j < data[i].length; j++) {
675
+ for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
676
+ }
677
+ if (i > 0) {
678
+ holeIndex += data[i - 1].length;
679
+ result.holes.push(holeIndex);
680
+ }
681
+ }
682
+ return result;
683
+ };
684
+
685
+ var earcutExports = earcut$2.exports;
686
+ var earcut$1 = /*@__PURE__*/Math$1.getDefaultExportFromCjs(earcutExports);
687
+
688
+ /**
689
+ * Winding order defines the order of vertices for a triangle to be considered front-facing.
690
+ *
691
+ * @enum {number}
692
+ */
693
+ const WindingOrder = {
694
+ /**
695
+ * Vertices are in clockwise order.
696
+ *
697
+ * @type {number}
698
+ * @constant
699
+ */
700
+ CLOCKWISE: WebGLConstants.WebGLConstants.CW,
701
+
702
+ /**
703
+ * Vertices are in counter-clockwise order.
704
+ *
705
+ * @type {number}
706
+ * @constant
707
+ */
708
+ COUNTER_CLOCKWISE: WebGLConstants.WebGLConstants.CCW,
709
+ };
710
+
711
+ /**
712
+ * @private
713
+ */
714
+ WindingOrder.validate = function (windingOrder) {
715
+ return (
716
+ windingOrder === WindingOrder.CLOCKWISE ||
717
+ windingOrder === WindingOrder.COUNTER_CLOCKWISE
718
+ );
719
+ };
720
+
721
+ var WindingOrder$1 = Object.freeze(WindingOrder);
722
+
723
+ const scaleToGeodeticHeightN = new Matrix3.Cartesian3();
724
+ const scaleToGeodeticHeightP = new Matrix3.Cartesian3();
725
+
726
+ /**
727
+ * @private
728
+ */
729
+ const PolygonPipeline = {};
730
+
731
+ /**
732
+ * @exception {DeveloperError} At least three positions are required.
733
+ */
734
+ PolygonPipeline.computeArea2D = function (positions) {
735
+ //>>includeStart('debug', pragmas.debug);
736
+ Check.Check.defined("positions", positions);
737
+ Check.Check.typeOf.number.greaterThanOrEquals(
738
+ "positions.length",
739
+ positions.length,
740
+ 3
741
+ );
742
+ //>>includeEnd('debug');
743
+
744
+ const length = positions.length;
745
+ let area = 0.0;
746
+
747
+ for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
748
+ const v0 = positions[i0];
749
+ const v1 = positions[i1];
750
+
751
+ area += v0.x * v1.y - v1.x * v0.y;
752
+ }
753
+
754
+ return area * 0.5;
755
+ };
756
+
757
+ /**
758
+ * @returns {WindingOrder} The winding order.
759
+ *
760
+ * @exception {DeveloperError} At least three positions are required.
761
+ */
762
+ PolygonPipeline.computeWindingOrder2D = function (positions) {
763
+ const area = PolygonPipeline.computeArea2D(positions);
764
+ return area > 0.0 ? WindingOrder$1.COUNTER_CLOCKWISE : WindingOrder$1.CLOCKWISE;
765
+ };
766
+
767
+ /**
768
+ * Triangulate a polygon.
769
+ *
770
+ * @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
771
+ * @param {number[]} [holes] An array of the staring indices of the holes.
772
+ * @returns {number[]} Index array representing triangles that fill the polygon
773
+ */
774
+ PolygonPipeline.triangulate = function (positions, holes) {
775
+ //>>includeStart('debug', pragmas.debug);
776
+ Check.Check.defined("positions", positions);
777
+ //>>includeEnd('debug');
778
+
779
+ const flattenedPositions = Matrix2.Cartesian2.packArray(positions);
780
+ return earcut$1(flattenedPositions, holes, 2);
781
+ };
782
+
783
+ const subdivisionV0Scratch = new Matrix3.Cartesian3();
784
+ const subdivisionV1Scratch = new Matrix3.Cartesian3();
785
+ const subdivisionV2Scratch = new Matrix3.Cartesian3();
786
+ const subdivisionS0Scratch = new Matrix3.Cartesian3();
787
+ const subdivisionS1Scratch = new Matrix3.Cartesian3();
788
+ const subdivisionS2Scratch = new Matrix3.Cartesian3();
789
+ const subdivisionMidScratch = new Matrix3.Cartesian3();
790
+ const subdivisionT0Scratch = new Matrix2.Cartesian2();
791
+ const subdivisionT1Scratch = new Matrix2.Cartesian2();
792
+ const subdivisionT2Scratch = new Matrix2.Cartesian2();
793
+ const subdivisionTexcoordMidScratch = new Matrix2.Cartesian2();
794
+
795
+ /**
796
+ * Subdivides positions and raises points to the surface of the ellipsoid.
797
+ *
798
+ * @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
799
+ * @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
800
+ * @param {number[]} indices An array of indices that determines the triangles in the polygon.
801
+ * @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
802
+ * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
803
+ *
804
+ * @exception {DeveloperError} At least three indices are required.
805
+ * @exception {DeveloperError} The number of indices must be divisable by three.
806
+ * @exception {DeveloperError} Granularity must be greater than zero.
807
+ */
808
+ PolygonPipeline.computeSubdivision = function (
809
+ ellipsoid,
810
+ positions,
811
+ indices,
812
+ texcoords,
813
+ granularity
814
+ ) {
815
+ granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
816
+
817
+ const hasTexcoords = defaultValue.defined(texcoords);
818
+
819
+ //>>includeStart('debug', pragmas.debug);
820
+ Check.Check.typeOf.object("ellipsoid", ellipsoid);
821
+ Check.Check.defined("positions", positions);
822
+ Check.Check.defined("indices", indices);
823
+ Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
824
+ Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
825
+ Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
826
+ //>>includeEnd('debug');
827
+
828
+ // triangles that need (or might need) to be subdivided.
829
+ const triangles = indices.slice(0);
830
+
831
+ // New positions due to edge splits are appended to the positions list.
832
+ let i;
833
+ const length = positions.length;
834
+ const subdividedPositions = new Array(length * 3);
835
+ const subdividedTexcoords = new Array(length * 2);
836
+ let q = 0;
837
+ let p = 0;
838
+ for (i = 0; i < length; i++) {
839
+ const item = positions[i];
840
+ subdividedPositions[q++] = item.x;
841
+ subdividedPositions[q++] = item.y;
842
+ subdividedPositions[q++] = item.z;
843
+
844
+ if (hasTexcoords) {
845
+ const texcoordItem = texcoords[i];
846
+ subdividedTexcoords[p++] = texcoordItem.x;
847
+ subdividedTexcoords[p++] = texcoordItem.y;
848
+ }
849
+ }
850
+
851
+ const subdividedIndices = [];
852
+
853
+ // Used to make sure shared edges are not split more than once.
854
+ const edges = {};
855
+
856
+ const radius = ellipsoid.maximumRadius;
857
+ const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
858
+ const minDistanceSqrd = minDistance * minDistance;
859
+
860
+ while (triangles.length > 0) {
861
+ const i2 = triangles.pop();
862
+ const i1 = triangles.pop();
863
+ const i0 = triangles.pop();
864
+
865
+ const v0 = Matrix3.Cartesian3.fromArray(
866
+ subdividedPositions,
867
+ i0 * 3,
868
+ subdivisionV0Scratch
869
+ );
870
+ const v1 = Matrix3.Cartesian3.fromArray(
871
+ subdividedPositions,
872
+ i1 * 3,
873
+ subdivisionV1Scratch
874
+ );
875
+ const v2 = Matrix3.Cartesian3.fromArray(
876
+ subdividedPositions,
877
+ i2 * 3,
878
+ subdivisionV2Scratch
879
+ );
880
+
881
+ let t0, t1, t2;
882
+ if (hasTexcoords) {
883
+ t0 = Matrix2.Cartesian2.fromArray(
884
+ subdividedTexcoords,
885
+ i0 * 2,
886
+ subdivisionT0Scratch
887
+ );
888
+ t1 = Matrix2.Cartesian2.fromArray(
889
+ subdividedTexcoords,
890
+ i1 * 2,
891
+ subdivisionT1Scratch
892
+ );
893
+ t2 = Matrix2.Cartesian2.fromArray(
894
+ subdividedTexcoords,
895
+ i2 * 2,
896
+ subdivisionT2Scratch
897
+ );
898
+ }
899
+
900
+ const s0 = Matrix3.Cartesian3.multiplyByScalar(
901
+ Matrix3.Cartesian3.normalize(v0, subdivisionS0Scratch),
902
+ radius,
903
+ subdivisionS0Scratch
904
+ );
905
+ const s1 = Matrix3.Cartesian3.multiplyByScalar(
906
+ Matrix3.Cartesian3.normalize(v1, subdivisionS1Scratch),
907
+ radius,
908
+ subdivisionS1Scratch
909
+ );
910
+ const s2 = Matrix3.Cartesian3.multiplyByScalar(
911
+ Matrix3.Cartesian3.normalize(v2, subdivisionS2Scratch),
912
+ radius,
913
+ subdivisionS2Scratch
914
+ );
915
+
916
+ const g0 = Matrix3.Cartesian3.magnitudeSquared(
917
+ Matrix3.Cartesian3.subtract(s0, s1, subdivisionMidScratch)
918
+ );
919
+ const g1 = Matrix3.Cartesian3.magnitudeSquared(
920
+ Matrix3.Cartesian3.subtract(s1, s2, subdivisionMidScratch)
921
+ );
922
+ const g2 = Matrix3.Cartesian3.magnitudeSquared(
923
+ Matrix3.Cartesian3.subtract(s2, s0, subdivisionMidScratch)
924
+ );
925
+
926
+ const max = Math.max(g0, g1, g2);
927
+ let edge;
928
+ let mid;
929
+ let midTexcoord;
930
+
931
+ // if the max length squared of a triangle edge is greater than the chord length of squared
932
+ // of the granularity, subdivide the triangle
933
+ if (max > minDistanceSqrd) {
934
+ if (g0 === max) {
935
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
936
+
937
+ i = edges[edge];
938
+ if (!defaultValue.defined(i)) {
939
+ mid = Matrix3.Cartesian3.add(v0, v1, subdivisionMidScratch);
940
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
941
+ subdividedPositions.push(mid.x, mid.y, mid.z);
942
+ i = subdividedPositions.length / 3 - 1;
943
+ edges[edge] = i;
944
+
945
+ if (hasTexcoords) {
946
+ midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
947
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
948
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
949
+ }
950
+ }
951
+
952
+ triangles.push(i0, i, i2);
953
+ triangles.push(i, i1, i2);
954
+ } else if (g1 === max) {
955
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
956
+
957
+ i = edges[edge];
958
+ if (!defaultValue.defined(i)) {
959
+ mid = Matrix3.Cartesian3.add(v1, v2, subdivisionMidScratch);
960
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
961
+ subdividedPositions.push(mid.x, mid.y, mid.z);
962
+ i = subdividedPositions.length / 3 - 1;
963
+ edges[edge] = i;
964
+
965
+ if (hasTexcoords) {
966
+ midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
967
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
968
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
969
+ }
970
+ }
971
+
972
+ triangles.push(i1, i, i0);
973
+ triangles.push(i, i2, i0);
974
+ } else if (g2 === max) {
975
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
976
+
977
+ i = edges[edge];
978
+ if (!defaultValue.defined(i)) {
979
+ mid = Matrix3.Cartesian3.add(v2, v0, subdivisionMidScratch);
980
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
981
+ subdividedPositions.push(mid.x, mid.y, mid.z);
982
+ i = subdividedPositions.length / 3 - 1;
983
+ edges[edge] = i;
984
+
985
+ if (hasTexcoords) {
986
+ midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
987
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
988
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
989
+ }
990
+ }
991
+
992
+ triangles.push(i2, i, i1);
993
+ triangles.push(i, i0, i1);
994
+ }
995
+ } else {
996
+ subdividedIndices.push(i0);
997
+ subdividedIndices.push(i1);
998
+ subdividedIndices.push(i2);
999
+ }
1000
+ }
1001
+
1002
+ const geometryOptions = {
1003
+ attributes: {
1004
+ position: new GeometryAttribute.GeometryAttribute({
1005
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
1006
+ componentsPerAttribute: 3,
1007
+ values: subdividedPositions,
1008
+ }),
1009
+ },
1010
+ indices: subdividedIndices,
1011
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
1012
+ };
1013
+
1014
+ if (hasTexcoords) {
1015
+ geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
1016
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
1017
+ componentsPerAttribute: 2,
1018
+ values: subdividedTexcoords,
1019
+ });
1020
+ }
1021
+
1022
+ return new GeometryAttribute.Geometry(geometryOptions);
1023
+ };
1024
+
1025
+ const subdivisionC0Scratch = new Matrix3.Cartographic();
1026
+ const subdivisionC1Scratch = new Matrix3.Cartographic();
1027
+ const subdivisionC2Scratch = new Matrix3.Cartographic();
1028
+ const subdivisionCartographicScratch = new Matrix3.Cartographic();
1029
+
1030
+ /**
1031
+ * Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
1032
+ *
1033
+ * @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
1034
+ * @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
1035
+ * @param {number[]} indices An array of indices that determines the triangles in the polygon.
1036
+ * @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
1037
+ * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
1038
+ *
1039
+ * @exception {DeveloperError} At least three indices are required.
1040
+ * @exception {DeveloperError} The number of indices must be divisable by three.
1041
+ * @exception {DeveloperError} Granularity must be greater than zero.
1042
+ */
1043
+ PolygonPipeline.computeRhumbLineSubdivision = function (
1044
+ ellipsoid,
1045
+ positions,
1046
+ indices,
1047
+ texcoords,
1048
+ granularity
1049
+ ) {
1050
+ granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
1051
+
1052
+ const hasTexcoords = defaultValue.defined(texcoords);
1053
+
1054
+ //>>includeStart('debug', pragmas.debug);
1055
+ Check.Check.typeOf.object("ellipsoid", ellipsoid);
1056
+ Check.Check.defined("positions", positions);
1057
+ Check.Check.defined("indices", indices);
1058
+ Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
1059
+ Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
1060
+ Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
1061
+ //>>includeEnd('debug');
1062
+
1063
+ // triangles that need (or might need) to be subdivided.
1064
+ const triangles = indices.slice(0);
1065
+
1066
+ // New positions due to edge splits are appended to the positions list.
1067
+ let i;
1068
+ const length = positions.length;
1069
+ const subdividedPositions = new Array(length * 3);
1070
+ const subdividedTexcoords = new Array(length * 2);
1071
+ let q = 0;
1072
+ let p = 0;
1073
+ for (i = 0; i < length; i++) {
1074
+ const item = positions[i];
1075
+ subdividedPositions[q++] = item.x;
1076
+ subdividedPositions[q++] = item.y;
1077
+ subdividedPositions[q++] = item.z;
1078
+
1079
+ if (hasTexcoords) {
1080
+ const texcoordItem = texcoords[i];
1081
+ subdividedTexcoords[p++] = texcoordItem.x;
1082
+ subdividedTexcoords[p++] = texcoordItem.y;
1083
+ }
1084
+ }
1085
+
1086
+ const subdividedIndices = [];
1087
+
1088
+ // Used to make sure shared edges are not split more than once.
1089
+ const edges = {};
1090
+
1091
+ const radius = ellipsoid.maximumRadius;
1092
+ const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
1093
+
1094
+ const rhumb0 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1095
+ const rhumb1 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1096
+ const rhumb2 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1097
+
1098
+ while (triangles.length > 0) {
1099
+ const i2 = triangles.pop();
1100
+ const i1 = triangles.pop();
1101
+ const i0 = triangles.pop();
1102
+
1103
+ const v0 = Matrix3.Cartesian3.fromArray(
1104
+ subdividedPositions,
1105
+ i0 * 3,
1106
+ subdivisionV0Scratch
1107
+ );
1108
+ const v1 = Matrix3.Cartesian3.fromArray(
1109
+ subdividedPositions,
1110
+ i1 * 3,
1111
+ subdivisionV1Scratch
1112
+ );
1113
+ const v2 = Matrix3.Cartesian3.fromArray(
1114
+ subdividedPositions,
1115
+ i2 * 3,
1116
+ subdivisionV2Scratch
1117
+ );
1118
+
1119
+ let t0, t1, t2;
1120
+ if (hasTexcoords) {
1121
+ t0 = Matrix2.Cartesian2.fromArray(
1122
+ subdividedTexcoords,
1123
+ i0 * 2,
1124
+ subdivisionT0Scratch
1125
+ );
1126
+ t1 = Matrix2.Cartesian2.fromArray(
1127
+ subdividedTexcoords,
1128
+ i1 * 2,
1129
+ subdivisionT1Scratch
1130
+ );
1131
+ t2 = Matrix2.Cartesian2.fromArray(
1132
+ subdividedTexcoords,
1133
+ i2 * 2,
1134
+ subdivisionT2Scratch
1135
+ );
1136
+ }
1137
+
1138
+ const c0 = ellipsoid.cartesianToCartographic(v0, subdivisionC0Scratch);
1139
+ const c1 = ellipsoid.cartesianToCartographic(v1, subdivisionC1Scratch);
1140
+ const c2 = ellipsoid.cartesianToCartographic(v2, subdivisionC2Scratch);
1141
+
1142
+ rhumb0.setEndPoints(c0, c1);
1143
+ const g0 = rhumb0.surfaceDistance;
1144
+ rhumb1.setEndPoints(c1, c2);
1145
+ const g1 = rhumb1.surfaceDistance;
1146
+ rhumb2.setEndPoints(c2, c0);
1147
+ const g2 = rhumb2.surfaceDistance;
1148
+
1149
+ const max = Math.max(g0, g1, g2);
1150
+ let edge;
1151
+ let mid;
1152
+ let midHeight;
1153
+ let midCartesian3;
1154
+ let midTexcoord;
1155
+
1156
+ // if the max length squared of a triangle edge is greater than granularity, subdivide the triangle
1157
+ if (max > minDistance) {
1158
+ if (g0 === max) {
1159
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
1160
+
1161
+ i = edges[edge];
1162
+ if (!defaultValue.defined(i)) {
1163
+ mid = rhumb0.interpolateUsingFraction(
1164
+ 0.5,
1165
+ subdivisionCartographicScratch
1166
+ );
1167
+ midHeight = (c0.height + c1.height) * 0.5;
1168
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1169
+ mid.longitude,
1170
+ mid.latitude,
1171
+ midHeight,
1172
+ ellipsoid,
1173
+ subdivisionMidScratch
1174
+ );
1175
+ subdividedPositions.push(
1176
+ midCartesian3.x,
1177
+ midCartesian3.y,
1178
+ midCartesian3.z
1179
+ );
1180
+ i = subdividedPositions.length / 3 - 1;
1181
+ edges[edge] = i;
1182
+
1183
+ if (hasTexcoords) {
1184
+ midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
1185
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1186
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1187
+ }
1188
+ }
1189
+
1190
+ triangles.push(i0, i, i2);
1191
+ triangles.push(i, i1, i2);
1192
+ } else if (g1 === max) {
1193
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
1194
+
1195
+ i = edges[edge];
1196
+ if (!defaultValue.defined(i)) {
1197
+ mid = rhumb1.interpolateUsingFraction(
1198
+ 0.5,
1199
+ subdivisionCartographicScratch
1200
+ );
1201
+ midHeight = (c1.height + c2.height) * 0.5;
1202
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1203
+ mid.longitude,
1204
+ mid.latitude,
1205
+ midHeight,
1206
+ ellipsoid,
1207
+ subdivisionMidScratch
1208
+ );
1209
+ subdividedPositions.push(
1210
+ midCartesian3.x,
1211
+ midCartesian3.y,
1212
+ midCartesian3.z
1213
+ );
1214
+ i = subdividedPositions.length / 3 - 1;
1215
+ edges[edge] = i;
1216
+
1217
+ if (hasTexcoords) {
1218
+ midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
1219
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1220
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1221
+ }
1222
+ }
1223
+
1224
+ triangles.push(i1, i, i0);
1225
+ triangles.push(i, i2, i0);
1226
+ } else if (g2 === max) {
1227
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
1228
+
1229
+ i = edges[edge];
1230
+ if (!defaultValue.defined(i)) {
1231
+ mid = rhumb2.interpolateUsingFraction(
1232
+ 0.5,
1233
+ subdivisionCartographicScratch
1234
+ );
1235
+ midHeight = (c2.height + c0.height) * 0.5;
1236
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1237
+ mid.longitude,
1238
+ mid.latitude,
1239
+ midHeight,
1240
+ ellipsoid,
1241
+ subdivisionMidScratch
1242
+ );
1243
+ subdividedPositions.push(
1244
+ midCartesian3.x,
1245
+ midCartesian3.y,
1246
+ midCartesian3.z
1247
+ );
1248
+ i = subdividedPositions.length / 3 - 1;
1249
+ edges[edge] = i;
1250
+
1251
+ if (hasTexcoords) {
1252
+ midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
1253
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1254
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1255
+ }
1256
+ }
1257
+
1258
+ triangles.push(i2, i, i1);
1259
+ triangles.push(i, i0, i1);
1260
+ }
1261
+ } else {
1262
+ subdividedIndices.push(i0);
1263
+ subdividedIndices.push(i1);
1264
+ subdividedIndices.push(i2);
1265
+ }
1266
+ }
1267
+
1268
+ const geometryOptions = {
1269
+ attributes: {
1270
+ position: new GeometryAttribute.GeometryAttribute({
1271
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
1272
+ componentsPerAttribute: 3,
1273
+ values: subdividedPositions,
1274
+ }),
1275
+ },
1276
+ indices: subdividedIndices,
1277
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
1278
+ };
1279
+
1280
+ if (hasTexcoords) {
1281
+ geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
1282
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
1283
+ componentsPerAttribute: 2,
1284
+ values: subdividedTexcoords,
1285
+ });
1286
+ }
1287
+
1288
+ return new GeometryAttribute.Geometry(geometryOptions);
1289
+ };
1290
+
1291
+ /**
1292
+ * Scales each position of a geometry's position attribute to a height, in place.
1293
+ *
1294
+ * @param {number[]} positions The array of numbers representing the positions to be scaled
1295
+ * @param {number} [height=0.0] The desired height to add to the positions
1296
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
1297
+ * @param {boolean} [scaleToSurface=true] <code>true</code> if the positions need to be scaled to the surface before the height is added.
1298
+ * @returns {number[]} The input array of positions, scaled to height
1299
+ */
1300
+ PolygonPipeline.scaleToGeodeticHeight = function (
1301
+ positions,
1302
+ height,
1303
+ ellipsoid,
1304
+ scaleToSurface
1305
+ ) {
1306
+ ellipsoid = defaultValue.defaultValue(ellipsoid, Matrix3.Ellipsoid.WGS84);
1307
+
1308
+ let n = scaleToGeodeticHeightN;
1309
+ let p = scaleToGeodeticHeightP;
1310
+
1311
+ height = defaultValue.defaultValue(height, 0.0);
1312
+ scaleToSurface = defaultValue.defaultValue(scaleToSurface, true);
1313
+
1314
+ if (defaultValue.defined(positions)) {
1315
+ const length = positions.length;
1316
+
1317
+ for (let i = 0; i < length; i += 3) {
1318
+ Matrix3.Cartesian3.fromArray(positions, i, p);
1319
+
1320
+ if (scaleToSurface) {
1321
+ p = ellipsoid.scaleToGeodeticSurface(p, p);
1322
+ }
1323
+
1324
+ if (height !== 0) {
1325
+ n = ellipsoid.geodeticSurfaceNormal(p, n);
1326
+
1327
+ Matrix3.Cartesian3.multiplyByScalar(n, height, n);
1328
+ Matrix3.Cartesian3.add(p, n, p);
1329
+ }
1330
+
1331
+ positions[i] = p.x;
1332
+ positions[i + 1] = p.y;
1333
+ positions[i + 2] = p.z;
1334
+ }
1335
+ }
1336
+
1337
+ return positions;
1338
+ };
1339
+ var PolygonPipeline$1 = PolygonPipeline;
1340
+
1341
+ exports.PolygonPipeline = PolygonPipeline$1;
1342
+ exports.WindingOrder = WindingOrder$1;
1343
+
1344
+ }));