{
  "version": 3,
  "sources": ["map_3d_notice.js"],
  "sourcesContent": ["// @ts-check\n/*\n * static/js/map_3d_notice.js \u2014 \"3D is experimental\" (SNOW-1470).\n *\n * The 3D view still has rough edges, so a reader in it is told so\n * (Hugo, 7 Nov 2026). #map-3d-notice is a floating top banner\n * (includes/_overlay_banner.html), rendered hidden in\n * public/partials/_map_embed.html only for a reader with the 3D view.\n *\n * Behaviour:\n *   - Shown whenever the map is in 3D: at load when map_view_3d.js has\n *     already set :root[data-map-view=\"3d\"], and on every\n *     `snowdesk:map-view-changed` whose view is '3d'.\n *   - Hidden when the map goes flat, by the switch or on its own (a slow\n *     device, a lost WebGL context), so it never sits over a flat map.\n *   - The x (overlays.js's shared dismiss) hides it for the rest of the\n *     visit, whichever view the reader moves to. Nothing is stored, so a\n *     reload brings it back.\n *\n * A classic script loaded after map_view_3d.js. It owns no strings: the\n * copy is in the template.\n */\n\n(function map3dNoticeInit() {\n  'use strict';\n\n  const banner = document.getElementById('map-3d-notice');\n  if (!banner) return;\n\n  // map_view_core.js's VIEWS.THREE_D.\n  const THREE_D = '3d';\n  let dismissed = false;\n\n  /**\n   * Show the banner in 3D, unless the reader closed it this visit.\n   *\n   * @param {string | undefined} view The map's view.\n   */\n  const sync = (view) => {\n    banner.classList.toggle('hidden', dismissed || view !== THREE_D);\n  };\n\n  document.addEventListener('overlay:dismissed', (event) => {\n    const detail = /** @type {CustomEvent} */ (event).detail;\n    if (detail && detail.overlay === banner) dismissed = true;\n  });\n\n  document.addEventListener('snowdesk:map-view-changed', (event) => {\n    const detail = /** @type {CustomEvent} */ (event).detail;\n    sync(detail ? detail.view : undefined);\n  });\n\n  sync(document.documentElement.dataset.mapView);\n})();\n"],
  "mappings": "CAuBC,UAA2B,CAC1B,aAEA,MAAMA,EAAS,SAAS,eAAe,eAAe,EACtD,GAAI,CAACA,EAAQ,OAGb,MAAMC,EAAU,KAChB,IAAIC,EAAY,GAOhB,MAAMC,EAAQC,GAAS,CACrBJ,EAAO,UAAU,OAAO,SAAUE,GAAaE,IAASH,CAAO,CACjE,EAEA,SAAS,iBAAiB,oBAAsBI,GAAU,CACxD,MAAMC,EAAqCD,EAAO,OAC9CC,GAAUA,EAAO,UAAYN,IAAQE,EAAY,GACvD,CAAC,EAED,SAAS,iBAAiB,4BAA8BG,GAAU,CAChE,MAAMC,EAAqCD,EAAO,OAClDF,EAAKG,EAASA,EAAO,KAAO,MAAS,CACvC,CAAC,EAEDH,EAAK,SAAS,gBAAgB,QAAQ,OAAO,CAC/C,GAAG",
  "names": ["banner", "THREE_D", "dismissed", "sync", "view", "event", "detail"]
}
