A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.
JavaScript 3d-globecesiumflight-trackinggeospatialgeospatial-intelligencegisosintphotogrammetrysatellite-trackingspatial-intelligencewebglworldview
Merge current main into S2 GhostMaps and preserve updated import and voice behavior
Mazeyar Moeini Feizabadi4da002bd4278
diff --cc src/data/geoFileImport.jsindex 86c60cb94,6f5f2e653..6e379bb39--- a/src/data/geoFileImport.js+++ b/src/data/geoFileImport.js@@@ -1040,32 -1040,103 +1040,104 @@@ export function detachImportedTime(datareturn dataSource;}- /**- * Parse KML or GPX text with the namespace repairs Cesium applies.- * @param {string} text- * @param {string} what Format name for the error message.- * @returns {Document}- */+ /** Repair only the first KML opening tag, scanning its delimiter once. */+ export function repairKmlRootNamespaces(value, what = 'KML') {+ const text = String(value);+ // Skip XML comments and processing instructions without treating their+ // literal '<kml' text as an opening root tag.+ let start = 0;+ for (;;) {+ start = text.indexOf('<', start);+ if (start < 0) return text;+ if (text.slice(start, start + 9).toUpperCase() === '<!DOCTYPE') {+ let quote = null;+ let subsetDepth = 0;+ let end = start + 9;+ for (; end < text.length; end++) {+ const char = text[end];+ if (quote) {+ if (char === quote) quote = null;+ } else if (char === '"' || char === "'") quote = char;+ else if (char === '<' && text.startsWith('<!--', end)) {+ // Comments and processing instructions inside the internal subset+ // carry no declaration syntax; jump past them as a whole.+ const skip = text.indexOf('-->', end + 4);+ if (skip < 0) return text;+ end = skip + 2;+ } else if (char === '<' && text.startsWith('<?', end)) {+ const skip = text.indexOf('?>', end + 2);+ if (skip < 0) return text;+ end = skip + 1;+ } else if (char === '[') subsetDepth++;+ else if (char === ']') subsetDepth--;+ else if (char === '>' && subsetDepth === 0) break;+ }+ if (end === text.length) return text;+ start = end + 1;+ continue;+ }+ const close = text.startsWith('<!--', start)+ ? '-->'+ : text.startsWith('<?', start)+ ? '?>'+ : null;+ if (!close) break;+ const end = text.indexOf(close, start + 2);+ if (end < 0) return text; // The XML parser reports an unterminated preamble.+ start = end + close.length;+ }+ const match = /^<kml\b/i.exec(text.slice(start, start + 5));+ if (!match) return text;+ let quote = null;+ let end = -1;+ for (let index = start + match[0].length; index < text.length; index++) {+ const char = text[index];+ if (char === '<') break; // Raw '<' is invalid even inside an XML attribute.+ if (quote) {+ if (char === quote) quote = null;+ } else if (char === '"' || char === "'") {+ quote = char;+ } else if (char === '>') {+ end = index + 1;+ break;+ }+ }+ if (end < 0)+ throw new GeoImportError(+ `That ${what} file is not valid XML.`,+ msg('That {format} file is not valid XML.'),+ { format: what },+ );+ // Walk the root's attributes in order so quoted values are never read as+ // declarations. Anything the walk cannot tokenize is kept verbatim for the+ // XML parser to judge.+ const seen = new Set();+ const attribute = /(\s+)([^\s=/>"']+)\s*=\s*("[^"]*"|'[^']*')/y;+ let position = start + match[0].length;+ let root = text.slice(start, position);+ for (;;) {+ attribute.lastIndex = position;+ const found = attribute.exec(text);+ if (!found || attribute.lastIndex > end) break;+ position = attribute.lastIndex;+ const prefix = /^xmlns:([\w.-]+)$/.exec(found[2])?.[1];+ if (prefix && seen.has(prefix)) continue;+ if (prefix) seen.add(prefix);+ root += found[0];+ }+ root += text.slice(position, end);+ if (!seen.has('xsi') && /[<\s]xsi:/.test(text))+ root = root.replace(+ /(\/?)>$/,+ ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"$1>',+ );+ return text.slice(0, start) + root + text.slice(end);+ }+-function parseXml(text, what) {++/** Parse KML or GPX with the shared namespace repairs and XML validation. */+export function parseXml(text, what) {// Match the namespace repairs Cesium applies to ordinary exported KML.- if (what !== 'GPX')- text = String(text).replace(/<kml\b[^>]*>/i, (root) => {- const seen = new Set();- root = root.replace(- /\s+xmlns:([\w.-]+)\s*=\s*(["'])[^"']*\2/g,- (declaration, prefix) => {- if (seen.has(prefix)) return '';- seen.add(prefix);- return declaration;- },- );- if (!seen.has('xsi') && /[<\s]xsi:/.test(text))- root = root.replace(- />$/,- ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">',- );- return root;- });+ if (what !== 'GPX') text = repairKmlRootNamespaces(text, what);const doc = new DOMParser().parseFromString(String(text).replace(/^/, ''),'application/xml',diff --cc src/firstRunExperience.test.mjsindex acf4d4bfe,603272e82..2b18c6825--- a/src/firstRunExperience.test.mjs+++ b/src/firstRunExperience.test.mjs@@@ -995,11 -1049,14 +1049,15 @@@ test('the voice TOOL SCHEMA matches th// list descriptions; the missions still ride existing tools.// Street Level and GNSS extend the manifest; broadcast caveats describe tracked and analyst aircraft.// Air quality (ECCC AQHI) extends the manifest.- // S2 GhostMaps extends the manifest.- assert.equal(block.length, 30723, 'serialized tool schema length drifted');+ // Globe rotation adds one camera motion and its descriptions; Globe View+ // framing/default guidance updates only move_camera and mode descriptions.+ // Radio markup and the complete production-request comparison pin locality.+ // Restore the base camera/Globe View wording with the globe-rotation append.- assert.equal(block.length, 30878, 'serialized tool schema length drifted');++ // S2 GhostMaps adds its layer id to the generated layer enums.++ assert.equal(block.length, 30946, 'serialized tool schema length drifted');assert.equal(crypto.createHash('sha256').update(block).digest('hex'),- '5937f0e90d38bf4109136c71bb9561298dd3fca11464ff980a1f982b6c154e5b',- '7b95f0f4258896fe5c3316265a19f3a6602809d4e7e681ee7ecd8f2df514ef1f',++ 'be53b22c55e620fb36c6ea0f276bfe5a59de47fa02ead99188ada40c0bf48cc0','the first-run missions must ride EXISTING tools: no schema edit, no cache bust',);const instructions = fs.readFileSync(diff --cc src/i18n/locales/es.jsonindex 80685eee1,098c82f55..076c231d1--- a/src/i18n/locales/es.json+++ b/src/i18n/locales/es.json@@@ -2938,32 -2942,15 +2942,43 @@@"Gemini Live is unavailable for the configured model.": "Gemini Live no está disponible para el modelo configurado.","Token request is too large": "La solicitud de credencial es demasiado grande","Use an empty JSON token request": "Usa una solicitud de credencial con un objeto JSON vacío",+ "S2 GhostMaps": "S2 GhostMaps",+ "Intel Picture": "Panorama de inteligencia",+ "Kinetic 30d": "Cinético 30 d",+ "Border Crisis": "Crisis fronteriza",+ "Iran Picture": "Panorama de Irán",+ "Iran Kinetic": "Irán cinético",+ "Yemen FLOT": "FLOT de Yemen",+ "Latest Drop": "Última publicación",+ "GhostMaps file could not be read": "No se pudo leer el archivo de GhostMaps",+ "GhostMaps catalog unavailable": "Catálogo de GhostMaps no disponible",+ "Malformed GhostMaps catalog": "Catálogo de GhostMaps mal formado",+ "{count} source links ↗ · click card to open the first": {+ "one": "{count} enlace a la fuente ↗ · haz clic en la tarjeta para abrirlo",+ "many": "{count} de enlaces a fuentes ↗ · haz clic en la tarjeta para abrir el primero",+ "other": "{count} enlaces a fuentes ↗ · haz clic en la tarjeta para abrir el primero"+ },+ "S2 · {name}": "S2 · {name}",+ "Report": "Informe",+ "Open the source for {title}": "Abrir la fuente de {title}",+ "LIVE · GitHub {commit} · {message} · checked every {seconds}s": "EN VIVO · GitHub {commit} · {message} · comprobado cada {seconds} s",+ "GitHub {commit} · {message} · reconnecting for live updates": "GitHub {commit} · {message} · reconectando para recibir actualizaciones en vivo",+ "Connecting to the S2 GhostMaps repository…": "Conectando con el repositorio S2 GhostMaps…",+ "{count} placemarks": {+ "one": "{count} marcador",+ "many": "{count} de marcadores",+ "other": "{count} marcadores"+ },- "S2 Underground publishes these KMZ products to GitHub. New uploads are detected within seconds and replace the previous edition automatically. Click a marker for its report.": "S2 Underground publica estos productos KMZ en GitHub. Las nuevas publicaciones se detectan en segundos y sustituyen automáticamente a la edición anterior. Haz clic en un marcador para ver su informe."++ "S2 Underground publishes these KMZ products to GitHub. New uploads are detected within seconds and replace the previous edition automatically. Click a marker for its report.": "S2 Underground publica estos productos KMZ en GitHub. Las nuevas publicaciones se detectan en segundos y sustituyen automáticamente a la edición anterior. Haz clic en un marcador para ver su informe.",+ " Clouds are preserved from the source imagery.": " Las nubes provienen de las imágenes de origen.",+ "hemisphere|N": "N",+ "hemisphere|S": "S",+ "hemisphere|E": "E",+ "hemisphere|W": "O",+ "OK": "OK",+ "{category} ({count})": "{category} ({count})",+ "Layers": "Capas",+ "Search": "Buscar",+ "More": "Más",+ "Panels": "Paneles"}diff --cc src/i18n/locales/ru.jsonindex 0a0d7a8bf,8d12ba43e..dcbe8ff60--- a/src/i18n/locales/ru.json+++ b/src/i18n/locales/ru.json@@@ -3005,34 -3009,15 +3009,45 @@@"Gemini Live is unavailable for the configured model.": "Gemini Live недоступен для выбранной модели.","Token request is too large": "Запрос токена слишком велик","Use an empty JSON token request": "Используйте запрос токена с пустым объектом JSON",+ "S2 GhostMaps": "S2 GhostMaps",+ "Intel Picture": "Разведкартина",+ "Kinetic 30d": "Боевые 30 дн.",+ "Border Crisis": "Кризис на границе",+ "Iran Picture": "Иран: картина",+ "Iran Kinetic": "Иран: боевые",+ "Yemen FLOT": "Йемен: линия фронта",+ "Latest Drop": "Новый выпуск",+ "GhostMaps file could not be read": "Не удалось прочитать файл GhostMaps",+ "GhostMaps catalog unavailable": "Каталог GhostMaps недоступен",+ "Malformed GhostMaps catalog": "Повреждённый каталог GhostMaps",+ "{count} source links ↗ · click card to open the first": {+ "one": "{count} ссылка на источник ↗ · нажмите на карточку, чтобы открыть",+ "few": "{count} ссылки на источники ↗ · нажмите на карточку, чтобы открыть первую",+ "many": "{count} ссылок на источники ↗ · нажмите на карточку, чтобы открыть первую",+ "other": "{count} ссылки на источники ↗ · нажмите на карточку, чтобы открыть первую"+ },+ "S2 · {name}": "S2 · {name}",+ "Report": "Сводка",+ "Open the source for {title}": "Открыть источник: {title}",+ "LIVE · GitHub {commit} · {message} · checked every {seconds}s": "В ЭФИРЕ · GitHub {commit} · {message} · проверка каждые {seconds} с",+ "GitHub {commit} · {message} · reconnecting for live updates": "GitHub {commit} · {message} · переподключение для обновлений в реальном времени",+ "Connecting to the S2 GhostMaps repository…": "Подключение к репозиторию S2 GhostMaps…",+ "{count} placemarks": {+ "one": "{count} метка",+ "few": "{count} метки",+ "many": "{count} меток",+ "other": "{count} метки"+ },- "S2 Underground publishes these KMZ products to GitHub. New uploads are detected within seconds and replace the previous edition automatically. Click a marker for its report.": "S2 Underground публикует эти продукты KMZ на GitHub. Новые файлы обнаруживаются за секунды и автоматически заменяют предыдущий выпуск. Нажмите на метку, чтобы открыть её сводку."++ "S2 Underground publishes these KMZ products to GitHub. New uploads are detected within seconds and replace the previous edition automatically. Click a marker for its report.": "S2 Underground публикует эти продукты KMZ на GitHub. Новые файлы обнаруживаются за секунды и автоматически заменяют предыдущий выпуск. Нажмите на метку, чтобы открыть её сводку.",+ " Clouds are preserved from the source imagery.": " Облака оставлены такими, как на исходных снимках.",+ "hemisphere|N": "С",+ "hemisphere|S": "Ю",+ "hemisphere|E": "В",+ "hemisphere|W": "З",+ "OK": "НОРМА",+ "{category} ({count})": "{category} ({count})",+ "Layers": "Слои",+ "Search": "Поиск",+ "More": "Ещё",+ "Panels": "Панели"}diff --cc src/i18n/same-as-english.jsonindex 722f1c942,c331cd070..3a4a9e54a--- a/src/i18n/same-as-english.json+++ b/src/i18n/same-as-english.json@@@ -133,9 -135,62 +137,64 @@@"NVG","R&B","REC",+ "S2 GhostMaps",+ "S2 · {name}","VS","WHOT/BHOT"+ ],+ "zh-CN": [+ "1090 MHz",+ "978 MHz UAT",+ "AIS: --",+ "AIS: {name}",+ "BRG {value}°",+ "BRG —",+ "CAL {value}",+ "CAL · {badge}",+ "CCTV",+ "CRS {value}°",+ "CRT",+ "FLIR",+ "FOV",+ "FOV {value}°",+ "FT",+ "GEO",+ "HDG",+ "HDG {value}°",+ "House",+ "Ironbow",+ "KTS",+ "Landsat 8/9",+ "MM",+ "NVG",+ "REC",+ "SRC {value}",+ "Sentinel-2",+ "Techno",+ "Trance",+ "USB {rate} msg/s",+ "WHOT/BHOT",+ "dB",+ "ft",+ "hPa",+ "hemisphere|E",+ "hemisphere|N",+ "hemisphere|S",+ "hemisphere|W",+ "km",+ "km/h",+ "kt",+ "kts",+ "mph",+ "{city} CCTV",+ "{rate} msg/s",+ "{source} HTTP {status}",+ "{speed} kn",+ "{type} SPD: {speed} HDG: {heading}",+ "{value} KM",+ "{value} KM/S",+ "ΔE",+ "ΔN",+ "▲ {frp} MW"]}diff --cc src/voice/actionSchemas.test.mjsindex b295e6f1b,d65d7d8db..617d0077f--- a/src/voice/actionSchemas.test.mjs+++ b/src/voice/actionSchemas.test.mjs@@@ -38,8 -39,10 +39,11 @@@ test('the complete Realtime tool payloa// requested radius and center authority in descriptions only.// Street Level and GNSS extend the manifest; tracked and analyst aircraft describe broadcasts.// Air quality (ECCC AQHI) extends the manifest.- // S2 GhostMaps extends the manifest.- '64a7ae9719cbf53f2c5b57739c1e84e8b60dc4ede040decd48a9c06d1ccbcbca',+ // Globe rotation adds one motion; visual keyhole fit and explicit+ // reset guidance/defaults update only move_camera and mode descriptions.+ // Restore base descriptions; append only globe-rotation defaults and fit guidance.- '967b5a043b812e2f8c1e190fc571cf12b960c9d4486df736902221aab4d99cf6',++ // S2 GhostMaps adds its layer id to the generated layer enums.++ '1f95d78074559217872ccbdfa57d4363264ea88c1a22b259e6ebba3c8189b806',);});