@tak-ps/cloudtak 12.54.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.
- package/README.md +34 -0
- package/dist/types/plugin.d.ts +99 -0
- package/dist/types/src/App.vue.d.ts +5 -0
- package/dist/types/src/base/chatroom-chats.d.ts +17 -0
- package/dist/types/src/base/chatroom.d.ts +47 -0
- package/dist/types/src/base/cot.d.ts +94 -0
- package/dist/types/src/base/database.d.ts +115 -0
- package/dist/types/src/base/events.d.ts +30 -0
- package/dist/types/src/base/filter.d.ts +41 -0
- package/dist/types/src/base/handler.d.ts +11 -0
- package/dist/types/src/base/icon.d.ts +4 -0
- package/dist/types/src/base/notification.d.ts +37 -0
- package/dist/types/src/base/overlay.d.ts +94 -0
- package/dist/types/src/base/subscription-feature.d.ts +49 -0
- package/dist/types/src/base/subscription-log.d.ts +32 -0
- package/dist/types/src/base/subscription.d.ts +115 -0
- package/dist/types/src/base/utils/styles.d.ts +11 -0
- package/dist/types/src/base/validators.d.ts +9 -0
- package/dist/types/src/components/Admin/AdminImports.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminLayers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplate.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplateLog.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminMissionTemplates.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalette.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPaletteFeature.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminPalettes.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminServer.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUser.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminUsers.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/AdminVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerConnection.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerInjectorModal.vue.d.ts +11 -0
- package/dist/types/src/components/Admin/Server/ServerInjectors.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerPackages.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerRepeaters.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Server/ServerVideos.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Tasks/AdminRawTasks.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoLeases.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/AdminVideoService.vue.d.ts +3 -0
- package/dist/types/src/components/Admin/Videos/VideoConfig.vue.d.ts +7 -0
- package/dist/types/src/components/Admin/Videos/VideoConfigPort.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/CoordInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/FeatView.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/GeoJSONInput.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +101 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/RangeInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/RangeRingsInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +71 -0
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +37 -0
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
- package/dist/types/src/components/Configure.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
- package/dist/types/src/components/ETL/Connection/ConnectionFiles.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionTokens.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/ConnectionVideos.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Connection/TokenModal.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connection.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/ConnectionCard.vue.d.ts +16 -0
- package/dist/types/src/components/ETL/Connections.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Data.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Layer/LayerIncomingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/LayerOutgoingConfig.vue.d.ts +27 -0
- package/dist/types/src/components/ETL/Layer/utils/QueryInput.vue.d.ts +56 -0
- package/dist/types/src/components/ETL/Layer/utils/StatusDot.vue.d.ts +7 -0
- package/dist/types/src/components/ETL/Layer.vue.d.ts +3 -0
- package/dist/types/src/components/Home.vue.d.ts +13 -0
- package/dist/types/src/components/Loading.vue.d.ts +3 -0
- package/dist/types/src/components/Login.vue.d.ts +7 -0
- package/dist/types/src/components/LostUser.vue.d.ts +3 -0
- package/dist/types/src/components/PageFooter.vue.d.ts +3 -0
- package/dist/types/src/components/ServerAdmin.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall/Main.vue.d.ts +3 -0
- package/dist/types/src/components/VideoWall.vue.d.ts +13 -0
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/util/InitialAuthor.vue.d.ts +6 -0
- package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
- package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/pages/admin/main.d.ts +1 -0
- package/dist/types/src/pages/connection/main.d.ts +1 -0
- package/dist/types/src/pages/docs/App.vue.d.ts +4 -0
- package/dist/types/src/pages/docs/main.d.ts +1 -0
- package/dist/types/src/pages/video/main.d.ts +1 -0
- package/dist/types/src/std.d.ts +19 -0
- package/dist/types/src/stores/brand.d.ts +7 -0
- package/dist/types/src/stores/float.d.ts +42 -0
- package/dist/types/src/stores/map.d.ts +115 -0
- package/dist/types/src/stores/modules/draw.d.ts +35 -0
- package/dist/types/src/stores/modules/icons.d.ts +38 -0
- package/dist/types/src/stores/modules/menu.d.ts +34 -0
- package/dist/types/src/test/setup.d.ts +1 -0
- package/dist/types/src/timediff.d.ts +1 -0
- package/dist/types/src/types.d.ts +158 -0
- package/dist/types/src/video.d.ts +1 -0
- package/dist/types/src/workers/atlas-connection.d.ts +12 -0
- package/dist/types/src/workers/atlas-database.d.ts +134 -0
- package/dist/types/src/workers/atlas-profile.d.ts +39 -0
- package/dist/types/src/workers/atlas-team.d.ts +13 -0
- package/dist/types/src/workers/atlas.d.ts +19 -0
- package/package.json +97 -0
- package/src/App.vue +341 -0
- package/src/base/chatroom-chats.ts +124 -0
- package/src/base/chatroom.ts +202 -0
- package/src/base/cot.ts +625 -0
- package/src/base/database.ts +150 -0
- package/src/base/events.ts +43 -0
- package/src/base/filter.ts +163 -0
- package/src/base/handler.ts +67 -0
- package/src/base/icon.ts +16 -0
- package/src/base/notification.ts +163 -0
- package/src/base/overlay.ts +558 -0
- package/src/base/subscription-feature.ts +224 -0
- package/src/base/subscription-log.ts +174 -0
- package/src/base/subscription.ts +489 -0
- package/src/base/utils/styles.ts +430 -0
- package/src/base/validators.ts +66 -0
- package/src/components/Admin/AdminConfig.vue +487 -0
- package/src/components/Admin/AdminConnections.vue +195 -0
- package/src/components/Admin/AdminDatas.vue +165 -0
- package/src/components/Admin/AdminExport.vue +121 -0
- package/src/components/Admin/AdminImports.vue +222 -0
- package/src/components/Admin/AdminLayerTemplate.vue +91 -0
- package/src/components/Admin/AdminLayers.vue +301 -0
- package/src/components/Admin/AdminMissionTemplate.vue +259 -0
- package/src/components/Admin/AdminMissionTemplateLog.vue +273 -0
- package/src/components/Admin/AdminMissionTemplates.vue +189 -0
- package/src/components/Admin/AdminOverlays.vue +232 -0
- package/src/components/Admin/AdminOverlaysEdit.vue +355 -0
- package/src/components/Admin/AdminPalette.vue +214 -0
- package/src/components/Admin/AdminPaletteFeature.vue +208 -0
- package/src/components/Admin/AdminPalettes.vue +189 -0
- package/src/components/Admin/AdminServer.vue +143 -0
- package/src/components/Admin/AdminTasks.vue +60 -0
- package/src/components/Admin/AdminUser.vue +263 -0
- package/src/components/Admin/AdminUsers.vue +183 -0
- package/src/components/Admin/AdminVideos.vue +60 -0
- package/src/components/Admin/Server/ServerConnection.vue +322 -0
- package/src/components/Admin/Server/ServerInjectorModal.vue +125 -0
- package/src/components/Admin/Server/ServerInjectors.vue +104 -0
- package/src/components/Admin/Server/ServerPackages.vue +159 -0
- package/src/components/Admin/Server/ServerRepeaters.vue +105 -0
- package/src/components/Admin/Server/ServerVideos.vue +83 -0
- package/src/components/Admin/Tasks/AdminRawTasks.vue +148 -0
- package/src/components/Admin/Tasks/AdminTasks.vue +286 -0
- package/src/components/Admin/Videos/AdminVideoLeases.vue +198 -0
- package/src/components/Admin/Videos/AdminVideoService.vue +67 -0
- package/src/components/Admin/Videos/VideoConfig.vue +132 -0
- package/src/components/Admin/Videos/VideoConfigPath.vue +58 -0
- package/src/components/Admin/Videos/VideoConfigPort.vue +40 -0
- package/src/components/CloudTAK/CoTView.vue +915 -0
- package/src/components/CloudTAK/CoordInput.vue +110 -0
- package/src/components/CloudTAK/DrawTools.vue +200 -0
- package/src/components/CloudTAK/FeatView.vue +242 -0
- package/src/components/CloudTAK/GeoJSONInput.vue +226 -0
- package/src/components/CloudTAK/MainMenu.vue +190 -0
- package/src/components/CloudTAK/MainMenuContents.vue +360 -0
- package/src/components/CloudTAK/Map.vue +972 -0
- package/src/components/CloudTAK/MapLoading.vue +31 -0
- package/src/components/CloudTAK/Menu/Basemaps/EditModal.vue +427 -0
- package/src/components/CloudTAK/Menu/Debugger.vue +118 -0
- package/src/components/CloudTAK/Menu/Iconset/EditModal.vue +118 -0
- package/src/components/CloudTAK/Menu/MenuBasemaps.vue +410 -0
- package/src/components/CloudTAK/Menu/MenuChannels.vue +206 -0
- package/src/components/CloudTAK/Menu/MenuChat.vue +222 -0
- package/src/components/CloudTAK/Menu/MenuChats.vue +167 -0
- package/src/components/CloudTAK/Menu/MenuConnections.vue +166 -0
- package/src/components/CloudTAK/Menu/MenuContacts.vue +245 -0
- package/src/components/CloudTAK/Menu/MenuFeatures.vue +718 -0
- package/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue +217 -0
- package/src/components/CloudTAK/Menu/MenuFiles.vue +433 -0
- package/src/components/CloudTAK/Menu/MenuIcon.vue +236 -0
- package/src/components/CloudTAK/Menu/MenuIconset.vue +128 -0
- package/src/components/CloudTAK/Menu/MenuIconsets.vue +266 -0
- package/src/components/CloudTAK/Menu/MenuImport.vue +198 -0
- package/src/components/CloudTAK/Menu/MenuImports.vue +199 -0
- package/src/components/CloudTAK/Menu/MenuItemCard.vue +240 -0
- package/src/components/CloudTAK/Menu/MenuMission.vue +324 -0
- package/src/components/CloudTAK/Menu/MenuMissions.vue +334 -0
- package/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue +434 -0
- package/src/components/CloudTAK/Menu/MenuOverlays.vue +560 -0
- package/src/components/CloudTAK/Menu/MenuPackage.vue +340 -0
- package/src/components/CloudTAK/Menu/MenuPackages.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuRoutes.vue +186 -0
- package/src/components/CloudTAK/Menu/MenuRoutesNew.vue +193 -0
- package/src/components/CloudTAK/Menu/MenuSettings.vue +95 -0
- package/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue +12 -0
- package/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue +144 -0
- package/src/components/CloudTAK/Menu/MenuSettingsTokens.vue +83 -0
- package/src/components/CloudTAK/Menu/MenuVideos.vue +436 -0
- package/src/components/CloudTAK/Menu/MenuVideosRemote.vue +203 -0
- package/src/components/CloudTAK/Menu/Mission/MissionContents.vue +211 -0
- package/src/components/CloudTAK/Menu/Mission/MissionCreate.vue +372 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInfo.vue +331 -0
- package/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue +107 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue +77 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +157 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLog.vue +170 -0
- package/src/components/CloudTAK/Menu/Mission/MissionLogs.vue +194 -0
- package/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue +142 -0
- package/src/components/CloudTAK/Menu/Mission/MissionUsers.vue +74 -0
- package/src/components/CloudTAK/Menu/Mission/PendingInvites.vue +130 -0
- package/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue +57 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeCots.vue +497 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +32 -0
- package/src/components/CloudTAK/Menu/Overlays/TreeVector.vue +113 -0
- package/src/components/CloudTAK/Menu/Settings/TokenModal.vue +110 -0
- package/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue +753 -0
- package/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue +75 -0
- package/src/components/CloudTAK/Notifications.vue +195 -0
- package/src/components/CloudTAK/Query/Magnetic.vue +80 -0
- package/src/components/CloudTAK/Query/Reverse.vue +65 -0
- package/src/components/CloudTAK/Query/Sun.vue +178 -0
- package/src/components/CloudTAK/Query/Weather.vue +195 -0
- package/src/components/CloudTAK/QueryView.vue +134 -0
- package/src/components/CloudTAK/RadialMenu/LICENSE +21 -0
- package/src/components/CloudTAK/RadialMenu/README.md +63 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.css +85 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.js +534 -0
- package/src/components/CloudTAK/RadialMenu/RadialMenu.vue +257 -0
- package/src/components/CloudTAK/RangeInput.vue +155 -0
- package/src/components/CloudTAK/RangeRingsInput.vue +269 -0
- package/src/components/CloudTAK/util/Breadcrumb.vue +85 -0
- package/src/components/CloudTAK/util/ChannelInfo.vue +25 -0
- package/src/components/CloudTAK/util/Contact.vue +131 -0
- package/src/components/CloudTAK/util/ContactPuck.vue +40 -0
- package/src/components/CloudTAK/util/Coordinate.vue +313 -0
- package/src/components/CloudTAK/util/CoordinateType.vue +134 -0
- package/src/components/CloudTAK/util/CopyButton.vue +67 -0
- package/src/components/CloudTAK/util/CopyField.vue +286 -0
- package/src/components/CloudTAK/util/DrawOverlay.vue +254 -0
- package/src/components/CloudTAK/util/EmptyInfo.vue +71 -0
- package/src/components/CloudTAK/util/FeatureIcon.vue +134 -0
- package/src/components/CloudTAK/util/FeatureRow.vue +206 -0
- package/src/components/CloudTAK/util/FloatingAttachment.vue +191 -0
- package/src/components/CloudTAK/util/FloatingVideo.vue +654 -0
- package/src/components/CloudTAK/util/GenericSelect.vue +125 -0
- package/src/components/CloudTAK/util/GroupSelect.vue +129 -0
- package/src/components/CloudTAK/util/Icons.vue +146 -0
- package/src/components/CloudTAK/util/JSONModal.vue +57 -0
- package/src/components/CloudTAK/util/Keywords.vue +31 -0
- package/src/components/CloudTAK/util/LineLength.vue +121 -0
- package/src/components/CloudTAK/util/MenuItem.vue +21 -0
- package/src/components/CloudTAK/util/MenuTemplate.vue +137 -0
- package/src/components/CloudTAK/util/MultipleSelect.vue +103 -0
- package/src/components/CloudTAK/util/NotificationIcon.vue +50 -0
- package/src/components/CloudTAK/util/NotificationToast.vue +125 -0
- package/src/components/CloudTAK/util/PolygonArea.vue +109 -0
- package/src/components/CloudTAK/util/PropertyAttachments.vue +224 -0
- package/src/components/CloudTAK/util/PropertyBattery.vue +44 -0
- package/src/components/CloudTAK/util/PropertyBearing.vue +148 -0
- package/src/components/CloudTAK/util/PropertyCreator.vue +61 -0
- package/src/components/CloudTAK/util/PropertyDistance.vue +182 -0
- package/src/components/CloudTAK/util/PropertyElevation.vue +84 -0
- package/src/components/CloudTAK/util/PropertyEmail.vue +44 -0
- package/src/components/CloudTAK/util/PropertyLinks.vue +148 -0
- package/src/components/CloudTAK/util/PropertyMetadata.vue +53 -0
- package/src/components/CloudTAK/util/PropertyMilSym.vue +62 -0
- package/src/components/CloudTAK/util/PropertyPhone.vue +61 -0
- package/src/components/CloudTAK/util/PropertySensor.vue +129 -0
- package/src/components/CloudTAK/util/PropertySpeed.vue +91 -0
- package/src/components/CloudTAK/util/PropertyStyle.vue +202 -0
- package/src/components/CloudTAK/util/PropertyTimes.vue +95 -0
- package/src/components/CloudTAK/util/PropertyType.vue +274 -0
- package/src/components/CloudTAK/util/SearchBox.vue +314 -0
- package/src/components/CloudTAK/util/SelectFeats.vue +190 -0
- package/src/components/CloudTAK/util/SettingsCallsign.vue +151 -0
- package/src/components/CloudTAK/util/Share.vue +496 -0
- package/src/components/CloudTAK/util/ShareToMission.vue +223 -0
- package/src/components/CloudTAK/util/ShareToPackage.vue +250 -0
- package/src/components/CloudTAK/util/SlideDownHeader.vue +92 -0
- package/src/components/CloudTAK/util/StandardItem.vue +42 -0
- package/src/components/CloudTAK/util/Subscriptions.vue +151 -0
- package/src/components/CloudTAK/util/TagEntry.vue +301 -0
- package/src/components/CloudTAK/util/UploadImport.vue +195 -0
- package/src/components/CloudTAK/util/VideoLeaseSourceType.vue +66 -0
- package/src/components/CloudTAK/util/WarnChannels.vue +56 -0
- package/src/components/CloudTAK/util/WarnConfiguration.vue +34 -0
- package/src/components/Configure.vue +259 -0
- package/src/components/ETL/Connection/AgencyBadge.vue +102 -0
- package/src/components/ETL/Connection/AgencySelect.vue +185 -0
- package/src/components/ETL/Connection/CertificateLogin.vue +75 -0
- package/src/components/ETL/Connection/CertificateMachineUser.vue +228 -0
- package/src/components/ETL/Connection/CertificateP12.vue +104 -0
- package/src/components/ETL/Connection/CertificateRaw.vue +50 -0
- package/src/components/ETL/Connection/ConnectionData.vue +174 -0
- package/src/components/ETL/Connection/ConnectionFiles.vue +182 -0
- package/src/components/ETL/Connection/ConnectionGroups.vue +181 -0
- package/src/components/ETL/Connection/ConnectionLayer.vue +180 -0
- package/src/components/ETL/Connection/ConnectionTokens.vue +147 -0
- package/src/components/ETL/Connection/ConnectionVideos.vue +151 -0
- package/src/components/ETL/Connection/Events.vue +88 -0
- package/src/components/ETL/Connection/StatusDot.vue +48 -0
- package/src/components/ETL/Connection/TokenModal.vue +136 -0
- package/src/components/ETL/Connection.vue +194 -0
- package/src/components/ETL/ConnectionCard.vue +265 -0
- package/src/components/ETL/ConnectionEdit.vue +448 -0
- package/src/components/ETL/Connections.vue +148 -0
- package/src/components/ETL/Data/DataFiles.vue +245 -0
- package/src/components/ETL/Data/DataGroups.vue +45 -0
- package/src/components/ETL/Data/DataLayer.vue +144 -0
- package/src/components/ETL/Data/Location.vue +238 -0
- package/src/components/ETL/Data.vue +259 -0
- package/src/components/ETL/DataEdit.vue +212 -0
- package/src/components/ETL/Layer/LayerAlarm.vue +307 -0
- package/src/components/ETL/Layer/LayerDeployment.vue +388 -0
- package/src/components/ETL/Layer/LayerEnvironment.vue +259 -0
- package/src/components/ETL/Layer/LayerIncomingConfig.vue +401 -0
- package/src/components/ETL/Layer/LayerIncomingEnvironmentArcGIS.vue +354 -0
- package/src/components/ETL/Layer/LayerIncomingSchema.vue +138 -0
- package/src/components/ETL/Layer/LayerIncomingStyles.vue +349 -0
- package/src/components/ETL/Layer/LayerOutgoingConfig.vue +204 -0
- package/src/components/ETL/Layer/LayerOutgoingEnvironmentArcGIS.vue +279 -0
- package/src/components/ETL/Layer/utils/QueryInput.vue +52 -0
- package/src/components/ETL/Layer/utils/Schema.vue +322 -0
- package/src/components/ETL/Layer/utils/SchemaModal.vue +77 -0
- package/src/components/ETL/Layer/utils/StatusDot.vue +38 -0
- package/src/components/ETL/Layer/utils/StyleLinkModal.vue +83 -0
- package/src/components/ETL/Layer/utils/StyleLinks.vue +139 -0
- package/src/components/ETL/Layer/utils/StyleSingle.vue +885 -0
- package/src/components/ETL/Layer/utils/StyleTemplate.vue +97 -0
- package/src/components/ETL/Layer/utils/TaskModal.vue +217 -0
- package/src/components/ETL/Layer.vue +560 -0
- package/src/components/ETL/LayerEdit.vue +276 -0
- package/src/components/ETL/Styling/Layer.vue +311 -0
- package/src/components/ETL/Styling/ObjectInput.vue +46 -0
- package/src/components/ETL/Styling/Style.vue +233 -0
- package/src/components/Home.vue +17 -0
- package/src/components/Loading.vue +42 -0
- package/src/components/Login.vue +198 -0
- package/src/components/LostUser.vue +31 -0
- package/src/components/PageFooter.vue +41 -0
- package/src/components/ServerAdmin.vue +408 -0
- package/src/components/VideoWall/Main.vue +79 -0
- package/src/components/VideoWall.vue +17 -0
- package/src/components/util/DataSelect.vue +148 -0
- package/src/components/util/EsriFilter.vue +140 -0
- package/src/components/util/EsriPortal.vue +422 -0
- package/src/components/util/EsriPortalCreate.vue +72 -0
- package/src/components/util/EsriServer.vue +368 -0
- package/src/components/util/GroupSelect.vue +166 -0
- package/src/components/util/IconSelect.vue +302 -0
- package/src/components/util/InitialAuthor.vue +28 -0
- package/src/components/util/LayerSelect.vue +162 -0
- package/src/components/util/LayerTaskSelect.vue +311 -0
- package/src/components/util/LayerTemplateSelect.vue +173 -0
- package/src/components/util/LoginModal.vue +110 -0
- package/src/components/util/PublicTilesSelect.vue +171 -0
- package/src/components/util/StatusDot.vue +31 -0
- package/src/components/util/TableFooter.vue +64 -0
- package/src/components/util/TableHeader.vue +127 -0
- package/src/components/util/Upload.vue +220 -0
- package/src/components/util/UploadCSV.vue +46 -0
- package/src/components/util/UploadLogo.vue +83 -0
- package/src/components/util/UploadP12.vue +93 -0
- package/src/components/util/UserSelect.vue +151 -0
- package/src/derived-types.d.ts +35243 -0
- package/src/main.ts +264 -0
- package/src/pages/admin/main.ts +208 -0
- package/src/pages/connection/main.ts +158 -0
- package/src/pages/docs/App.vue +19 -0
- package/src/pages/docs/main.ts +6 -0
- package/src/pages/video/main.ts +27 -0
- package/src/std.ts +152 -0
- package/src/stores/brand.ts +28 -0
- package/src/stores/float.ts +113 -0
- package/src/stores/map.ts +931 -0
- package/src/stores/modules/draw.ts +413 -0
- package/src/stores/modules/icons.ts +185 -0
- package/src/stores/modules/menu.ts +281 -0
- package/src/test/setup.ts +43 -0
- package/src/timediff.ts +33 -0
- package/src/types.ts +226 -0
- package/src/video.ts +27 -0
- package/src/vite-env.d.ts +9 -0
- package/src/workers/atlas-connection.ts +236 -0
- package/src/workers/atlas-database.ts +764 -0
- package/src/workers/atlas-profile.ts +374 -0
- package/src/workers/atlas-team.ts +90 -0
- package/src/workers/atlas.ts +81 -0
package/src/base/cot.ts
ADDED
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
import Icon from './icon.ts';
|
|
2
|
+
import { v4 as randomUUID } from 'uuid';
|
|
3
|
+
import { std } from '../std.ts';
|
|
4
|
+
import { db } from './database.ts';
|
|
5
|
+
import { bbox } from '@turf/bbox'
|
|
6
|
+
import { length } from '@turf/length'
|
|
7
|
+
import { isEqual } from '@react-hookz/deep-equal';
|
|
8
|
+
import { WorkerMessageType } from'./events.ts'
|
|
9
|
+
import type { Remote } from 'comlink';
|
|
10
|
+
import type Atlas from '../workers/atlas.ts';
|
|
11
|
+
import pointOnFeature from '@turf/point-on-feature';
|
|
12
|
+
import type { Feature, Subscription } from '../types.ts'
|
|
13
|
+
import type {
|
|
14
|
+
BBox as GeoJSONBBox,
|
|
15
|
+
Feature as GeoJSONFeature,
|
|
16
|
+
Geometry as GeoJSONGeometry,
|
|
17
|
+
} from 'geojson'
|
|
18
|
+
|
|
19
|
+
export interface Origin {
|
|
20
|
+
mode: OriginMode,
|
|
21
|
+
mode_id?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum OriginMode {
|
|
25
|
+
CONNECTION = 'Connection',
|
|
26
|
+
MISSION = 'Mission'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const RENDERED_PROPERTIES = [
|
|
30
|
+
'callsign',
|
|
31
|
+
'minzoom',
|
|
32
|
+
'maxzoom',
|
|
33
|
+
'fill',
|
|
34
|
+
'fill-opacity',
|
|
35
|
+
'stroke',
|
|
36
|
+
'group',
|
|
37
|
+
'icon',
|
|
38
|
+
'course',
|
|
39
|
+
'icon-opacity',
|
|
40
|
+
'stroke-opacity',
|
|
41
|
+
'stroke-style',
|
|
42
|
+
'stroke-width',
|
|
43
|
+
'marker-color',
|
|
44
|
+
'marker-radius',
|
|
45
|
+
'marker-opacity',
|
|
46
|
+
'circle-color',
|
|
47
|
+
'circle-radius',
|
|
48
|
+
'circle-opacity'
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
export default class COT {
|
|
52
|
+
id: string;
|
|
53
|
+
|
|
54
|
+
instance: string;
|
|
55
|
+
|
|
56
|
+
_path: string;
|
|
57
|
+
_properties: Feature["properties"];
|
|
58
|
+
_geometry: Feature["geometry"];
|
|
59
|
+
|
|
60
|
+
_remote: BroadcastChannel | null;
|
|
61
|
+
|
|
62
|
+
_atlas: Atlas | Remote<Atlas>;
|
|
63
|
+
|
|
64
|
+
_username?: string;
|
|
65
|
+
|
|
66
|
+
origin: Origin
|
|
67
|
+
|
|
68
|
+
static async load(
|
|
69
|
+
atlas: Atlas,
|
|
70
|
+
feat: Feature,
|
|
71
|
+
origin?: Origin,
|
|
72
|
+
opts?: {
|
|
73
|
+
skipSave?: boolean;
|
|
74
|
+
remote?: boolean
|
|
75
|
+
}
|
|
76
|
+
) {
|
|
77
|
+
const a = atlas as Atlas;
|
|
78
|
+
await COT.style(feat);
|
|
79
|
+
|
|
80
|
+
return new COT(
|
|
81
|
+
a,
|
|
82
|
+
feat,
|
|
83
|
+
origin,
|
|
84
|
+
opts
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
constructor(
|
|
89
|
+
atlas: Atlas | Remote<Atlas>,
|
|
90
|
+
feat: Feature,
|
|
91
|
+
origin?: Origin,
|
|
92
|
+
opts?: {
|
|
93
|
+
skipSave?: boolean;
|
|
94
|
+
remote?: boolean
|
|
95
|
+
}
|
|
96
|
+
) {
|
|
97
|
+
this.id = feat.id || randomUUID();
|
|
98
|
+
|
|
99
|
+
this._path = feat.path || '/';
|
|
100
|
+
this._properties = feat["properties"] || {};
|
|
101
|
+
this._geometry = feat["geometry"];
|
|
102
|
+
|
|
103
|
+
this._remote = (opts && opts.remote === true) ? new BroadcastChannel('sync') : null
|
|
104
|
+
this._atlas = atlas;
|
|
105
|
+
|
|
106
|
+
this.instance = this._remote ? `remote:${randomUUID()}` : `db:${randomUUID()}`
|
|
107
|
+
|
|
108
|
+
this.origin = origin || { mode: OriginMode.CONNECTION };
|
|
109
|
+
if (this.origin.mode === OriginMode.CONNECTION && !this._remote) {
|
|
110
|
+
const atlas = this._atlas as Atlas;
|
|
111
|
+
|
|
112
|
+
if (!atlas.db.cots.has(this.id)) {
|
|
113
|
+
atlas.db.pendingCreate.set(this.id, this);
|
|
114
|
+
} else {
|
|
115
|
+
atlas.db.pendingUpdate.set(this.id, this);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
atlas.db.cots.set(this.id, this);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (!opts || (opts && opts.skipSave !== true)) {
|
|
122
|
+
this.save();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Begin listening for remote updates
|
|
128
|
+
* This is a seperate function due to the issues outlined in: https://stackoverflow.com/q/70184129
|
|
129
|
+
*/
|
|
130
|
+
reactivity() {
|
|
131
|
+
if (this._remote) {
|
|
132
|
+
// The sync BroadcastChannel will post a message anytime the underlying
|
|
133
|
+
// Atlas database has a COT update, resulting in a sync with the frontend
|
|
134
|
+
this._remote.onmessage = async (ev) => {
|
|
135
|
+
if (ev.data.id === this.id) {
|
|
136
|
+
this._path = ev.data.path;
|
|
137
|
+
this.origin = ev.data.origin;
|
|
138
|
+
Object.assign(this._properties, ev.data.properties);
|
|
139
|
+
Object.assign(this._geometry, ev.data.geometry);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
} else {
|
|
143
|
+
throw new Error('Only Remote instances can listen for updates');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
set path(path: string) {
|
|
148
|
+
this.update({ path });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
get path() {
|
|
152
|
+
return this._path;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
set properties(properties: Feature["properties"]) {
|
|
156
|
+
this.update({ properties });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
get properties() {
|
|
160
|
+
return this._properties;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
set geometry(geometry: Feature["geometry"]) {
|
|
164
|
+
this.update({ geometry })
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
get geometry() {
|
|
168
|
+
return this._geometry;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Update the COT and return a boolean as to whether the COT needs to be re-rendered
|
|
173
|
+
*/
|
|
174
|
+
async update(
|
|
175
|
+
update: {
|
|
176
|
+
path?: string,
|
|
177
|
+
properties?: Feature["properties"],
|
|
178
|
+
geometry?: Feature["geometry"]
|
|
179
|
+
},
|
|
180
|
+
opts?: {
|
|
181
|
+
skipSave?: boolean;
|
|
182
|
+
}
|
|
183
|
+
): Promise<boolean> {
|
|
184
|
+
if (this._remote) {
|
|
185
|
+
const atlas = this._atlas as Remote<Atlas>;
|
|
186
|
+
|
|
187
|
+
if (update.path) this._path = update.path;
|
|
188
|
+
if (update.properties) this._properties = update.properties;
|
|
189
|
+
if (update.geometry) this._geometry = update.geometry;
|
|
190
|
+
|
|
191
|
+
// We do the parse/stringify to ensure that deep Proxies created with Vue3 ref/reactive are removed
|
|
192
|
+
// As they cannot be Cloned accross the ComLink Bridge
|
|
193
|
+
await atlas.db.add(JSON.parse(JSON.stringify(this.as_feature())), {
|
|
194
|
+
// Changes that are remote (from the frontend are always user-authored),
|
|
195
|
+
// this is important to trigger submission for Mission Syncs
|
|
196
|
+
authored: true
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
return false;
|
|
200
|
+
} else {
|
|
201
|
+
if (!update.geometry && !update.properties && !update.path) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const atlas = this._atlas as Atlas;
|
|
206
|
+
|
|
207
|
+
if (update.path) {
|
|
208
|
+
this._path = update.path;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let visuallyChanged = false;
|
|
212
|
+
if (update.geometry) {
|
|
213
|
+
if (isEqual(this.geometry, update.geometry)) {
|
|
214
|
+
delete update.geometry;
|
|
215
|
+
} else {
|
|
216
|
+
Object.assign(this._geometry, update.geometry);
|
|
217
|
+
visuallyChanged = true;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (update.properties) {
|
|
222
|
+
update.properties = await COT.styleProperties(this._geometry.type, update.properties);
|
|
223
|
+
|
|
224
|
+
if (isEqual(this.properties, update.properties)) {
|
|
225
|
+
delete update.properties
|
|
226
|
+
} else {
|
|
227
|
+
for (const prop of RENDERED_PROPERTIES) {
|
|
228
|
+
if (this._properties[prop] !== update.properties[prop]) {
|
|
229
|
+
visuallyChanged = true;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
Object.assign(this._properties, update.properties);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (update.geometry || !this._properties.center || (this._properties.center[0] === 0 && this._properties.center[1] === 0)) {
|
|
239
|
+
this._properties.center = pointOnFeature(this._geometry).geometry.coordinates;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (this.origin.mode === OriginMode.CONNECTION) {
|
|
243
|
+
atlas.db.pendingUpdate.set(this.id, this);
|
|
244
|
+
await db.feature.put({
|
|
245
|
+
id: this.id,
|
|
246
|
+
path: this._path,
|
|
247
|
+
properties: this._properties,
|
|
248
|
+
geometry: this._geometry
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
atlas.sync.postMessage(this.as_feature());
|
|
253
|
+
|
|
254
|
+
if (this.is_self) {
|
|
255
|
+
const getProfile = await atlas.profile.profile;
|
|
256
|
+
|
|
257
|
+
const profile = getProfile instanceof Promise ? await getProfile : getProfile;
|
|
258
|
+
|
|
259
|
+
if (
|
|
260
|
+
profile
|
|
261
|
+
&& (
|
|
262
|
+
this.properties.remarks !== profile.tak_remarks
|
|
263
|
+
|| this.properties.callsign !== profile.tak_callsign
|
|
264
|
+
)
|
|
265
|
+
) {
|
|
266
|
+
await atlas.profile.update({
|
|
267
|
+
tak_callsign: this.properties.callsign,
|
|
268
|
+
tak_remarks: this.properties.remarks
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
} else if (!opts || (opts && opts.skipSave !== false)) {
|
|
272
|
+
await this.save();
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return visuallyChanged;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Attempt to save the CoT to the database if necessary
|
|
281
|
+
*/
|
|
282
|
+
async save(): Promise<void> {
|
|
283
|
+
if (
|
|
284
|
+
!this._remote
|
|
285
|
+
&& !this.is_self
|
|
286
|
+
&& this.properties.archived
|
|
287
|
+
&& this.origin.mode === OriginMode.CONNECTION
|
|
288
|
+
) {
|
|
289
|
+
const atlas = this._atlas as Atlas;
|
|
290
|
+
|
|
291
|
+
await std('/api/profile/feature', {
|
|
292
|
+
method: 'PUT',
|
|
293
|
+
token: atlas.token,
|
|
294
|
+
body: this.as_feature()
|
|
295
|
+
})
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
get is_skittle(): boolean {
|
|
300
|
+
return !!this.properties.group;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
get is_self(): boolean {
|
|
304
|
+
if (this._atlas) {
|
|
305
|
+
return this._atlas.profile.uid() === this.id;
|
|
306
|
+
} else {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
get is_archivable(): boolean {
|
|
312
|
+
return !this.is_skittle;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Determines if the COT type allows editing
|
|
317
|
+
* But does not determine if a COT is part of a Misison Sync, if the mission allows editing
|
|
318
|
+
*/
|
|
319
|
+
get is_editable(): boolean {
|
|
320
|
+
return this.properties.archived || this.is_self || false;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async subscription(): Promise<Subscription> {
|
|
324
|
+
if (!this.is_skittle) throw new Error('Username can only be obtained for Users');
|
|
325
|
+
|
|
326
|
+
return (await std(`/api/marti/subscription/${this.id}`, {
|
|
327
|
+
method: 'GET'
|
|
328
|
+
}) as Subscription);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
async username(): Promise<string> {
|
|
332
|
+
if (!this.is_skittle) throw new Error('Username can only be obtained for Users');
|
|
333
|
+
|
|
334
|
+
if (this._username) {
|
|
335
|
+
return this._username;
|
|
336
|
+
} else {
|
|
337
|
+
try {
|
|
338
|
+
this._username = (await this.subscription()).username;
|
|
339
|
+
} catch (err) {
|
|
340
|
+
console.error(err);
|
|
341
|
+
this._username = '';
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return this._username;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Returns a proxy that will correctly call the internal update function if changes are made
|
|
350
|
+
* Warning: Cannot be used with Vue3's reactivity system
|
|
351
|
+
*/
|
|
352
|
+
as_proxy(): COT {
|
|
353
|
+
return new Proxy(this, {
|
|
354
|
+
set(target, prop, val) {
|
|
355
|
+
return Reflect.set(target, prop, val);
|
|
356
|
+
},
|
|
357
|
+
get(target, prop) {
|
|
358
|
+
if (prop === 'properties') {
|
|
359
|
+
return new Proxy(target.properties, {
|
|
360
|
+
set(subtarget, prop, val) {
|
|
361
|
+
const res = Reflect.set(subtarget, prop, val);
|
|
362
|
+
target.update({ properties: subtarget })
|
|
363
|
+
return res;
|
|
364
|
+
}
|
|
365
|
+
})
|
|
366
|
+
} else if (prop === 'geometry') {
|
|
367
|
+
return new Proxy(target.geometry, {
|
|
368
|
+
set(subtarget, prop, val) {
|
|
369
|
+
const res = Reflect.set(subtarget, prop, val);
|
|
370
|
+
target.update({ geometry: subtarget })
|
|
371
|
+
return res;
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
} else {
|
|
375
|
+
return Reflect.get(target, prop);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
})
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
as_feature(opts?: {
|
|
382
|
+
clone?: boolean
|
|
383
|
+
}): Feature {
|
|
384
|
+
const feat = {
|
|
385
|
+
id: this.id,
|
|
386
|
+
type: 'Feature',
|
|
387
|
+
path: this._path,
|
|
388
|
+
origin: this.origin,
|
|
389
|
+
properties: this._properties,
|
|
390
|
+
geometry: this._geometry
|
|
391
|
+
} as Feature
|
|
392
|
+
|
|
393
|
+
if (opts && opts.clone) {
|
|
394
|
+
return JSON.parse(JSON.stringify(feat)) as Feature;
|
|
395
|
+
} else {
|
|
396
|
+
return feat;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
as_rendered() {
|
|
401
|
+
return COT.as_rendered(this.as_feature());
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The slimmer we can get the Features, the better
|
|
406
|
+
* This returns the minium feature we need to actually style the COT in the vector tiles
|
|
407
|
+
*/
|
|
408
|
+
static as_rendered(
|
|
409
|
+
input: Feature
|
|
410
|
+
): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>> {
|
|
411
|
+
const feat: GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>> = {
|
|
412
|
+
id: this.vectorId(input.id),
|
|
413
|
+
type: 'Feature',
|
|
414
|
+
properties: {
|
|
415
|
+
id: input.id, //Vector Tiles only support integer IDs so store in props
|
|
416
|
+
callsign: input.properties.callsign,
|
|
417
|
+
},
|
|
418
|
+
geometry: input.geometry
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
if (!feat.properties) feat.properties = {};
|
|
422
|
+
|
|
423
|
+
for (const prop of RENDERED_PROPERTIES) {
|
|
424
|
+
if (input.properties[prop] !== undefined) {
|
|
425
|
+
feat.properties[prop] = input.properties[prop];
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return feat;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
vectorId(): number {
|
|
433
|
+
return COT.vectorId(this.id);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* string hash function to convert the COT ID into a number for use as a vector tile feature ID
|
|
438
|
+
*/
|
|
439
|
+
static vectorId(id: string): number {
|
|
440
|
+
let h = 0;
|
|
441
|
+
if (id.length === 0) return h;
|
|
442
|
+
for (let i = 0; i < id.length; i++) {
|
|
443
|
+
h = (h << 5) - h + id.charCodeAt(i);
|
|
444
|
+
h |= 0; // Ensure 32-bit integer
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return h >>> 0; // Convert to unsigned
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
length(): number {
|
|
451
|
+
if (this._geometry.type === 'LineString') {
|
|
452
|
+
return length({
|
|
453
|
+
type: 'Feature',
|
|
454
|
+
properties: {},
|
|
455
|
+
geometry: this._geometry
|
|
456
|
+
});
|
|
457
|
+
} else {
|
|
458
|
+
return 0;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
bounds(): GeoJSONBBox {
|
|
463
|
+
return bbox(this._geometry);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
async flyTo(): Promise<void> {
|
|
467
|
+
if (this.geometry.type === 'Point') {
|
|
468
|
+
let zoom = 16
|
|
469
|
+
if (this.properties.minzoom) {
|
|
470
|
+
zoom = this.properties.minzoom;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
await this._atlas.postMessage({
|
|
474
|
+
type: WorkerMessageType.Map_FlyTo,
|
|
475
|
+
body: {
|
|
476
|
+
center: [this.properties.center[0], this.properties.center[1]],
|
|
477
|
+
zoom,
|
|
478
|
+
speed: Infinity,
|
|
479
|
+
}
|
|
480
|
+
})
|
|
481
|
+
} else {
|
|
482
|
+
await this._atlas.postMessage({
|
|
483
|
+
type: WorkerMessageType.Map_FitBounds,
|
|
484
|
+
body: {
|
|
485
|
+
bounds: this.bounds(),
|
|
486
|
+
options: {
|
|
487
|
+
maxZoom: 18,
|
|
488
|
+
padding: {
|
|
489
|
+
top: 20,
|
|
490
|
+
bottom: 20,
|
|
491
|
+
left: 20,
|
|
492
|
+
right: 20
|
|
493
|
+
},
|
|
494
|
+
speed: Infinity,
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
})
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
static async style(
|
|
502
|
+
feat: Feature
|
|
503
|
+
): Promise<Feature> {
|
|
504
|
+
feat.properties = await COT.styleProperties(feat.geometry.type, feat.properties);
|
|
505
|
+
|
|
506
|
+
if (!feat.properties.archived) {
|
|
507
|
+
feat.properties.archived = false
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if (!feat.properties.id) {
|
|
511
|
+
feat.properties.id = feat.id;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if (!feat.properties.center || (feat.properties.center[0] === 0 && feat.properties.center[1] === 0)) {
|
|
515
|
+
feat.properties.center = pointOnFeature(feat.geometry).geometry.coordinates;
|
|
516
|
+
|
|
517
|
+
if (feat.geometry.type === 'Point' && feat.geometry.coordinates.length > 2) {
|
|
518
|
+
feat.properties.center[2] = feat.geometry.coordinates[2];
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
return feat;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Consistent feature manipulation between add & update
|
|
527
|
+
*/
|
|
528
|
+
static async styleProperties(
|
|
529
|
+
type: string,
|
|
530
|
+
properties: Feature["properties"]
|
|
531
|
+
): Promise<Feature["properties"]> {
|
|
532
|
+
if (!properties.time) properties.time = new Date().toISOString();
|
|
533
|
+
if (!properties.start) properties.start = new Date().toISOString();
|
|
534
|
+
if (!properties.stale) {
|
|
535
|
+
const currentTime = new Date();
|
|
536
|
+
currentTime.setMinutes(currentTime.getMinutes() + 10);
|
|
537
|
+
properties.stale = currentTime.toISOString();
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (!properties.remarks) {
|
|
541
|
+
properties.remarks = 'None';
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if (!properties.how && properties.type.startsWith('u-')) {
|
|
545
|
+
properties.how = 'h-g-i-g-o';
|
|
546
|
+
} else if (!properties.how) {
|
|
547
|
+
properties.how = 'm-p';
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
if (type.includes('Point')) {
|
|
551
|
+
if (properties.group) {
|
|
552
|
+
properties['icon-opacity'] = 0;
|
|
553
|
+
|
|
554
|
+
if (properties.group.name === 'Yellow') {
|
|
555
|
+
properties["marker-color"] = '#f59f00';
|
|
556
|
+
} else if (properties.group.name === 'Orange') {
|
|
557
|
+
properties["marker-color"] = '#f76707';
|
|
558
|
+
} else if (properties.group.name === 'Magenta') {
|
|
559
|
+
properties["marker-color"] = '#ea4c89';
|
|
560
|
+
} else if (properties.group.name === 'Red') {
|
|
561
|
+
properties["marker-color"] = '#d63939';
|
|
562
|
+
} else if (properties.group.name === 'Maroon') {
|
|
563
|
+
properties["marker-color"] = '#bd081c';
|
|
564
|
+
} else if (properties.group.name === 'Purple') {
|
|
565
|
+
properties["marker-color"] = '#ae3ec9';
|
|
566
|
+
} else if (properties.group.name === 'Dark Blue') {
|
|
567
|
+
properties["marker-color"] = '#0054a6';
|
|
568
|
+
} else if (properties.group.name === 'Blue') {
|
|
569
|
+
properties["marker-color"] = '#4299e1';
|
|
570
|
+
} else if (properties.group.name === 'Cyan') {
|
|
571
|
+
properties["marker-color"] = '#17a2b8';
|
|
572
|
+
} else if (properties.group.name === 'Teal') {
|
|
573
|
+
properties["marker-color"] = '#0ca678';
|
|
574
|
+
} else if (properties.group.name === 'Green') {
|
|
575
|
+
properties["marker-color"] = '#74b816';
|
|
576
|
+
} else if (properties.group.name === 'Dark Green') {
|
|
577
|
+
properties["marker-color"] = '#2fb344';
|
|
578
|
+
} else if (properties.group.name === 'Brown') {
|
|
579
|
+
properties["marker-color"] = '#dc4e41';
|
|
580
|
+
} else {
|
|
581
|
+
properties["marker-color"] = '#ffffff';
|
|
582
|
+
}
|
|
583
|
+
} else if (properties.icon) {
|
|
584
|
+
// Format of icon needs to change for spritesheet
|
|
585
|
+
if (!properties.icon.includes(':')) {
|
|
586
|
+
properties.icon = properties.icon.replace('/', ':')
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (properties.icon.endsWith('.png')) {
|
|
590
|
+
properties.icon = properties.icon.replace(/.png$/, '');
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (!await Icon.has(properties.icon)) {
|
|
594
|
+
console.warn(`No Icon for: ${properties.icon} fallback to ${properties.type}`);
|
|
595
|
+
properties.icon = `${properties.type}`;
|
|
596
|
+
}
|
|
597
|
+
} else if (properties.milsym && !isNaN(Number(properties.milsym.id))) {
|
|
598
|
+
properties.icon = `2525D:${properties.milsym.id}`;
|
|
599
|
+
} else {
|
|
600
|
+
// TODO Only add icon if one actually exists in the spritejson
|
|
601
|
+
if (!['u-d-p', 'b-m-p-s-m'].includes(properties.type)) {
|
|
602
|
+
properties.icon = `${properties.type}`;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
} else if (type.includes('Line') || type.includes('Polygon')) {
|
|
606
|
+
if (!properties['stroke']) properties.stroke = '#d63939';
|
|
607
|
+
if (!properties['stroke-style']) properties['stroke-style'] = 'solid';
|
|
608
|
+
if (!properties['stroke-width']) properties['stroke-width'] = 3;
|
|
609
|
+
|
|
610
|
+
if (properties['stroke-opacity'] === undefined) {
|
|
611
|
+
properties['stroke-opacity'] = 1;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
if (type.includes('Polygon')) {
|
|
615
|
+
if (!properties['fill']) properties.fill = '#d63939';
|
|
616
|
+
|
|
617
|
+
if (properties['fill-opacity'] === undefined) {
|
|
618
|
+
properties['fill-opacity'] = 0.5;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return properties;
|
|
624
|
+
}
|
|
625
|
+
}
|