{
  "version": 3,
  "sources": ["map_3d_flight.js"],
  "sourcesContent": ["// @ts-check\n/*\n * static/js/map_3d_flight.js \u2014 a 3D fly-past on /map/ (SNOW-1466).\n *\n * Loaded after map_view_3d.js, for a reader in the map_3d flag\n * (public/map.html). It flies the camera along a route through /map/'s own\n * 3D view, one frame at a time, so the promo video's recorder\n * (bin/record-3d-flyby) can screenshot each frame once its tiles are in\n * (docs/decisions/a-fly-past-is-rendered-frame-by-frame.md). The path\n * itself is map_3d_flight_core.js; this is only the part that needs a map.\n *\n * Publishes window.pwaMap3dFlight:\n *\n *   load(geojson, options = {}) \u2014 builds the flight from the first\n *     LineString or MultiLineString in a Feature, FeatureCollection or\n *     bare geometry, with options.flight merged over the feature's\n *     properties.flight as the core's options. Enters 3D through\n *     window.pwaMapView.beginTest(), which saves the camera and the view and\n *     rests the watchdog, and throws if 3D cannot be entered here, naming\n *     canTest()'s reason. Adds the `map-3d-flight` source and its casing,\n *     line and head layers on top, in the route colours\n *     window.pwaRouteDrawingCore publishes. options.chrome = false sets\n *     body.map-recording, which lays the map over the whole page with no\n *     controls (src/css/main.css); the default leaves the page alone.\n *   frame(t) \u2014 draws the frame t of the way through (0..1) and resolves\n *     with its phase once the map is idle with every tile loaded (or every\n *     tile has stayed loaded for QUIET_MS, for a camera where MapLibre\n *     never goes idle), jumping\n *     a second time if MapLibre moved the camera to keep it out of ground\n *     whose height had not loaded yet. If that\n *     has not happened within FRAME_CAP_MS (or load's options.capMs, which\n *     the recorder raises for software rendering) it rejects, so a half-loaded\n *     frame cannot reach a video. A reveal frame fits the route's bounds\n *     with map.cameraForBounds at the core's pitch and bearing, and blends\n *     the centre and zoom towards that by the frame's fit weight.\n *   unload() \u2014 removes the layers and the source, clears map-recording\n *     and puts the view and camera back (pwaMapView.endTest()).\n *\n * The page shows no words of its own, so nothing here is translated.\n */\n(function map3dFlightInit() {\n  'use strict';\n\n  const core = self.pwaMap3dFlightCore;\n  const mapState = window.snowdeskMapState;\n  const map = mapState ? mapState.map : null;\n  if (!core || !map) return;\n\n  /** The flight's source and its layers, bottom to top. */\n  const SOURCE_ID = 'map-3d-flight';\n  const LAYER_IDS = Object.freeze(['map-3d-flight-casing', 'map-3d-flight-line', 'map-3d-flight-head']);\n  /** How long a frame may take to settle before it fails. */\n  const FRAME_CAP_MS = 60000;\n  /**\n   * A frame whose tiles have all stayed in this long has settled, though\n   * the map never goes idle (settled()); checked this often.\n   */\n  const QUIET_MS = 500;\n  const QUIET_POLL_MS = 250;\n  /** Room left round the route when the reveal fits it, in CSS pixels. */\n  const REVEAL_PADDING = 120;\n  /** The body class a recording sets. */\n  const RECORDING_CLASS = 'map-recording';\n\n  /** @type {any} The flight loaded now, if one is. */\n  let flight = null;\n  /** @type {any} The source's data for the last frame drawn. */\n  let lastData = null;\n  /** How long a frame may take to settle for this flight. */\n  let capMs = FRAME_CAP_MS;\n\n  /**\n   * The first line in a GeoJSON object, as {coords, properties}.\n   *\n   * @param {any} geojson\n   * @returns {{coords: any, properties: any} | null}\n   */\n  function firstLine(geojson) {\n    if (!geojson || typeof geojson !== 'object') return null;\n    if (geojson.type === 'FeatureCollection') {\n      for (const feature of geojson.features || []) {\n        const found = firstLine(feature);\n        if (found) return found;\n      }\n      return null;\n    }\n    if (geojson.type === 'Feature') {\n      const found = firstLine(geojson.geometry);\n      return found ? { coords: found.coords, properties: geojson.properties || {} } : null;\n    }\n    if (geojson.type === 'LineString' || geojson.type === 'MultiLineString') {\n      return { coords: geojson.coordinates, properties: {} };\n    }\n    return null;\n  }\n\n  /** The route colours, from the module that owns them. */\n  function colours() {\n    const routeCore = /** @type {any} */ (window).pwaRouteDrawingCore;\n    if (!routeCore) throw new Error('pwaRouteDrawingCore is not loaded');\n    return { line: routeCore.ROUTE_LINE_COLOUR, casing: routeCore.ROUTE_CASING_COLOUR };\n  }\n\n  /** Take the flight's layers and source off the map, if they are there. */\n  function removeLayers() {\n    for (const id of [...LAYER_IDS].reverse()) if (map.getLayer(id)) map.removeLayer(id);\n    if (map.getSource(SOURCE_ID)) map.removeSource(SOURCE_ID);\n  }\n\n  /** Put the flight's source and layers on the map, on top. */\n  function addLayers() {\n    removeLayers();\n    const { line, casing } = colours();\n    map.addSource(SOURCE_ID, { type: 'geojson', data: { type: 'FeatureCollection', features: [] } });\n    const isLine = ['==', ['geometry-type'], 'LineString'];\n    map.addLayer({\n      id: LAYER_IDS[0], type: 'line', source: SOURCE_ID, filter: isLine,\n      layout: { 'line-cap': 'round', 'line-join': 'round' },\n      paint: { 'line-color': casing, 'line-width': 9, 'line-opacity': 0.8 },\n    });\n    map.addLayer({\n      id: LAYER_IDS[1], type: 'line', source: SOURCE_ID, filter: isLine,\n      layout: { 'line-cap': 'round', 'line-join': 'round' },\n      paint: { 'line-color': line, 'line-width': 5.5 },\n    });\n    map.addLayer({\n      id: LAYER_IDS[2], type: 'circle', source: SOURCE_ID, filter: ['==', ['geometry-type'], 'Point'],\n      paint: {\n        'circle-radius': 7,\n        'circle-color': line,\n        'circle-stroke-color': '#ffffff',\n        'circle-stroke-width': 3,\n        'circle-pitch-alignment': 'map',\n      },\n    });\n  }\n\n  /**\n   * Put the layers back if a setStyle took them, and draw the last frame's\n   * data. Entering 3D from another basemap swaps the style after load()\n   * has added the layers, and the swap wipes them (SNOW-1466).\n   */\n  function draw() {\n    if (!flight) return;\n    if (!map.getSource(SOURCE_ID)) {\n      try {\n        addLayers();\n      } catch (_err) {\n        // The new style is still loading; its style.load draws again.\n        return;\n      }\n    }\n    const source = map.getSource(SOURCE_ID);\n    if (source && lastData) source.setData(lastData);\n  }\n\n  /**\n   * The source's data for a frame: the drawn line, if there is one, and the head.\n   *\n   * @param {any} frame\n   */\n  function frameData(frame) {\n    const features = [];\n    if (frame.drawn.length >= 2) {\n      features.push({ type: 'Feature', properties: {}, geometry: { type: 'LineString', coordinates: frame.drawn } });\n    }\n    features.push({ type: 'Feature', properties: {}, geometry: { type: 'Point', coordinates: frame.head } });\n    return { type: 'FeatureCollection', features };\n  }\n\n  /**\n   * The camera to jump to for a frame: the core's, or in the reveal its\n   * blend towards the fitted bounds.\n   *\n   * @param {any} frame\n   * @returns {{center: [number, number], zoom: number, pitch: number, bearing: number}}\n   */\n  function cameraFor(frame) {\n    const cam = frame.camera;\n    if (!frame.fit || frame.fit.weight <= 0) return cam;\n    const fitted = map.cameraForBounds(frame.fit.bounds, {\n      padding: REVEAL_PADDING, pitch: cam.pitch, bearing: cam.bearing,\n    });\n    if (!fitted) return cam;\n    const c = fitted.center;\n    const centre = Array.isArray(c) ? c : [c.lng, c.lat];\n    const w = frame.fit.weight;\n    return {\n      center: [cam.center[0] + (centre[0] - cam.center[0]) * w, cam.center[1] + (centre[1] - cam.center[1]) * w],\n      zoom: cam.zoom + (fitted.zoom - cam.zoom) * w,\n      pitch: cam.pitch,\n      bearing: cam.bearing,\n    };\n  }\n\n  /**\n   * Let MapLibre read the centre's height again.\n   *\n   * MapLibre 4.7 sets `_elevationFreeze` when a camera ease starts over\n   * terrain and clears it only at the end of an ease asked to freeze, or of a\n   * gesture. After any other ease over terrain (the page's own camera\n   * moves) it stays set, so the centre keeps the height it had then, and a\n   * jump to the route draws the camera at that height: under the mountain,\n   * the ground streaked and the sky missing. A reader's first drag clears\n   * it; a recording makes none.\n   * The property is MapLibre's own, so this is checked against the vendored\n   * version (static/js/maplibre-gl.min.js) and does nothing if it is gone.\n   */\n  function thawElevation() {\n    const internal = /** @type {any} */ (map);\n    if (internal._elevationFreeze === true) internal._elevationFreeze = false;\n  }\n\n  /**\n   * Whether the map's pitch or zoom is not the camera it was sent to.\n   *\n   * @param {{zoom: number, pitch: number}} camera\n   * @returns {boolean}\n   */\n  function drifted(camera) {\n    return Math.abs(map.getPitch() - camera.pitch) > 0.01 || Math.abs(map.getZoom() - camera.zoom) > 0.001;\n  }\n\n  /**\n   * Whether every source in the style has all its tiles in.\n   *\n   * @returns {boolean}\n   */\n  function tilesIn() {\n    const style = map.getStyle();\n    const ids = Object.keys((style && style.sources) || {});\n    return ids.every((id) => map.isSourceLoaded(id)) && map.areTilesLoaded();\n  }\n\n  /**\n   * What a frame that has not settled is still waiting for, for its error:\n   * the sources with tiles still loading, then the map's own state.\n   *\n   * @param {{renders: number, idles: number}} seen Events since the jump.\n   * @returns {string}\n   */\n  function waitingOn(seen) {\n    const style = map.getStyle();\n    const loading = Object.keys((style && style.sources) || {}).filter((id) => !map.isSourceLoaded(id));\n    const state = `loaded=${map.loaded()} moving=${map.isMoving()} tiles=${map.areTilesLoaded()}`\n      + ` renders=${seen.renders} idles=${seen.idles}`;\n    if (loading.length) return `tiles still loading: ${loading.join(', ')}; ${state}`;\n    return `every source loaded; ${state}`;\n  }\n\n  /**\n   * Resolve once the map has drawn the frame with every tile loaded; reject\n   * after the cap.\n   *\n   * Settled means an idle with every tile loaded, or every tile staying\n   * loaded for QUIET_MS, checked every QUIET_POLL_MS whatever the map is\n   * doing. MapLibre fires idle only once a render leaves nothing to do, and\n   * at some cameras over terrain it never gets there, so idle never comes\n   * (frame 349 of the Breithorn, 7 Nov 2026, on a Mac GPU and under\n   * SwiftShader alike). The tiles are what a frame waits for; a label still\n   * fading is not worth failing the run. The wait starts only after a\n   * render since the jump, the one that asks for the new camera's tiles,\n   * and every tile load asks for another, so a frame whose tiles have been\n   * in for QUIET_MS has been drawn with them.\n   *\n   * @param {number} t For the error.\n   * @returns {Promise<void>}\n   */\n  function settled(t) {\n    return new Promise((resolve, reject) => {\n      let done = false;\n      let quietSince = 0;\n      const seen = { renders: 0, idles: 0 };\n      /** @param {Error} [error] */\n      const finish = (error) => {\n        if (done) return;\n        done = true;\n        clearTimeout(timer);\n        clearInterval(poll);\n        map.off('idle', onIdle);\n        map.off('render', onRender);\n        if (error) reject(error);\n        else resolve();\n      };\n      const timer = setTimeout(() => {\n        finish(new Error(`frame t=${t} not settled after ${capMs / 1000} s (${waitingOn(seen)})`));\n      }, capMs);\n      const poll = setInterval(() => {\n        // Until the map has drawn once since the jump it has not asked for\n        // the new camera's tiles, so the old ones would count as in.\n        if (!seen.renders || !tilesIn()) {\n          quietSince = 0;\n          return;\n        }\n        if (!quietSince) quietSince = Date.now();\n        else if (Date.now() - quietSince >= QUIET_MS) finish();\n      }, QUIET_POLL_MS);\n      const onIdle = () => {\n        seen.idles += 1;\n        if (map.areTilesLoaded()) finish();\n      };\n      const onRender = () => {\n        seen.renders += 1;\n      };\n      map.on('idle', onIdle);\n      map.on('render', onRender);\n      map.triggerRepaint();\n    });\n  }\n\n  /**\n   * Load a route to fly.\n   *\n   * @param {any} geojson\n   * @param {{chrome?: boolean, flight?: any, capMs?: number}} [options]\n   * @returns {{length: number, phases: readonly string[]}}\n   */\n  function load(geojson, options = {}) {\n    const line = firstLine(geojson);\n    if (!line) throw new Error('No LineString or MultiLineString to fly');\n    // The caller's options go over the route's own, so a recorder's\n    // seconds do not drop the route's camera settings.\n    const built = core.buildFlight(line.coords, { ...(line.properties.flight || {}), ...(options.flight || {}) });\n    const view = /** @type {any} */ (window).pwaMapView;\n    if (!view) throw new Error('3D is not available here: no 3D view on this page');\n    if (!flight && !view.beginTest()) {\n      const why = view.canTest();\n      throw new Error(`3D is not available here: ${(why && why.reason) || 'the view would not enter 3D'}`);\n    }\n    flight = built;\n    capMs = options.capMs && options.capMs > 0 ? options.capMs : FRAME_CAP_MS;\n    addLayers();\n    if (options.chrome === false) {\n      document.body.classList.add(RECORDING_CLASS);\n      map.resize();\n    } else if (document.body.classList.contains(RECORDING_CLASS)) {\n      document.body.classList.remove(RECORDING_CLASS);\n      map.resize();\n    }\n    return { length: built.length, phases: core.PHASES };\n  }\n\n  /**\n   * Draw the frame t of the way through, once its tiles are in.\n   *\n   * @param {number} t\n   * @returns {Promise<{phase: string}>}\n   */\n  async function frame(t) {\n    if (!flight) throw new Error('No flight loaded');\n    const f = core.flightFrame(flight, t);\n    lastData = frameData(f);\n    draw();\n    const camera = cameraFor(f);\n    thawElevation();\n    map.jumpTo(camera);\n    await settled(t);\n    // A basemap swap that landed while this frame settled took the line\n    // with it; draw it again on the new style before the screenshot.\n    if (!map.getSource(SOURCE_ID)) {\n      draw();\n      await settled(t);\n    }\n    // MapLibre keeps the camera out of the ground by lowering its pitch and\n    // zoom, judged against the centre's height at the jump. After a long\n    // jump that height is the old centre's, or 0 before its tile is in, so\n    // the camera can be pushed down. Once settled the height is right, and\n    // the same jump lands where it should (SNOW-1466).\n    if (drifted(camera)) {\n      map.jumpTo(camera);\n      await settled(t);\n    }\n    return { phase: f.phase };\n  }\n\n  /** Take the flight off the map and put the view and camera back. */\n  function unload() {\n    removeLayers();\n    if (document.body.classList.contains(RECORDING_CLASS)) {\n      document.body.classList.remove(RECORDING_CLASS);\n      map.resize();\n    }\n    if (flight) {\n      flight = null;\n      lastData = null;\n      const view = /** @type {any} */ (window).pwaMapView;\n      if (view) view.endTest({});\n    }\n  }\n\n  map.on('style.load', draw);\n\n  window.pwaMap3dFlight = Object.freeze({ load, frame, unload, FRAME_CAP_MS, QUIET_MS });\n})();\n"],
  "mappings": "CAwCC,UAA2B,CAC1B,aAEA,MAAMA,EAAO,KAAK,mBACZC,EAAW,OAAO,iBAClBC,EAAMD,EAAWA,EAAS,IAAM,KACtC,GAAI,CAACD,GAAQ,CAACE,EAAK,OAGnB,MAAMC,EAAY,gBACZC,EAAY,OAAO,OAAO,CAAC,uBAAwB,qBAAsB,oBAAoB,CAAC,EAE9FC,EAAe,IAKfC,EAAW,IACXC,EAAgB,IAEhBC,EAAiB,IAEjBC,EAAkB,gBAGxB,IAAIC,EAAS,KAETC,EAAW,KAEXC,EAAQP,EAQZ,SAASQ,EAAUC,EAAS,CAC1B,GAAI,CAACA,GAAW,OAAOA,GAAY,SAAU,OAAO,KACpD,GAAIA,EAAQ,OAAS,oBAAqB,CACxC,UAAWC,KAAWD,EAAQ,UAAY,CAAC,EAAG,CAC5C,MAAME,EAAQH,EAAUE,CAAO,EAC/B,GAAIC,EAAO,OAAOA,CACpB,CACA,OAAO,IACT,CACA,GAAIF,EAAQ,OAAS,UAAW,CAC9B,MAAME,EAAQH,EA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S,CAAC,CACvF,GAAG",
  "names": ["core", "mapState", "map", "SOURCE_ID", "LAYER_IDS", "FRAME_CAP_MS", "QUIET_MS", "QUIET_POLL_MS", "REVEAL_PADDING", "RECORDING_CLASS", "flight", "lastData", "capMs", "firstLine", "geojson", "feature", "found", "colours", "routeCore", "removeLayers", "id", "addLayers", "line", "casing", "isLine", "draw", "source", "frameData", "frame", "features", "cameraFor", "cam", "fitted", "c", "centre", "w", "thawElevation", "internal", "drifted", "camera", "tilesIn", "style", "waitingOn", "seen", "loading", "state", "settled", "t", "resolve", "reject", "done", "quietSince", "finish", "error", "timer", "poll", "onIdle", "onRender", "load", "options", "built", "view", "why", "f", "unload"]
}
