{
  "version": 3,
  "sources": ["favourites_offline.js"],
  "sourcesContent": ["/*\n * static/js/favourites_offline.js \u2014 Offline read cache for favourites\n * (SNOW-418).\n *\n * Caches every favourite the map's pins sheet fetches \u2014 the roster\n * (``favourites:list``) and each opened detail card (``favourites:card``)\n * \u2014 into the ``data:favourites`` IndexedDB store (SNOW-375's ``db.js``,\n * schema v2), keyed by the favourite's uuid. When either HTMX request\n * fails (offline, or a 5xx from a flaky connection), this script repaints\n * the same target element from the cached record instead of leaving\n * HTMX's own error state in place.\n *\n * This is the documented relaxation of the SW \"safety data is\n * network-only\" rule to \"cached, with explicit staleness\" \u2014 see\n * docs/offline-first.md \u00A712.6. A cached rating past its\n * ``unsafe_after_seconds`` horizon (48h, mirroring\n * ``core.freshness.DEFAULT_UNSAFE_AFTER_SECONDS``) never renders as a\n * current-looking danger chip; it renders as explicitly EXPIRED instead.\n *\n * Write-through\n * --------------\n * On ``htmx:afterOnLoad`` this reads the ``favourites-roster-cache`` /\n * ``favourite-card-cache`` ``json_script`` sidecars the server renders\n * alongside the swapped HTML (``favourites/views.py``), and upserts each\n * record into ``data:favourites``. A card update merges onto any existing\n * roster record for the same uuid (the card is the more detailed source,\n * so its fields win).\n *\n * The roster sidecar carries the user's whole current list, so the same\n * pass also drops any cached record the roster omits. Deleting a\n * favourite is an online-only ``hx-post`` with no cache-eviction step of\n * its own, so this reconcile is what keeps a deleted pin out of the\n * offline roster below.\n *\n * Offline read\n * ------------\n * On ``htmx:sendError`` / ``htmx:responseError`` (network failure or a\n * non-2xx response) this inspects the failed request's path to decide\n * whether it was the roster or a single card, reads the cached\n * record(s), and renders a minimal offline card via\n * ``renderOfflineCard`` \u2014 reusing the existing ``.danger-tile`` CSS +\n * design tokens rather than re-implementing the full card template.\n *\n * No exports \u2014 every entry point is wired to a DOM event at load time.\n */\n\n(function () {\n  'use strict';\n\n  const STORE = 'data:favourites';\n  const RESOURCE = 'favourites';\n  const LIST_PATH_SUFFIX = '/partials/list/';\n  const CARD_PATH_SUFFIX = '/card/';\n  // SNOW-722: the ownership prefix. The two suffixes above are matched with\n  // bare ``indexOf``, and this module's error handlers are bound to\n  // ``document.body`` \u2014 so they see EVERY failed HTMX request on the page,\n  // not just the favourites ones. ``/routes/partials/list/`` contains\n  // ``/partials/list/``, so offline the routes panel's failed fetch was\n  // caught here, its [data-routes-rows] wiped, and favourite cards painted\n  // into the Routes panel under its \"TRACKS\" heading. Only paths under this\n  // prefix belong to this module. ``config/urls.py`` mounts favourites at an\n  // unprefixed ``favourites/`` and the project has no ``i18n_patterns``, so\n  // no language segment can precede it \u2014 do not loosen this to a suffix.\n  const OWNED_PATH_PREFIX = '/favourites/partials/';\n\n  // SNOW-620: server-translated card copy, read back from the template\n  // includes/_favourites_offline_strings.html renders. This module builds\n  // the offline favourite card entirely in JS \u2014 it stands in for a server\n  // partial that could not be fetched \u2014 so none of its copy has ever\n  // passed through a template. The literals are the English fallback;\n  // see static/js/i18n_strings.js.\n  const STRINGS = self.pwaStrings.read('favourites-offline-strings-template', {\n    altitude: '%(metres)s m altitude',\n    'no-coverage': 'No bulletin coverage for this location.',\n    'rating-expired': \"Rating expired \u2014 reconnect to see today's danger level\",\n    'rating-as-of': 'as of %(time)s',\n    'cached-as-of': 'Showing cached data \u2014 as of %(time)s',\n    'no-longer-listed': 'No longer listed',\n  });\n\n  const interpolate = self.pwaStrings.interpolate;\n\n  /**\n   * True when ``window.pwaDb`` is present and the app is not in the\n   * terminal Reset Required state. Every DB access in this file is\n   * guarded by this check first.\n   *\n   * @returns {boolean}\n   */\n  function dbReady() {\n    return (\n      typeof window.pwaDb === 'object' && !window.pwaDb.isResetRequired()\n    );\n  }\n\n  /**\n   * Parse a ``json_script``-rendered sidecar by element id.\n   *\n   * @param {ParentNode} root\n   * @param {string} id\n   * @returns {any | null}\n   */\n  function _readJsonScript(root, id) {\n    try {\n      const el = root.querySelector ? root.querySelector(`#${id}`) : null;\n      if (!el || !el.textContent) return null;\n      return JSON.parse(el.textContent);\n    } catch (_e) {\n      return null;\n    }\n  }\n\n  /**\n   * Delete every cached record whose uuid is absent from ``keep``.\n   *\n   * ``db.js`` exposes single-key operations only, so this is a second pass\n   * over the store rather than part of the roster's write transaction.\n   * Both passes are idempotent and every later roster swap repeats the\n   * reconcile, so a failure between them self-corrects.\n   *\n   * @param {Set<string>} keep - uuids present in the roster payload.\n   * @returns {Promise<void>}\n   */\n  async function _evictAbsent(keep) {\n    const cached = await window.pwaDb.getAll(STORE);\n    for (const record of cached) {\n      if (record && record.uuid && !keep.has(record.uuid)) {\n        await window.pwaDb.delete(STORE, record.uuid);\n      }\n    }\n  }\n\n  /**\n   * Write-through: upsert the roster + card sidecars found under ``root``\n   * into ``data:favourites``, and reconcile the store against the roster.\n   * Never throws \u2014 every failure is swallowed so a broken cache write\n   * can't break the HTMX swap it rides on.\n   *\n   * @param {ParentNode} root\n   * @returns {Promise<void>}\n   */\n  async function _syncFromDom(root) {\n    if (!dbReady()) return;\n    try {\n      const roster = _readJsonScript(root, 'favourites-roster-cache');\n      const card = _readJsonScript(root, 'favourite-card-cache');\n      let wrote = false;\n\n      if (Array.isArray(roster)) {\n        const rosterUuids = new Set();\n        for (const record of roster) {\n          if (record && record.uuid) {\n            rosterUuids.add(record.uuid);\n            await window.pwaDb.put(STORE, record);\n            wrote = true;\n          }\n        }\n        // The roster is the user's full list, so anything cached and not\n        // in it has been deleted since the last swap. A card-only swap\n        // never reaches here \u2014 it says nothing about which favourites\n        // exist, so it must not evict.\n        await _evictAbsent(rosterUuids);\n      }\n\n      if (card && card.uuid) {\n        let merged = card;\n        try {\n          const existing = await window.pwaDb.get(STORE, card.uuid);\n          if (existing) merged = { ...existing, ...card };\n        } catch (_e) {\n          // No existing record \u2014 fall back to the card payload as-is.\n        }\n        await window.pwaDb.put(STORE, merged);\n        wrote = true;\n      }\n\n      if (wrote) {\n        await window.pwaDb.put('meta:sync', {\n          resource: RESOURCE,\n          last_synced_at: new Date().toISOString(),\n        });\n      }\n    } catch (_e) {\n      // Non-fatal \u2014 the cache is best-effort.\n    }\n  }\n\n  /**\n   * Stamp a cached record's time: \"HH:MM\" when it is from today, day +\n   * \"HH:MM\" otherwise, so yesterday's cache cannot read as today's\n   * (SNOW-1139). The formatting is ``pwaCachedStampCore``'s, shared with\n   * the reports and routes panels; '' on a parse failure, or when the core\n   * is somehow absent.\n   *\n   * @param {string | null} isoValue\n   * @returns {string}\n   */\n  function _formatStamp(isoValue) {\n    const core = window.pwaCachedStampCore;\n    return core ? core.formatStamp(isoValue) : '';\n  }\n\n  /**\n   * Classify a cached record as expired \u2014 past its\n   * ``unsafe_after_seconds`` horizon \u2014 using wall-clock ``Date.now()``.\n   * Records with no rating (``record.rating`` null) or no horizon\n   * (``unsafe_after_seconds`` null) never expire.\n   *\n   * @param {object} record\n   * @returns {boolean}\n   */\n  function _isExpired(record) {\n    if (!record.rating || record.unsafe_after_seconds == null) return false;\n    const generated = Date.parse(record.generated_at);\n    if (Number.isNaN(generated)) return false;\n    return Date.now() - generated >= record.unsafe_after_seconds * 1000;\n  }\n\n  /**\n   * Build the offline fallback card for one cached favourite record.\n   * Built with ``createElement`` + ``textContent`` throughout \u2014 never\n   * ``innerHTML`` with user-supplied data (the favourite's own name) \u2014\n   * per the \"no mark_safe on user-supplied content\" invariant.\n   *\n   * ``headingTag`` mirrors the server card's ``heading_tag``\n   * (favourites/partials/_favourite_card.html): this card stands in for\n   * that one, in the same slot, so it has to rank its title the same way\n   * \u2014 otherwise a pin's outline level would depend on whether the request\n   * reached the server. Callers below choose it from where they are\n   * painting; see ``_renderFromCache``.\n   *\n   * @param {object} record\n   * @param {string} [headingTag] \u2014 \"h2\" (default) or \"h3\".\n   * @returns {HTMLElement}\n   */\n  function renderOfflineCard(record, headingTag) {\n    const root = document.createElement('div');\n    root.className = 'bg-card border border-border rounded-card p-6';\n    root.setAttribute('data-testid', 'favourite-card');\n    root.setAttribute('data-favourite-uuid', record.uuid);\n\n    const title = document.createElement(headingTag || 'h2');\n    title.className = 'text-lg font-semibold text-text-1';\n    title.setAttribute('data-testid', 'favourite-card-title');\n    title.textContent =\n      record.name ||\n      `${Number(record.latitude).toFixed(5)}, ${Number(record.longitude).toFixed(5)}`;\n    root.appendChild(title);\n\n    // SNOW-1404: a saved resort that was retired has no place card to show\n    // \u2014 the panel's online row says so, and the cached one must too.\n    if (record.retired) {\n      const retired = document.createElement('p');\n      retired.className = 'text-sm text-text-2 mt-0.5';\n      retired.setAttribute('data-testid', 'favourite-card-retired');\n      retired.textContent = STRINGS['no-longer-listed'];\n      root.appendChild(retired);\n      return root;\n    }\n\n    const altitude = document.createElement('p');\n    altitude.className = 'text-sm text-text-2 mt-0.5';\n    altitude.setAttribute('data-testid', 'favourite-card-altitude');\n    altitude.textContent = interpolate(STRINGS.altitude, {\n      metres: Math.round(record.elevation),\n    });\n    root.appendChild(altitude);\n\n    const dangerSection = document.createElement('div');\n    dangerSection.className = 'mt-4 pt-4 border-t border-border';\n\n    if (!record.region) {\n      const noCoverage = document.createElement('p');\n      noCoverage.className = 'text-sm text-text-3';\n      noCoverage.setAttribute('data-testid', 'favourite-card-no-coverage');\n      noCoverage.textContent = STRINGS['no-coverage'];\n      dangerSection.appendChild(noCoverage);\n    } else if (_isExpired(record)) {\n      const expired = document.createElement('p');\n      expired.className = 'text-sm text-text-3';\n      expired.setAttribute(\n        'data-testid',\n        'favourite-card-rating-expired',\n      );\n      expired.textContent = STRINGS['rating-expired'];\n      dangerSection.appendChild(expired);\n    } else if (record.rating) {\n      const row = document.createElement('div');\n      row.className = 'flex items-center gap-2 mt-2';\n\n      const chip = document.createElement('span');\n      chip.className = 'danger-tile';\n      chip.setAttribute('data-level', record.rating.max_rating || '');\n      chip.setAttribute('data-testid', 'favourite-card-rating-chip');\n      chip.textContent = `${record.rating.digit || ''}${record.rating.max_subdivision || ''}`;\n      row.appendChild(chip);\n\n      const stamp = document.createElement('span');\n      stamp.className = 'text-xs text-text-3 font-mono';\n      stamp.textContent = interpolate(STRINGS['rating-as-of'], {\n        time: _formatStamp(record.generated_at),\n      });\n      row.appendChild(stamp);\n\n      dangerSection.appendChild(row);\n    }\n    root.appendChild(dangerSection);\n\n    const asOf = document.createElement('p');\n    asOf.className = 'text-xs text-text-3 font-mono mt-4';\n    asOf.setAttribute('data-testid', 'favourite-card-cached-as-of');\n    asOf.textContent = interpolate(STRINGS['cached-as-of'], {\n      time: _formatStamp(record.generated_at),\n    });\n    root.appendChild(asOf);\n\n    return root;\n  }\n\n  /**\n   * Extract the request path HTMX attempted, from an\n   * ``htmx:sendError`` / ``htmx:responseError`` event detail. htmx's own\n   * event object carries this as ``detail.requestConfig.path`` (and\n   * mirrors it at ``detail.pathInfo.requestPath``); ``detail.elt``'s\n   * ``hx-get`` attribute is a last-resort fallback for event shapes that\n   * omit both.\n   *\n   * @param {CustomEvent} evt\n   * @returns {string}\n   */\n  function _requestPath(evt) {\n    const detail = evt && evt.detail;\n    if (!detail) return '';\n    if (detail.requestConfig && detail.requestConfig.path) {\n      return detail.requestConfig.path;\n    }\n    if (detail.pathInfo && detail.pathInfo.requestPath) {\n      return detail.pathInfo.requestPath;\n    }\n    const elt = detail.elt;\n    if (elt && typeof elt.getAttribute === 'function') {\n      return elt.getAttribute('hx-get') || '';\n    }\n    return '';\n  }\n\n  /**\n   * Extract the favourite uuid from a card request path\n   * (``/favourites/partials/<uuid>/card/``).\n   *\n   * @param {string} path\n   * @returns {string | null}\n   */\n  function _uuidFromCardPath(path) {\n    const parts = path.split('/').filter(Boolean);\n    const idx = parts.indexOf('card');\n    return idx > 0 ? parts[idx - 1] : null;\n  }\n\n  /**\n   * SNOW-722: does this request path belong to the favourites app?\n   *\n   * The failure handlers below are bound to ``document.body``, so they are\n   * offered every failed HTMX request on the page. Anything that is not a\n   * favourites partial must be left to whoever owns it \u2014 the routes panel\n   * in particular has an offline cache of its own since SNOW-950\n   * (``static/js/routes_offline.js``, painted by ``static/js/routes.js``),\n   * and a favourites handler repainting over it would be the SNOW-722\n   * fault again with cached rows instead of a failure line.\n   *\n   * Resolved through ``URL`` so a relative ``hx-get``, an absolute path and\n   * a fully-qualified URL all reduce to a comparable pathname, and a query\n   * string (``?variant=map``) can't defeat the prefix test.\n   *\n   * @param {string} path\n   * @returns {boolean}\n   */\n  function _isFavouritesPath(path) {\n    let pathname;\n    try {\n      pathname = new URL(path, window.location.origin).pathname;\n    } catch (_e) {\n      return false;\n    }\n    return pathname.indexOf(OWNED_PATH_PREFIX) === 0;\n  }\n\n  /**\n   * Offline-read fallback: on a failed roster or card request, repaint\n   * the target element from the cached ``data:favourites`` record(s).\n   * Leaves HTMX's own failure UI in place when the cache has nothing to\n   * offer (not ready, or no matching record).\n   *\n   * @param {CustomEvent} evt\n   * @returns {Promise<void>}\n   */\n  async function _renderFromCache(evt) {\n    if (!dbReady()) return;\n    const path = _requestPath(evt);\n    if (!path) return;\n    // SNOW-722: ownership guard \u2014 see _isFavouritesPath. Without it the bare\n    // suffix matches below claim /routes/partials/list/ as well.\n    if (!_isFavouritesPath(path)) return;\n\n    const detail = evt.detail || {};\n    const target = detail.target || (detail.elt && detail.elt.parentNode);\n\n    try {\n      if (path.indexOf(LIST_PATH_SUFFIX) !== -1) {\n        const records = await window.pwaDb.getAll(STORE);\n        if (!records || records.length === 0 || !target) return;\n        // One endpoint, one outline depth \u2014 h2.\n        //\n        // The map sheet swaps this list into [data-favourites-rows], inside\n        // a panel whose title is a <span> (includes/_sheet_header.html), so\n        // a card in it has no section heading to rank under. (It was also\n        // h2 on /account/favourites/, whose only heading above the list was\n        // the page <h1>, until SNOW-803 removed that page; the h3 branch\n        // before that ranked under the account hub's <h2>.)\n        target.textContent = '';\n        records.forEach((record) =>\n          target.appendChild(renderOfflineCard(record, 'h2'))\n        );\n        return;\n      }\n\n      if (path.indexOf(CARD_PATH_SUFFIX) !== -1) {\n        const uuid = _uuidFromCardPath(path);\n        if (!uuid) return;\n        const record = await window.pwaDb.get(STORE, uuid);\n        if (!record) return;\n        // The request's own target \u2014 the panel under the row whose chevron\n        // asked for the card (SNOW-711 gave every row its own; there was\n        // one #favourite-card-panel above the whole list before it). That\n        // was /account/favourites/, which SNOW-803 removed: the map renders\n        // its rows with ``hide_disclosure``, so nothing there has a chevron\n        // to ask with \u2014 this branch is kept for the card endpoint's sake.\n        //\n        // h2, matching what the server would have sent for the same\n        // request \u2014 apps.favourites.views.favourite_card passes\n        // heading_tag=\"h2\" for exactly this panel. Both were h3 while the\n        // panel lived inside the account hub's <h2>-headed \"Favourites\"\n        // section; SNOW-668 made the page's <h1> the only heading above it.\n        if (!target) return;\n        target.textContent = '';\n        target.appendChild(renderOfflineCard(record, 'h2'));\n      }\n    } catch (_e) {\n      // Non-fatal \u2014 leave HTMX's own failure state in place.\n    }\n  }\n\n  document.body?.addEventListener('htmx:afterOnLoad', (evt) => {\n    const target = (evt && evt.detail && evt.detail.target) || document;\n    _syncFromDom(target).catch(() => {});\n  });\n\n  document.body?.addEventListener('htmx:sendError', (evt) => {\n    _renderFromCache(evt).catch(() => {});\n  });\n\n  document.body?.addEventListener('htmx:responseError', (evt) => {\n    _renderFromCache(evt).catch(() => {});\n  });\n})();\n"],
  "mappings": "CA8CC,UAAY,CACX,aAEA,MAAMA,EAAQ,kBACRC,EAAW,aACXC,EAAmB,kBACnBC,EAAmB,SAWnBC,EAAoB,wBAQpBC,EAAU,KAAK,WAAW,KAAK,sCAAuC,CAC1E,SAAU,wBACV,cAAe,0CACf,iBAAkB,8DAClB,eAAgB,iBAChB,eAAgB,4CAChB,mBAAoB,kBACtB,CAAC,EAEKC,EAAc,KAAK,WAAW,YASpC,SAASC,GAAU,CACjB,OACE,OAAO,OAAO,OAAU,UAAY,CAAC,OAAO,MAAM,gBAAgB,CAEtE,CASA,SAASC,EAAgBC,EAAMC,EAAI,CACjC,GAAI,CACF,MAAMC,EAAKF,EAAK,cAAgBA,EAAK,cAAc,IAAIC,CAAE,EAAE,EAAI,KAC/D,MAAI,CAACC,GAAM,CAACA,EAAG,YAAoB,KAC5B,KAAK,MAAMA,EAAG,WAA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,EAAO,YAAYvB,EAAkBb,EAAQ,IAAI,CAAC,CACpD,CACF,MAAa,CAEb,CACF,CAEA,SAAS,MAAM,iBAAiB,mBAAqB0B,GAAQ,CAC3D,MAAMU,EAAUV,GAAOA,EAAI,QAAUA,EAAI,OAAO,QAAW,SAC3DzB,EAAamC,CAAM,EAAE,MAAM,IAAM,CAAC,CAAC,CACrC,CAAC,EAED,SAAS,MAAM,iBAAiB,iBAAmBV,GAAQ,CACzDS,EAAiBT,CAAG,EAAE,MAAM,IAAM,CAAC,CAAC,CACtC,CAAC,EAED,SAAS,MAAM,iBAAiB,qBAAuBA,GAAQ,CAC7DS,EAAiBT,CAAG,EAAE,MAAM,IAAM,CAAC,CAAC,CACtC,CAAC,CACH,GAAG",
  "names": ["STORE", "RESOURCE", "LIST_PATH_SUFFIX", "CARD_PATH_SUFFIX", "OWNED_PATH_PREFIX", "STRINGS", "interpolate", "dbReady", "_readJsonScript", "root", "id", "el", "_evictAbsent", "keep", "cached", "record", "_syncFromDom", "roster", "card", "wrote", "rosterUuids", "merged", "existing", "_formatStamp", "isoValue", "core", "_isExpired", "generated", "renderOfflineCard", "headingTag", "title", "retired", "altitude", "dangerSection", "expired", "row", "chip", "stamp", "noCoverage", "asOf", "_requestPath", "evt", "detail", "elt", "_uuidFromCardPath", "path", "parts", "idx", "_isFavouritesPath", "pathname", "_renderFromCache", "target", "records", "uuid"]
}
