{
  "version": 3,
  "sources": ["pwa_install.js"],
  "sourcesContent": ["/*\n * static/js/pwa_install.js \u2014 Install-prompt orchestration (SNOW-379,\n * asked at install moments since SNOW-1513).\n *\n * Snowdesk asks a signed-in phone reader to install it at the moments\n * installing helps them, with a reason that fits the platform: alerts on\n * iPhone, where they need the installed app, and the app itself on\n * Android. Desktop is never asked. The decision is\n * static/js/pwa_install_core.js's (window.pwaInstallCore); this module\n * reads the page into its inputs and draws the answer.\n *\n * Install moments \u2014 window.pwaInstall.offer(moment, opts)\n * -------------------------------------------------------\n * Every caller asks through ``offer``, inline at its own moment:\n *\n *   alerts    the region bulletin's \"Alerts for this region\" switched on,\n *             on an iPhone in Safari (handled here, on its htmx swap):\n *             a nudge in ``[data-pwa-install-slot=\"alerts\"]``.\n *   download  map_region_download.js / map_custom_download.js, when a run\n *             finishes: #pwa-install-download, naming the area.\n *   saved     favourites.js, on a new pin's confirmation, and a new trip's\n *             \"Trip created.\" (trips/trip_list.html marks its slot\n *             ``data-pwa-install-auto``): a nudge in\n *             ``[data-pwa-install-slot=\"saved\"]``.\n *   visit     here, at load: the third visit in 14 days. The iPhone guide\n *             (#pwa-install-ios) or, with a deferred beforeinstallprompt,\n *             the Android banner (#pwa-install-banner).\n *   menu      the avatar and \"?\" menus' \"Install the app\"\n *             (``data-pwa-install=\"menu\"``): opens the guide or the\n *             browser's prompt. Ignores the cool-off and the once-per-visit\n *             key, so it works after a dismissal.\n *\n * A shown moment stamps the once-per-visit key and emits\n * ``pwa.install.prompted`` with ``{moment}``. Any ``[data-pwa-install]``\n * button (a nudge's, the settings page's \"Show me how\") opens the iPhone\n * guide, the deferred prompt, or \u2014 with neither \u2014 the guide's generic\n * browser-menu line.\n *\n * Inputs read from the page\n * -------------------------\n *   signed in   <meta name=\"pwa-user-id\"> is non-empty\n *   phone       matchMedia('(max-width: 639.98px)'), the tab bar's gate\n *   standalone  display-mode standalone, or iOS navigator.standalone\n *   online      navigator.onLine, and the network indicator\n *               (``[data-network-indicator]``, pwa_offline.js) not\n *               ``offline`` \u2014 which it reads in forced offline mode too\n *   mid-task    route drawing (``<html data-route-drawing>``), placing a\n *               pin (``window.PlacePicker.isActive()``), an open form panel\n *               (a shown ``[data-overlay]`` sheet with no detents \u2014 the map\n *               hold bar, the route draw sheet \u2014 or a shown sheet holding a\n *               ``form[data-sheet-fit]``), or the \"Explore Snowdesk\"\n *               welcome card (#map-tour-offer) being open\n *\n * State\n * -----\n *   localStorage   pwa.install.visits        JSON ms timestamps, 14 days\n *                  pwa.install.dismissed_at  last visit-banner dismissal\n *                  pwa.install.installed_at  confirmed install\n *   sessionStorage pwa.install.visit_counted        this session counted\n *                  pwa.install.prompted_this_visit  a moment showed\n *   pwaDb meta:app pwa.install.first_launch_done     the first-launch card\n *                                                    is answered\n *\n * First launch (includes/_pwa_first_launch.html)\n * ----------------------------------------------\n * The installed app's first launch for a signed-in reader with alerts on\n * shows \"Turn on alerts?\" while Notification.permission is ``default``,\n * or ``granted`` with no ``push.subscribed_before`` (a registration that\n * failed after the dialog). On a map page it waits for <html\n * data-map-welcome-settled> from map_tour_offer.js.\n * \"Turn on\" is window.pwaAlertsOptin.enable() (alerts_optin.js).\n * ``first_launch_done`` is written on Skip, on success and on ``denied``;\n * an unanswered dialog or a failed registration leaves it unwritten.\n *\n * Persistent storage\n * ------------------\n * Once installed AND (on iOS) notification permission is granted,\n * ``navigator.storage.persist()`` is called to request that the OS keep\n * our IndexedDB / Cache Storage across storage-pressure evictions.\n *\n * Telemetry (SNOW-384), each stamped with ``platform``:\n *   pwa.install.prompted                \u2014 a moment showed ({moment})\n *   pwa.install.accepted                \u2014 user accepted the native prompt\n *   pwa.install.dismissed               \u2014 user dismissed a prompt\n *   pwa.install.completed               \u2014 ``appinstalled`` / standalone launch\n *   pwa.install.notifications_granted   \u2014 iOS install with permission granted\n */\n\n(function () {\n  'use strict';\n\n  const VISITS_KEY = 'pwa.install.visits';\n  const DISMISS_KEY = 'pwa.install.dismissed_at';\n  const INSTALLED_KEY = 'pwa.install.installed_at';\n  const VISIT_COUNTED_KEY = 'pwa.install.visit_counted';\n  const PROMPTED_KEY = 'pwa.install.prompted_this_visit';\n  const FIRST_LAUNCH_KEY = 'pwa.install.first_launch_done';\n  // Written by alerts_optin.js once this device's push registration succeeds.\n  const SUBSCRIBED_BEFORE_KEY = 'push.subscribed_before';\n  // The SNOW-379 threshold's keys, cleared once: nothing reads them now.\n  const RETIRED_KEYS = ['pwa.install.regions_viewed', 'pwa.install.time_engaged_ms'];\n\n  const PHONE_QUERY = '(max-width: 639.98px)';\n\n  // The English for includes/_pwa_install_prompt.html's strings template,\n  // used only when it is missing.\n  // `var`, the shape tests/test_js_strings_are_translatable.py reads.\n  var STRINGS_FALLBACKS = {\n    'pitch-alerts': 'Snowdesk tells you when the bulletin changes for your places.',\n    'pitch-app': 'The whole screen for the map, and Map, Today and Saved one tap apart.',\n    'download-title': '%(area)s is ready offline',\n    'download-title-unnamed': 'Your area is ready offline',\n    'alerts-line': 'Alerts on iPhone need the app',\n    'alerts-cta': 'Show me how',\n    'saved-line': 'Get told when its bulletin changes.',\n    'saved-cta': 'Install the app.',\n  };\n\n  // The ``beforeinstallprompt`` event, deferred until a moment uses it.\n  let deferredPrompt = null;\n\n  /** @returns {any} the pure core, or null before it has loaded. */\n  function core() {\n    return window.pwaInstallCore || null;\n  }\n\n  /**\n   * A Storage call that never throws \u2014 Safari private mode does.\n   * @param {'localStorage' | 'sessionStorage'} area\n   * @param {string} k\n   * @returns {string | null}\n   */\n  function readItem(area, k) {\n    try {\n      return window[area].getItem(k);\n    } catch (_err) {\n      return null;\n    }\n  }\n\n  /**\n   * @param {'localStorage' | 'sessionStorage'} area\n   * @param {string} k\n   * @param {string} v\n   */\n  function writeItem(area, k, v) {\n    try {\n      window[area].setItem(k, v);\n    } catch (_err) {\n      // Ignore.\n    }\n  }\n\n  /**\n   * @param {string} query\n   * @returns {boolean}\n   */\n  function mediaMatches(query) {\n    try {\n      return !!(window.matchMedia && window.matchMedia(query).matches);\n    } catch (_err) {\n      return false;\n    }\n  }\n\n  /**\n   * True when the app is running as a home-screen installed shell,\n   * either standard PWA display-mode or iOS Safari's legacy attribute.\n   * @returns {boolean}\n   */\n  function isStandalone() {\n    return mediaMatches('(display-mode: standalone)') || navigator.standalone === true;\n  }\n\n  /**\n   * Feature-detect iOS Safari. ``'standalone' in navigator`` is\n   * exclusive to iOS Safari; combined with a UA regex we avoid false\n   * positives from desktop Safari devtools emulation.\n   * @returns {boolean}\n   */\n  function isIOS() {\n    try {\n      return (\n        'standalone' in navigator &&\n        /iP(hone|ad|od)/.test(navigator.userAgent) &&\n        !('MSStream' in window)\n      );\n    } catch (_err) {\n      return false;\n    }\n  }\n\n  /**\n   * Coarse platform bucket: ``'ios'`` | ``'android'`` | ``'desktop'``.\n   * Picks the pitch and stamps every telemetry event.\n   * @returns {'ios' | 'android' | 'desktop'}\n   */\n  function installPlatform() {\n    try {\n      if (isIOS()) return 'ios';\n      if (/Android/.test(navigator.userAgent)) return 'android';\n    } catch (_err) {\n      // Fall through to desktop.\n    }\n    return 'desktop';\n  }\n\n  /**\n   * Best-effort telemetry emit \u2014 never breaks the install flow.\n   * @param {string} event\n   * @param {object} [properties]\n   */\n  function emitTelemetry(event, properties) {\n    try {\n      window.pwaTelemetry?.emit(event, { platform: installPlatform(), ...properties });\n    } catch (_err) {\n      // Ignore.\n    }\n  }\n\n  /** @returns {Object<string, string>} the module's copy. */\n  function strings() {\n    return window.pwaStrings\n      ? window.pwaStrings.read('pwa-install-strings-template', STRINGS_FALLBACKS)\n      : STRINGS_FALLBACKS;\n  }\n\n  /** @returns {boolean} the page was rendered for a signed-in reader. */\n  function isSignedIn() {\n    const meta = document.querySelector('meta[name=\"pwa-user-id\"]');\n    return !!(meta && (meta.getAttribute('content') || '').trim());\n  }\n\n  /** @returns {boolean} the device is online and not in offline mode. */\n  function isOnline() {\n    if (navigator.onLine === false) return false;\n    const indicator = document.querySelector('[data-network-indicator]');\n    return !(indicator && indicator.getAttribute('data-network-state') === 'offline');\n  }\n\n  /**\n   * @param {Element | null} el\n   * @returns {boolean} shown by both hide idioms (attribute and class).\n   */\n  function isShown(el) {\n    return !!el && !el.hasAttribute('hidden') && !el.classList.contains('hidden');\n  }\n\n  /** @returns {boolean} the reader is in the middle of something. */\n  function isMidTask() {\n    if (document.documentElement.hasAttribute('data-route-drawing')) return true;\n    try {\n      if (window.PlacePicker && window.PlacePicker.isActive()) return true;\n    } catch (_err) {\n      // Not a task we can see.\n    }\n    if (isShown(document.getElementById('map-tour-offer'))) return true;\n    // A form panel: an overlay sheet with no detents (a task, not an object\n    // sheet), or any sheet holding a form that fits its content. Floating\n    // banners and toasts hide by class (data-overlay-hide) and are not\n    // panels. A finished download's framing bar is no longer a task.\n    const sheets = document.querySelectorAll('[data-overlay]:not([data-overlay-hide])');\n    for (const sheet of sheets) {\n      if (!isShown(sheet)) continue;\n      if (sheet.getAttribute('data-run-state') === 'done') continue;\n      if (!sheet.hasAttribute('data-detents')) return true;\n      if (sheet.querySelector('form[data-sheet-fit]')) return true;\n    }\n    return false;\n  }\n\n  /** @returns {number[]} the stored visit history. */\n  function loadVisits() {\n    try {\n      const parsed = JSON.parse(readItem('localStorage', VISITS_KEY) || '[]');\n      return Array.isArray(parsed) ? parsed : [];\n    } catch (_err) {\n      return [];\n    }\n  }\n\n  /** Count this browsing session as a visit, once. */\n  function recordVisit() {\n    const c = core();\n    if (!c || !isSignedIn() || isStandalone()) return;\n    const counted = readItem('sessionStorage', VISIT_COUNTED_KEY) === '1';\n    const history = c.recordVisit(loadVisits(), Date.now(), counted);\n    writeItem('localStorage', VISITS_KEY, JSON.stringify(history));\n    writeItem('sessionStorage', VISIT_COUNTED_KEY, '1');\n  }\n\n  /** @returns {Object} the environment the core decides on. */\n  function readEnv() {\n    const now = Date.now();\n    const dismissedAt = Number(readItem('localStorage', DISMISS_KEY));\n    const c = core();\n    const visits = c ? c.recordVisit(loadVisits(), now, true).length : 0;\n    return {\n      signedIn: isSignedIn(),\n      phone: mediaMatches(PHONE_QUERY),\n      standalone: isStandalone(),\n      online: isOnline(),\n      midTask: isMidTask(),\n      promptedThisVisit: readItem('sessionStorage', PROMPTED_KEY) === '1',\n      visits: visits,\n      dismissedAt: dismissedAt,\n      now: now,\n    };\n  }\n\n  /**\n   * Reveal a hidden prompt and note which moment opened it, so a dismissal\n   * can tell a visit banner (cool-off) from any other.\n   * @param {HTMLElement | null} el\n   * @param {string} moment\n   * @returns {boolean} whether it is now showing.\n   */\n  function reveal(el, moment) {\n    if (!el) return false;\n    el.setAttribute('data-pwa-install-moment', moment);\n    el.classList.remove('hidden');\n    return true;\n  }\n\n  /**\n   * Open the Add to Home Screen guide: the iPhone steps, or the generic\n   * browser-menu line where neither the iPhone flow nor a deferred prompt\n   * is available. Leads with the platform's pitch.\n   * @param {string} moment\n   * @returns {boolean}\n   */\n  function openGuide(moment) {\n    const guide = document.getElementById('pwa-install-ios');\n    if (!guide) return false;\n    const platform = installPlatform();\n    const kind = platform === 'ios' ? 'ios' : 'generic';\n    guide.querySelectorAll('[data-pwa-install-guide-part]').forEach((part) => {\n      part.hidden = part.getAttribute('data-pwa-install-guide-part') !== kind;\n    });\n    const pitch = guide.querySelector('[data-pwa-install-pitch]');\n    const c = core();\n    if (pitch && c) pitch.textContent = strings()['pitch-' + c.pitchFor(platform)];\n    return reveal(guide, moment);\n  }\n\n  /**\n   * Run the browser's deferred install prompt.\n   * @param {string} moment\n   * @returns {Promise<void>}\n   */\n  async function runPrompt(moment) {\n    const evt = deferredPrompt;\n    deferredPrompt = null;\n    try {\n      evt.prompt();\n      const choice = await evt.userChoice;\n      if (choice && choice.outcome === 'accepted') {\n        emitTelemetry('pwa.install.accepted', { moment: moment });\n      } else {\n        recordDismissal(moment, 'pwa-install-prompt');\n      }\n    } catch (_err) {\n      recordDismissal(moment, 'pwa-install-prompt');\n    }\n  }\n\n  /**\n   * The install itself, from a button the reader pressed: the iPhone guide,\n   * the deferred prompt, or the generic guide.\n   * @param {string} moment\n   */\n  function openInstall(moment) {\n    if (installPlatform() !== 'ios' && deferredPrompt) {\n      runPrompt(moment);\n      return;\n    }\n    openGuide(moment);\n  }\n\n  /**\n   * Note a dismissal. Only the visit banner's starts the 30-day cool-off:\n   * every other moment is the reader's own, or happens once.\n   * @param {string} moment\n   * @param {string} banner\n   */\n  function recordDismissal(moment, banner) {\n    if (moment === 'visit') writeItem('localStorage', DISMISS_KEY, String(Date.now()));\n    emitTelemetry('pwa.install.dismissed', { banner: banner, moment: moment });\n  }\n\n  /**\n   * Clone the nudge into a slot with the moment's line and button.\n   * @param {Element | null} anchor\n   * @param {string} moment\n   * @returns {boolean}\n   */\n  function renderNudge(anchor, moment) {\n    const template = /** @type {HTMLTemplateElement | null} */ (\n      document.getElementById('pwa-install-nudge-template')\n    );\n    if (!anchor || !template) return false;\n    const S = strings();\n    const fragment = template.content.cloneNode(true);\n    const text = fragment.querySelector('[data-pwa-install-nudge-text]');\n    const button = fragment.querySelector('[data-pwa-install]');\n    if (text) text.textContent = S[moment + '-line'] || '';\n    if (button) {\n      button.textContent = S[moment + '-cta'] || '';\n      button.setAttribute('data-pwa-install', moment);\n      // Already counted as prompted, when it rendered.\n      button.setAttribute('data-pwa-install-counted', '');\n    }\n    const nudge = fragment.querySelector('[data-pwa-install-nudge]');\n    if (nudge && anchor.hasAttribute('data-pwa-install-centred')) {\n      nudge.classList.add('justify-center', 'text-center');\n    }\n    anchor.replaceChildren(fragment);\n    // Slots ship hidden, so an empty one takes no room.\n    anchor.removeAttribute('hidden');\n    return true;\n  }\n\n  /**\n   * The download banner, titled with the area's name.\n   * @param {string} area\n   * @returns {boolean}\n   */\n  function showDownload(area) {\n    const banner = document.getElementById('pwa-install-download');\n    if (!banner) return false;\n    const S = strings();\n    const title = document.getElementById('pwa-install-download-title');\n    if (title) {\n      title.textContent = area\n        ? window.pwaStrings\n          ? window.pwaStrings.interpolate(S['download-title'], { area: area })\n          : S['download-title'].replace('%(area)s', area)\n        : S['download-title-unnamed'];\n    }\n    return reveal(banner, 'download');\n  }\n\n  /**\n   * Ask for an install prompt at ``moment``. Shows it only when the core\n   * allows the moment now.\n   *\n   * @param {string} moment  'alerts' | 'download' | 'saved' | 'visit' | 'menu'\n   * @param {{anchor?: Element | string | null, area?: string}} [opts]\n   * @returns {boolean} whether a prompt showed.\n   */\n  function offer(moment, opts) {\n    const c = core();\n    if (!c || !c.momentAllowed(moment, readEnv())) return false;\n    const options = opts || {};\n    const anchor =\n      typeof options.anchor === 'string' ? document.querySelector(options.anchor) : options.anchor;\n    let shown = false;\n    if (moment === 'alerts' || moment === 'saved') {\n      shown = renderNudge(anchor || null, moment);\n    } else if (moment === 'download') {\n      shown = showDownload(typeof options.area === 'string' ? options.area : '');\n    } else if (moment === 'visit') {\n      if (installPlatform() === 'ios') {\n        shown = openGuide('visit');\n      } else if (deferredPrompt) {\n        shown = reveal(document.getElementById('pwa-install-banner'), 'visit');\n      }\n    } else if (moment === 'menu') {\n      openInstall('menu');\n      shown = true;\n    }\n    if (!shown) return false;\n    if (moment !== 'menu') writeItem('sessionStorage', PROMPTED_KEY, '1');\n    emitTelemetry('pwa.install.prompted', { moment: moment });\n    return true;\n  }\n\n  /**\n   * True on an iPhone in Safari, where alerts need the app \u2014 the alerts\n   * opt-in core's own verdict when it is loaded.\n   * @returns {boolean}\n   */\n  function needsHomeScreen() {\n    const optin = window.pwaAlertsOptinCore;\n    const ua = navigator.userAgent || '';\n    const isAppleMobile =\n      /iPhone|iPad|iPod/.test(ua) || (/Macintosh/.test(ua) && navigator.maxTouchPoints > 1);\n    if (!optin) return isAppleMobile && !isStandalone();\n    return (\n      optin.pushSupport({\n        hasServiceWorker: 'serviceWorker' in navigator,\n        hasPushManager: 'PushManager' in window,\n        hasNotification: typeof Notification !== 'undefined',\n        permission: typeof Notification !== 'undefined' ? Notification.permission : '',\n        isAppleMobile: isAppleMobile,\n        isStandalone: isStandalone(),\n      }) === 'needs-home-screen'\n    );\n  }\n\n  /**\n   * The alerts moment: \"Alerts for this region\" was just switched on (its\n   * POST swapped the switch back in, checked).\n   * @param {CustomEvent} event\n   */\n  function onAlertsSwap(event) {\n    const detail = event.detail || {};\n    const verb = detail.requestConfig && detail.requestConfig.verb;\n    if (!verb || String(verb).toLowerCase() !== 'post') return;\n    const slots = document.querySelectorAll(\n      '[data-region-alerts-switch] [data-pwa-install-slot=\"alerts\"]',\n    );\n    for (const slot of slots) {\n      const input = slot\n        .closest('[data-region-alerts-switch]')\n        .querySelector('input[name=\"alerts\"]');\n      if (!input || !input.checked) continue;\n      if (needsHomeScreen()) offer('alerts', { anchor: slot });\n      return;\n    }\n  }\n\n  /** Bind the prompts' own controls. */\n  function bindControls() {\n    document.getElementById('pwa-install-accept')?.addEventListener('click', () => {\n      const banner = document.getElementById('pwa-install-banner');\n      banner?.classList.add('hidden');\n      if (!deferredPrompt) {\n        recordDismissal('visit', 'pwa-install-banner');\n        return;\n      }\n      runPrompt('visit');\n    });\n    document.getElementById('pwa-install-download-accept')?.addEventListener('click', () => {\n      document.getElementById('pwa-install-download')?.classList.add('hidden');\n      openInstall('download');\n    });\n    // Every \"Show me how\" / \"Install the app\": the nudges', the settings\n    // row's, and the menus' (which go through offer('menu')).\n    document.addEventListener('click', (event) => {\n      const target = /** @type {Element} */ (event.target);\n      const button = target && target.closest ? target.closest('[data-pwa-install]') : null;\n      if (!button) return;\n      const moment = button.getAttribute('data-pwa-install') || '';\n      if (moment === 'menu') {\n        offer('menu');\n        return;\n      }\n      if (!button.hasAttribute('data-pwa-install-counted')) {\n        emitTelemetry('pwa.install.prompted', { moment: moment });\n      }\n      openInstall(moment);\n    });\n    // SNOW-486: the \"\u00D7\" on the banners is [data-action=\"dismiss\"] inside a\n    // [data-overlay], so static/js/overlays.js owns the hide; this module\n    // records the dismissal.\n    document.addEventListener('overlay:dismissed', (event) => {\n      const el = event.detail && event.detail.overlay;\n      if (!el) return;\n      if (el.id === 'pwa-first-launch') {\n        markFirstLaunchDone();\n        return;\n      }\n      if (!['pwa-install-banner', 'pwa-install-ios', 'pwa-install-download'].includes(el.id)) {\n        return;\n      }\n      recordDismissal(el.getAttribute('data-pwa-install-moment') || '', el.id);\n    });\n    document.addEventListener('htmx:afterSwap', onAlertsSwap);\n  }\n\n  /** Remember the first-launch card is answered, for good. */\n  function markFirstLaunchDone() {\n    try {\n      window.pwaDb?.put('meta:app', { key: FIRST_LAUNCH_KEY, value: true })?.catch(() => {});\n    } catch (_err) {\n      // Ignore.\n    }\n  }\n\n  /**\n   * \"Turn on\": the alerts opt-in's whole subscribe. Written as answered on\n   * success and on a refusal; an unanswered dialog or a failed\n   * registration asks again next launch.\n   * @param {HTMLElement} card\n   * @returns {Promise<void>}\n   */\n  async function turnOnAlerts(card) {\n    card.classList.add('hidden');\n    try {\n      const ok = await window.pwaAlertsOptin.enable();\n      if (ok || Notification.permission === 'denied') markFirstLaunchDone();\n    } catch (_err) {\n      // Registration failed: ask again next launch.\n    }\n  }\n\n  /**\n   * The installed app's first launch: offer alerts, once answered.\n   * @returns {Promise<void>}\n   */\n  async function firstLaunch() {\n    const card = document.getElementById('pwa-first-launch');\n    if (!card || !isStandalone()) return;\n    if (typeof Notification === 'undefined' || Notification.permission === 'denied') return;\n    if (!window.pwaDb) return;\n    let row = null;\n    let registered = null;\n    try {\n      row = await window.pwaDb.get('meta:app', FIRST_LAUNCH_KEY);\n      registered = await window.pwaDb.get('meta:app', SUBSCRIBED_BEFORE_KEY);\n    } catch (_err) {\n      return;\n    }\n    if (row && row.value) return;\n    // Permission granted but the device never registered (a registration\n    // that failed after the dialog): ask again, so \"Turn on\" can finish.\n    // Granted and registered is answered: alerts are on.\n    if (Notification.permission === 'granted' && registered && registered.value) {\n      markFirstLaunchDone();\n      return;\n    }\n    document.getElementById('pwa-first-launch-accept')?.addEventListener('click', () => {\n      turnOnAlerts(card);\n    });\n    const show = () => card.classList.remove('hidden');\n    const welcome = document.getElementById('map-tour-offer');\n    const root = document.documentElement;\n    // Never with the welcome card: on a page that has one, wait until\n    // map_tour_offer.js has settled this visit's offer (not offered,\n    // skipped, or answered). It is revealed only after load, the ratings\n    // and a settle delay, so its visibility now says nothing.\n    const ready = () => !welcome || (root.hasAttribute('data-map-welcome-settled') && !isShown(welcome));\n    if (ready()) {\n      show();\n      return;\n    }\n    const observer = new MutationObserver(() => {\n      if (!ready()) return;\n      observer.disconnect();\n      show();\n    });\n    observer.observe(root, { attributes: true, attributeFilter: ['data-map-welcome-settled'] });\n    observer.observe(welcome, { attributes: true, attributeFilter: ['hidden', 'class'] });\n  }\n\n  /**\n   * Ask the browser to make our storage persistent. Called once we can\n   * plausibly know the user is committed (installed + notification-\n   * permission-granted on iOS).\n   */\n  async function requestPersistentStorage() {\n    try {\n      if (!('storage' in navigator) || typeof navigator.storage.persist !== 'function') {\n        return;\n      }\n      const persisted = await navigator.storage.persist();\n      try {\n        console.info('pwa.storage.persisted', { result: persisted });\n      } catch (_err) {\n        // Ignore.\n      }\n    } catch (_err) {\n      // Ignore.\n    }\n  }\n\n  /**\n   * Called after install detection. Records timestamp, requests\n   * persistent storage.\n   */\n  async function onInstalled() {\n    writeItem('localStorage', INSTALLED_KEY, String(Date.now()));\n    emitTelemetry('pwa.install.completed');\n    // On iOS, storage.persist() only reliably returns true once\n    // notification permission has been granted. Elsewhere the browser\n    // may auto-grant based on install state.\n    if (isIOS()) {\n      try {\n        if ('Notification' in window && Notification.permission === 'granted') {\n          emitTelemetry('pwa.install.notifications_granted');\n          await requestPersistentStorage();\n        }\n      } catch (_err) {\n        // Ignore.\n      }\n    } else {\n      await requestPersistentStorage();\n    }\n  }\n\n  // Capture the browser's install prompt so we can defer it. At desktop\n  // and tablet widths nothing is revealed, but preventDefault() still\n  // keeps Chromium's own mini-infobar off.\n  window.addEventListener('beforeinstallprompt', (evt) => {\n    evt.preventDefault();\n    deferredPrompt = evt;\n    offer('visit');\n  });\n\n  window.addEventListener('appinstalled', () => {\n    onInstalled().catch(() => {});\n  });\n\n  // Declared in static/js/globals.d.ts.\n  window.pwaInstall = Object.freeze({ offer: offer });\n\n  function ready() {\n    // Standalone launch \u2014 user already installed; fire the post-install\n    // one-time work if we haven't recorded it yet.\n    if (isStandalone() && !readItem('localStorage', INSTALLED_KEY)) {\n      onInstalled().catch(() => {});\n    }\n    try {\n      RETIRED_KEYS.forEach((k) => localStorage.removeItem(k));\n    } catch (_err) {\n      // Ignore.\n    }\n    recordVisit();\n    bindControls();\n    // A trip just created (trips/trip_list.html): its slot asks itself.\n    const tripSlot = document.querySelector('[data-pwa-install-slot=\"saved\"][data-pwa-install-auto]');\n    if (tripSlot) offer('saved', { anchor: tripSlot });\n    offer('visit');\n    firstLaunch().catch(() => {});\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', ready);\n  } else {\n    ready();\n  }\n})();\n"],
  "mappings": "CAwFC,UAAY,CACX,aAEA,MAAMA,EAAa,qBACbC,EAAc,2BACdC,EAAgB,2BAChBC,EAAoB,4BACpBC,EAAe,kCACfC,EAAmB,gCAEnBC,EAAwB,yBAExBC,EAAe,CAAC,6BAA8B,6BAA6B,EAE3EC,EAAc,wBAKpB,IAAIC,EAAoB,CACtB,eAAgB,gEAChB,YAAa,wEACb,iBAAkB,4BAClB,yBAA0B,6BAC1B,cAAe,gCACf,aAAc,cACd,aAAc,sCACd,YAAa,kBACf,EAGA,IAAIC,EAAiB,KAGrB,SAASC,GAAO,CACd,OAAO,OAAO,gBAAkB,IAClC,CAQA,SAASC,EAASC,EAAMC,EAAG,CACzB,GAAI,CACF,OAAO,OAAOD,CAAI,EAAE,QAAQC,CAAC,CAC/B,MAAe,CACb,OAAO,IACT,CACF,CAOA,SAASC,EAAUF,EAAMC,EAAGE,EAAG,CAC7B,GAAI,CACF,OAAOH,CAAI,EAAE,QAAQC,EAAGE,CAAC,CAC3B,MAAe,CAEf,CACF,CAMA,SAASC,EAAaC,EAAO,CAC3B,GAAI,CACF,MAAO,CAAC,EAAE,OAAO,YAAc,OAAO,WAAWA,CAAK,EAAE,QAC1D,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BED_BEFORE_KEY", "RETIRED_KEYS", "PHONE_QUERY", "STRINGS_FALLBACKS", "deferredPrompt", "core", "readItem", "area", "k", "writeItem", "v", "mediaMatches", "query", "isStandalone", "isIOS", "installPlatform", "emitTelemetry", "event", "properties", "strings", "isSignedIn", "meta", "isOnline", "indicator", "isShown", "el", "isMidTask", "sheets", "sheet", "loadVisits", "parsed", "recordVisit", "c", "counted", "history", "readEnv", "now", "dismissedAt", "visits", "reveal", "moment", "openGuide", "guide", "platform", "kind", "part", "pitch", "runPrompt", "evt", "choice", "recordDismissal", "openInstall", "banner", "renderNudge", "anchor", "template", "S", "fragment", "text", "button", "nudge", "showDownload", "title", "offer", "opts", "options", "shown", "needsHomeScreen", "optin", "ua", "isAppleMobile", "onAlertsSwap", "detail", "verb", "slots", "slot", "input", "bindControls", "target", "markFirstLaunchDone", "turnOnAlerts", "card", "firstLaunch", "row", "registered", "show", "welcome", "root", "ready", "observer", "requestPersistentStorage", "persisted", "onInstalled", "tripSlot"]
}
