doxa-maps-cdn/public/js/doxa-simple-map.js
corsacca 0fe471dc8c
Maps: Fly, share, bug fixes (#8)
* maps on pray adopt and home pages

* translation of titles

* "Fixed more info button url mapping, fixed legend gets translated fields from api using language code from parent site passed as prop,  fixed legend numbers for engagement mapped to propper field"

* MERGE MAP REPOS AS PUBLIC PLUGINS

* Doxa-life is now a monorepo -> embeddables built inline -> Doxa-life /public/js serves as static CDN for serving map widgets to partner DOXA sites. UNLOCKS people of the day widget.

* Launch v1 Doxa Research Maps

* Add Go Pin Indicator 2 Research Map 2 Make Disciples

* Add Go Pin Indicator 2 Research Map 2 Make Disciples - fix map slots

* Research map: parse dialects from language field; add dialect tab + selection

- Parse "Arabic, Sudanese" (comma-inverted) and "Pakistan Sign Language" (suffix-grouped)
  into base language + dialect; dedup Languages tab to one row per base language.
- Move dialect rows under base languages via expandable carat in Tab 1 (family tree)
  and Tab 2 (languages). Tab 3 (Dialects) shows flat "Language, Dialect" list.
- New mapStore.selectedDialect ({ key, originalLabels }) drives dialect highlight +
  exact-match pin filter. Selecting a dialect dims sibling dialects + non-matching pins;
  selecting a language keeps its expanded dialect children visible (lft-row-child-active).
- _raw.primary_language is the reliable source for the comma-inverted label
  (p.language gets overwritten by useMapData).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-1: Dialects/Varieties tab, parent-display title, per-map geocoder placeholder

- LegendFamilyTree: add "Dialects/Varieties" as the 3rd default tab so users
  can actually reach Tab 3 from the legend bar (was only reachable via state).
- LegendFamilyTree: title row now surfaces the parent of the selected child
  (e.g. "Parent: Afro-Asiatic" when Arabic is selected on the Languages tab,
  "Parent: Arabic" when "Arabic, Sudanese" is selected) — solves the
  "what family does Arabic belong to?" problem without leaving the tab.
- LegendFamilyTree: bump dialect indent (28→40px) and add a vertical guide
  line on child rows so the hierarchical nesting is visibly clear.
- GeocoderComponent: watch the effective placeholder and patch the DOM
  input directly so the per-map prop can change as the active tab switches
  (Mapbox geocoder has no public placeholder updater).
- research-map: pass per-tab placeholder. On the Language Families tab the
  search bar reads "Search language family, language, dialect/variety";
  other tabs keep the i18n default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-2: search → tab navigation for language-family + dialect kinds

useDoxaSearch.js
- Add base-language + dialect parsing (mirrors LegendFamilyTree's SUFFIX_GROUPS).
- buildIndex now derives baseLang and dialectLabel per entry; reads the comma-
  inverted label from _raw.primary_language first (p.language gets overwritten
  by useMapData).
- buildAggregates: new `families` bucket (keyed by familyDerived from
  langFamilyByLanguage), `languages` rebased on baseLang (so "Arabic" appears
  once, not "Arabic, Sudanese" + "Arabic, Levantine"), and new `dialects`
  bucket keyed by base+dialect with originalLabels accumulated.
- makeAggregateFeature emits doxa-language-family / doxa-dialect place_types
  with EMOJI_FAMILY (🌳) and EMOJI_DIALECT (💬). Dialect features carry
  familyDerived/baseLang/dialectLabel/originalLabels for downstream wiring.
- search() output ordering: family → language → dialect (semantic-tree top-down)
  before places/religions.

GeocoderComponent.vue
- Forward doxa-language-family + doxa-dialect place_types as aggregate-result
  events; thread originalLabels + familyDerived + baseLang + dialectLabel.
- Clear selectedDialect too on "All DOXA Data" click (bidirectional sync).

research-map.vue
- onGeocoderAggregateResult handles 'language-family' (selectFamily +
  setActiveLegendTab('family')), 'language' (with comma-prefix + suffix-
  contains pin filter so "Arabic" catches "Arabic, Sudanese" and "Sign
  Language" catches "Pakistan Sign Language"), and 'dialect' (exact-match
  via originalLabels + selectDialect with legend-matching key
  "familyKey__baseLang__dialect" so the row indicator lights up).
- onGeocoderClear also clears selectedDialect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-3: tab info popovers (ⓘ buttons with definitions)

LegendFamilyTree.vue
- Each tab in the default tabLabels now carries an `info` field (per-tab
  plain-English definition). Definitions stay generic to the tab id, so
  future maps using the same component can pass their own.
- Added a small ⓘ button next to each tab label. Click toggles a popover
  showing the definition; click again or click outside closes; Escape
  closes. Switching tabs also closes the popover.
- Click-outside uses event.composedPath() — required for correctness across
  the shadow-DOM boundary (otherwise event.target is rewritten to the host
  element and the contains-check would always fail, closing on every click).
- Default copy: "A language family is a group of languages descended from
  a common ancestor (e.g. Indo-European, Afro-Asiatic).", "A language is a
  system of communication used by a people…", "A dialect/variety is a
  regional or social form of a language…".
- Tab CSS: tab button + ⓘ now share a flex wrapper (.lft-tab-info-wrap)
  with position:relative so the popover anchors to the tab cell.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: revert iter-3 tab info popovers

Per-tab ⓘ buttons + popovers duplicated the existing toolbar HelpButton (?)
and added clutter the eventual mobile rewrite would have to undo. Removing:
- ⓘ button + popover template wrapper
- info field on tabLabels default
- openInfoTab ref + toggleInfo + onDocClick + onEsc handlers
- onMounted/onBeforeUnmount document listeners + composedPath() click-outside
- .lft-tab-info-wrap / .lft-tab-info-btn / .lft-tab-info-popover CSS

Tab definitions belong in the toolbar HelpButton's "About this map" modal,
not inline on the legend.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: 3 bug fixes from screenshot QA

1. Sign Language duplicated in Languages tab — readFamily now consults
   SUFFIX_GROUPS as a final fallback. Pins where imb_language_family is null
   AND lookupFamilyFromLanguageLabel misses (e.g. "Pakistan Sign Language"
   not in langFamilyByLanguage.json) used to fall through to "Unknown",
   creating an Unknown__Sign Language bucket alongside the existing
   Sign Language__Sign Language one — same display label, two rows. Both
   highlighted on select because the selected-row check is by label, not
   key. Now any pin matching " sign language$" returns "Sign Language" as
   the family, collapsing both buckets into one.

2. X deselect button overlapped the population badge. Moved from right:6px
   (inside the inner pill) to right:-22px (into the empty right caret column,
   grid column -1). Bumped contrast (dark bg + white icon, theme-inverted
   in dark mode) so it reads as a proper close affordance.

3. Tab 3 (Dialects/Varieties) flat rows had no dialect styling — looked
   identical to Tab 2 language rows. Added lft-row-dialect + lft-name-dialect
   classes so they get the 40px indent, italic font, and vertical guide-line
   that distinguish dialects from base languages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: QA building-round-1 R2 fixes (5 items)

1. Sign-language LANGUAGES are kept distinct per QA R2 A1 — partial revert of
   e26e7cd which collapsed every "X Sign Language" into one base "Sign Language"
   row. SUFFIX_GROUPS renamed to FAMILY_SUFFIXES and applied ONLY in the
   family-resolution path. baseLang/dialect parsing leaves the full label
   intact: "Pakistan Sign Language" → family "Sign Language", base "Pakistan
   Sign Language", dialect null. Each variant gets its own Languages-tab row.
   Both useLanguageFamilyLegendData.js and useDoxaSearch.js updated in lockstep.

2. X deselect button now lives in its OWN grid column, not absolute-positioned
   inside the inner pill. Added --lft-deselect-col (24px) and used it as the
   trailing column of .lft-items grid. The X is a sibling of .lft-item (which
   uses display:contents, so its inner div participates in row grid columns
   2 to -2; the X lands cleanly in column -1). No overlap with badges, no
   negative-margin overflow into nothing.

3. Children of selected family no longer dim (Bug 5): added lft-row-child-active
   to (a) child language rows under a selected family on Tab 1, and (b) dialect
   grandchildren under either a selected family OR a selected child language.
   The existing CSS rule .lft-has-selection .lft-row-child-active … {opacity:1}
   handles the visual exception.

4. Title-row "Field: Parent" pattern (Bug 6): replaces "Parent: X" with
   level-specific labels — "Family: Afro-Asiatic" when a language is selected,
   "Language: Arabic" when a dialect is selected, "Family: Sign Language"
   when the family itself is selected. Default per-tab labels when nothing
   is selected.

5. Cross-tab geocoder clear (Bug 11): switchTab now calls
   _clearGeocoderProgrammatic() so the previous tab's search query doesn't
   leak. Programmatic clear bypasses onGeocoderClear so legend selection
   stays intact (only the geocoder INPUT TEXT resets).

Deferred per QA queue: Bug 7/8 count mismatches (data edge cases), Bug 9
case-insensitive search (needs repro), Bug 10 auto-collapse + scroll
(bigger UX work), file rename to SemanticTreeLegend.vue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: QA building-round-1 R3 fixes (5 items, cherry-picked from PPLR SemanticTreeLegend)

Per the user's "merge their patterns into ours, keep our rounded edges" call —
cherry-picking from /Map-Framework/05-apps/PPLR-MAPS/.../SemanticTreeLegend.vue
rather than full port. Preserves the doxa app aesthetic.

1. Bug 13 — Parent → child selection swap now works immediately.
   selectFamily() and selectLanguage() now clear the OTHER legend levels
   (mutually exclusive at the store layer). Watchers in research-map.vue gate
   the clear-cascade: when selectedFamily transitions to null, only fire
   applyDimFilter({kind:null}) if NO other level is set — otherwise the
   cascade-clear from a swap would erase the new selection via clearAllHighlights.

2. X button — now visually attached to the pill with no gap. Margin-left:-6px
   eats the row's column-gap so the button left-edge sits flush with the pill's
   right edge. Border-radius rounds only the right corners (matches pill's right
   side). Stretches to row height; the chip "sticks out" from the pill into the
   reserved trailing column. No absolute positioning, no overlap with badges.

3. Cross-tab geocoder clear — wrapped behind FEATURES.geocoderPersistAcrossTabs
   (default false). Flip to true to keep the geocoder query when returning to
   a previously visited tab.

4. Auto-collapse + scroll-into-view on geocoder selection (Bug 10).
   research-map.vue dispatches a `legend:reveal-selected` window event after
   driving mapStore.selectFamily/Language/Dialect via geocoder result.
   LegendFamilyTree listens, computes the ancestor-chain keys for the selected
   row, and calls setExpansionToOnly(keys) — collapsing every other family.
   After nextTick, scrollIntoView(behavior:smooth, block:center) on the
   .lft-row-selected element. The reveal is geocoder-only — direct legend
   clicks leave the user's manual expansion state alone.

5. useLanguageFamilyLegendData exposes setExpansionToOnly(keys) — generic
   helper that resets the expansion map to only the listed keys. Used by the
   reveal handler above; callable by any consumer that needs to drive expansion
   programmatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: replace LegendFamilyTree with ported PPLR SemanticTreeLegend

Per QA building-round-1 R4 user directive — "take their legend pretty much
word for word, archive ours" — the PPLR competitor's legend ships nearly
every Round-1-3 fix in one component. Cherry-pick gave way to full port:

- src/components/SemanticTreeLegend.vue (NEW): PPLR's component ported
  word-for-word (.stl-* class names + script + template + CSS). Adaptations:
  * Outer .stl-panel + .stl-collapse-btn + .stl-reopen rounded-pill REMOVED.
    LegendDesktop's existing collapse-to-circle (the rounded aesthetic the
    user explicitly called out as missing from PPLR's pill style) wraps and
    drives collapse via the #title-caret slot.
  * <style scoped> → useShadowStyles, since doxa-research-mfe renders in
    shadow DOM (Vue's scoped attribute selectors don't bridge the boundary).
  * Light-mode selectors rebased from .stl-panel[data-theme=light] to
    .semantic-tree-legend[data-theme=light] to match the new root element.

- src/composables/usePplrInstance.js (NEW): verbatim copy of PPLR's per-map
  instance store. createPplrInstance/provideInstance/useInstance API.

- src/components/LegendFamilyTree.vue → LegendFamilyTree.legacy.vue:
  archived in place per user direction. Not imported anywhere now.

- src/composables/useLanguageFamilyLegendData.js: new langTree computed
  exports the family→language→dialect tree as { id, label, color, count,
  pop, filter, originalLabels?, children }. Each node carries a pre-built
  Mapbox filter expression so legend selection drives the pin filter
  directly with no kind-specific dispatch downstream.

- src/components/LegendDesktop.vue: import SemanticTreeLegend instead of
  LegendFamilyTree. Invoke useLanguageFamilyLegendData here to derive
  langTree and pass via :nodes. Translate the new component's @select
  payload back into the existing legend:highlight window event so
  applyDimFilter in research-map.vue can keep using the same pipeline.
  Pass detail.filterExpr through verbatim — applyDimFilter prefers the
  pre-built expression over rebuilding from kind+expectedValue.

- src/components/LegendMobile.vue: same swap (SemanticTreeLegend + langTree
  adapter).

- src/app-profiles/research-map.vue: createPplrInstance + provideInstance
  so the legend's useInstance() inject resolves. Watch uiStore.theme and
  mirror to instance.theme for light/dark chrome. applyDimFilter prefers
  detail.filterExpr (pre-built node filter from langTree) over kind-based
  rebuild — same end result, less duplicate logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-2: PPLR port runtime fixes (4 items)

Iter-1 (commit 2508ea3) ported the legend; build passed but four runtime
issues surfaced when traced through the actual data flow:

1. langTree family filter was unreliable. Pin features have
   `properties.languageFamily` derived from `pg.languageFamily` (the API
   field) which is null for all 2,069 records — so the property is mostly
   "Unknown". A filter `['==', ['get', 'languageFamily'], 'Indo-European']`
   would match zero pins. Fix: collect every language string under the
   family (base lang + every dialect's originalLabels) and filter via
   `['in', ['get', 'language'], ['literal', allLangs]]`. The `language`
   property IS reliably populated. Falls back to the property match only
   when the family bucket has no language strings (defensive).

2. Geocoder → legend selection was not bridged. Search picks write to
   mapStore.selected{Family,Language,Dialect}, but the SemanticTreeLegend
   reads from instance.selection. Added watchers in research-map.vue that
   project mapStore changes onto pplrInstance.selection (using id strings
   that match the langTree node ids: fam:X / lang:__X / dial:X__Y__Z).
   Loop guard via the legend's existing _lastInternalId catches the
   round-trip when a legend-row click → mapStore mutation → bridge fires.

3. Selection from the bridge was sparse ({id, label, depth}, no children),
   so collectAllDescendantIds returned an empty Set — descendants dimmed
   instead of staying full-opacity. Added findNodeById helper and made
   selectedDescendants resolve the sparse selection to the full tree node
   via props.nodes lookup.

4. Collapsed-state CSS targeted the old .lft-* / .lrg-* classes; the new
   .stl-* SemanticTreeLegend would have shown its full inner card inside
   the 36px collapsed pill, double-chrome-ing. Added equivalent rules:
   .legend-container.collapsed .semantic-tree-legend .stl-tabs-wrap /
   .stl-col-hdr / .stl-rows hidden; .stl-inner background/border/shadow
   stripped; .stl-titlebar padding tuned to fit 36px height. Preserves
   the existing rounded-circle collapse aesthetic the user emphasized.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: SemanticTreeLegend now an EXACT clone of PPLR's; mounted standalone

Per user directive: "do a direct clone, only shave the API." Iter-1's adapted
port had stripped PPLR's outer .stl-panel + .stl-collapse-btn + .stl-reopen
chrome on the assumption that LegendDesktop's circular-collapse would wrap
better. The user disagreed — PPLR's collapsed pill + right-justified UPG
columns look better. Reverting to verbatim PPLR shape.

SemanticTreeLegend.vue
- File rewritten as a true word-for-word clone of upstream (851 lines).
- Outer .stl-panel + .stl-collapse-btn (titlebar caret) + .stl-reopen (rounded
  pill collapsed-state) ALL preserved. The only deviations from upstream:
  * <style scoped> contents copied into a useShadowStyles() call so the CSS
    lands inside doxa-research-mfe's shadow root (Vue scoped styles don't
    bridge custom-element shadow boundaries cleanly here).
  * useInstance() import path points to our local copy of usePplrInstance.js
    (already added in iter-1; unchanged).

research-map.vue
- langTree + LANG_TABS + onSemanticTreeSelect moved up from LegendDesktop.
  The legend mounts as a direct sibling of LegendDesktop in the
  rm-legend-desktop-slot. Conditional v-if swaps based on activeLegendType:
  language-family → SemanticTreeLegend; everything else → LegendDesktop.
- onSemanticTreeSelect uses PPLR's setFilter(node.filter) pattern verbatim.
  Mirrors selection back to mapStore so the geocoder + popup + fly-to paths
  keep working unchanged. Loop guarded by the legend's _lastInternalId.
- Bridge watchers now look up the FULL node in langTree (color/children/
  filter all populated) instead of passing a sparse {id,label,depth}.
  Searching "Arabic" in the geocoder now writes to mapStore.selectedLanguage,
  the bridge finds the matching lang: node, the legend lights up the row,
  expands its ancestor chain, and PPLR's setFilter(node.filter) applies.

LegendDesktop.vue
- Reverted iter-1 changes: dropped SemanticTreeLegend import + langTree
  compute + onSemanticTreeSelect translator. Left a no-op v-else-if for
  legendType === 'language-family' since the parent v-if hides this whole
  card on that tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: stop auto-switching tabs on legend row click

Per user: clicking a child component on the Family tab was auto-switching
to the Language tab. This was a bridge bug, NOT a legend-clone deviation:

  1. User clicks child language "Bengali" under Indo-European on Tab 1.
  2. Legend's selectNode sets _lastInternalId = "lang:Indo-European__Bengali",
     writes the clicked node to instance.selection. instance watcher fires;
     guard catches (sel.id === _lastInternalId), no tab switch. ✓
  3. onSemanticTreeSelect → mapStore.selectLanguage("Bengali").
  4. Research-map bridge watcher fires for selectedLanguage. _findNodeInTree
     searches by LABEL "Bengali" — matches the FIRST lang: node it finds.
     If Bengali appears in multiple family buckets (e.g. one pin under
     Indo-European, one with null imb_language_family bucketed under
     "Unknown"), the find may return "lang:Unknown__Bengali" — a different
     id than the one selectNode used.
  5. Bridge writes that wrong-id node to instance.selection. Legend watcher
     fires AGAIN; guard MISSES (sel.id="lang:Unknown__Bengali" ≠
     _lastInternalId="lang:Indo-European__Bengali"). Watcher reaches the
     `activeTab.value = Math.min(sel.depth, ...)` line → tab switches to
     depth 1 (Language tab). Bug.

Fix: in _bridgeSelection, if the legend already holds a selection of the
same kind+label, skip the overwrite. The click-set selection (which has the
correct family-prefixed id) wins; the bridge no-ops. Geocoder picks (where
no prior selection exists, or the label genuinely differs) still update.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: restore pin-click → people-group detail on language-family tab + align geocoder column

Pin-click flow was broken on the language-family tab after the PPLR-port
mounted SemanticTreeLegend standalone (LegendDesktop hidden). Tracing the
existing flow:

  - Direct pin click → useMapEvents.js → uiStore.selectPeopleGroup(feature)
    → uiStore.setLegendMode('detail'). LegendDesktop watches both and renders
    PeopleGroupDetail in its content slot.
  - Geocoder PG pick → mapStore.selectFeature(feature). The root-level
    PeopleGroupDetail (research-map line ~1370) renders.

Two parallel detail-display paths, two stores. Pin-click on the
language-family tab fell into a gap because LegendDesktop was v-if-hidden,
so uiStore.selectedPeopleGroup changes had nowhere to render.

Fix: re-mount LegendDesktop on the language-family tab specifically when
detail-mode is active. Its existing v-if priority renders PeopleGroupDetail;
SemanticTreeLegend hides for the duration. When the user closes the detail
panel (uiStore.selectPeopleGroup(null) → legendMode goes back to 'prayer'),
the condition flips and SemanticTreeLegend reappears.

Also aligned the geocoder column (.mapboxgl-ctrl-top-left) to match the
SemanticTreeLegend's .stl-panel — left:8px, width:380px — so the search bar
and the legend stack at the same x-edge as one PPLR-style column.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-2: align geocoder pill geometry + focus ring to PPLR

Audited the live geocoder against PPLR's .pgc-input-wrap; three deltas:
- border-radius was 20px → bumped to 999px (true pill, matches PPLR)
- no :focus-within ring → added rgba(59,70,61,0.18) (light) /
  rgba(115,161,127,0.22) (dark, PPLR's #73A17F accent at 22% opacity)
- input font-size unset → set 13px / placeholder 12px to match

(a) v-if/v-else-if branching for LegendDesktop ↔ SemanticTreeLegend
    confirmed sound — no flicker beyond Vue's normal mount/unmount.
(c) Confirmed no live LegendFamilyTree imports; all hits are stale comments
    + the archived .legacy.vue file (not imported anywhere).
(d) @media(max-width:767px) mobile geocoder override still works on top of
    the desktop width:380px change (uses !important).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: 3 bugs from desktop QA — pin-color, family-filter coverage, detail-card width

User report: clicking Afro-Asiatic in the legend only highlighted SOME
Arabic pins (the ones whose `language` happened to match a string in the
family bucket). Clicking Arabic itself highlighted MORE pins than Afro-
Asiatic. Also: Arabic pins on the map painted black instead of family-green
when the user expanded under Afro-Asiatic. Same root cause for both:

  Pin features carried `languageFamily: 'Unknown'` because the API field
  `imb_language_family` is null for all 2,069 records. The legend's family
  bucketing derives client-side via langFamilyByLanguage; the PIN PROPERTY
  never did. Result: the languageFamily color strategy painted Unknown =
  fallback (gray/black), and any property-based family filter missed every
  pin.

Fix #1: useMapLayers.js now derives `languageFamily` client-side via the
same lookup the legend uses (langFamilyByLanguage with comma-inversion +
parenthetical strip + sign-language suffix fallback). Pin colors now reflect
the legend's bucketing.

Fix #2: langTree's family filter is now belt-and-suspenders — matches by
derived `languageFamily` property OR by enumerated language strings under
the family bucket. Property path catches pins after the iter-2 derivation;
language-list path catches any pin whose `language` value matches a label
the legend bucketed even if the property derivation missed.

Fix #3: people-group detail card was wider than the SemanticTreeLegend
(LegendDesktop's --map-legend-width was 400px; .stl-panel is 380px). The
swap when the user clicks a pin now reads as same-card different-content.
applyContainerScale() bumped 400→380 at width≥700; .legend-container CSS
re-anchored to top:60px / left:8px / width:380px to match .stl-panel
exactly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map: ROOT-CAUSE fix — useMapData.deriveLanguageFamily now does comma-inversion

f72de45 fixed useMapLayers to derive languageFamily client-side, but the
fallback never ran. Tracing:

  1. useMapData.loadData() runs FIRST during mfe boot.
  2. Inside, it calls deriveLanguageFamily(pg) which did only an exact-match
     lookup `langFamilyByLanguage[langLabel]`.
  3. API returns pg.language = "Arabic, Sudanese", but
     langFamilyByLanguage keys are standard form ("Sudanese Arabic"). Exact
     lookup misses → returns ''.
  4. canonicalFamilyName('') returns 'Unknown'.
  5. pg.languageFamily = 'Unknown' for ~90% of the dataset.
  6. useMapLayers' OR-chain `pg.languageFamily || pg._normalized?... ||
     derive...` short-circuits at step 1 because 'Unknown' is truthy.
  7. Pin features carry languageFamily='Unknown'; map paints them gray/black;
     property filter matches nothing.

Real fix: upgrade useMapData.deriveLanguageFamily to mirror the legend's
lookupFamilyFromLanguageLabel logic — comma-inversion ("Arabic, Sudanese"
→ "Sudanese Arabic"), parenthetical strip ("Ainu (China)" → "Ainu"),
sign-language suffix fallback. Now pg.languageFamily = "Afro-Asiatic" for
every Arabic pin (and equivalents for other families).

Pin colors render correctly. Family filter (`['==', 'languageFamily',
familyKey]`) catches all pins. Belt-and-suspenders language-list filter from
f72de45 stays as a safety net for future format variances.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map mobile iter-1: SemanticTreeLegend embedded-in-sheet overrides

User reports the mobile bottom-sheet legend doesn't render on the language-
family tab. Root cause traced: LegendMobile renders <SemanticTreeLegend>
inside .legend-content for legendType==='language-family', but the
PPLR-ported component was designed for STANDALONE desktop use — its
.stl-panel uses position:absolute with hardcoded left:8px / top:60px /
bottom:12px / width:380px, anchoring to the nearest positioned ancestor.
Inside the bottom sheet, that means the panel pins to the sheet's
boundaries with desktop-sized offsets, clipping/overflowing the small
sheet chrome. .stl-reopen + .stl-collapse-btn (the desktop chrome) ALSO
duplicate the sheet's own pull-tab + .mobile-collapse-caret.

Fix: in LegendMobile's useShadowStyles, override the embedded
SemanticTreeLegend's positioning so it flows inside the sheet content area
normally (position:static, width:100%, height:100%, transparent inner card).
Hide .stl-reopen and .stl-collapse-btn since the sheet provides its own.
Trim .stl-titlebar padding so it doesn't fight the sheet's left-padding
(which clears the absolute mobile-collapse-caret at left:6px).

Iter-2 plan: verify the mobile sheet itself appears (uiStore.isMobile +
@media(max-width:767px) breakpoint alignment); audit pin-click → detail
flow on mobile; verify the sheet's height transitions don't clip the
embedded tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map mobile iter-2 + UPGs/Pop center-align (4 items)

User QA feedback:
1. uiStore.init() never called — breakpoint stayed 'desktop' even on mobile;
   resize observer never attached. Wired up in research-map.vue's onMounted
   (uiStore.init?.() with optional chaining for any setup that doesn't
   provide an init).
2. Mobile collapse caret looked unstyled vs the desktop's "professional gray
   highlighted button" (PPLR's .stl-collapse-btn). Restyled
   .mobile-collapse-caret with the same gray bg + border + rounded shape;
   added .sheet-dark variant for dark theme.
3. 3-tier collapse footer (collapsed → 44px footer with no rounded corners,
   only the title visible). Existing CSS used height:auto which depended on
   inner content; locked to height:44px / min-height:44px so the footer is
   stable. Hide SemanticTreeLegend's .stl-tabs-wrap / .stl-col-hdr / .stl-rows
   when the sheet is in collapsed state, and tighten .stl-titlebar to 44px
   (clears the absolute mobile-collapse-caret at left:10px via padding-left:44px).
4. UPGs/Pop columns: changed from text-align:right + justify-content:flex-end
   to text-align:center + justify-content:center on both .stl-hdr-num and
   .stl-num so header label and numeric values share an x-center across rows.

Pin-click → mobile detail flow (LegendMobile.vue:362 PeopleGroupDetail
branch) verified working independently of LegendDesktop's parent v-if;
unchanged in this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map mobile iter-3: tab-change reset + stronger caret styling

Sub-agent traced the language-family-tab "stuck cycle" bug:
- uiStore.legendState defaults to 'collapsed' on store creation, but is
  NEVER reset on tab change.
- Switching tabs keeps the prior tab's legendState. If user left Prayer at
  'fullyOpen' (the user perceives this as "70%") and switches to Language
  Families, the legend opens at 'fullyOpen'.
- toggleLegend cycles fullyOpen → open → collapsed → open. So clicks go
  fullyOpen → open → collapsed (footer). On other tabs this works.
- On the language-family tab, the cycle SHOULD also reach 'collapsed', but
  the user reports it gets stuck flipping fullyOpen ↔ open. Most likely
  cause: SemanticTreeLegend's height:100% override + internal scroll
  containers may have been masking the 'collapsed' state visually, but
  resetting on tab change short-circuits the issue regardless.

Fix #1 (research-map.vue:355): the activeTabId watcher now calls
uiStore.collapseLegend?.() on every tab change (skipping the very first
mount since the store already starts at 'collapsed'). All tabs — including
language-family — now start fresh at the footer tier when the user
navigates to them.

Fix #2 (LegendMobile.vue:40): bumped the .mobile-collapse-caret styling
to match PPLR's light-theme .stl-collapse-btn more closely. Background
rgba(208,215,222,0.5) (visible gray fill, not a barely-there transparent
overlay), border #afb8c1 (1px stronger contrast), color #3b463d (darker
text), 1px shadow for subtle elevation. Sheet-dark variant updated to
rgba(110,118,129,0.22) bg + #30363d border for visibility on dark sheet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-4: collapsed footer layout, search ranking, geocoder hard-clear

User QA on iter-3:
1. Caret overlapped "LEGEND" title in collapsed footer (caret left:10 + 24px
   width landed at x=34, title started at x=28 from .legend-content padding).
2. Title "centered horizontally but at top of footer" — wasn't vertically
   centered.
3. "LEGEND" text minute (10px font on a 44px footer).
4. Searching "arabic" lowercase didn't surface the Arabic LANGUAGE entry —
   five Arabic-speaking people-groups ate the All-Data slot.
5. Search bar text persisted "Afro-Asiatic" across tab switches even though
   switchTab calls _clearGeocoderProgrammatic.

Fixes:
1+2+3. LegendMobile.vue collapsed-state CSS now: padding-left:44px on
   .lrg-title-row / .lft-title-row / .stl-titlebar so title clears the
   absolute caret with a 10px gap; display:flex + align-items:center +
   height:48px on every title-bearing element so titles vertically center;
   .stl-tb-title / .lrg-title font-size bumped 10→13px; sheet height 44→48px
   for slightly more breathing room. Hide-rules for data rows/columns
   consolidated into one selector list.

4. useDoxaSearch.js: reorder allFlat so families → languages → dialects
   come BEFORE people / places / religions. With activeFilter set, the
   All-Data section now takes (families×3, languages×3, dialects×3,
   people×5, places×2, religions×2) instead of slicing the flat list at 5
   — guarantees representation across kinds. Total cap bumped to MAX_TOTAL+8.

5. _clearGeocoderProgrammatic now force-resets the DOM input element
   directly (input.value=''), in addition to calling Mapbox's geocoder.clear().
   Mapbox sometimes leaves the prior aggregate-result's text in the
   <input> even after clear() returns; forcing the value=''+input event
   guarantees the visible text resets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-5: mobile caret z-index, padding, title alignment, mixed-case

QA round on iter-4 (commit f42062f). All visual fixes per user feedback:

1. Caret z-index too low — caret was hidden BEHIND the legend grid on the
   language-family tab. Bumped from z-index:3 → z-index:10 so the caret
   floats above .stl-rows / .lrg-items.

2. Caret too large — reduced from 24×22 → 20×20 (square, smaller, sits
   tighter against the sheet's top-left corner). Top:14px / left:8px
   alignment matches the LegendRows title-row vertical center.

3. .legend-content left padding — reduced 28px → 8px. The wide gutter was
   only there to keep clear of the absolute caret; with z-index:10 the
   caret floats over the grid so the gutter is unnecessary. Title rows
   handle their own 36px padding-left to clear the caret visually.

4. SemanticTreeLegend title was UPPERCASE ("LANGUAGE FAMILIES") via PPLR's
   .stl-tb-title { text-transform:uppercase; letter-spacing:0.07em }. The
   user's other tabs use mixed-case ("Prayer Progress", "Engagement
   Progress"). Override text-transform:none + 14px system-ui font for
   .legend-mobile-sheet .stl-tb-title so it reads "Language Families"
   matching the other tabs' aesthetic. Dark-mode color variant added.

5. Caret overlapping the "L" of "LANGUAGE FAMILIES" in expanded state —
   .stl-titlebar's left padding bumped to 36px, clearing the 8+20=28px
   caret + 8px breathing room.

6. Collapsed-state titles weren't horizontally centered (LegendRows
   centered fine, .stl-titlebar left-justified). Added justify-content:
   center to all three title-row selectors when collapsed; symmetric
   padding 36px both sides keeps the centered text from touching the caret
   on the left or any future close-button on the right.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-6: fix CSS specificity collision + descender clip

User QA on iter-5: caret overlapping title text on language-family tab
("guage Families" visible — "Lan" cut off behind caret) and "Legend"
descender clipped on Prayer/Engagement/Adoption tabs.

Root cause #1 (overlap): iter-1 added a defensive .stl-titlebar rule
(padding:0 12px 4px 0!important) at line 134 to "trim padding fighting
mobile sheet". Iter-5 then added padding-left:36px!important at line 95
to clear the caret. Same specificity, line 134 wins by source order →
padding-left collapses to 0, caret covers the first 28px of title text.
Removed the iter-1 padding override entirely (its purpose is now served
by line 95 + the collapsed-state padding rule); kept the border-bottom-
color tweak.

Root cause #2 (descender clip): iter-5 set line-height:1 on collapsed
title text. With font-size:13px, the line box equals the font-em-square
exactly; descenders of 'g' / 'p' / 'y' hang below the box and get
clipped by the parent's overflow:hidden. Bumped to line-height:1.4 so
the line box accommodates descenders cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-7: per-tab legend tier memory + bright-row badge contrast

User QA on iter-6:
1. Switching tabs always collapsed the legend — user wants returning to a
   tab to RESTORE whatever tier (collapsed/open/fullyOpen) it was last at.
2. White text on bright green rows (engagement-tab "Engaged", adoption-tab
   "Has Adoption") was unreadable. The .lrg-name label had a text-shadow
   (line 170) but the .lrg-badge-inner did not, AND the badge background
   was mixing the row color with currentColor=white (lightening it on
   bright rows — the wrong direction for contrast). Numbers in the pills
   ("26", "8.3M") nearly disappeared.

Fixes:
1. research-map.vue: replaced the iter-3 "always collapseLegend on tab
   change" with a Map<tabId, legendState> that saves the outgoing tab's
   legendState and restores the incoming tab's prior state (default
   'collapsed' on first visit). Switching Prayer→Engagement→Prayer now
   returns Prayer to its prior tier instead of always-footer.
2. LegendRows.vue:
   - .lrg-badge-inner background mix changed from currentColor 22%
     (lightens on bright rows in light mode) to #000 28% (darkens any
     row, gives white text proper contrast).
   - Added text-shadow:0 1px 2px rgba(0,0,0,0.4) on .lrg-light
     .lrg-badge-inner and .lrg-dark .lrg-badge-inner — same shadow
     density the label gets, so "26"/"8.3M"/etc. stay legible on
     bright backgrounds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-8: bump --lrg-caret-col on mobile so caret stops overlapping title

User QA on iter-7: caret still overlapped the start of title text on
Prayer/Engagement/Adoption tabs. DevTools inspector showed .lrg-items
with no left padding.

Root cause: .legend-row-group declares --lrg-caret-col:10px (line 106 of
LegendRows.vue). The .lrg-items grid uses that as the width of column 1
(default template: var(--lrg-caret-col) minmax(80px,1fr) auto auto
var(--lrg-caret-col)). Title rows place their text in column 2.

The absolute-positioned .mobile-collapse-caret is 20px wide at left:8px,
so its right edge sits at x=28. Column 1 occupies only x=0..10 + 6px
column-gap, so column 2 (where title text starts) begins at x=16 —
DEEPLY inside the caret's footprint (caret right edge x=28 vs title text
left edge x=16 = 12px overlap).

Fix: override the --lrg-caret-col custom property to 32px ON THE MOBILE
SHEET ONLY. Column 1 now spans x=0..32 + 6px gap, column 2 starts at
x=38 — well past the caret's right edge at x=28. No overlap. Column 5
(right gutter) widens symmetrically, keeping the row visually balanced.

User's suggested approach: "increase the padding on both sides of the
prayer, engagement and adoption map. And then place the caret on the
column one to the left of the title." This is exactly that — bumping
the caret column width is equivalent to adding padding around the title
pill, while the caret continues to absolute-position cleanly within the
now-wider column 1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-9: slotted mobile caret + symmetric padding cleanup

Replaces the iter-5..8 absolute-positioned .mobile-collapse-caret with a
slotted caret that lives in the title row's column-1 caret slot — matching
desktop's pattern. SemanticTreeLegend now exposes a #title-caret slot
inside .stl-titlebar (with v-if fallback to PPLR's default .stl-collapse-btn);
LegendRows already had .lrg-title-caret-slot at grid-column:1.

CSS cleanup follow-on:
- .mobile-collapse-caret: dropped position:absolute / top:14 / left:8 / z-index:10;
  it's now a normal in-flow flex item that aligns with the title via the slot's
  align-items:center
- .legend-content padding: 12px 0 12px 8px → 12px 0 (symmetric, no asymmetric
  left gutter to clear the now-removed absolute caret)
- --lrg-caret-col on mobile: 32px → 28px (still fits 20px button + 4px each side)
- .stl-titlebar expanded: dropped padding-left:36px hack; now padding:8px 12px 8px 8px
- collapsed-state title rows: padding:0 36px 0 36px → padding:0 16px with gap:8px;
  caret + "Legend" cluster centered together, no fixed offset

Outcome: caret aligns with title text via grid/flex (no magic numbers); padding
is symmetric on both sides; structure-fix replaces five iterations of CSS patches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-10: fix tier-3 fullyOpen white-space-at-bottom on mobile

When the mobile sheet was at fullyOpen tier (calc(100% - 80px)) and the
legend list was long (e.g. Language Families with 30+ entries), the area
below the visible rows showed empty white space instead of more rows
flowing into view.

Root cause: .legend-content was display:block with flex:1. Its child
shells (.stl-panel / .legend-row-group) used height:100% to fill it,
but height:100% requires the parent to have a definite height — flex:1
gives a definite COMPUTED height but no definite DECLARED height, so
height:100% falls back to auto. The shells then sized to natural content,
.stl-rows / .lrg-items lost their flex:1 height anchor (their parent was
also auto), and the inner scroll containers ended up shorter than the
sheet — leaving the gap at the bottom.

Fix:
- .legend-content now display:flex; flex-direction:column; min-height:0
- Scope flex:1; min-height:0 to .stl-panel and .legend-row-group only
  (PeopleGroupDetail keeps its natural-height + outer-scroll behavior)
- .stl-panel mobile override: drop height:100%, add min-height:0

Outcome: inner scroll containers now bound to the .legend-content viewport,
last row aligns to the bottom of the sheet, no white tail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-11: add min-height:0 to .stl-rows so SemanticTreeLegend scrolls

iter-10 fixed white-space-at-bottom for Prayer/Engagement/Adoption (LegendRows
path) but missed the Language Families tab (SemanticTreeLegend path) — there
was still a white gap below the visible rows on fullyOpen mobile.

Root cause: .stl-rows has flex:1 + overflow-y:auto, but no min-height:0.
Flex items default to min-height:auto = content height, so a long list grows
past the parent instead of scrolling. .lrg-items in LegendRows already has
min-height:0 in its base CSS, which is why iter-10 worked there. .stl-rows
was missing it.

Fix: scoped mobile override .legend-mobile-sheet .stl-rows{min-height:0;}.

Outcome: SemanticTreeLegend's .stl-rows now scrolls within its parent bounds
on tier-3 fullyOpen, no white tail below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-12: clicking empty map clears stuck row-dim filter

User reported: clicking a legend row dims non-matching pins (correct), but
clicking off the row left the dim state stuck — pins stayed dimmed and
the row stayed selected with no obvious way to recover.

Fix: added a generic map.on('click') handler in onMapReady that fires
AFTER any layer-specific click. If queryRenderedFeatures finds no hits
on the interactive layers (language-family-pins, regions-fill), and any
of the prayer/engagement/adoption/family/language/dialect/region filter
states are active, clear them via uiStore setters + clearAllHighlights().

Outcome: clicking anywhere on empty map restores all pins to full opacity
and clears the row selection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Simple-map iter-1: unify engagement+adoption green to neon, move prayer-page map

User feedback (2026-05-03):
1. The simple-map (used on home/prayer/adopt pages) had different greens for
   engagement (#73A17F muted sage) vs adoption (#22c55e bright lime). User
   wants them unified to a single bright neon green that matches the pin
   color AND the legend row color in BOTH tabs.
2. The Prayer Progress map was at the bottom of the prayer page, after the
   "Choose a people group" section. User wants it moved up to sit right
   after the hero/prayer-goal/women-photo section so it's more visible.

Changes:
- doxa-simple-map-mfe/src/config/colorStrategies.js: ENGAGEMENT_COLORS
  hasEngagement and ADOPTION_COLORS hasAdoption both → #39ff14 (matches
  research-mfe engagement neon). Single source of truth — pins + legend
  rows pull the same hex.
- app/pages/pray.vue: Moved the <section> wrapping <DoxaMapSlot map-id="pray-map">
  from after "Choose a people group" (line 194-201) to immediately after the
  hero section (line 81), placing it before "Where do I start?".
- Built doxa-simple-map-mfe with PUBLISH_TO_PUBLIC=true so public/js/
  doxa-simple-map.iife.js is updated for the parent Nuxt site to serve.

NOT pushed to remote — local commit for user to test in doxa-website-nuxt
locally before any push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-13: slim mobile rows + free-drag legend pull-tab

User feedback (2026-05-03):
1. Mobile prayer/engagement/adoption legend rows look chunkier than the
   thinner desktop equivalents — match desktop's compact density.
2. Pull-tab on language families / data legend tabs auto-snaps to fullyOpen
   on the slightest upward drag. User wants free-drag on legend tabs (so
   they can interact with the legend AND the map at the same time without
   it taking over the screen). Keep auto-fullyOpen-snap behavior for
   PeopleGroupDetail (legendMode === 'detail'), since they DO want a slight
   pull to fill the screen with the photo + people-group content.

Changes:
- LegendMobile.vue handlePullTabTouchEnd: branch on legendMode. In 'data'
  mode, leave the dragged height in place (keep _customLegendHeight set)
  unless dragged below ~12% of available height (then collapse). In 'detail'
  mode, retain the existing ladder-snap (open ↔ fullyOpen ↔ collapsed).
- LegendMobile.vue CSS: .lrg-item-inner min-height 36→28, vertical padding
  6→2; .lrg-items row-gap 6→3. !important to win specificity over the
  shared LegendRows.vue base rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-14: fix legendMode check (was 'data', should be !== 'detail')

iter-13 introduced the mode-aware pull-tab release but checked legendMode
=== 'data', which never matches — uiStore.legendMode is 'prayer' by
default and only flips to 'detail' when a people group is selected. The
free-drag branch never ran, so the snap-to-fullyOpen path kept firing on
the legend tabs.

Fix: invert to legendMode !== 'detail'. Now legend tabs free-drag, and
PeopleGroupDetail still snaps to fullyOpen on a slight upward pull.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-15: snap legend to default 30% on pin select / detail close

User feedback (2026-05-03): the iter-14 free-drag fix let the user park the
legend at any custom height (e.g. 50%), but clicking a pin (entering detail
mode) inherited that custom height. The PeopleGroupDetail view is designed
around the canonical 30% 'open' state — the floating mini-image is
position:absolute with bottom:calc(30% + 16px), so a 50%-tall sheet hides
it, and the pull-tab from a custom-height detail behaves oddly because the
ladder-snap logic compares against the dragged height not the canonical
state height.

Fix: in uiStore.selectPeopleGroup, reset legendState to 'open' and clear
_customLegendHeight whenever a people group is selected (entering detail)
OR cleared (leaving detail). This restores the canonical 30% layout in
both transitions, matching the user's expected flow:
  - User drags legend up to 50% in language-family/prayer/etc. tab
  - Clicks a pin → legend SNAPS to 30%, floating image appears above
  - X out of detail → legend stays at 30% (clean default state)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-16: collapsed-detail footer for PeopleGroupDetail mode

User feedback (2026-05-03): when in detail mode (people-group selected),
collapsing the sheet via pull-tab tap or drag-down didn't render a clean
footer — PeopleGroupDetail's rich content (image / actions / quick-stats /
story) tried to render at 48px height. The collapse worked, but the visual
result was a clipped/overflowing detail panel instead of the canonical
"caret + name" footer that the legend tabs get.

Fix:
- Added a dedicated .collapsed-detail-footer block in LegendMobile,
  rendered v-if="legendState === 'collapsed' && legendMode === 'detail'".
  Mirrors the LegendRows collapsed-state pattern: a centered caret + the
  people-group name as the title. Click handler routes to handleCaretClick
  to re-expand back to 30% open.
- PeopleGroupDetail v-if now also gates on legendState !== 'collapsed' so
  it doesn't render at 48px.
- detail-close-btn (top-right X) is hidden when collapsed so the footer
  reads cleanly; user re-expands via the caret to reach the X.
- New CSS for .collapsed-detail-footer + .collapsed-detail-title (light +
  dark mode color).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-17: fix duplicate label in collapsed-detail footer

iter-16 added a collapsed-detail-footer (caret + PG name) but its v-if
gate on PeopleGroupDetail (legendState !== 'collapsed') let the fallback
v-else-if branches still evaluate — so SemanticTreeLegend (or LegendRows)
ALSO rendered with its own titlebar showing the same legendTitle (the PG
name). Result: the name appeared twice in the collapsed footer.

Fix: wrap the detail-mode branch in a <template v-if="legendMode ===
'detail' && selectedPeopleGroup"> so the v-else-if alternatives never
render when a people group is selected, regardless of state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-18: wire mobile SemanticTreeLegend @select to onSemanticTreeSelect

User reported: clicking a language-family legend row dimmed pins (correct),
but deselecting (clicking same row or X-chip) did NOT restore non-dim state.

Root cause: the mobile <LegendMobile> mounts its own <SemanticTreeLegend>
instance but did not pass an @select handler. Desktop's instance does:
  <SemanticTreeLegend @select="onSemanticTreeSelect" .../>
On mobile, row clicks updated only the shared instance.selection (via
inject), never reaching mapStore.selectFamily → applyDimFilter →
clearAllHighlights. Whatever path was applying dim on mobile (likely the
shared pplrInstance affecting desktop's SemanticTreeLegend in the hidden
desktop slot) ran the dim once on selection but the deselect never
fired the symmetric clear because mapStore.selectedFamily was never set
to begin with → its watcher never ran the kind:null path.

Fix:
- research-map.vue: provide('onSemanticTreeSelect', node => onSemanticTreeSelect(node))
- LegendMobile.vue: inject('onSemanticTreeSelect') + wire @select on
  the embedded <SemanticTreeLegend>

Outcome: mobile language-family row clicks now drive the canonical
mapStore.selectFamily → applyDimFilter pipeline, and deselect restores
pins to full opacity via the same kind:null clear path desktop uses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Simple-map iter-2: slim rows + darken badge bg for neon green readability

User feedback (2026-05-04): two issues on the simple-map after iter-1
unified engagement+adoption to neon #39ff14:
  1. The bright neon row background made the badge digits hard to read
     (badge bg was lightening with currentColor 22%, washing out white text)
  2. Rows felt chunky vs the slimmed research-map mobile rows

Fix (mirrors research-map iter-7 + iter-13):
- .lrg-badge-inner background: color-mix with #000 28% (darken) instead of
  currentColor 22% (lighten); add text-shadow:0 1px 2px rgba(0,0,0,0.45)
  on the badge inner so digits stay readable on any row color.
- .lrg-item-inner: min-height 36→28, vertical padding 6→2.
- .lrg-items row-gap: 6→3.

Built with PUBLISH_TO_PUBLIC=true so public/js/doxa-simple-map.iife.js
is updated for the parent Nuxt site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Simple-map iter-3: flat top edges on collapsed mobile footer

Mirrors research-map's collapsed-footer pattern. When the simple-map
mobile legend is collapsed (52px footer mode), the rounded top corners
flatten so the footer reads as a clean strip pinned to the bottom edge.
Rounded corners return automatically when the sheet expands, since the
base .legend-mobile-sheet rule still sets border-top-*-radius:16px and
only .collapsed zeroes them out.

Single-line CSS addition — no behavior changes elsewhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-19: swap Adoption before Engagement in tab order

User feedback (2026-05-04): tab order should follow the Prayer → Adopt
→ Engage → Language Families flow, not Prayer → Engage → Adopt.

Single-line reorder in ALL_TABS array. Per-tab logic, filters, watchers,
and Mapbox layer paint all key off `id`, not array position, so no other
changes needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-20: isolate .rm-root stacking so internal z-index doesn't leak

User reported: the geocoder pill (z-index:1200 inside the shadow root)
overlapped the page hamburger menu items.

Root cause: .rm-root had position:absolute but no z-index/transform/etc.
that would force a stacking context. Without one, child stacking values
(geocoder 1200, legend 1000) compared against page-level elements rather
than only against each other inside the widget. Any page element with
z-index < 1200 (or auto) lost the stacking battle.

Fix: add isolation:isolate to .rm-root. This is the modern, side-effect-
free way to create a stacking context — no visual change, no impact on
existing internal layering. All internal z-indexes now compare only
against each other within the .rm-root subtree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* DoxaMapSlot: inherit border-radius onto the custom element host

User reported a brief square-corners flicker on the research page —
the map slot itself had rounded corners (class="rounded-xlg") but the
custom element rendered with rectangular edges for the first few hundred
milliseconds between page paint and IIFE registration / first map paint,
making the edges appear to "snap" rounded once the map loaded.

Fix: the :deep(doxa-map) / :deep(doxa-research-map) selector now sets
border-radius:inherit + overflow:hidden, so the host element matches
the slot's curve from first paint regardless of mount timing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* DoxaMapSlot: add contain:paint for reliable canvas clipping

iter-1 (efd7800) added border-radius:inherit + overflow:hidden on the
custom element host, but the user still saw a brief square-corners flash
on the research page during initial load. Some browsers don't reliably
clip a WebGL canvas (Mapbox) to a parent's border-radius until after
the first composited repaint — overflow:hidden alone is sometimes not
enough when shadow-DOM-painted canvas content is involved.

Fix: add contain:paint to the host. This explicitly creates a paint
containment layer so the border-radius clip is enforced from the very
first frame regardless of when Mapbox's canvas paints its first tile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Research map iter-21: bump desktop tab-bar left padding to clear rounded corner

User feedback (2026-05-04): on desktop the Prayer tab sat partially
under the .rounded-xlg slot corner. Mobile padding (16px) was already
correct and shouldn't change.

Fix: split the desktop padding into start:36px / end:16px. The mobile
@media(max-width:767px) override below already resets both sides to
16px so mobile is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Ship PPLR data maps page at /research/pplr-data-maps

Adds the validation MFE bundle behind a Nuxt page that reads the
Mapbox token from runtimeConfig.public.mapboxToken (NUXT_PUBLIC_MAPBOX_TOKEN),
matching the pattern used by /research and /pray. Token is never
hardcoded — sourced from .env at runtime so secret-scanning stays clean
and tokens rotate via the host environment.

Page renders the gem-frame chrome + tab system natively in Vue, then
injects /js/pplr-data-maps.iife.js on mount. The iife defines the
<doxa-map> custom element; the dynamically created doxa-map placeholders
upgrade automatically once customElements.define runs.

Source MFE:
  port-kingdom/Map-Framework/05-apps/PPLR-MAPS/PPLR-validate-data-mfe
Built with `npm run build` -> dist/pplr-data-maps.iife.js, copied here.
mapbox-gl + geocoder + d3 stay as CDN scripts (intentionally NOT bundled).

Tabs through 10 PPLR validation profiles: Religion, ROP Tree, Language
Families, Semantic Trees, PG Name Locales (primary) + Sunburst, Pins,
Rosetta Cards, Coverage (More), + Index (fixed right).

Heads up: pg-names.jsonl is 54 MB (over GitHub's 50 MB advisory but
under the 100 MB hard limit). If we want to dodge the warning later,
swap to LFS or move that one file to a CDN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Add /api/maps/token endpoint, swap PPLR page back to static HTML

The Vue page conversion (previous commit) was forced by GitHub's
secret-scanning false-positive on the hardcoded Mapbox pk. token. This
commit ports the dt-geo-steward pattern (geo-steward.php :: get_temp_key)
to a Nuxt server endpoint instead, which lets us go back to a clean
static HTML page in public/.

Changes:
  + server/api/maps/token.get.ts — returns a pk.* directly OR mints a
    1-hour read-only tk.* from an sk.* via Mapbox Tokens API. Caches
    minted TKs in-memory until 5 min before expiry. JWT-decodes the
    SK to extract the username for the API call (Mapbox 'u' field).

  M nuxt.config.ts — adds private mapboxKey runtimeConfig slot
    (NUXT_MAPBOX_KEY). Falls back to public.mapboxToken if unset, so
    existing setups keep working with no env change.

  + public/research/pplr-data-maps.html — static page that fetches
    /api/maps/token at load, sets window.PPLR_TOKEN, then injects
    /js/pplr-data-maps.iife.js. Token NEVER appears in committed
    files — secret-scanning safe.

  D app/pages/research/pplr-data-maps.vue — replaced by the static
    HTML above. Same URL semantics (/research/pplr-data-maps.html now,
    no Nuxt routing involved).

Pattern can be reused by any future static MFE embed on doxa-life:
just fetch /api/maps/token, set the token, load your bundle. No
runtimeConfig dance, no page wrapper.

Heads up: requires NUXT_MAPBOX_KEY (sk. or pk.) OR the existing
NUXT_PUBLIC_MAPBOX_TOKEN to be set in Railway env. If only the public
token is set, the endpoint returns it as-is — same effective result
as before, just routed through the server.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 2: prayer green unify, geocoder flag, black pin, default tab

User feedback (2026-05-04) — four changes for the simple-map and the
research-map's language-families legend:

1. Simple-map prayer green: was '#27ae60' (dark), now '#39ff14' (neon)
   so all three "green" rows (prayer fullPrayer, engagement hasEngagement,
   adoption hasAdoption) match exactly across all three simple-map tabs.

2. Simple-map geocoder: feature-flagged off via FEATURES.geocoder=false
   in doxa-simple-map.vue. Research-map keeps its geocoder unchanged.
   Flip the flag back on if/when search returns to home/pray/adopt pages.

3. Simple-map selected-pin marker: orange GO pin → simple black pin.
   Removed the orange glow halo, the orange shimmer animation, the
   "GO" text label, and the dark inner circle. Just a black teardrop
   with white outline + a tiny drop shadow for visibility.

4. Research-map Language Families legend: default tab is now "Language"
   (index 1) instead of "Language Family" (index 0). Set on the shared
   pplrInstance after creation so both desktop and mobile mounts inherit
   it. Users can still click the Language Family tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 3: unify greens to #22c55e, simple black pin on research, legend reflow when geocoder hidden

User feedback (2026-05-06) — three Phase-1 fixes for shipping V1:

1. Unify green across BOTH maps to '#22c55e' (the existing adoption green —
   "deep but visible, not too dark, not too neon"). Replaces:
   - simple-map prayerColors.fullPrayer  '#39ff14' → '#22c55e'
   - simple-map ENGAGEMENT_COLORS         '#39ff14' → '#22c55e'
   - simple-map ADOPTION_COLORS           '#39ff14' → '#22c55e'
   - research-mfe ENGAGEMENT_COLORS       '#39ff14' → '#22c55e'
   - research-mfe prayerColors.fullPrayer '#27ae60' → '#22c55e'
   - research-mfe ADOPTION_COLORS         '#22c55e' (already correct, no change)
   Now all 6 "green" rows + pin colors match exactly across both bundles.

2. Apply the simple black/white selected-pin pattern to research-mfe (mirrors
   what simple-map iter-1 received earlier). GO_ORANGE constant '#FF6600' →
   '#1a1a1a' (black). createGoMarkerElement body simplified — no orange
   glow halo, no shimmer animation, no inner dark circle, no "GO" text.
   Just a black teardrop with a white outline + a tiny drop-shadow.

3. Simple-map: when FEATURES.geocoder=false, the LegendDesktop reflows up
   from top:54px to top:10px to fill the freed slot. Driven by adding a
   'dsm-no-geocoder' class to .dsm-root (bound to !FEATURES.geocoder) +
   a single CSS rule that overrides the legend-container top.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 4: research caret pattern on simple-map mobile + slight padding trim

User feedback (2026-05-06) — Phase 2 of the V1 ship:

Simple-map mobile legend: now mirrors the research-mfe collapsed-footer
pattern so the caret reads more clearly and the title is centered:
- .mobile-collapse-caret bumped from a 10x10 monochrome arrow to the
  research-mfe 20x20 light-gray pill (border + box-shadow + hover state).
- Inner SVG bumped 8x8 → 11x11, stroke-width 2 → 1.5.
- --lrg-caret-col bumped on mobile only (10 → 28px) so the slotted
  20px pill fits with breathing room and doesn't overlap the title.
- Collapsed-state .lrg-title-row reflows to display:flex; justify-content:
  center; gap:8px — caret + "Legend" cluster now sits in the middle of
  the 52px footer instead of being subgrid-pinned to column 1.

Research-mfe mobile legend: slight padding trim per the "find the middle
ground" ask:
- --lrg-caret-col 28px → 24px. Pill caret is 20px so still fits with 2px
  breathing room on each side; row content gets ~8px more width.

Note: not using module federation, so the caret pattern is duplicated
between the two LegendMobile.vue files. Acceptable for v1 ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 5: unify needs-red, rename Languages tab, dynamic selection-pin color

User feedback (2026-05-06) — three V1 ship items:

1. Needs-red across all "not" rows: notEngaged + notAdopted in BOTH bundles
   change from near-black '#1a1a2e' to red '#e74c3c' so prayer's noPrayer,
   engagement's notEngaged, adoption's notAdopted all share the SAME red.
   Same approach as the green unification: prayer-color drives the family.

2. Tab + legend rename "Language Families" → "Languages" on research-mfe
   (research-map.vue ALL_TABS label + desktop SemanticTreeLegend title +
   LegendMobile fallback title). Tab id and ALL underlying logic still keys
   off 'language-families' / 'language-family' so no other code touched.

3. Selected-pin color now matches the underlying dot color via a new
   provide('getActivePinColor', ...) in each app-profile. useSelectedPin.js
   in BOTH bundles now:
   - injects the resolver
   - tracks closure-state _currentColor (default GO_ORANGE fallback)
   - rebuilds the marker SVG when color changes
   - updates the highlight layer's circle-color paint property
   Resolver in research-map.vue uses getColorStrategy(activeTab.colorStrategy)
   directly; simple-map's mapping is via COLOR_MODES (engagement/adoption/
   prayer) since its tab strategyKey strings don't match COLOR_MODES values.

Note: pin updates on next selection — if user switches tabs while a
group is selected, pin stays the previous color until next click. Can
add a tab-switch watcher in a follow-up if it's a real annoyance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 6: angled brush-style pin + 'advanced research map' link on simple-map pages

User feedback (2026-05-06):

1. Selected pin redesign — replaced the flat-fill teardrop with an angled
   gradient-filled version that reads more like a hand-drawn / painterly
   pin (per the reference image they shared). In both useSelectedPin.js
   files:
   - viewBox bumped to "-2 -2 32 40" so a -5° tilt around the tip (14, 35)
     doesn't clip the pin's top corners.
   - <linearGradient> in <defs> with three stops: lighter ${color}@92%,
     ${color}@100%, then #000@85% bottom-right — gives the pin volume.
   - filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.4)) on the SVG —
     stronger offset shadow that suggests the pin is set down on the map.
   - Wrapper bumped 28x36 → 32x40.
   - Each marker render generates a unique gradient ID via
     pinGrad-${Math.random().toString(36).slice(2,8)} so multiple pins on
     the same page can never collide on the gradient ID.
   - The dynamic ${color} from round 5 still drives the gradient stops,
     so the pin color follows the active dot color AND has the painterly
     gradient at the same time.

2. "Explore the advanced research map →" link added below the simple-map
   on home (index.vue), pray (pray.vue), and adopt (adopt/index.vue) pages.
   Uses NuxtLink + localePath('/research') to match the rest of the site's
   routing. Right-aligned, underlined, brand color. Gives simple-map users
   a clear path to the more advanced 5-tab research-map widget.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 7: rephrase + enlarge 'Explore our research maps' link

User feedback (2026-05-06):
- Text: 'Explore the advanced research map' → 'Explore our research maps'.
  Drops 'the advanced' (more inclusive phrasing) and pluralizes 'maps'
  since the research page hosts five tabs / five distinct map experiences.
- Font size: 0.95rem → 1.2rem so the link reads as a deliberate CTA below
  the simple-map and not as fine-print.

Applied to home (index.vue), pray (pray.vue), adopt (adopt/index.vue).
No MFE rebuild needed — pure Nuxt page text change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 8: untilt selected pin + theme-aware thin Joshua-Project-style data-pin outline

User feedback (2026-05-06):

1. Selected pin was visibly tilted (-5° from round 6) and looked off; user
   wants a fully symmetric vertical pin. Removed the <g transform="rotate(
   -5 14 35)"> wrapper around the pin paths in BOTH useSelectedPin.js
   files. Painterly gradient + drop-shadow + dynamic color all preserved
   — just no tilt.

2. Data-pin outline reverse-engineered from Joshua Project — they use a
   very thin near-black outline that reads as a subtle definition rather
   than the bright white halo we had. In light mode (default boot style
   = mapbox/light-v11) the white #ffffff outline made red/orange/green
   pins look "haloed" and washed out. New approach:
   - Initial circle-stroke-color in addLanguageFamilyLayer:
     'rgba(0,0,0,0.45)' — thin, semi-transparent near-black for light mode.
   - Watcher on isDark in each app-profile flips stroke to '#ffffff' when
     the user toggles to dark mode (so pins stay visible against dark
     basemaps), and back to 'rgba(0,0,0,0.45)' on light.
   - The existing setStyle()-then-re-add path in handleToggleTheme already
     re-applies the layer; the new watcher just ensures stroke updates
     reactively in both directions.

   stroke-WIDTH (getCircleStrokeWidthInterpolation('standard')) already
   ramps 0.5px → 1.5px from min to zoom 12, which is fine — no width
   change needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 9: Joshua-Project outline now also flows through ACTIVE_LAYER overlay

User feedback (2026-05-06) — round 8 made the base data-pins thin near-black
in light mode, but selecting a legend row still drew the matched pins
through a SEPARATE 'language-family-pins-active' overlay layer whose stroke
color was hardcoded white via getStrokeColor() returning '#ffffff' (old
FEATURES.darkPinBorder=false gate). Result: filtered/highlighted pins kept
the old bright white halo while non-matched dimmed pins had the new thin
outline — visually inconsistent.

Fix in simple-map app-profile:
- getStrokeColor() drops the FEATURES.darkPinBorder gate; now returns
  isDark.value ? '#ffffff' : 'rgba(0,0,0,0.45)' to match round 8's
  base-layer watcher.
- getFilterStrokeColor() simplified — the DARK_PIN_KEYS exception
  (returned white for 'notEngaged'/'notAdopted') no longer matches its
  original intent because round 5 changed those pins from near-black to
  red (#e74c3c). All filter cases now use getStrokeColor() uniformly.

Research-mfe was already fine — it dims via circle-(stroke-)opacity on the
same language-family-pins layer rather than drawing a separate active
overlay, so the round-8 stroke-color change covers it without extra work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Maps round 10: feature-flag the active-overlay emphasis off on simple-map

User feedback (2026-05-06): selecting a legend row added too much visual
noise — the matched pins got a thicker outline, an enlarged radius, AND
a pulsing animation via a separate ACTIVE_LAYER + PULSE_LAYER overlay.
Want just "dim the others" and call it done.

Added FEATURES.activeOverlayEmphasis (default false). When false:

- initActiveLayer() short-circuits at the top — neither ACTIVE_LAYER nor
  PULSE_LAYER ever get added, so no rAF loop, no animation, no extra stroke.
- applyLegendFilter dim path: instead of recoloring base to mutedGray and
  drawing matches via the (now-absent) overlay, the base layer's
  circle-opacity + circle-stroke-opacity become 'case' expressions on
  matchExpr — matched pins stay at 0.9 / 1.0, non-matched dim to 0.15 /
  0.15. Color stays at the tab's normal palette.
- clear-filter branch restores circle-stroke-opacity:1 (it was previously
  set to 0 via the muted-gray dim path).
- Legacy overlay code is kept behind the flag in case someone wants to
  flip it back on.

Visual outcome: matched pins look IDENTICAL to their unfiltered state
(thin near-black outline from round 8/9, no halo); only non-matched pins
fade. No animation. Matches what the user asked for.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Replace doxa-{simple,research}-mfe with unified 1040-maps forge

Two cloned MFEs (doxa-simple-map-mfe, doxa-research-mfe) collapsed into
a single Vite monorepo at embeddables/micro-frontends/1040-maps/, ending
the clone-and-drift pattern that was shipping divergent SemanticTreeLegend,
colorStrategies, useMapData, etc. across maps.

Architecture:
  src/                shared library (components, composables, config,
                      stores, i18n, utils, ProfileLoader)
  app-profiles/<n>/   per-bundle source folders
                        ├─ index.html  (staging)
                        ├─ index.js    (custom-element entry)
                        └─ profiles/   (bundle-private .vue profiles)
  npm run build       loops app-profiles/* → emits one IIFE per bundle
                      directly to ../../public/js/<bundle>.js

Per-bundle build (BUNDLE=<name> vite build) lets each bundle ship as a
single self-contained IIFE with CSS inlined via vite-plugin-css-injected-
by-js. Tree-shaking + workspace-style sharing replaces Module Federation;
nothing ships across bundle boundaries that the bundle's profiles don't
import.

Bundles produced:
  public/js/doxa-simple-map.js     377 KB  (3 simple-map profiles)
  public/js/doxa-research-map.js   1.25 MB (1 research workbench profile,
                                            7 outer tabs incl. new Religion)

New research-map outer tabs (vs original): Affinity Blocks (4-tier:
Bloc → Cluster → PG → PGIC), Religions (10 family rows, Christianity
filtered out via excludeReligionFamilies opt). Vertical separator
between tier-1 (Prayer/Adoption/Engagement = simple-map regurgs) and
tier-2 (Languages/Affinity Blocks/Religions = research-only).

Custom-element ownership: <doxa-map> exclusive to simple-map bundle;
<doxa-research-map> exclusive to research bundle. Disjoint to prevent
the SPA-navigation tag-collision bug where /research → /home would
have <doxa-map> stuck on the research bundle's profileModules.

Site wiring: useDoxaMap.ts paths updated to .js (no .iife suffix).
DoxaMapSlot already routes to distinct tags per bundle.

Old MFE folders (doxa-simple-map-mfe/, doxa-research-mfe/) removed —
historical archive lives at Map-Framework/1040-maps/ if needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat: rename legend title from Affinity Blocks to People Groups

* feat(1040-maps): modern map styling — Apple Maps / Felt quality polish

Why: The map's GIS-tool-era styling (black borders, high-saturation fills,
dark pin outlines) undermined the polished UX the research tool needs.
Modern map products (Apple Maps, Felt.com, Mapbox Standard) use low-opacity
tinted fills, sub-pixel borders, white pin strokes, and drop shadows.

Changes:
- Polygon fill: opacity 0.35 → 0.20, add fill-antialias + 300ms transition
- Borders: #000000 width 1 → rgba(60,60,80,0.35) width 0.6
- Pin stroke: rgba(0,0,0,0.45) → rgba(255,255,255,0.9) white for contrast
- Pin shadow: new language-family-pins-shadow layer (circle-blur + translate)
- Selection dimming: selected 0.30 / unselected 0.06 (stronger spotlight)
- Unselected border: rgba(60,60,80,0.15) width 0.3 during selection
- Region insert z-order: prefer shadow layer as beforeId anchor
- All reset paths (clearAllHighlights, onSemanticTreeSelect, applyDimFilter)
  updated to new baseline values

Verified: All 7 region hex colors preserved. Hitbox layer untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(legend-mobile): add doxa-regions (WAGF Regions) to mobile SemanticTreeLegend

Why: LegendMobile only gated SemanticTreeLegend for language-family and
affinity-block tabs — the doxa-regions tab fell through to LegendRows
(flat list), which can't render the 3-tier Region/Block/Country tree.
This also meant the WAGF Regions tab on mobile showed the wrong component
with mismatched data, appearing as empty/no content.

Fix:
- Import useWagfRegionsLegendData and wire regionsTreeForMobile
- Add REGIONS_TABS_MOBILE constant (Region/Block/Country)
- Update treeForMobile, tabsForMobile, treeTitleForMobile computeds
  to handle 'doxa-regions' as a third branch
- Add 'doxa-regions' to the template v-else-if condition so the
  SemanticTreeLegend renders instead of LegendRows on mobile

The desktop path (research-map.vue) already handles all three legend
types via legendNodes/legendInnerTabs/legendTitle computeds and the
onSemanticTreeSelect handler already processes region:/block:/country:
node id prefixes — no changes needed there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research-map): add mobile edge scroll padding instead of cooperativeGestures

Why: on mobile, cooperativeGestures forced a two-finger-zoom requirement that
trapped users — they couldn't scroll past the map without using two fingers.
The ctrl-to-zoom overlay was also undesirable on desktop.

Fix: remove cooperativeGestures entirely (desktop gets direct scroll-zoom with
no ctrl requirement). Add two invisible 40px-wide touch strips along the left
and right edges of the map that have touch-action:pan-y, so mobile users can
grab either edge to scroll the page past the map without getting stuck.
The strips are pointer-events:none on desktop (no interference) and
pointer-events:auto only on mobile via @media(max-width:768px).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(legend): match flat legend carets + collapsed pill to SemanticTreeLegend

Why: Prayer/Adoption/Engagement/Religion tab legends used a bare 10x10px
downward-chevron caret and a plain border-radius:20px collapsed state.
SemanticTreeLegend (Languages/PG/Regions tabs) has a polished 22x20px
button caret with hover glow and a beautiful floating pill when collapsed.
The visual inconsistency made the flat legends look unfinished.

Changes:
- LegendDesktop: replace .legend-collapse-caret with STL's .stl-collapse-btn
  styling (22x20px, rounded-rect, dark bg + border, green hover accent).
  SVG swapped from downward chevron to STL's right-chevron with 180deg
  rotation. Collapsed state now uses STL's .stl-reopen pill appearance
  (border-radius:999px, dark bg, floating shadow, hover lift).
- LegendRows: widen --lrg-caret-col 10px -> 30px to accommodate the
  larger caret button with breathing room on both sides.
- LegendMobile: unify .mobile-collapse-caret to 22x20px STL dimensions,
  match bg/border/color/hover to STL's light and dark palettes, SVG
  updated to 9x9 with 1.8 stroke-width.
- Full light/dark mode support on all three components.

Verified: npm run build succeeds (both doxa-research-map + doxa-simple-map).
No backticks in useShadowStyles strings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(legend): collapsed pill parity, pin dimming, tab scrollbar fix, legend state preservation

- LegendDesktop collapsed state now uses separate reopen pill button
  matching SemanticTreeLegend's stl-reopen exactly (dark/light modes)
- Unselected pins fully disappear (opacity 0) when legend row selected,
  including shadow layer
- Pin strokes: thin dark rings on light mode, white on regions/dark mode
- Legend state preserved when switching tabs (no forced collapse)
- Tab bar horizontal scrollbar hidden on desktop
- Religion "Other" color changed to vivid orange for visibility
- Collapse-deselect: collapsing parent deselects selected children
- Tab renamed "WAGF Regions" → "Regions" (legend title kept as WAGF Regions)
- Legend state preserved when clicking pin then closing detail panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(1040-maps): prayer ripple animation, unified legend labels, mobile legend parity

Prayer ripple: CSS-keyframe-inspired expanding rings on prayed-for pins.
4 rings staggered at 1.5s intervals over a 6s cycle, scaling from 0.3x
(inside pin) to 2.5x with linear opacity fade. Color-coded by prayer
status (orange = has prayer, green = fully prayed). Glow coupled to
legend filters via syncGlowFilter. Unprayed pins render on top (z-index 3)
so they draw attention.

Legend: title always "Legend", column header shows tab-specific label
(Prayer Status, World Religions, etc.) in larger monospace text. Both
simple and research maps unified. Simple map now uses SemanticTreeLegend
on desktop + LegendMobile on mobile (was STL-only). Desktop defaults open,
mobile defaults collapsed. Tab switch preserves legend state.

DoxaMapSlot: removed bottom scroll pad that blocked mobile legend touches.
Added left/right scroll edges inside shadow DOM for simple map parity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(DoxaMapSlot): only render top scroll pad for simple maps

The top scroll pad (z-index 1500, pointer-events:auto, 48px) was blocking
touch/click events on the research map's tab bar on mobile. Research maps
have their own tab bar occupying the top area and don't need the scroll pad.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(legend): cap panel height to viewport instead of stretching to bottom on tablet

Why: On tablet (desktop layout), the SemanticTreeLegend .stl-panel used
`bottom: 12px` absolute positioning, stretching the panel from top:60px
to the viewport bottom regardless of content height. This created visible
white space below the last row on region and people-group tabs where
content is shorter than the available space. The prayer/adoption/engagement
tabs already avoided this via the `.fit-content` class which set
`bottom: auto; max-height: calc(100vh - 80px)`, but tree tabs (regions,
people-groups, language families) did not have `hideTabs` set, so the
class was never applied.

Fix: Remove `bottom: 12px` from the base `.stl-panel` rule and add
`max-height: calc(100vh - 80px)` to all panels. The flexbox column
layout naturally shrinks to content height, and the max-height cap
prevents overflow past the viewport. The `.stl-rows` container already
has `overflow-y: auto`, so scrolling activates automatically when
content exceeds the capped height. Also updated the @media(max-width:640px)
override to use max-height instead of bottom.

Verified: both bundles build cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(legend): hide SemanticTreeLegend when people-group detail opens

Why: When a pin was clicked on tablet, the SemanticTreeLegend stayed
visible behind the PeopleGroupDetail panel. The v-show directive was
applied directly to the SemanticTreeLegend component, which has two
root elements (.stl-panel div and .stl-reopen button). Vue 3's v-show
on a multi-root component fails silently — it cannot set display:none
on a fragment, so the component remained visible.

Fix: Wrap SemanticTreeLegend in a single-root <div> and move v-show
to the wrapper. The wrapper is a plain block element with no positioning
of its own — .stl-panel inside handles its own absolute positioning.
When detail mode activates, the wrapper's display:none properly hides
both the panel and the reopen pill.

Verified: both bundles build cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(pins): increase touch target to 44px+ on tablet zoom levels 4-8

Why: Pin tapping on tablet required too much precision. The invisible
hitbox layer used the 'large' circle radius profile which only reached
6px radius (12px diameter) at zoom 4 and 14px (28px) at zoom 8 — well
below the 44px minimum recommended by Apple HIG and 48px by Material
Design for comfortable touch targets.

Fix: Add a 'touchTarget' interpolation profile to zoom.js with 22px+
radius at zoom 4-8 (44-52px effective diameter). The hitbox layer in
useMapLayers.js now uses this profile instead of 'large'. The visual
pins remain at their standard size — only the transparent hit-test
area grows. At zoom 0-2 the hitbox is 14-18px radius (still larger
than visual pins), scaling up to 40px radius at zoom 14.

Touch target diameters at key zoom levels:
  zoom 4: 44px (meets Apple HIG)
  zoom 6: 48px (meets Material)
  zoom 8: 52px (comfortable)

Verified: both bundles build cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(region-popup): wire WAGF Region, WAGF Block, and UUPG count into country-click detail

Why: useMapLayers created its own internal useMapEvents instance without
passing getNormalizedPeopleGroups, so the region popup always received an
empty array — UUPG count was 0 and WAGF fields showed dashes. Additionally,
DataSourceManager only created *Label fields for {value,label} objects,
not plain strings, so APIs returning string region names produced no label
field. The doxa-api source also lacked a countryIso field mapping, causing
the ISO-3 match to fail for that data source.

Fix:
- useMapLayers now accepts and forwards getNormalizedPeopleGroups to its
  internal useMapEvents, so the region popup gets the full people-group array
- DataSourceManager objectFields loop now creates *Label fields for plain
  strings too (if no label already exists), making the popup resilient to
  both {value,label} objects and raw string values from any API
- doxa-api sources.json gains countryIso → imb_isoalpha3 mapping parity
  with pray-tools (country_code) and doxa-csv (ISOalpha3)
- generateRegionPopupContent falls back through countryIso → country for
  ISO matching, and wagfRegionLabel → doxaRegionLabel → doxaRegion → wagfRegion
  for display

Verified: both doxa-research-map and doxa-simple-map bundles build cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(legend): constrain desktop panel height to map container, not viewport

Why: commit db805e6 capped .stl-panel with calc(100vh - 80px), but 100vh
references the browser viewport. When the map is embedded in a page with
a header/nav above it, the legend extends past the map container bottom.

Fix: switch to calc(100% - 72px) so the max-height is relative to the
nearest positioned ancestor (.rm-map-area, position:relative). The 72px
accounts for the top:60px offset plus a 12px bottom gap. Short-content
tabs still shrink-to-fit (max-height, not height). .stl-rows already has
overflow-y:auto so a scrollbar appears when content overflows.

Mobile breakpoint (@media max-width:640px) left untouched — it correctly
uses calc(100vh - 72px) since the map fills the viewport on mobile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research-map): add standalone embed page for partner websites

Why: partners need a simple URL they can iframe or link to directly to
show the research map on their own sites. The existing pplr-data-maps.html
is a complex multi-tab showcase unsuitable for embedding.

What: minimal full-viewport HTML page at /research/doxa-research-map.html
that fetches the Mapbox token from /api/maps/token, loads the
doxa-research-map MFE bundle, and renders a single <doxa-research-map>
custom element filling 100vw x 100vh on a dark background. No tabs, no
gem frames, no showcase UI — just the map.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(research-map): add missing dataSource and instanceId to embed profile-config

Why: the standalone embed page only passed profile + tk to <doxa-research-map>,
but DataSourceManager requires dataSource: 'pray-tools' to resolve the API
endpoint. Without it the fetch never fires and the map loads empty. Also adds
instanceId: 'embed-research' for unique map container IDs matching the pattern
used by the Nuxt research page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research-map): add Share button with iframe embed snippet for partners

Why: partners need a frictionless way to embed the research map on their
own websites. Currently there is no share/embed affordance in the toolbar
so partners must manually construct an iframe tag or request the URL.

What:
- New ShareButton.vue following the MapControlButton wrapper pattern
- Popover with pre-filled <iframe> snippet and direct-link sections
- One-click copy-to-clipboard with "Copied!" visual feedback (2s revert)
- Embed URL computed from window.location.origin (works on staging + prod)
- Click-outside and Escape close the popover
- Dark/light theme support via useShadowStyles, mobile-responsive popover
- Added to research-map toolbar only (not simple-map)
- i18n "shareEmbed" key added to all 11 locales
- Both bundles verified: npm run build passes cleanly

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research): add share-multiplier animated SVG for partner communication

Why: project managers need a visual that immediately conveys the value
proposition of the share/embed button — one research map deployed on
doxa.life can multiply into 5+ prayer surfaces across partner websites
via iframe embedding.

Animation sequence (10s loop):
1. Center browser shows the doxa.life research map with 10/40 window dots
2. Share icon pulses + <embed/> snippet emerges
3. Green flow lines connect to 4 partner browser windows that appear sequentially
4. All 5 maps pulse with green ripple — "1 → 5x prayer surfaces" label fades in

Style: dark theme (#0b0f14), green prayer accent (#22c55e), blue share accent
(#60a5fa). Pure CSS animations, no JS, standalone SVG, under 20KB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research): replace share-multiplier SVG with two-panel light-mode design

Why: the dark-mode (#0b0f14) SVG clashed with the light website context.
The new design communicates the share-to-embed story more clearly with
a two-panel layout: a partner-facing hero (65%) showing the doxa.life
browser -> share button -> 3 partner sites animation, and a developer
pipeline strip (35%) showing the Vue -> Vite -> bundle -> iframe flow.

Visual: white background, cream/beige landmass map, blue share button
(#2563eb), green people-group dots (#22c55e), animated blue flow lines,
sequential partner window activation with green glow, 10s CSS loop.
24.8KB, pure SVG + CSS keyframes, no JavaScript.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(research): two-panel dark-theme share-multiplier SVG

Why: the share-multiplier visual needs to serve two audiences in one
graphic -- project managers who need the "one click = 5x prayer" story,
and developers who need the build pipeline schematic.

Top panel (~70% height): animated hero "MULTIPLIED"
- Center doxa.life browser with 10/40 window map + green people-group dots
- Blue share icon pulses, <embed/> snippet emerges
- 5 partner browser windows (partner-a.org, church-b.com, missions-c.net,
  pray-d.org, network-e.org) appear sequentially via green flow lines
- Green ripple bursts expand from all 6 maps simultaneously
- "FOR DOXA PARTNERS" section label

Divider: gradient horizontal line + "HOW IT WORKS" label

Bottom panel (~30% height): static architecture pipeline
- 7-stage left-to-right: Vue Source -> Vite Build -> .js Bundle ->
  HTML Embed Page -> /public Nuxt Host -> iframe Snippet -> Partners
- Color-coded: green=Vue, blue=Vite+iframe, amber=bundle, green=partners
- Monospace annotations map each stage to actual filenames
- "FOR DEVELOPERS" section label

Style: dark theme (#0b0f14), green prayer (#22c55e), blue share (#60a5fa).
Pure CSS @keyframes, no JS, 10s seamless loop, 23KB standalone SVG.

Replaces light-mode version from c491f99 with spec-matching dark theme.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(share): redesign ShareButton for non-technical users

Why: the original share popover led with a raw <iframe> tag and a
"Direct Link" section — fine for developers but intimidating for
ministry partners and church websites. Market research of YouTube,
Spotify, Canva, and Google Maps showed that consumer-grade share
modals always lead with "Copy Link" and hide embed behind a
friendly tab.

Changes:
- Two-tab design: "Share Link" (default) and "Add to Your Website"
- Share Link tab: clean URL display, large Copy Link CTA, email +
  WhatsApp social icons
- Embed tab: plain-English description (never mentions "iframe"),
  Small/Medium/Large size-preset pills that live-update the code,
  styled code box with Copy Code button
- Both copy buttons show checkmark + "Copied!" feedback for 2s
- Box-with-arrow-up share icon (iOS/Material standard)
- Header with close X, smooth pop-in animation
- Full dark/light theme support via isDark prop
- Mobile-responsive: wider popover positioned below button
- All styles via useShadowStyles (shadow DOM compatible)
- Build verified: both research-map and simple-map bundles compile

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(share): portal z-index fix, touch targets, and topojson deps

ShareButton popover now portals to shadow-root level so it paints above
the mobile legend (z-1000). Touch targets bumped to 44-48px min-height.
Added topojson-client and world-atlas deps. Rebuilt research-map bundle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(share+legend): mobile share popover positioning and collapsed legend caret

ShareButton mobile: pin popover at top:120px (clears the search bar pill),
left:10/right:52 to align with MapToolbar and leave room for the toolbar
buttons. Slim header to match SemanticTreeLegend's .stl-titlebar styling
(32px min-height, mono uppercase title). Removed Share via email/WhatsApp
row. Click-outside now only closes when click hits the bare map canvas so
interacting with the legend or other UI keeps the popover open.

LegendMobile: add max-height:none override on .stl-panel so the recent
calc(100% - 72px) cap (commit 81816a0) doesn't zero-out the panel inside
the 48px collapsed sheet, which was hiding the caret + title.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(legend): rebuild doxa-simple-map bundle to ship collapsed-caret fix

The .legend-mobile-sheet .stl-panel max-height:none override in
LegendMobile.vue (commit e4bbc79) was only rebuilt into doxa-research-map.js
at the time. doxa-simple-map.js (pray/adopt/home pages) still shipped the
pre-fix CSS, leaving the mobile collapsed legend pill blank and untappable
on the simple-map host pages.

Rebuild only the simple-map bundle: BUNDLE=doxa-simple-map vite build.
Source LegendMobile.vue is unchanged — already correct. Diff is the new
max-height:none!important rule + Vue's auto-rotated scopeId hash.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(map-fly): add uniform zoomToLegendRow camera meta-solution

Card d1336834 — STL legend row click → camera fit, derived from the live
language-families pin source (NOT hardcoded per-region coords). Uniform path
for polygon / pin-cluster / single-pin rows: 1-pin flyTo @ zoom 8,
≥2-pin fitBounds with 40px padding + 800ms duration.

Caller passes the row + optional matchExpr override (for flat tabs whose
row.filter is a _flat_filter placeholder). zero-match rows = no-op so the
map never blanks out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(map-fly): wire legend rows → camera in both map app-profiles

Card d1336834 — research-map calls mapFly.zoomToLegendRow(node, …) at the
top of onSemanticTreeSelect so every legend-row click (tree tabs OR flat
prayer/engagement/adoption/religion tabs) moves the camera to fit the row's
scope. Flat-tab nodes get a synthesized matchExpr via _buildFlatLegendMatchExpr
(node.filter is a _flat_filter placeholder that never matches real pins).

simple-map gets useMapFly instantiated for the first time and routes its
prayer/engagement/adoption row clicks through buildMatchExpr → zoomToLegendRow.

Same uniform gesture as research-map: Africa-row fits Africa, North-India-
cluster fits the cluster, single-pin → flyTo zoom 8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* build(map-fly): rebuild simple-map + research-map bundles for legend-row camera

Card d1336834 — bundles include useMapFly.zoomToLegendRow + the per-profile
onSemanticTreeSelect wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(map-fly): evaluate legend filter against source data, not viewport

map.querySourceFeatures(sourceId, {filter}) is viewport-clipped — when
the camera was zoomed in on Africa and the driver clicked South Cone (or
any other off-screen region row), Mapbox returned zero matches and the
function silently no-op'd. fitBounds is bidirectional, but it never got
a chance to fire.

zoomToLegendRow now reads map.getSource(sourceId)._data and evaluates the
Mapbox filter expression in JS against every feature's properties. The
mini evaluator handles the expression shapes the legend producers actually
emit (==, !=, >, >=, <, <=, all, any, in, match, has, get, literal,
coalesce, to-number, plus legacy ['==', 'prop', value] form).

After the fix:
  - Zoomed in on Africa + click South Cone → camera zooms OUT and pans
    to South America South Cone bounds.
  - Any region/religion row while zoomed in → fits that scope.
  - Both research-map and simple-map share the same path.

Includes rebuilt public/js/doxa-research-map.js + doxa-simple-map.js.

Card: d1336834-3d6b-410c-9f6d-d11ebbd0bdaf

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(map-fly): probe fit zoom vs minZoom to prevent mobile snap on wide scopes

Why: on mobile, the legend row scope (prayer/adoption/engagement) often spans
a region wider than the mobile viewport can render at its effective minZoom.
fitBounds animates toward a zoom < minZoom and Mapbox clamps mid-animation,
producing a visible snap/jolt.

Fix: in zoomToLegendRow >=2-pin path, call map.cameraForBounds(bounds, {padding})
WITHOUT animating, compare the would-be zoom against map.getMinZoom() with
0.3 slack. When bounds would clamp, flyTo({center, zoom: minZoom}) instead
of fitBounds — same duration, no snap.

Card: 0912e936-96da-4a62-b3d7-7f9c52b25163

* fix(maps): mobile bug wave — viewport, fullscreen, legend, filter, animation

Mobile (iOS Safari):
- viewport meta added with pinch-zoom allowed + viewport-fit=cover
- geocoder input forced to 16px to prevent iOS auto-zoom on focus
- pseudo-fullscreen for iOS (real requestFullscreen rejected on non-video)
  - locks html/body overflow + body.position:fixed + scrollY save/restore
  - touch-action:none on root + capture-phase touchmove/wheel blockers
    so pad-zones around the host can't scroll the page behind
- simple-map MapToolbar moves to top:10 when has-geocoder=false so the
  no-geocoder profiles (home/pray/adopt) don't leave a dead gap

Legend:
- detail-mode collapse caret is now an invisible 28x28 tap zone (no
  visible chevron overlapping the people-group name)
- click handler always toggles; previous early-return in detail mode
  removed; watcher no longer auto-re-expands during user collapse
- empty-map click no longer clears legend filter — selection is sticky;
  only same-row re-tap or close button clears

Filter:
- hidden pins are removed from the language-family-pins-hitbox layer
  (setFilter), so dimmed/invisible pins are no longer hit-testable
- pplrInstance.selection cleared alongside mapStore on intentional
  clearAllHighlights paths so legend state mirrors map state

Zoom (useMapFly):
- religion legend rows zoom correctly (added slice handler to filter
  expression evaluator)
- doxa-regions rows fit the polygon source instead of pin clusters
  (Oceania-across-antimeridian no longer zooms out to span both copies)
- antimeridian-aware longitude bounds prevent global-span zoom-outs
- LEGEND_FIT_MAX_ZOOM=5 cap so single-pin clicks don't slam to street

Prayer-glow animation:
- removed persistent _glowStyleHandler — host map.once('style.load') is
  the sole reconciliation path on theme swap
- addPrayerGlowLayers truly idempotent: returns early if all 5 layers
  already exist, no remove+re-add churn that caused the 2-second flash
- _glowEpoch token + cancel-before-schedule pattern preserved

Labels:
- "World Religions" → "UUPG Religions" on religion tab header
- "UPGs" → "UUPGs" column header in semantic tree (across 11 locales)

Misc:
- fixed duplicate const config in app/layouts/default.vue (auto-merge
  artifact from earlier merge of master)

* remove duplicate feedback widget

---------

Co-authored-by: swift-river542 <swift-river542@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 10:13:51 -05:00

1224 lines
404 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".profile-loader[data-v-858dd5a1]{width:100%;height:100%;position:relative}.profile-error[data-v-858dd5a1]{padding:1rem;background:#fff3cd;border:1px solid #ffc107;border-radius:4px;font-family:monospace;font-size:13px}.people-group-detail[data-v-0cd4696d]{display:flex;flex-direction:column;height:100%;overflow-y:auto}.detail-header[data-v-0cd4696d]{display:flex;justify-content:space-between;align-items:flex-start;padding:16px;border-bottom:1px solid #e0e0e0;background:#fff;position:sticky;top:0;z-index:10}.header-left[data-v-0cd4696d]{display:flex;gap:12px;align-items:center;flex:1;min-width:0}.header-text[data-v-0cd4696d]{flex:1;min-width:0}.people-group-name[data-v-0cd4696d]{margin:0;font-size:18px;font-weight:700;color:#333;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text;-webkit-user-select:text;cursor:text}.people-group-subtitle[data-v-0cd4696d]{margin:4px 0 0;font-size:13px;color:#666;line-height:1.2}.close-button[data-v-0cd4696d]{background:none;border:none;padding:4px;cursor:pointer;color:#666;transition:color .2s ease;flex-shrink:0}.close-button[data-v-0cd4696d]:hover{color:#333}.detail-content[data-v-0cd4696d]{padding:6px 12px 12px;flex:1;overflow-y:auto}.quick-stats[data-v-0cd4696d]{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.stat-item[data-v-0cd4696d]{display:flex;justify-content:space-between;align-items:baseline;font-size:13px}.stat-label[data-v-0cd4696d]{color:#666;font-weight:500}.stat-value[data-v-0cd4696d]{color:#333;font-weight:600;text-align:right}.action-buttons[data-v-0cd4696d]{display:flex;gap:8px;padding-top:12px;margin-bottom:10px;overflow-x:auto;padding-bottom:2px}.action-btn[data-v-0cd4696d]{display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s ease;white-space:nowrap;flex-shrink:0}.action-btn.primary[data-v-0cd4696d]{background:#92b195;color:#fff}.action-btn.primary[data-v-0cd4696d]:hover{background:#73a17f;box-shadow:0 2px 4px #92b1954d}.action-btn.secondary[data-v-0cd4696d]{background:#ecf0f1;color:#333}.action-btn.secondary[data-v-0cd4696d]:hover{background:#d5dbdb}.btn-icon[data-v-0cd4696d]{flex-shrink:0}.image-container[data-v-0cd4696d]{margin-bottom:16px;border-radius:8px;overflow:hidden;background:#f5f5f5}.image-container.position-above[data-v-0cd4696d]{width:120px;height:150px;margin:0 auto 16px}.image-container.position-inside[data-v-0cd4696d]{width:200px;height:250px;margin:0 auto 16px}.people-group-image[data-v-0cd4696d]{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s ease}.people-group-image.loaded[data-v-0cd4696d]{opacity:1}.image-placeholder-svg[data-v-0cd4696d]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#f0f0f0;transition:opacity .3s ease}.image-placeholder-svg.hidden[data-v-0cd4696d]{opacity:0;pointer-events:none}.image-container[data-v-0cd4696d]{position:relative}.description-section[data-v-0cd4696d]{margin-top:16px;padding-top:16px;border-top:1px solid #e0e0e0}.description-text[data-v-0cd4696d]{margin:0;font-size:14px;line-height:1.6;color:#555}.description-text.empty[data-v-0cd4696d]{color:#999;font-style:italic}.action-buttons[data-v-0cd4696d]::-webkit-scrollbar{height:4px}.action-buttons[data-v-0cd4696d]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:2px}.action-buttons[data-v-0cd4696d]::-webkit-scrollbar-thumb{background:#ccc;border-radius:2px}.action-buttons[data-v-0cd4696d]::-webkit-scrollbar-thumb:hover{background:#999}@media (max-width: 480px){.people-group-name[data-v-0cd4696d]{font-size:16px}.stat-item[data-v-0cd4696d]{font-size:13px}.action-btn[data-v-0cd4696d]{padding:8px 14px;font-size:13px}}.dsm-root[data-v-bf7056c2]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;overflow:hidden}.dsm-tab-bar[data-v-bf7056c2]{flex:0 0 auto;display:flex;align-items:center;background:#fff;border-bottom:2px solid #e0e0e0;box-shadow:0 2px 4px #00000014;height:48px;padding:0 12px;gap:4px;z-index:10}.dsm-tab[data-v-bf7056c2]{background:none;border:none;padding:0 20px;height:100%;font-size:14px;font-weight:500;color:#555;cursor:pointer;border-bottom:3px solid transparent;transition:color .15s,border-color .15s,background .15s;white-space:nowrap}.dsm-tab[data-v-bf7056c2]:hover{background:#3498db0f;color:#3498db}.dsm-tab.active[data-v-bf7056c2]{color:#3498db;border-bottom-color:#3498db;background:#3498db0f}.dsm-map-area[data-v-bf7056c2]{flex:1 1 0;position:relative;overflow:hidden}.dsm-map-canvas[data-v-bf7056c2]{position:absolute;top:0;right:0;bottom:0;left:0}.dsm-loading[data-v-bf7056c2]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#f8f9fa;color:#555;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;z-index:5}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
(function(){"use strict";var Jc;var xa=typeof document<"u"?document.currentScript:null;const R0="modulepreload",D0=function(e){return"/"+e},O0={},La=function(t,o,n){let a=Promise.resolve();function r(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return a.then(s=>{for(const i of s||[])i.status==="rejected"&&r(i.reason);return t().catch(r)})};/**
* @vue/shared v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Ta(e){const t=Object.create(null);for(const o of e.split(","))t[o]=1;return o=>o in t}const Oe={},$o=[],It=()=>{},Jr=()=>!1,Nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fn=e=>e.startsWith("onUpdate:"),qe=Object.assign,Ea=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},Xc=Object.prototype.hasOwnProperty,Me=(e,t)=>Xc.call(e,t),be=Array.isArray,Po=e=>tn(e)==="[object Map]",Xr=e=>tn(e)==="[object Set]",Zr=e=>tn(e)==="[object Date]",Se=e=>typeof e=="function",je=e=>typeof e=="string",bt=e=>typeof e=="symbol",Ne=e=>e!==null&&typeof e=="object",Qr=e=>(Ne(e)||Se(e))&&Se(e.then)&&Se(e.catch),es=Object.prototype.toString,tn=e=>es.call(e),Zc=e=>tn(e).slice(8,-1),Rn=e=>tn(e)==="[object Object]",Dn=e=>je(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,on=Ta(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),On=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},Qc=/-\w/g,ot=On(e=>e.replace(Qc,t=>t.slice(1).toUpperCase())),eu=/\B([A-Z])/g,vt=On(e=>e.replace(eu,"-$1").toLowerCase()),Bn=On(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ca=On(e=>e?`on${Bn(e)}`:""),Nt=(e,t)=>!Object.is(e,t),$a=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},ts=(e,t,o,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:o})},tu=e=>{const t=parseFloat(e);return isNaN(t)?e:t},os=e=>{const t=je(e)?Number(e):NaN;return isNaN(t)?e:t};let ns;const Un=()=>ns||(ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ct(e){if(be(e)){const t={};for(let o=0;o<e.length;o++){const n=e[o],a=je(n)?ru(n):ct(n);if(a)for(const r in a)t[r]=a[r]}return t}else if(je(e)||Ne(e))return e}const ou=/;(?![^(]*\))/g,nu=/:([^]+)/,au=/\/\*[^]*?\*\//g;function ru(e){const t={};return e.replace(au,"").split(ou).forEach(o=>{if(o){const n=o.split(nu);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Be(e){let t="";if(je(e))t=e;else if(be(e))for(let o=0;o<e.length;o++){const n=Be(e[o]);n&&(t+=n+" ")}else if(Ne(e))for(const o in e)e[o]&&(t+=o+" ");return t.trim()}const su=Ta("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function as(e){return!!e||e===""}function iu(e,t){if(e.length!==t.length)return!1;let o=!0;for(let n=0;o&&n<e.length;n++)o=Pa(e[n],t[n]);return o}function Pa(e,t){if(e===t)return!0;let o=Zr(e),n=Zr(t);if(o||n)return o&&n?e.getTime()===t.getTime():!1;if(o=bt(e),n=bt(t),o||n)return e===t;if(o=be(e),n=be(t),o||n)return o&&n?iu(e,t):!1;if(o=Ne(e),n=Ne(t),o||n){if(!o||!n)return!1;const a=Object.keys(e).length,r=Object.keys(t).length;if(a!==r)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!Pa(e[s],t[s]))return!1}}return String(e)===String(t)}const rs=e=>!!(e&&e.__v_isRef===!0),ye=e=>je(e)?e:e==null?"":be(e)||Ne(e)&&(e.toString===es||!Se(e.toString))?rs(e)?ye(e.value):JSON.stringify(e,ss,2):String(e),ss=(e,t)=>rs(t)?ss(e,t.value):Po(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[n,a],r)=>(o[Ma(n,r)+" =>"]=a,o),{})}:Xr(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>Ma(o))}:bt(t)?Ma(t):Ne(t)&&!be(t)&&!Rn(t)?String(t):t,Ma=(e,t="")=>{var o;return bt(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/**
* @vue/reactivity v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let et;class is{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&et&&(et.active?(this.parent=et,this.index=(et.scopes||(et.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].pause();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].resume();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].resume()}}run(t){if(this._active){const o=et;try{return et=this,t()}finally{et=o}}}on(){++this._on===1&&(this.prevScope=et,et=this)}off(){if(this._on>0&&--this._on===0){if(et===this)et=this.prevScope;else{let t=et;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,n;for(o=0,n=this.effects.length;o<n;o++)this.effects[o].stop();for(this.effects.length=0,o=0,n=this.cleanups.length;o<n;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,n=this.scopes.length;o<n;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Ia(e){return new is(e)}function ls(){return et}function lu(e,t=!1){et&&et.cleanups.push(e)}let Ue;const Na=new WeakSet;class cs{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,et&&(et.active?et.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Na.has(this)&&(Na.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ds(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ms(this),ps(this);const t=Ue,o=At;Ue=this,At=!0;try{return this.fn()}finally{gs(this),Ue=t,At=o,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Oa(t);this.deps=this.depsTail=void 0,ms(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Na.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Da(this)&&this.run()}get dirty(){return Da(this)}}let us=0,nn,an;function ds(e,t=!1){if(e.flags|=8,t){e.next=an,an=e;return}e.next=nn,nn=e}function Fa(){us++}function Ra(){if(--us>0)return;if(an){let t=an;for(an=void 0;t;){const o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=o}}if(e)throw e}function ps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gs(e){let t,o=e.depsTail,n=o;for(;n;){const a=n.prevDep;n.version===-1?(n===o&&(o=a),Oa(n),cu(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=a}e.deps=t,e.depsTail=o}function Da(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fs(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fs(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rn)||(e.globalVersion=rn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Da(e))))return;e.flags|=2;const t=e.dep,o=Ue,n=At;Ue=e,At=!0;try{ps(e);const a=e.fn(e._value);(t.version===0||Nt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Ue=o,At=n,gs(e),e.flags&=-3}}function Oa(e,t=!1){const{dep:o,prevSub:n,nextSub:a}=e;if(n&&(n.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=n,e.nextSub=void 0),o.subs===e&&(o.subs=n,!n&&o.computed)){o.computed.flags&=-5;for(let r=o.computed.deps;r;r=r.nextDep)Oa(r,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function cu(e){const{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}let At=!0;const hs=[];function Ft(){hs.push(At),At=!1}function Rt(){const e=hs.pop();At=e===void 0?!0:e}function ms(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const o=Ue;Ue=void 0;try{t()}finally{Ue=o}}}let rn=0;class uu{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ba{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ue||!At||Ue===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Ue)o=this.activeLink=new uu(Ue,this),Ue.deps?(o.prevDep=Ue.depsTail,Ue.depsTail.nextDep=o,Ue.depsTail=o):Ue.deps=Ue.depsTail=o,bs(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const n=o.nextDep;n.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=n),o.prevDep=Ue.depsTail,o.nextDep=void 0,Ue.depsTail.nextDep=o,Ue.depsTail=o,Ue.deps===o&&(Ue.deps=n)}return o}trigger(t){this.version++,rn++,this.notify(t)}notify(t){Fa();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{Ra()}}}function bs(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)bs(n)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const Gn=new WeakMap,_o=Symbol(""),Ua=Symbol(""),sn=Symbol("");function lt(e,t,o){if(At&&Ue){let n=Gn.get(e);n||Gn.set(e,n=new Map);let a=n.get(o);a||(n.set(o,a=new Ba),a.map=n,a.key=o),a.track()}}function Ht(e,t,o,n,a,r){const s=Gn.get(e);if(!s){rn++;return}const i=l=>{l&&l.trigger()};if(Fa(),t==="clear")s.forEach(i);else{const l=be(e),c=l&&Dn(o);if(l&&o==="length"){const u=Number(n);s.forEach((f,v)=>{(v==="length"||v===sn||!bt(v)&&v>=u)&&i(f)})}else switch((o!==void 0||s.has(void 0))&&i(s.get(o)),c&&i(s.get(sn)),t){case"add":l?c&&i(s.get("length")):(i(s.get(_o)),Po(e)&&i(s.get(Ua)));break;case"delete":l||(i(s.get(_o)),Po(e)&&i(s.get(Ua)));break;case"set":Po(e)&&i(s.get(_o));break}}Ra()}function du(e,t){const o=Gn.get(e);return o&&o.get(t)}function Mo(e){const t=Ce(e);return t===e?t:(lt(t,"iterate",sn),yt(e)?t:t.map(xt))}function jn(e){return lt(e=Ce(e),"iterate",sn),e}function Dt(e,t){return Wt(e)?No(Vt(e)?xt(t):t):xt(t)}const pu={__proto__:null,[Symbol.iterator](){return Ga(this,Symbol.iterator,e=>Dt(this,e))},concat(...e){return Mo(this).concat(...e.map(t=>be(t)?Mo(t):t))},entries(){return Ga(this,"entries",e=>(e[1]=Dt(this,e[1]),e))},every(e,t){return zt(this,"every",e,t,void 0,arguments)},filter(e,t){return zt(this,"filter",e,t,o=>o.map(n=>Dt(this,n)),arguments)},find(e,t){return zt(this,"find",e,t,o=>Dt(this,o),arguments)},findIndex(e,t){return zt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return zt(this,"findLast",e,t,o=>Dt(this,o),arguments)},findLastIndex(e,t){return zt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return zt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ja(this,"includes",e)},indexOf(...e){return ja(this,"indexOf",e)},join(e){return Mo(this).join(e)},lastIndexOf(...e){return ja(this,"lastIndexOf",e)},map(e,t){return zt(this,"map",e,t,void 0,arguments)},pop(){return ln(this,"pop")},push(...e){return ln(this,"push",e)},reduce(e,...t){return ys(this,"reduce",e,t)},reduceRight(e,...t){return ys(this,"reduceRight",e,t)},shift(){return ln(this,"shift")},some(e,t){return zt(this,"some",e,t,void 0,arguments)},splice(...e){return ln(this,"splice",e)},toReversed(){return Mo(this).toReversed()},toSorted(e){return Mo(this).toSorted(e)},toSpliced(...e){return Mo(this).toSpliced(...e)},unshift(...e){return ln(this,"unshift",e)},values(){return Ga(this,"values",e=>Dt(this,e))}};function Ga(e,t,o){const n=jn(e),a=n[t]();return n!==e&&!yt(e)&&(a._next=a.next,a.next=()=>{const r=a._next();return r.done||(r.value=o(r.value)),r}),a}const gu=Array.prototype;function zt(e,t,o,n,a,r){const s=jn(e),i=s!==e&&!yt(e),l=s[t];if(l!==gu[t]){const f=l.apply(e,r);return i?xt(f):f}let c=o;s!==e&&(i?c=function(f,v){return o.call(this,Dt(e,f),v,e)}:o.length>2&&(c=function(f,v){return o.call(this,f,v,e)}));const u=l.call(s,c,n);return i&&a?a(u):u}function ys(e,t,o,n){const a=jn(e),r=a!==e&&!yt(e);let s=o,i=!1;a!==e&&(r?(i=n.length===0,s=function(c,u,f){return i&&(i=!1,c=Dt(e,c)),o.call(this,c,Dt(e,u),f,e)}):o.length>3&&(s=function(c,u,f){return o.call(this,c,u,f,e)}));const l=a[t](s,...n);return i?Dt(e,l):l}function ja(e,t,o){const n=Ce(e);lt(n,"iterate",sn);const a=n[t](...o);return(a===-1||a===!1)&&Wn(o[0])?(o[0]=Ce(o[0]),n[t](...o)):a}function ln(e,t,o=[]){Ft(),Fa();const n=Ce(e)[t].apply(e,o);return Ra(),Rt(),n}const fu=Ta("__proto__,__v_isRef,__isVue"),_s=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(bt));function hu(e){bt(e)||(e=String(e));const t=Ce(this);return lt(t,"has",e),t.hasOwnProperty(e)}class vs{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,n){if(o==="__v_skip")return t.__v_skip;const a=this._isReadonly,r=this._isShallow;if(o==="__v_isReactive")return!a;if(o==="__v_isReadonly")return a;if(o==="__v_isShallow")return r;if(o==="__v_raw")return n===(a?r?Ls:xs:r?As:Ss).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const s=be(t);if(!a){let l;if(s&&(l=pu[o]))return l;if(o==="hasOwnProperty")return hu}const i=Reflect.get(t,o,Ke(t)?t:n);if((bt(o)?_s.has(o):fu(o))||(a||lt(t,"get",o),r))return i;if(Ke(i)){const l=s&&Dn(o)?i:i.value;return a&&Ne(l)?Ha(l):l}return Ne(i)?a?Ha(i):Io(i):i}}class ws extends vs{constructor(t=!1){super(!1,t)}set(t,o,n,a){let r=t[o];const s=be(t)&&Dn(o);if(!this._isShallow){const c=Wt(r);if(!yt(n)&&!Wt(n)&&(r=Ce(r),n=Ce(n)),!s&&Ke(r)&&!Ke(n))return c||(r.value=n),!0}const i=s?Number(o)<t.length:Me(t,o),l=Reflect.set(t,o,n,Ke(t)?t:a);return t===Ce(a)&&(i?Nt(n,r)&&Ht(t,"set",o,n):Ht(t,"add",o,n)),l}deleteProperty(t,o){const n=Me(t,o);t[o];const a=Reflect.deleteProperty(t,o);return a&&n&&Ht(t,"delete",o,void 0),a}has(t,o){const n=Reflect.has(t,o);return(!bt(o)||!_s.has(o))&&lt(t,"has",o),n}ownKeys(t){return lt(t,"iterate",be(t)?"length":_o),Reflect.ownKeys(t)}}class ks extends vs{constructor(t=!1){super(!0,t)}set(t,o){return!0}deleteProperty(t,o){return!0}}const mu=new ws,bu=new ks,yu=new ws(!0),_u=new ks(!0),Ka=e=>e,Kn=e=>Reflect.getPrototypeOf(e);function vu(e,t,o){return function(...n){const a=this.__v_raw,r=Ce(a),s=Po(r),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=a[e](...n),u=o?Ka:t?No:xt;return!t&&lt(r,"iterate",l?Ua:_o),qe(Object.create(c),{next(){const{value:f,done:v}=c.next();return v?{value:f,done:v}:{value:i?[u(f[0]),u(f[1])]:u(f),done:v}}})}}function Hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function wu(e,t){const o={get(a){const r=this.__v_raw,s=Ce(r),i=Ce(a);e||(Nt(a,i)&&lt(s,"get",a),lt(s,"get",i));const{has:l}=Kn(s),c=t?Ka:e?No:xt;if(l.call(s,a))return c(r.get(a));if(l.call(s,i))return c(r.get(i));r!==s&&r.get(a)},get size(){const a=this.__v_raw;return!e&&lt(Ce(a),"iterate",_o),a.size},has(a){const r=this.__v_raw,s=Ce(r),i=Ce(a);return e||(Nt(a,i)&&lt(s,"has",a),lt(s,"has",i)),a===i?r.has(a):r.has(a)||r.has(i)},forEach(a,r){const s=this,i=s.__v_raw,l=Ce(i),c=t?Ka:e?No:xt;return!e&&lt(l,"iterate",_o),i.forEach((u,f)=>a.call(r,c(u),c(f),s))}};return qe(o,e?{add:Hn("add"),set:Hn("set"),delete:Hn("delete"),clear:Hn("clear")}:{add(a){const r=Ce(this),s=Kn(r),i=Ce(a),l=!t&&!yt(a)&&!Wt(a)?i:a;return s.has.call(r,l)||Nt(a,l)&&s.has.call(r,a)||Nt(i,l)&&s.has.call(r,i)||(r.add(l),Ht(r,"add",l,l)),this},set(a,r){!t&&!yt(r)&&!Wt(r)&&(r=Ce(r));const s=Ce(this),{has:i,get:l}=Kn(s);let c=i.call(s,a);c||(a=Ce(a),c=i.call(s,a));const u=l.call(s,a);return s.set(a,r),c?Nt(r,u)&&Ht(s,"set",a,r):Ht(s,"add",a,r),this},delete(a){const r=Ce(this),{has:s,get:i}=Kn(r);let l=s.call(r,a);l||(a=Ce(a),l=s.call(r,a)),i&&i.call(r,a);const c=r.delete(a);return l&&Ht(r,"delete",a,void 0),c},clear(){const a=Ce(this),r=a.size!==0,s=a.clear();return r&&Ht(a,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(a=>{o[a]=vu(a,e,t)}),o}function zn(e,t){const o=wu(e,t);return(n,a,r)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?n:Reflect.get(Me(o,a)&&a in n?o:n,a,r)}const ku={get:zn(!1,!1)},Su={get:zn(!1,!0)},Au={get:zn(!0,!1)},xu={get:zn(!0,!0)},Ss=new WeakMap,As=new WeakMap,xs=new WeakMap,Ls=new WeakMap;function Lu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Io(e){return Wt(e)?e:Vn(e,!1,mu,ku,Ss)}function Tu(e){return Vn(e,!1,yu,Su,As)}function Ha(e){return Vn(e,!0,bu,Au,xs)}function U0(e){return Vn(e,!0,_u,xu,Ls)}function Vn(e,t,o,n,a){if(!Ne(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=a.get(e);if(r)return r;const s=Lu(Zc(e));if(s===0)return e;const i=new Proxy(e,s===2?n:o);return a.set(e,i),i}function Vt(e){return Wt(e)?Vt(e.__v_raw):!!(e&&e.__v_isReactive)}function Wt(e){return!!(e&&e.__v_isReadonly)}function yt(e){return!!(e&&e.__v_isShallow)}function Wn(e){return e?!!e.__v_raw:!1}function Ce(e){const t=e&&e.__v_raw;return t?Ce(t):e}function cn(e){return!Me(e,"__v_skip")&&Object.isExtensible(e)&&ts(e,"__v_skip",!0),e}const xt=e=>Ne(e)?Io(e):e,No=e=>Ne(e)?Ha(e):e;function Ke(e){return e?e.__v_isRef===!0:!1}function me(e){return Es(e,!1)}function Ts(e){return Es(e,!0)}function Es(e,t){return Ke(e)?e:new Eu(e,t)}class Eu{constructor(t,o){this.dep=new Ba,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:Ce(t),this._value=o?t:xt(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){const o=this._rawValue,n=this.__v_isShallow||yt(t)||Wt(t);t=n?t:Ce(t),Nt(t,o)&&(this._rawValue=t,this._value=n?t:xt(t),this.dep.trigger())}}function pe(e){return Ke(e)?e.value:e}const Cu={get:(e,t,o)=>t==="__v_raw"?e:pe(Reflect.get(e,t,o)),set:(e,t,o,n)=>{const a=e[t];return Ke(a)&&!Ke(o)?(a.value=o,!0):Reflect.set(e,t,o,n)}};function Cs(e){return Vt(e)?e:new Proxy(e,Cu)}function $u(e){const t=be(e)?new Array(e.length):{};for(const o in e)t[o]=$s(e,o);return t}class Pu{constructor(t,o,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=bt(o)?o:String(o),this._raw=Ce(t);let a=!0,r=t;if(!be(t)||bt(this._key)||!Dn(this._key))do a=!Wn(r)||yt(r);while(a&&(r=r.__v_raw));this._shallow=a}get value(){let t=this._object[this._key];return this._shallow&&(t=pe(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ke(this._raw[this._key])){const o=this._object[this._key];if(Ke(o)){o.value=t;return}}this._object[this._key]=t}get dep(){return du(this._raw,this._key)}}class Mu{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function za(e,t,o){return Ke(e)?e:Se(e)?new Mu(e):Ne(e)&&arguments.length>1?$s(e,t,o):me(e)}function $s(e,t,o){return new Pu(e,t,o)}class Iu{constructor(t,o,n){this.fn=t,this.setter=o,this._value=void 0,this.dep=new Ba(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ue!==this)return ds(this,!0),!0}get value(){const t=this.dep.track();return fs(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Nu(e,t,o=!1){let n,a;return Se(e)?n=e:(n=e.get,a=e.set),new Iu(n,a,o)}const Yn={},qn=new WeakMap;let vo;function Fu(e,t=!1,o=vo){if(o){let n=qn.get(o);n||qn.set(o,n=[]),n.push(e)}}function Ru(e,t,o=Oe){const{immediate:n,deep:a,once:r,scheduler:s,augmentJob:i,call:l}=o,c=k=>a?k:yt(k)||a===!1||a===0?Yt(k,1):Yt(k);let u,f,v,x,T=!1,w=!1;if(Ke(e)?(f=()=>e.value,T=yt(e)):Vt(e)?(f=()=>c(e),T=!0):be(e)?(w=!0,T=e.some(k=>Vt(k)||yt(k)),f=()=>e.map(k=>{if(Ke(k))return k.value;if(Vt(k))return c(k);if(Se(k))return l?l(k,2):k()})):Se(e)?t?f=l?()=>l(e,2):e:f=()=>{if(v){Ft();try{v()}finally{Rt()}}const k=vo;vo=u;try{return l?l(e,3,[x]):e(x)}finally{vo=k}}:f=It,t&&a){const k=f,A=a===!0?1/0:a;f=()=>Yt(k(),A)}const E=ls(),_=()=>{u.stop(),E&&E.active&&Ea(E.effects,u)};if(r&&t){const k=t;t=(...A)=>{k(...A),_()}}let S=w?new Array(e.length).fill(Yn):Yn;const g=k=>{if(!(!(u.flags&1)||!u.dirty&&!k))if(t){const A=u.run();if(a||T||(w?A.some((L,O)=>Nt(L,S[O])):Nt(A,S))){v&&v();const L=vo;vo=u;try{const O=[A,S===Yn?void 0:w&&S[0]===Yn?[]:S,x];S=A,l?l(t,3,O):t(...O)}finally{vo=L}}}else u.run()};return i&&i(g),u=new cs(f),u.scheduler=s?()=>s(g,!1):g,x=k=>Fu(k,!1,u),v=u.onStop=()=>{const k=qn.get(u);if(k){if(l)l(k,4);else for(const A of k)A();qn.delete(u)}},t?n?g(!0):S=u.run():s?s(g.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Yt(e,t=1/0,o){if(t<=0||!Ne(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,Ke(e))Yt(e.value,t,o);else if(be(e))for(let n=0;n<e.length;n++)Yt(e[n],t,o);else if(Xr(e)||Po(e))e.forEach(n=>{Yt(n,t,o)});else if(Rn(e)){for(const n in e)Yt(e[n],t,o);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Yt(e[n],t,o)}return e}/**
* @vue/runtime-core v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const un=[];let Va=!1;function G0(e,...t){if(Va)return;Va=!0,Ft();const o=un.length?un[un.length-1].component:null,n=o&&o.appContext.config.warnHandler,a=Du();if(n)Fo(n,o,11,[e+t.map(r=>{var s,i;return(i=(s=r.toString)==null?void 0:s.call(r))!=null?i:JSON.stringify(r)}).join(""),o&&o.proxy,a.map(({vnode:r})=>`at <${Li(o,r.type)}>`).join(`
`),a]);else{const r=[`[Vue warn]: ${e}`,...t];a.length&&r.push(`
`,...Ou(a)),console.warn(...r)}Rt(),Va=!1}function Du(){let e=un[un.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function Ou(e){const t=[];return e.forEach((o,n)=>{t.push(...n===0?[]:[`
`],...Bu(o))}),t}function Bu({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${Li(e.component,e.type,n)}`,r=">"+o;return e.props?[a,...Uu(e.props),r]:[a+r]}function Uu(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach(n=>{t.push(...Ps(n,e[n]))}),o.length>3&&t.push(" ..."),t}function Ps(e,t,o){return je(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:Ke(t)?(t=Ps(e,Ce(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):Se(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ce(t),o?t:[`${e}=`,t])}function Fo(e,t,o,n){try{return n?e(...n):e()}catch(a){dn(a,t,o)}}function Lt(e,t,o,n){if(Se(e)){const a=Fo(e,t,o,n);return a&&Qr(a)&&a.catch(r=>{dn(r,t,o)}),a}if(be(e)){const a=[];for(let r=0;r<e.length;r++)a.push(Lt(e[r],t,o,n));return a}}function dn(e,t,o,n=!0){const a=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||Oe;if(t){let i=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${o}`;for(;i;){const u=i.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,l,c)===!1)return}i=i.parent}if(r){Ft(),Fo(r,null,10,[e,l,c]),Rt();return}}Gu(e,o,a,n,s)}function Gu(e,t,o,n=!0,a=!1){if(a)throw e;console.error(e)}const ut=[];let Ot=-1;const Ro=[];let no=null,Do=0;const Ms=Promise.resolve();let Jn=null;function Wa(e){const t=Jn||Ms;return e?t.then(this?e.bind(this):e):t}function ju(e){let t=Ot+1,o=ut.length;for(;t<o;){const n=t+o>>>1,a=ut[n],r=pn(a);r<e||r===e&&a.flags&2?t=n+1:o=n}return t}function Ya(e){if(!(e.flags&1)){const t=pn(e),o=ut[ut.length-1];!o||!(e.flags&2)&&t>=pn(o)?ut.push(e):ut.splice(ju(t),0,e),e.flags|=1,Is()}}function Is(){Jn||(Jn=Ms.then(Rs))}function Ku(e){be(e)?Ro.push(...e):no&&e.id===-1?no.splice(Do+1,0,e):e.flags&1||(Ro.push(e),e.flags|=1),Is()}function Ns(e,t,o=Ot+1){for(;o<ut.length;o++){const n=ut[o];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ut.splice(o,1),o--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Fs(e){if(Ro.length){const t=[...new Set(Ro)].sort((o,n)=>pn(o)-pn(n));if(Ro.length=0,no){no.push(...t);return}for(no=t,Do=0;Do<no.length;Do++){const o=no[Do];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}no=null,Do=0}}const pn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Rs(e){try{for(Ot=0;Ot<ut.length;Ot++){const t=ut[Ot];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Fo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ot<ut.length;Ot++){const t=ut[Ot];t&&(t.flags&=-2)}Ot=-1,ut.length=0,Fs(),Jn=null,(ut.length||Ro.length)&&Rs()}}let rt=null,Ds=null;function Xn(e){const t=rt;return rt=e,Ds=e&&e.type.__scopeId||null,t}function Tt(e,t=rt,o){if(!t||e._n)return e;const n=(...a)=>{n._d&&aa(-1);const r=Xn(t);let s;try{s=e(...a)}finally{Xn(r),n._d&&aa(1)}return s};return n._n=!0,n._c=!0,n._d=!0,n}function Hu(e,t){if(rt===null)return e;const o=ia(rt),n=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[r,s,i,l=Oe]=t[a];r&&(Se(r)&&(r={mounted:r,updated:r}),r.deep&&Yt(s),n.push({dir:r,instance:o,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function wo(e,t,o,n){const a=e.dirs,r=t&&t.dirs;for(let s=0;s<a.length;s++){const i=a[s];r&&(i.oldValue=r[s].value);let l=i.dir[n];l&&(Ft(),Lt(l,o,8,[e.el,i,e,t]),Rt())}}function wt(e,t){if(st){let o=st.provides;const n=st.parent&&st.parent.provides;n===o&&(o=st.provides=Object.create(n)),o[e]=t}}function $e(e,t,o=!1){const n=ro();if(n||ko){let a=ko?ko._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return o&&Se(t)?t.call(n&&n.proxy):t}}function zu(){return!!(ro()||ko)}const Vu=Symbol.for("v-scx"),Wu=()=>$e(Vu);function Ye(e,t,o){return Os(e,t,o)}function Os(e,t,o=Oe){const{immediate:n,deep:a,flush:r,once:s}=o,i=qe({},o),l=t&&n||!t&&r!=="post";let c;if(Go){if(r==="sync"){const x=Wu();c=x.__watcherHandles||(x.__watcherHandles=[])}else if(!l){const x=()=>{};return x.stop=It,x.resume=It,x.pause=It,x}}const u=st;i.call=(x,T,w)=>Lt(x,u,T,w);let f=!1;r==="post"?i.scheduler=x=>{ft(x,u&&u.suspense)}:r!=="sync"&&(f=!0,i.scheduler=(x,T)=>{T?x():Ya(x)}),i.augmentJob=x=>{t&&(x.flags|=4),f&&(x.flags|=2,u&&(x.id=u.uid,x.i=u))};const v=Ru(e,t,i);return Go&&(c?c.push(v):l&&v()),v}function Yu(e,t,o){const n=this.proxy,a=je(e)?e.includes(".")?Bs(n,e):()=>n[e]:e.bind(n,n);let r;Se(t)?r=t:(r=t.handler,o=t);const s=kn(this),i=Os(a,r.bind(n),o);return s(),i}function Bs(e,t){const o=t.split(".");return()=>{let n=e;for(let a=0;a<o.length&&n;a++)n=n[o[a]];return n}}const qu=Symbol("_vte"),Ju=e=>e.__isTeleport,qa=Symbol("_leaveCb");function Ja(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ja(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gn(e,t){return Se(e)?qe({name:e.name},t,{setup:e}):e}function Xa(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Us(e,t){let o;return!!((o=Object.getOwnPropertyDescriptor(e,t))&&!o.configurable)}const Zn=new WeakMap;function fn(e,t,o,n,a=!1){if(be(e)){e.forEach((w,E)=>fn(w,t&&(be(t)?t[E]:t),o,n,a));return}if(Oo(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&fn(e,t,o,n.component.subTree);return}const r=n.shapeFlag&4?ia(n.component):n.el,s=a?null:r,{i,r:l}=e,c=t&&t.r,u=i.refs===Oe?i.refs={}:i.refs,f=i.setupState,v=Ce(f),x=f===Oe?Jr:w=>Us(u,w)?!1:Me(v,w),T=(w,E)=>!(E&&Us(u,E));if(c!=null&&c!==l){if(Gs(t),je(c))u[c]=null,x(c)&&(f[c]=null);else if(Ke(c)){const w=t;T(c,w.k)&&(c.value=null),w.k&&(u[w.k]=null)}}if(Se(l))Fo(l,i,12,[s,u]);else{const w=je(l),E=Ke(l);if(w||E){const _=()=>{if(e.f){const S=w?x(l)?f[l]:u[l]:T()||!e.k?l.value:u[e.k];if(a)be(S)&&Ea(S,r);else if(be(S))S.includes(r)||S.push(r);else if(w)u[l]=[r],x(l)&&(f[l]=u[l]);else{const g=[r];T(l,e.k)&&(l.value=g),e.k&&(u[e.k]=g)}}else w?(u[l]=s,x(l)&&(f[l]=s)):E&&(T(l,e.k)&&(l.value=s),e.k&&(u[e.k]=s))};if(s){const S=()=>{_(),Zn.delete(e)};S.id=-1,Zn.set(e,S),ft(S,o)}else Gs(e),_()}}}function Gs(e){const t=Zn.get(e);t&&(t.flags|=8,Zn.delete(e))}const js=e=>e.nodeType===8;Un().requestIdleCallback,Un().cancelIdleCallback;function Xu(e,t){if(js(e)&&e.data==="["){let o=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(js(n))if(n.data==="]"){if(--o===0)break}else n.data==="["&&o++;n=n.nextSibling}}else t(e)}const Oo=e=>!!e.type.__asyncLoader;function Za(e){Se(e)&&(e={loader:e});const{loader:t,loadingComponent:o,errorComponent:n,delay:a=200,hydrate:r,timeout:s,suspensible:i=!0,onError:l}=e;let c=null,u,f=0;const v=()=>(f++,c=null,x()),x=()=>{let T;return c||(T=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((E,_)=>{l(w,()=>E(v()),()=>_(w),f+1)});throw w}).then(w=>T!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return gn({name:"AsyncComponentWrapper",__asyncLoader:x,__asyncHydrate(T,w,E){let _=!1;(w.bu||(w.bu=[])).push(()=>_=!0);const S=()=>{_||E()},g=r?()=>{const k=r(S,A=>Xu(T,A));k&&(w.bum||(w.bum=[])).push(k)}:S;u?g():x().then(()=>!w.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const T=st;if(Xa(T),u)return()=>Qn(u,T);const w=g=>{c=null,dn(g,T,13,!n)};if(i&&T.suspense||Go)return x().then(g=>()=>Qn(g,T)).catch(g=>(w(g),()=>n?Ve(n,{error:g}):null));const E=me(!1),_=me(),S=me(!!a);return a&&setTimeout(()=>{S.value=!1},a),s!=null&&setTimeout(()=>{if(!E.value&&!_.value){const g=new Error(`Async component timed out after ${s}ms.`);w(g),_.value=g}},s),x().then(()=>{E.value=!0,T.parent&&Qa(T.parent.vnode)&&T.parent.update()}).catch(g=>{w(g),_.value=g}),()=>{if(E.value&&u)return Qn(u,T);if(_.value&&n)return Ve(n,{error:_.value});if(o&&!S.value)return Qn(o,T)}}})}function Qn(e,t){const{ref:o,props:n,children:a,ce:r}=t.vnode,s=Ve(e,n,a);return s.ref=o,s.ce=r,delete t.vnode.ce,s}const Qa=e=>e.type.__isKeepAlive;function Zu(e,t){Ks(e,"a",t)}function Qu(e,t){Ks(e,"da",t)}function Ks(e,t,o=st){const n=e.__wdc||(e.__wdc=()=>{let a=o;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(ea(t,n,o),o){let a=o.parent;for(;a&&a.parent;)Qa(a.parent.vnode)&&ed(n,t,o,a),a=a.parent}}function ed(e,t,o,n){const a=ea(t,e,n,!0);er(()=>{Ea(n[t],a)},o)}function ea(e,t,o=st,n=!1){if(o){const a=o[e]||(o[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ft();const i=kn(o),l=Lt(t,o,e,s);return i(),Rt(),l});return n?a.unshift(r):a.push(r),r}}const qt=e=>(t,o=st)=>{(!Go||e==="sp")&&ea(e,(...n)=>t(...n),o)},Hs=qt("bm"),ao=qt("m"),td=qt("bu"),od=qt("u"),Bo=qt("bum"),er=qt("um"),nd=qt("sp"),ad=qt("rtg"),rd=qt("rtc");function sd(e,t=st){ea("ec",e,t)}const id="components",zs=Symbol.for("v-ndc");function ld(e){return je(e)?cd(id,e,!1)||e:e||zs}function cd(e,t,o=!0,n=!1){const a=rt||st;if(a){const r=a.type;{const i=xi(r,!1);if(i&&(i===t||i===ot(t)||i===Bn(ot(t))))return r}const s=Vs(a[e]||r[e],t)||Vs(a.appContext[e],t);return!s&&n?r:s}}function Vs(e,t){return e&&(e[t]||e[ot(t)]||e[Bn(ot(t))])}function Bt(e,t,o,n){let a;const r=o,s=be(e);if(s||je(e)){const i=s&&Vt(e);let l=!1,c=!1;i&&(l=!yt(e),c=Wt(e),e=jn(e)),a=new Array(e.length);for(let u=0,f=e.length;u<f;u++)a[u]=t(l?c?No(xt(e[u])):xt(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){a=new Array(e);for(let i=0;i<e;i++)a[i]=t(i+1,i,void 0,r)}else if(Ne(e))if(e[Symbol.iterator])a=Array.from(e,(i,l)=>t(i,l,void 0,r));else{const i=Object.keys(e);a=new Array(i.length);for(let l=0,c=i.length;l<c;l++){const u=i[l];a[l]=t(e[u],u,l,r)}}else a=[];return a}function ta(e,t,o={},n,a){if(rt.ce||rt.parent&&Oo(rt.parent)&&rt.parent.ce){const c=Object.keys(o).length>0;return t!=="default"&&(o.name=t),J(),Je(Ie,null,[Ve("slot",o,n)],c?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),J();const s=r&&Ws(r(o)),i=o.key||s&&s.key,l=Je(Ie,{key:(i&&!bt(i)?i:`_${t}`)+(!s&&n?"_fb":"")},s||[],s&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function Ws(e){return e.some(t=>vn(t)?!(t.type===Jt||t.type===Ie&&!Ws(t.children)):!0)?e:null}const tr=e=>e?ki(e)?ia(e):tr(e.parent):null,hn=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>tr(e.parent),$root:e=>tr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xs(e),$forceUpdate:e=>e.f||(e.f=()=>{Ya(e.update)}),$nextTick:e=>e.n||(e.n=Wa.bind(e.proxy)),$watch:e=>Yu.bind(e)}),or=(e,t)=>e!==Oe&&!e.__isScriptSetup&&Me(e,t),ud={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:n,data:a,props:r,accessCache:s,type:i,appContext:l}=e;if(t[0]!=="$"){const v=s[t];if(v!==void 0)switch(v){case 1:return n[t];case 2:return a[t];case 4:return o[t];case 3:return r[t]}else{if(or(n,t))return s[t]=1,n[t];if(a!==Oe&&Me(a,t))return s[t]=2,a[t];if(Me(r,t))return s[t]=3,r[t];if(o!==Oe&&Me(o,t))return s[t]=4,o[t];nr&&(s[t]=0)}}const c=hn[t];let u,f;if(c)return t==="$attrs"&&lt(e.attrs,"get",""),c(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(o!==Oe&&Me(o,t))return s[t]=4,o[t];if(f=l.config.globalProperties,Me(f,t))return f[t]},set({_:e},t,o){const{data:n,setupState:a,ctx:r}=e;return or(a,t)?(a[t]=o,!0):n!==Oe&&Me(n,t)?(n[t]=o,!0):Me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:n,appContext:a,props:r,type:s}},i){let l;return!!(o[i]||e!==Oe&&i[0]!=="$"&&Me(e,i)||or(t,i)||Me(r,i)||Me(n,i)||Me(hn,i)||Me(a.config.globalProperties,i)||(l=s.__cssModules)&&l[i])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Me(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Ys(e){return be(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}let nr=!0;function dd(e){const t=Xs(e),o=e.proxy,n=e.ctx;nr=!1,t.beforeCreate&&qs(t.beforeCreate,e,"bc");const{data:a,computed:r,methods:s,watch:i,provide:l,inject:c,created:u,beforeMount:f,mounted:v,beforeUpdate:x,updated:T,activated:w,deactivated:E,beforeDestroy:_,beforeUnmount:S,destroyed:g,unmounted:k,render:A,renderTracked:L,renderTriggered:O,errorCaptured:$,serverPrefetch:m,expose:U,inheritAttrs:H,components:I,directives:W,filters:ue}=t;if(c&&pd(c,n,null),s)for(const j in s){const se=s[j];Se(se)&&(n[j]=se.bind(o))}if(a){const j=a.call(o,o);Ne(j)&&(e.data=Io(j))}if(nr=!0,r)for(const j in r){const se=r[j],fe=Se(se)?se.bind(o,o):Se(se.get)?se.get.bind(o,o):It,Z=!Se(se)&&Se(se.set)?se.set.bind(o):It,ce=Q({get:fe,set:Z});Object.defineProperty(n,j,{enumerable:!0,configurable:!0,get:()=>ce.value,set:oe=>ce.value=oe})}if(i)for(const j in i)Js(i[j],n,o,j);if(l){const j=Se(l)?l.call(o):l;Reflect.ownKeys(j).forEach(se=>{wt(se,j[se])})}u&&qs(u,e,"c");function M(j,se){be(se)?se.forEach(fe=>j(fe.bind(o))):se&&j(se.bind(o))}if(M(Hs,f),M(ao,v),M(td,x),M(od,T),M(Zu,w),M(Qu,E),M(sd,$),M(rd,L),M(ad,O),M(Bo,S),M(er,k),M(nd,m),be(U))if(U.length){const j=e.exposed||(e.exposed={});U.forEach(se=>{Object.defineProperty(j,se,{get:()=>o[se],set:fe=>o[se]=fe,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===It&&(e.render=A),H!=null&&(e.inheritAttrs=H),I&&(e.components=I),W&&(e.directives=W),m&&Xa(e)}function pd(e,t,o=It){be(e)&&(e=ar(e));for(const n in e){const a=e[n];let r;Ne(a)?"default"in a?r=$e(a.from||n,a.default,!0):r=$e(a.from||n):r=$e(a),Ke(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[n]=r}}function qs(e,t,o){Lt(be(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,o)}function Js(e,t,o,n){let a=n.includes(".")?Bs(o,n):()=>o[n];if(je(e)){const r=t[e];Se(r)&&Ye(a,r)}else if(Se(e))Ye(a,e.bind(o));else if(Ne(e))if(be(e))e.forEach(r=>Js(r,t,o,n));else{const r=Se(e.handler)?e.handler.bind(o):t[e.handler];Se(r)&&Ye(a,r,e)}}function Xs(e){const t=e.type,{mixins:o,extends:n}=t,{mixins:a,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,i=r.get(t);let l;return i?l=i:!a.length&&!o&&!n?l=t:(l={},a.length&&a.forEach(c=>oa(l,c,s,!0)),oa(l,t,s)),Ne(t)&&r.set(t,l),l}function oa(e,t,o,n=!1){const{mixins:a,extends:r}=t;r&&oa(e,r,o,!0),a&&a.forEach(s=>oa(e,s,o,!0));for(const s in t)if(!(n&&s==="expose")){const i=gd[s]||o&&o[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const gd={data:Zs,props:Qs,emits:Qs,methods:mn,computed:mn,beforeCreate:dt,created:dt,beforeMount:dt,mounted:dt,beforeUpdate:dt,updated:dt,beforeDestroy:dt,beforeUnmount:dt,destroyed:dt,unmounted:dt,activated:dt,deactivated:dt,errorCaptured:dt,serverPrefetch:dt,components:mn,directives:mn,watch:hd,provide:Zs,inject:fd};function Zs(e,t){return t?e?function(){return qe(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function fd(e,t){return mn(ar(e),ar(t))}function ar(e){if(be(e)){const t={};for(let o=0;o<e.length;o++)t[e[o]]=e[o];return t}return e}function dt(e,t){return e?[...new Set([].concat(e,t))]:t}function mn(e,t){return e?qe(Object.create(null),e,t):t}function Qs(e,t){return e?be(e)&&be(t)?[...new Set([...e,...t])]:qe(Object.create(null),Ys(e),Ys(t??{})):t}function hd(e,t){if(!e)return t;if(!t)return e;const o=qe(Object.create(null),e);for(const n in t)o[n]=dt(e[n],t[n]);return o}function ei(){return{app:null,config:{isNativeTag:Jr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let md=0;function bd(e,t){return function(n,a=null){Se(n)||(n=qe({},n)),a!=null&&!Ne(a)&&(a=null);const r=ei(),s=new WeakSet,i=[];let l=!1;const c=r.app={_uid:md++,_component:n,_props:a,_container:null,_context:r,_instance:null,version:Jd,get config(){return r.config},set config(u){},use(u,...f){return s.has(u)||(u&&Se(u.install)?(s.add(u),u.install(c,...f)):Se(u)&&(s.add(u),u(c,...f))),c},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),c},component(u,f){return f?(r.components[u]=f,c):r.components[u]},directive(u,f){return f?(r.directives[u]=f,c):r.directives[u]},mount(u,f,v){if(!l){const x=c._ceVNode||Ve(n,a);return x.appContext=r,v===!0?v="svg":v===!1&&(v=void 0),e(x,u,v),l=!0,c._container=u,u.__vue_app__=c,ia(x.component)}},onUnmount(u){i.push(u)},unmount(){l&&(Lt(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return r.provides[u]=f,c},runWithContext(u){const f=ko;ko=c;try{return u()}finally{ko=f}}};return c}}let ko=null;const yd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ot(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function _d(e,t,...o){if(e.isUnmounted)return;const n=e.vnode.props||Oe;let a=o;const r=t.startsWith("update:"),s=r&&yd(n,t.slice(7));s&&(s.trim&&(a=o.map(u=>je(u)?u.trim():u)),s.number&&(a=o.map(tu)));let i,l=n[i=Ca(t)]||n[i=Ca(ot(t))];!l&&r&&(l=n[i=Ca(vt(t))]),l&&Lt(l,e,6,a);const c=n[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Lt(c,e,6,a)}}const vd=new WeakMap;function ti(e,t,o=!1){const n=o?vd:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const r=e.emits;let s={},i=!1;if(!Se(e)){const l=c=>{const u=ti(c,t,!0);u&&(i=!0,qe(s,u))};!o&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!r&&!i?(Ne(e)&&n.set(e,null),null):(be(r)?r.forEach(l=>s[l]=null):qe(s,r),Ne(e)&&n.set(e,s),s)}function na(e,t){return!e||!Nn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Me(e,t[0].toLowerCase()+t.slice(1))||Me(e,vt(t))||Me(e,t))}function j0(){}function oi(e){const{type:t,vnode:o,proxy:n,withProxy:a,propsOptions:[r],slots:s,attrs:i,emit:l,render:c,renderCache:u,props:f,data:v,setupState:x,ctx:T,inheritAttrs:w}=e,E=Xn(e);let _,S;try{if(o.shapeFlag&4){const k=a||n,A=k;_=Ut(c.call(A,k,u,f,x,v,T)),S=i}else{const k=t;_=Ut(k.length>1?k(f,{attrs:i,slots:s,emit:l}):k(f,null)),S=t.props?i:wd(i)}}catch(k){yn.length=0,dn(k,e,1),_=Ve(Jt)}let g=_;if(S&&w!==!1){const k=Object.keys(S),{shapeFlag:A}=g;k.length&&A&7&&(r&&k.some(Fn)&&(S=kd(S,r)),g=Uo(g,S,!1,!0))}return o.dirs&&(g=Uo(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(o.dirs):o.dirs),o.transition&&Ja(g,o.transition),_=g,Xn(E),_}const wd=e=>{let t;for(const o in e)(o==="class"||o==="style"||Nn(o))&&((t||(t={}))[o]=e[o]);return t},kd=(e,t)=>{const o={};for(const n in e)(!Fn(n)||!(n.slice(9)in t))&&(o[n]=e[n]);return o};function Sd(e,t,o){const{props:n,children:a,component:r}=e,{props:s,children:i,patchFlag:l}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&l>=0){if(l&1024)return!0;if(l&16)return n?ni(n,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const v=u[f];if(ai(s,n,v)&&!na(c,v))return!0}}}else return(a||i)&&(!i||!i.$stable)?!0:n===s?!1:n?s?ni(n,s,c):!0:!!s;return!1}function ni(e,t,o){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const r=n[a];if(ai(t,e,r)&&!na(o,r))return!0}return!1}function ai(e,t,o){const n=e[o],a=t[o];return o==="style"&&Ne(n)&&Ne(a)?!Pa(n,a):n!==a}function Ad({vnode:e,parent:t,suspense:o},n){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.suspense.vnode.el=a.el=n,e=a),a===e)(e=t.vnode).el=n,t=t.parent;else break}o&&o.activeBranch===e&&(o.vnode.el=n)}const ri={},si=()=>Object.create(ri),ii=e=>Object.getPrototypeOf(e)===ri;function xd(e,t,o,n=!1){const a={},r=si();e.propsDefaults=Object.create(null),li(e,t,a,r);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);o?e.props=n?a:Tu(a):e.type.props?e.props=a:e.props=r,e.attrs=r}function Ld(e,t,o,n){const{props:a,attrs:r,vnode:{patchFlag:s}}=e,i=Ce(a),[l]=e.propsOptions;let c=!1;if((n||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let v=u[f];if(na(e.emitsOptions,v))continue;const x=t[v];if(l)if(Me(r,v))x!==r[v]&&(r[v]=x,c=!0);else{const T=ot(v);a[T]=rr(l,i,T,x,e,!1)}else x!==r[v]&&(r[v]=x,c=!0)}}}else{li(e,t,a,r)&&(c=!0);let u;for(const f in i)(!t||!Me(t,f)&&((u=vt(f))===f||!Me(t,u)))&&(l?o&&(o[f]!==void 0||o[u]!==void 0)&&(a[f]=rr(l,i,f,void 0,e,!0)):delete a[f]);if(r!==i)for(const f in r)(!t||!Me(t,f))&&(delete r[f],c=!0)}c&&Ht(e.attrs,"set","")}function li(e,t,o,n){const[a,r]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(on(l))continue;const c=t[l];let u;a&&Me(a,u=ot(l))?!r||!r.includes(u)?o[u]=c:(i||(i={}))[u]=c:na(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,s=!0)}if(r){const l=Ce(o),c=i||Oe;for(let u=0;u<r.length;u++){const f=r[u];o[f]=rr(a,l,f,c[f],e,!Me(c,f))}}return s}function rr(e,t,o,n,a,r){const s=e[o];if(s!=null){const i=Me(s,"default");if(i&&n===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&Se(l)){const{propsDefaults:c}=a;if(o in c)n=c[o];else{const u=kn(a);n=c[o]=l.call(null,t),u()}}else n=l;a.ce&&a.ce._setProp(o,n)}s[0]&&(r&&!i?n=!1:s[1]&&(n===""||n===vt(o))&&(n=!0))}return n}const Td=new WeakMap;function ci(e,t,o=!1){const n=o?Td:t.propsCache,a=n.get(e);if(a)return a;const r=e.props,s={},i=[];let l=!1;if(!Se(e)){const u=f=>{l=!0;const[v,x]=ci(f,t,!0);qe(s,v),x&&i.push(...x)};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!l)return Ne(e)&&n.set(e,$o),$o;if(be(r))for(let u=0;u<r.length;u++){const f=ot(r[u]);ui(f)&&(s[f]=Oe)}else if(r)for(const u in r){const f=ot(u);if(ui(f)){const v=r[u],x=s[f]=be(v)||Se(v)?{type:v}:qe({},v),T=x.type;let w=!1,E=!0;if(be(T))for(let _=0;_<T.length;++_){const S=T[_],g=Se(S)&&S.name;if(g==="Boolean"){w=!0;break}else g==="String"&&(E=!1)}else w=Se(T)&&T.name==="Boolean";x[0]=w,x[1]=E,(w||Me(x,"default"))&&i.push(f)}}const c=[s,i];return Ne(e)&&n.set(e,c),c}function ui(e){return e[0]!=="$"&&!on(e)}const sr=e=>e==="_"||e==="_ctx"||e==="$stable",ir=e=>be(e)?e.map(Ut):[Ut(e)],Ed=(e,t,o)=>{if(t._n)return t;const n=Tt((...a)=>ir(t(...a)),o);return n._c=!1,n},di=(e,t,o)=>{const n=e._ctx;for(const a in e){if(sr(a))continue;const r=e[a];if(Se(r))t[a]=Ed(a,r,n);else if(r!=null){const s=ir(r);t[a]=()=>s}}},pi=(e,t)=>{const o=ir(t);e.slots.default=()=>o},gi=(e,t,o)=>{for(const n in t)(o||!sr(n))&&(e[n]=t[n])},Cd=(e,t,o)=>{const n=e.slots=si();if(e.vnode.shapeFlag&32){const a=t._;a?(gi(n,t,o),o&&ts(n,"_",a,!0)):di(t,n)}else t&&pi(e,t)},$d=(e,t,o)=>{const{vnode:n,slots:a}=e;let r=!0,s=Oe;if(n.shapeFlag&32){const i=t._;i?o&&i===1?r=!1:gi(a,t,o):(r=!t.$stable,di(t,a)),s=t}else t&&(pi(e,t),s={default:1});if(r)for(const i in a)!sr(i)&&s[i]==null&&delete a[i]},ft=Fd;function Pd(e){return Md(e)}function Md(e,t){const o=Un();o.__VUE__=!0;const{insert:n,remove:a,patchProp:r,createElement:s,createText:i,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:v,setScopeId:x=It,insertStaticContent:T}=e,w=(d,y,b,P=null,D=null,B=null,Y=void 0,q=null,p=!!y.dynamicChildren)=>{if(d===y)return;d&&!wn(d,y)&&(P=Te(d),oe(d,D,B,!0),d=null),y.patchFlag===-2&&(p=!1,y.dynamicChildren=null);const{type:h,ref:F,shapeFlag:K}=y;switch(h){case bn:E(d,y,b,P);break;case Jt:_(d,y,b,P);break;case cr:d==null&&S(y,b,P,Y);break;case Ie:I(d,y,b,P,D,B,Y,q,p);break;default:K&1?A(d,y,b,P,D,B,Y,q,p):K&6?W(d,y,b,P,D,B,Y,q,p):(K&64||K&128)&&h.process(d,y,b,P,D,B,Y,q,p,he)}F!=null&&D?fn(F,d&&d.ref,B,y||d,!y):F==null&&d&&d.ref!=null&&fn(d.ref,null,B,d,!0)},E=(d,y,b,P)=>{if(d==null)n(y.el=i(y.children),b,P);else{const D=y.el=d.el;y.children!==d.children&&c(D,y.children)}},_=(d,y,b,P)=>{d==null?n(y.el=l(y.children||""),b,P):y.el=d.el},S=(d,y,b,P)=>{[d.el,d.anchor]=T(d.children,y,b,P,d.el,d.anchor)},g=({el:d,anchor:y},b,P)=>{let D;for(;d&&d!==y;)D=v(d),n(d,b,P),d=D;n(y,b,P)},k=({el:d,anchor:y})=>{let b;for(;d&&d!==y;)b=v(d),a(d),d=b;a(y)},A=(d,y,b,P,D,B,Y,q,p)=>{if(y.type==="svg"?Y="svg":y.type==="math"&&(Y="mathml"),d==null)L(y,b,P,D,B,Y,q,p);else{const h=d.el&&d.el._isVueCE?d.el:null;try{h&&h._beginPatch(),m(d,y,D,B,Y,q,p)}finally{h&&h._endPatch()}}},L=(d,y,b,P,D,B,Y,q)=>{let p,h;const{props:F,shapeFlag:K,transition:re,dirs:ee}=d;if(p=d.el=s(d.type,B,F&&F.is,F),K&8?u(p,d.children):K&16&&$(d.children,p,null,P,D,lr(d,B),Y,q),ee&&wo(d,null,P,"created"),O(p,d,d.scopeId,Y,P),F){for(const V in F)V!=="value"&&!on(V)&&r(p,V,null,F[V],B,P);"value"in F&&r(p,"value",null,F.value,B),(h=F.onVnodeBeforeMount)&&Gt(h,P,d)}ee&&wo(d,null,P,"beforeMount");const R=Id(D,re);R&&re.beforeEnter(p),n(p,y,b),((h=F&&F.onVnodeMounted)||R||ee)&&ft(()=>{try{h&&Gt(h,P,d),R&&re.enter(p),ee&&wo(d,null,P,"mounted")}finally{}},D)},O=(d,y,b,P,D)=>{if(b&&x(d,b),P)for(let B=0;B<P.length;B++)x(d,P[B]);if(D){let B=D.subTree;if(y===B||yi(B.type)&&(B.ssContent===y||B.ssFallback===y)){const Y=D.vnode;O(d,Y,Y.scopeId,Y.slotScopeIds,D.parent)}}},$=(d,y,b,P,D,B,Y,q,p=0)=>{for(let h=p;h<d.length;h++){const F=d[h]=q?Xt(d[h]):Ut(d[h]);w(null,F,y,b,P,D,B,Y,q)}},m=(d,y,b,P,D,B,Y)=>{const q=y.el=d.el;let{patchFlag:p,dynamicChildren:h,dirs:F}=y;p|=d.patchFlag&16;const K=d.props||Oe,re=y.props||Oe;let ee;if(b&&So(b,!1),(ee=re.onVnodeBeforeUpdate)&&Gt(ee,b,y,d),F&&wo(y,d,b,"beforeUpdate"),b&&So(b,!0),(K.innerHTML&&re.innerHTML==null||K.textContent&&re.textContent==null)&&u(q,""),h?U(d.dynamicChildren,h,q,b,P,lr(y,D),B):Y||se(d,y,q,null,b,P,lr(y,D),B,!1),p>0){if(p&16)H(q,K,re,b,D);else if(p&2&&K.class!==re.class&&r(q,"class",null,re.class,D),p&4&&r(q,"style",K.style,re.style,D),p&8){const R=y.dynamicProps;for(let V=0;V<R.length;V++){const de=R[V],xe=K[de],De=re[de];(De!==xe||de==="value")&&r(q,de,xe,De,D,b)}}p&1&&d.children!==y.children&&u(q,y.children)}else!Y&&h==null&&H(q,K,re,b,D);((ee=re.onVnodeUpdated)||F)&&ft(()=>{ee&&Gt(ee,b,y,d),F&&wo(y,d,b,"updated")},P)},U=(d,y,b,P,D,B,Y)=>{for(let q=0;q<y.length;q++){const p=d[q],h=y[q],F=p.el&&(p.type===Ie||!wn(p,h)||p.shapeFlag&198)?f(p.el):b;w(p,h,F,null,P,D,B,Y,!0)}},H=(d,y,b,P,D)=>{if(y!==b){if(y!==Oe)for(const B in y)!on(B)&&!(B in b)&&r(d,B,y[B],null,D,P);for(const B in b){if(on(B))continue;const Y=b[B],q=y[B];Y!==q&&B!=="value"&&r(d,B,q,Y,D,P)}"value"in b&&r(d,"value",y.value,b.value,D)}},I=(d,y,b,P,D,B,Y,q,p)=>{const h=y.el=d?d.el:i(""),F=y.anchor=d?d.anchor:i("");let{patchFlag:K,dynamicChildren:re,slotScopeIds:ee}=y;ee&&(q=q?q.concat(ee):ee),d==null?(n(h,b,P),n(F,b,P),$(y.children||[],b,F,D,B,Y,q,p)):K>0&&K&64&&re&&d.dynamicChildren&&d.dynamicChildren.length===re.length?(U(d.dynamicChildren,re,b,D,B,Y,q),(y.key!=null||D&&y===D.subTree)&&fi(d,y,!0)):se(d,y,b,F,D,B,Y,q,p)},W=(d,y,b,P,D,B,Y,q,p)=>{y.slotScopeIds=q,d==null?y.shapeFlag&512?D.ctx.activate(y,b,P,Y,p):ue(y,b,P,D,B,Y,p):C(d,y,p)},ue=(d,y,b,P,D,B,Y)=>{const q=d.component=jd(d,P,D);if(Qa(d)&&(q.ctx.renderer=he),Kd(q,!1,Y),q.asyncDep){if(D&&D.registerDep(q,M,Y),!d.el){const p=q.subTree=Ve(Jt);_(null,p,y,b),d.placeholder=p.el}}else M(q,d,y,b,D,B,Y)},C=(d,y,b)=>{const P=y.component=d.component;if(Sd(d,y,b))if(P.asyncDep&&!P.asyncResolved){j(P,y,b);return}else P.next=y,P.update();else y.el=d.el,P.vnode=y},M=(d,y,b,P,D,B,Y)=>{const q=()=>{if(d.isMounted){let{next:K,bu:re,u:ee,parent:R,vnode:V}=d;{const Qe=hi(d);if(Qe){K&&(K.el=V.el,j(d,K,Y)),Qe.asyncDep.then(()=>{ft(()=>{d.isUnmounted||h()},D)});return}}let de=K,xe;So(d,!1),K?(K.el=V.el,j(d,K,Y)):K=V,re&&$a(re),(xe=K.props&&K.props.onVnodeBeforeUpdate)&&Gt(xe,R,K,V),So(d,!0);const De=oi(d),at=d.subTree;d.subTree=De,w(at,De,f(at.el),Te(at),d,D,B),K.el=De.el,de===null&&Ad(d,De.el),ee&&ft(ee,D),(xe=K.props&&K.props.onVnodeUpdated)&&ft(()=>Gt(xe,R,K,V),D)}else{let K;const{el:re,props:ee}=y,{bm:R,m:V,parent:de,root:xe,type:De}=d,at=Oo(y);So(d,!1),R&&$a(R),!at&&(K=ee&&ee.onVnodeBeforeMount)&&Gt(K,de,y),So(d,!0);{xe.ce&&xe.ce._hasShadowRoot()&&xe.ce._injectChildStyle(De,d.parent?d.parent.type:void 0);const Qe=d.subTree=oi(d);w(null,Qe,b,P,d,D,B),y.el=Qe.el}if(V&&ft(V,D),!at&&(K=ee&&ee.onVnodeMounted)){const Qe=y;ft(()=>Gt(K,de,Qe),D)}(y.shapeFlag&256||de&&Oo(de.vnode)&&de.vnode.shapeFlag&256)&&d.a&&ft(d.a,D),d.isMounted=!0,y=b=P=null}};d.scope.on();const p=d.effect=new cs(q);d.scope.off();const h=d.update=p.run.bind(p),F=d.job=p.runIfDirty.bind(p);F.i=d,F.id=d.uid,p.scheduler=()=>Ya(F),So(d,!0),h()},j=(d,y,b)=>{y.component=d;const P=d.vnode.props;d.vnode=y,d.next=null,Ld(d,y.props,P,b),$d(d,y.children,b),Ft(),Ns(d),Rt()},se=(d,y,b,P,D,B,Y,q,p=!1)=>{const h=d&&d.children,F=d?d.shapeFlag:0,K=y.children,{patchFlag:re,shapeFlag:ee}=y;if(re>0){if(re&128){Z(h,K,b,P,D,B,Y,q,p);return}else if(re&256){fe(h,K,b,P,D,B,Y,q,p);return}}ee&8?(F&16&&ge(h,D,B),K!==h&&u(b,K)):F&16?ee&16?Z(h,K,b,P,D,B,Y,q,p):ge(h,D,B,!0):(F&8&&u(b,""),ee&16&&$(K,b,P,D,B,Y,q,p))},fe=(d,y,b,P,D,B,Y,q,p)=>{d=d||$o,y=y||$o;const h=d.length,F=y.length,K=Math.min(h,F);let re;for(re=0;re<K;re++){const ee=y[re]=p?Xt(y[re]):Ut(y[re]);w(d[re],ee,b,null,D,B,Y,q,p)}h>F?ge(d,D,B,!0,!1,K):$(y,b,P,D,B,Y,q,p,K)},Z=(d,y,b,P,D,B,Y,q,p)=>{let h=0;const F=y.length;let K=d.length-1,re=F-1;for(;h<=K&&h<=re;){const ee=d[h],R=y[h]=p?Xt(y[h]):Ut(y[h]);if(wn(ee,R))w(ee,R,b,null,D,B,Y,q,p);else break;h++}for(;h<=K&&h<=re;){const ee=d[K],R=y[re]=p?Xt(y[re]):Ut(y[re]);if(wn(ee,R))w(ee,R,b,null,D,B,Y,q,p);else break;K--,re--}if(h>K){if(h<=re){const ee=re+1,R=ee<F?y[ee].el:P;for(;h<=re;)w(null,y[h]=p?Xt(y[h]):Ut(y[h]),b,R,D,B,Y,q,p),h++}}else if(h>re)for(;h<=K;)oe(d[h],D,B,!0),h++;else{const ee=h,R=h,V=new Map;for(h=R;h<=re;h++){const ae=y[h]=p?Xt(y[h]):Ut(y[h]);ae.key!=null&&V.set(ae.key,h)}let de,xe=0;const De=re-R+1;let at=!1,Qe=0;const X=new Array(De);for(h=0;h<De;h++)X[h]=0;for(h=ee;h<=K;h++){const ae=d[h];if(xe>=De){oe(ae,D,B,!0);continue}let ve;if(ae.key!=null)ve=V.get(ae.key);else for(de=R;de<=re;de++)if(X[de-R]===0&&wn(ae,y[de])){ve=de;break}ve===void 0?oe(ae,D,B,!0):(X[ve-R]=h+1,ve>=Qe?Qe=ve:at=!0,w(ae,y[ve],b,null,D,B,Y,q,p),xe++)}const te=at?Nd(X):$o;for(de=te.length-1,h=De-1;h>=0;h--){const ae=R+h,ve=y[ae],Ze=y[ae+1],yo=ae+1<F?Ze.el||bi(Ze):P;X[h]===0?w(null,ve,b,yo,D,B,Y,q,p):at&&(de<0||h!==te[de]?ce(ve,b,yo,2):de--)}}},ce=(d,y,b,P,D=null)=>{const{el:B,type:Y,transition:q,children:p,shapeFlag:h}=d;if(h&6){ce(d.component.subTree,y,b,P);return}if(h&128){d.suspense.move(y,b,P);return}if(h&64){Y.move(d,y,b,he);return}if(Y===Ie){n(B,y,b);for(let K=0;K<p.length;K++)ce(p[K],y,b,P);n(d.anchor,y,b);return}if(Y===cr){g(d,y,b);return}if(P!==2&&h&1&&q)if(P===0)q.persisted&&!B[qa]?n(B,y,b):(q.beforeEnter(B),n(B,y,b),ft(()=>q.enter(B),D));else{const{leave:K,delayLeave:re,afterLeave:ee}=q,R=()=>{d.ctx.isUnmounted?a(B):n(B,y,b)},V=()=>{const de=B._isLeaving||!!B[qa];B._isLeaving&&B[qa](!0),q.persisted&&!de?R():K(B,()=>{R(),ee&&ee()})};re?re(B,R,V):V()}else n(B,y,b)},oe=(d,y,b,P=!1,D=!1)=>{const{type:B,props:Y,ref:q,children:p,dynamicChildren:h,shapeFlag:F,patchFlag:K,dirs:re,cacheIndex:ee,memo:R}=d;if(K===-2&&(D=!1),q!=null&&(Ft(),fn(q,null,b,d,!0),Rt()),ee!=null&&(y.renderCache[ee]=void 0),F&256){y.ctx.deactivate(d);return}const V=F&1&&re,de=!Oo(d);let xe;if(de&&(xe=Y&&Y.onVnodeBeforeUnmount)&&Gt(xe,y,d),F&6)Fe(d.component,b,P);else{if(F&128){d.suspense.unmount(b,P);return}V&&wo(d,null,y,"beforeUnmount"),F&64?d.type.remove(d,y,b,he,P):h&&!h.hasOnce&&(B!==Ie||K>0&&K&64)?ge(h,y,b,!1,!0):(B===Ie&&K&384||!D&&F&16)&&ge(p,y,b),P&&ke(d)}const De=R!=null&&ee==null;(de&&(xe=Y&&Y.onVnodeUnmounted)||V||De)&&ft(()=>{xe&&Gt(xe,y,d),V&&wo(d,null,y,"unmounted"),De&&(d.el=null)},b)},ke=d=>{const{type:y,el:b,anchor:P,transition:D}=d;if(y===Ie){ie(b,P);return}if(y===cr){k(d);return}const B=()=>{a(b),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(d.shapeFlag&1&&D&&!D.persisted){const{leave:Y,delayLeave:q}=D,p=()=>Y(b,B);q?q(d.el,B,p):p()}else B()},ie=(d,y)=>{let b;for(;d!==y;)b=v(d),a(d),d=b;a(y)},Fe=(d,y,b)=>{const{bum:P,scope:D,job:B,subTree:Y,um:q,m:p,a:h}=d;mi(p),mi(h),P&&$a(P),D.stop(),B&&(B.flags|=8,oe(Y,d,y,b)),q&&ft(q,y),ft(()=>{d.isUnmounted=!0},y)},ge=(d,y,b,P=!1,D=!1,B=0)=>{for(let Y=B;Y<d.length;Y++)oe(d[Y],y,b,P,D)},Te=d=>{if(d.shapeFlag&6)return Te(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const y=v(d.anchor||d.el),b=y&&y[qu];return b?v(b):y};let Ae=!1;const z=(d,y,b)=>{let P;d==null?y._vnode&&(oe(y._vnode,null,null,!0),P=y._vnode.component):w(y._vnode||null,d,y,null,null,null,b),y._vnode=d,Ae||(Ae=!0,Ns(P),Fs(),Ae=!1)},he={p:w,um:oe,m:ce,r:ke,mt:ue,mc:$,pc:se,pbc:U,n:Te,o:e};return{render:z,hydrate:void 0,createApp:bd(z)}}function lr({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function So({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Id(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fi(e,t,o=!1){const n=e.children,a=t.children;if(be(n)&&be(a))for(let r=0;r<n.length;r++){const s=n[r];let i=a[r];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=a[r]=Xt(a[r]),i.el=s.el),!o&&i.patchFlag!==-2&&fi(s,i)),i.type===bn&&(i.patchFlag===-1&&(i=a[r]=Xt(i)),i.el=s.el),i.type===Jt&&!i.el&&(i.el=s.el)}}function Nd(e){const t=e.slice(),o=[0];let n,a,r,s,i;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(a=o[o.length-1],e[a]<c){t[n]=a,o.push(n);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,e[o[i]]<c?r=i+1:s=i;c<e[o[r]]&&(r>0&&(t[n]=o[r-1]),o[r]=n)}}for(r=o.length,s=o[r-1];r-- >0;)o[r]=s,s=t[s];return o}function hi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hi(t)}function mi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function bi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?bi(t.subTree):null}const yi=e=>e.__isSuspense;function Fd(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):Ku(e)}const Ie=Symbol.for("v-fgt"),bn=Symbol.for("v-txt"),Jt=Symbol.for("v-cmt"),cr=Symbol.for("v-stc"),yn=[];let _t=null;function J(e=!1){yn.push(_t=e?null:[])}function Rd(){yn.pop(),_t=yn[yn.length-1]||null}let _n=1;function aa(e,t=!1){_n+=e,e<0&&_t&&t&&(_t.hasOnce=!0)}function _i(e){return e.dynamicChildren=_n>0?_t||$o:null,Rd(),_n>0&&_t&&_t.push(e),e}function ne(e,t,o,n,a,r){return _i(G(e,t,o,n,a,r,!0))}function Je(e,t,o,n,a){return _i(Ve(e,t,o,n,a,!0))}function vn(e){return e?e.__v_isVNode===!0:!1}function wn(e,t){return e.type===t.type&&e.key===t.key}const vi=({key:e})=>e??null,ra=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?je(e)||Ke(e)||Se(e)?{i:rt,r:e,k:t,f:!!o}:e:null);function G(e,t=null,o=null,n=0,a=null,r=e===Ie?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vi(t),ref:t&&ra(t),scopeId:Ds,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:rt};return i?(ur(l,o),r&128&&e.normalize(l)):o&&(l.shapeFlag|=je(o)?8:16),_n>0&&!s&&_t&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&_t.push(l),l}const Ve=Dd;function Dd(e,t=null,o=null,n=0,a=null,r=!1){if((!e||e===zs)&&(e=Jt),vn(e)){const i=Uo(e,t,!0);return o&&ur(i,o),_n>0&&!r&&_t&&(i.shapeFlag&6?_t[_t.indexOf(e)]=i:_t.push(i)),i.patchFlag=-2,i}if(qd(e)&&(e=e.__vccOpts),t){t=Od(t);let{class:i,style:l}=t;i&&!je(i)&&(t.class=Be(i)),Ne(l)&&(Wn(l)&&!be(l)&&(l=qe({},l)),t.style=ct(l))}const s=je(e)?1:yi(e)?128:Ju(e)?64:Ne(e)?4:Se(e)?2:0;return G(e,t,o,n,a,s,r,!0)}function Od(e){return e?Wn(e)||ii(e)?qe({},e):e:null}function Uo(e,t,o=!1,n=!1){const{props:a,ref:r,patchFlag:s,children:i,transition:l}=e,c=t?Bd(a||{},t):a,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&vi(c),ref:t&&t.ref?o&&r?be(r)?r.concat(ra(t)):[r,ra(t)]:ra(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Uo(e.ssContent),ssFallback:e.ssFallback&&Uo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Ja(u,l.clone(u)),u}function ht(e=" ",t=0){return Ve(bn,null,e,t)}function we(e="",t=!1){return t?(J(),Je(Jt,null,e)):Ve(Jt,null,e)}function Ut(e){return e==null||typeof e=="boolean"?Ve(Jt):be(e)?Ve(Ie,null,e.slice()):vn(e)?Xt(e):Ve(bn,null,String(e))}function Xt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Uo(e)}function ur(e,t){let o=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(be(t))o=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),ur(e,a()),a._c&&(a._d=!0));return}else{o=32;const a=t._;!a&&!ii(t)?t._ctx=rt:a===3&&rt&&(rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:rt},o=32):(t=String(t),n&64?(o=16,t=[ht(t)]):o=8);e.children=t,e.shapeFlag|=o}function Bd(...e){const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Be([t.class,n.class]));else if(a==="style")t.style=ct([t.style,n.style]);else if(Nn(a)){const r=t[a],s=n[a];s&&r!==s&&!(be(r)&&r.includes(s))?t[a]=r?[].concat(r,s):s:s==null&&r==null&&!Fn(a)&&(t[a]=s)}else a!==""&&(t[a]=n[a])}return t}function Gt(e,t,o,n=null){Lt(e,t,7,[o,n])}const Ud=ei();let Gd=0;function jd(e,t,o){const n=e.type,a=(t?t.appContext:e.appContext)||Ud,r={uid:Gd++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new is(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ci(n,a),emitsOptions:ti(n,a),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:n.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,setupContext:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=_d.bind(null,r),e.ce&&e.ce(r),r}let st=null;const ro=()=>st||rt;let sa,dr;{const e=Un(),t=(o,n)=>{let a;return(a=e[o])||(a=e[o]=[]),a.push(n),r=>{a.length>1?a.forEach(s=>s(r)):a[0](r)}};sa=t("__VUE_INSTANCE_SETTERS__",o=>st=o),dr=t("__VUE_SSR_SETTERS__",o=>Go=o)}const kn=e=>{const t=st;return sa(e),e.scope.on(),()=>{e.scope.off(),sa(t)}},wi=()=>{st&&st.scope.off(),sa(null)};function ki(e){return e.vnode.shapeFlag&4}let Go=!1;function Kd(e,t=!1,o=!1){t&&dr(t);const{props:n,children:a}=e.vnode,r=ki(e);xd(e,n,r,t),Cd(e,a,o||t);const s=r?Hd(e,t):void 0;return t&&dr(!1),s}function Hd(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ud);const{setup:n}=o;if(n){Ft();const a=e.setupContext=n.length>1?Vd(e):null,r=kn(e),s=Fo(n,e,0,[e.props,a]),i=Qr(s);if(Rt(),r(),(i||e.sp)&&!Oo(e)&&Xa(e),i){if(s.then(wi,wi),t)return s.then(l=>{Si(e,l)}).catch(l=>{dn(l,e,0)});e.asyncDep=s}else Si(e,s)}else Ai(e)}function Si(e,t,o){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ne(t)&&(e.setupState=Cs(t)),Ai(e)}function Ai(e,t,o){const n=e.type;e.render||(e.render=n.render||It);{const a=kn(e);Ft();try{dd(e)}finally{Rt(),a()}}}const zd={get(e,t){return lt(e,"get",""),e[t]}};function Vd(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,zd),slots:e.slots,emit:e.emit,expose:t}}function ia(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cs(cn(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in hn)return hn[o](e)},has(t,o){return o in t||o in hn}})):e.proxy}const Wd=/(?:^|[-_])\w/g,Yd=e=>e.replace(Wd,t=>t.toUpperCase()).replace(/[-_]/g,"");function xi(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function Li(e,t,o=!1){let n=xi(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e){const a=r=>{for(const s in r)if(r[s]===t)return s};n=a(e.components)||e.parent&&a(e.parent.type.components)||a(e.appContext.components)}return n?Yd(n):o?"App":"Anonymous"}function qd(e){return Se(e)&&"__vccOpts"in e}const Q=(e,t)=>Nu(e,t,Go);function Ti(e,t,o){try{aa(-1);const n=arguments.length;return n===2?Ne(t)&&!be(t)?vn(t)?Ve(e,null,[t]):Ve(e,t):Ve(e,null,t):(n>3?o=Array.prototype.slice.call(arguments,2):n===3&&vn(o)&&(o=[o]),Ve(e,t,o))}finally{aa(1)}}const Jd="3.5.35";/**
* @vue/runtime-dom v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let pr;const Ei=typeof window<"u"&&window.trustedTypes;if(Ei)try{pr=Ei.createPolicy("vue",{createHTML:e=>e})}catch{}const Ci=pr?e=>pr.createHTML(e):e=>e,Xd="http://www.w3.org/2000/svg",Zd="http://www.w3.org/1998/Math/MathML",Zt=typeof document<"u"?document:null,$i=Zt&&Zt.createElement("template"),Qd={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,n)=>{const a=t==="svg"?Zt.createElementNS(Xd,e):t==="mathml"?Zt.createElementNS(Zd,e):o?Zt.createElement(e,{is:o}):Zt.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>Zt.createTextNode(e),createComment:e=>Zt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,n,a,r){const s=o?o.previousSibling:t.lastChild;if(a&&(a===r||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),o),!(a===r||!(a=a.nextSibling)););else{$i.innerHTML=Ci(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const i=$i.content;if(n==="svg"||n==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,o)}return[s?s.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},ep=Symbol("_vtc");function tp(e,t,o){const n=e[ep];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const la=Symbol("_vod"),Pi=Symbol("_vsh"),op={name:"show",beforeMount(e,{value:t},{transition:o}){e[la]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Sn(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:n}){!t!=!o&&(n?t?(n.beforeEnter(e),Sn(e,!0),n.enter(e)):n.leave(e,()=>{Sn(e,!1)}):Sn(e,t))},beforeUnmount(e,{value:t}){Sn(e,t)}};function Sn(e,t){e.style.display=t?e[la]:"none",e[Pi]=!t}const np=Symbol(""),ap=/(?:^|;)\s*display\s*:/;function rp(e,t,o){const n=e.style,a=je(o);let r=!1;if(o&&!a){if(t)if(je(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();o[i]==null&&An(n,i,"")}else for(const s in t)o[s]==null&&An(n,s,"");for(const s in o){s==="display"&&(r=!0);const i=o[s];i!=null?ip(e,s,!je(t)&&t?t[s]:void 0,i)||An(n,s,i):An(n,s,"")}}else if(a){if(t!==o){const s=n[np];s&&(o+=";"+s),n.cssText=o,r=ap.test(o)}}else t&&e.removeAttribute("style");la in e&&(e[la]=r?n.display:"",e[Pi]&&(n.display="none"))}const Mi=/\s*!important$/;function An(e,t,o){if(be(o))o.forEach(n=>An(e,t,n));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const n=sp(e,t);Mi.test(o)?e.setProperty(vt(n),o.replace(Mi,""),"important"):e[n]=o}}const Ii=["Webkit","Moz","ms"],gr={};function sp(e,t){const o=gr[t];if(o)return o;let n=ot(t);if(n!=="filter"&&n in e)return gr[t]=n;n=Bn(n);for(let a=0;a<Ii.length;a++){const r=Ii[a]+n;if(r in e)return gr[t]=r}return t}function ip(e,t,o,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&je(n)&&o===n}const Ni="http://www.w3.org/1999/xlink";function Fi(e,t,o,n,a,r=su(t)){n&&t.startsWith("xlink:")?o==null?e.removeAttributeNS(Ni,t.slice(6,t.length)):e.setAttributeNS(Ni,t,o):o==null||r&&!as(o)?e.removeAttribute(t):e.setAttribute(t,r?"":bt(o)?String(o):o)}function Ri(e,t,o,n,a){if(t==="innerHTML"||t==="textContent"){o!=null&&(e[t]=t==="innerHTML"?Ci(o):o);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const i=r==="OPTION"?e.getAttribute("value")||"":e.value,l=o==null?e.type==="checkbox"?"on":"":String(o);(i!==l||!("_value"in e))&&(e.value=l),o==null&&e.removeAttribute(t),e._value=o;return}let s=!1;if(o===""||o==null){const i=typeof e[t];i==="boolean"?o=as(o):o==null&&i==="string"?(o="",s=!0):i==="number"&&(o=0,s=!0)}try{e[t]=o}catch{}s&&e.removeAttribute(a||t)}function lp(e,t,o,n){e.addEventListener(t,o,n)}function cp(e,t,o,n){e.removeEventListener(t,o,n)}const Di=Symbol("_vei");function up(e,t,o,n,a=null){const r=e[Di]||(e[Di]={}),s=r[t];if(n&&s)s.value=n;else{const[i,l]=dp(t);if(n){const c=r[t]=fp(n,a);lp(e,i,c,l)}else s&&(cp(e,i,s,l),r[t]=void 0)}}const Oi=/(?:Once|Passive|Capture)$/;function dp(e){let t;if(Oi.test(e)){t={};let n;for(;n=e.match(Oi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let fr=0;const pp=Promise.resolve(),gp=()=>fr||(pp.then(()=>fr=0),fr=Date.now());function fp(e,t){const o=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=o.attached)return;const a=o.value;if(be(a)){const r=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{r.call(n),n._stopped=!0};const s=a.slice(),i=[n];for(let l=0;l<s.length&&!n._stopped;l++){const c=s[l];c&&Lt(c,t,5,i)}}else Lt(a,t,5,[n])};return o.value=e,o.attached=gp(),o}const Bi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,hp=(e,t,o,n,a,r)=>{const s=a==="svg";t==="class"?tp(e,n,s):t==="style"?rp(e,o,n):Nn(t)?Fn(t)||up(e,t,o,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):mp(e,t,n,s))?(Ri(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Fi(e,t,n,s,r,t!=="value")):e._isVueCE&&(bp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!je(n)))?Ri(e,ot(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Fi(e,t,n,s))};function mp(e,t,o,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bi(t)&&Se(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Bi(t)&&je(o)?!1:t in e}function bp(e,t){const o=e._def.props;if(!o)return!1;const n=ot(t);return Array.isArray(o)?o.some(a=>ot(a)===n):Object.keys(o).some(a=>ot(a)===n)}const Ui={};function yp(e,t,o){let n=gn(e,t);Rn(n)&&(n=qe({},n,t));class a extends hr{constructor(s){super(n,s,o)}}return a.def=n,a}const _p=typeof HTMLElement<"u"?HTMLElement:class{};class hr extends _p{constructor(t,o={},n=Ki){super(),this._def=t,this._props=o,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Ki?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(qe({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof hr){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Wa(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const o of t)this._setAttr(o.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:s}=n;let i;if(r&&!be(r))for(const l in r){const c=r[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=os(this._props[l])),(i||(i=Object.create(null)))[ot(l)]=!0)}this._numberProps=i,this._resolveProps(n),this.shadowRoot&&this._applyStyles(s),this._mount(n)},o=this._def.__asyncLoader;o?this._pendingResolve=o().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const o=this._instance&&this._instance.exposed;if(o)for(const n in o)Me(this,n)||Object.defineProperty(this,n,{get:()=>pe(o[n])})}_resolveProps(t){const{props:o}=t,n=be(o)?o:Object.keys(o||{});for(const a of Object.keys(this))a[0]!=="_"&&n.includes(a)&&this._setProp(a,this[a]);for(const a of n.map(ot))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(r){this._setProp(a,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const o=this.hasAttribute(t);let n=o?this.getAttribute(t):Ui;const a=ot(t);o&&this._numberProps&&this._numberProps[a]&&(n=os(n)),this._setProp(a,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,o,n=!0,a=!1){if(o!==this._props[t]&&(this._dirty=!0,o===Ui?delete this._props[t]:(this._props[t]=o,t==="key"&&this._app&&(this._app._ceVNode.key=o)),a&&this._instance&&this._update(),n)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),o===!0?this.setAttribute(vt(t),""):typeof o=="string"||typeof o=="number"?this.setAttribute(vt(t),o+""):o||this.removeAttribute(vt(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Sp(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const o=Ve(this._def,qe(t,this._props));return this._instance||(o.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const a=(r,s)=>{this.dispatchEvent(new CustomEvent(r,Rn(s[0])?qe({detail:s},s[0]):{detail:s}))};n.emit=(r,...s)=>{a(r,s),vt(r)!==r&&a(vt(r),s)},this._setParent()}),o}_applyStyles(t,o,n){if(!t)return;if(o){if(o===this._def||this._styleChildren.has(o))return;this._styleChildren.add(o)}const a=this._nonce,r=this.shadowRoot,s=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(r);let i=null;for(let l=t.length-1;l>=0;l--){const c=document.createElement("style");a&&c.setAttribute("nonce",a),c.textContent=t[l],r.insertBefore(c,i||s),i=c,l===0&&(n||this._styleAnchors.set(this._def,c),o&&this._styleAnchors.set(o,c))}}_getStyleAnchor(t){if(!t)return null;const o=this._styleAnchors.get(t);return o&&o.parentNode===this.shadowRoot?o:(o&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let o=0;o<t.childNodes.length;o++){const n=t.childNodes[o];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){const t=this._slots={};let o;for(;o=this.firstChild;){const n=o.nodeType===1&&o.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(o),this.removeChild(o)}}_renderSlots(){const t=this._getSlots(),o=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const a=t[n],r=a.getAttribute("name")||"default",s=this._slots[r],i=a.parentNode;if(s)for(const l of s){if(o&&l.nodeType===1){const c=o+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let f;for(;f=u.nextNode();)f.setAttribute(c,"")}i.insertBefore(l,a)}else for(;a.firstChild;)i.insertBefore(a.firstChild,a);i.removeChild(a)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const o=new Set;for(const n of t){const a=n.querySelectorAll("slot");for(let r=0;r<a.length;r++)o.add(a[r])}return Array.from(o)}_injectChildStyle(t,o){this._applyStyles(t.styles,t,o)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}const vp=["ctrl","shift","alt","meta"],wp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>vp.some(o=>e[`${o}Key`]&&!t.includes(o))},Et=(e,t)=>{if(!e)return e;const o=e._withMods||(e._withMods={}),n=t.join(".");return o[n]||(o[n]=(a,...r)=>{for(let s=0;s<t.length;s++){const i=wp[t[s]];if(i&&i(a,t))return}return e(a,...r)})},kp=qe({patchProp:hp},Qd);let Gi;function ji(){return Gi||(Gi=Pd(kp))}const Sp=(...e)=>{ji().render(...e)},Ki=(...e)=>{const t=ji().createApp(...e),{mount:o}=t;return t.mount=n=>{const a=xp(n);if(!a)return;const r=t._component;!Se(r)&&!r.render&&!r.template&&(r.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const s=o(a,!1,Ap(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t};function Ap(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xp(e){return je(e)?document.querySelector(e):e}/*!
* pinia v2.3.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Hi;const ca=e=>Hi=e,zi=Symbol();function mr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var xn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(xn||(xn={}));function Lp(){const e=Ia(!0),t=e.run(()=>me({}));let o=[],n=[];const a=cn({install(r){ca(a),a._a=r,r.provide(zi,a),r.config.globalProperties.$pinia=a,n.forEach(s=>o.push(s)),n=[]},use(r){return this._a?o.push(r):n.push(r),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return a}const Vi=()=>{};function Wi(e,t,o,n=Vi){e.push(t);const a=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),n())};return!o&&ls()&&lu(a),a}function jo(e,...t){e.slice().forEach(o=>{o(...t)})}const Tp=e=>e(),Yi=Symbol(),br=Symbol();function yr(e,t){e instanceof Map&&t instanceof Map?t.forEach((o,n)=>e.set(n,o)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const n=t[o],a=e[o];mr(a)&&mr(n)&&e.hasOwnProperty(o)&&!Ke(n)&&!Vt(n)?e[o]=yr(a,n):e[o]=n}return e}const Ep=Symbol();function Cp(e){return!mr(e)||!e.hasOwnProperty(Ep)}const{assign:so}=Object;function $p(e){return!!(Ke(e)&&e.effect)}function Pp(e,t,o,n){const{state:a,actions:r,getters:s}=t,i=o.state.value[e];let l;function c(){i||(o.state.value[e]=a?a():{});const u=$u(o.state.value[e]);return so(u,r,Object.keys(s||{}).reduce((f,v)=>(f[v]=cn(Q(()=>{ca(o);const x=o._s.get(e);return s[v].call(x,x)})),f),{}))}return l=qi(e,c,t,o,n,!0),l}function qi(e,t,o={},n,a,r){let s;const i=so({actions:{}},o),l={deep:!0};let c,u,f=[],v=[],x;const T=n.state.value[e];!r&&!T&&(n.state.value[e]={});let w;function E($){let m;c=u=!1,typeof $=="function"?($(n.state.value[e]),m={type:xn.patchFunction,storeId:e,events:x}):(yr(n.state.value[e],$),m={type:xn.patchObject,payload:$,storeId:e,events:x});const U=w=Symbol();Wa().then(()=>{w===U&&(c=!0)}),u=!0,jo(f,m,n.state.value[e])}const _=r?function(){const{state:m}=o,U=m?m():{};this.$patch(H=>{so(H,U)})}:Vi;function S(){s.stop(),f=[],v=[],n._s.delete(e)}const g=($,m="")=>{if(Yi in $)return $[br]=m,$;const U=function(){ca(n);const H=Array.from(arguments),I=[],W=[];function ue(j){I.push(j)}function C(j){W.push(j)}jo(v,{args:H,name:U[br],store:A,after:ue,onError:C});let M;try{M=$.apply(this&&this.$id===e?this:A,H)}catch(j){throw jo(W,j),j}return M instanceof Promise?M.then(j=>(jo(I,j),j)).catch(j=>(jo(W,j),Promise.reject(j))):(jo(I,M),M)};return U[Yi]=!0,U[br]=m,U},k={_p:n,$id:e,$onAction:Wi.bind(null,v),$patch:E,$reset:_,$subscribe($,m={}){const U=Wi(f,$,m.detached,()=>H()),H=s.run(()=>Ye(()=>n.state.value[e],I=>{(m.flush==="sync"?u:c)&&$({storeId:e,type:xn.direct,events:x},I)},so({},l,m)));return U},$dispose:S},A=Io(k);n._s.set(e,A);const O=(n._a&&n._a.runWithContext||Tp)(()=>n._e.run(()=>(s=Ia()).run(()=>t({action:g}))));for(const $ in O){const m=O[$];if(Ke(m)&&!$p(m)||Vt(m))r||(T&&Cp(m)&&(Ke(m)?m.value=T[$]:yr(m,T[$])),n.state.value[e][$]=m);else if(typeof m=="function"){const U=g(m,$);O[$]=U,i.actions[$]=m}}return so(A,O),so(Ce(A),O),Object.defineProperty(A,"$state",{get:()=>n.state.value[e],set:$=>{E(m=>{so(m,$)})}}),n._p.forEach($=>{so(A,s.run(()=>$({store:A,app:n._a,pinia:n,options:i})))}),T&&r&&o.hydrate&&o.hydrate(A.$state,T),c=!0,u=!0,A}/*! #__NO_SIDE_EFFECTS__ */function _r(e,t,o){let n,a;const r=typeof t=="function";typeof e=="string"?(n=e,a=r?o:t):(a=e,n=e.id);function s(i,l){const c=zu();return i=i||(c?$e(zi,null):null),i&&ca(i),i=Hi,i._s.has(n)||(r?qi(n,t,a,i):Pp(n,a,i)),i._s.get(n)}return s.$id=n,s}let Mp=0;const Ip=_r("ui",{state:()=>({_storeInstanceId:++Mp,theme:"light",colorScheme:"default",reducedMotion:!1,highContrast:!1,activeTab:"doxa-regions",sidebarCollapsed:!1,mobileMenuOpen:!1,legendState:"collapsed",_customLegendHeight:null,searchMode:!1,hamburgerMenuOpen:!1,legendMode:"prayer",prayerFilter:null,engagementFilter:null,adoptionFilter:null,religionFilter:null,selectedPeopleGroup:null,breakpoint:"desktop",windowSize:{width:window.innerWidth,height:window.innerHeight},toasts:[],nextToastId:1,toastDuration:5e3,openModals:[],modalData:new Map,isGlobalLoading:!1,globalLoadingMessage:"Loading...",loadingStates:new Map,interactionHistory:[],maxHistoryLength:20,keyboardShortcutsEnabled:!0,screenReaderAnnouncement:"",focusTrapActive:!1,debugMode:!1,showPerformanceOverlay:!1}),getters:{isDarkTheme:e=>e.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:e.theme==="dark",isMobile:e=>e.breakpoint==="mobile",isTablet:e=>e.breakpoint==="tablet",isDesktop:e=>e.breakpoint==="desktop"||e.breakpoint==="wide",legendHeight:e=>e._customLegendHeight?e._customLegendHeight:e.legendState==="collapsed"?"48px":e.legendState==="open"?"30%":e.legendState==="fullyOpen"?"calc(100% - 80px)":"48px",caretRotation:e=>e.legendState==="collapsed"?0:90,showPullTab:e=>e.legendState==="open"||e.legendState==="fullyOpen",getToastsByType:e=>t=>e.toasts.filter(o=>o.type===t),hasOpenModal:e=>e.openModals.length>0,topModal:e=>e.openModals.length===0?null:e.openModals[e.openModals.length-1],isModalOpen:e=>t=>e.openModals.includes(t),isAnyLoading:e=>e.isGlobalLoading||e.loadingStates.size>0,isLoading:e=>t=>e.loadingStates.get(t)||!1},actions:{setTheme(e){if(!["light","dark","auto"].includes(e))return;this.theme=e;const o=this.isDarkTheme;document.documentElement.setAttribute("data-theme",o?"dark":"light"),localStorage.setItem("theme",e)},toggleTheme(){const e=this.theme==="light"?"dark":"light";this.setTheme(e)},setColorScheme(e){this.colorScheme=e,document.documentElement.setAttribute("data-color-scheme",e)},toggleReducedMotion(){this.reducedMotion=!this.reducedMotion,document.documentElement.setAttribute("data-reduced-motion",this.reducedMotion)},toggleHighContrast(){this.highContrast=!this.highContrast,document.documentElement.setAttribute("data-high-contrast",this.highContrast)},setActiveTab(e){this.activeTab=e,this.addToHistory({type:"tab-change",tabId:e,timestamp:Date.now()})},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},openMobileMenu(){this.mobileMenuOpen=!0},closeMobileMenu(){this.mobileMenuOpen=!1},setLegendMode(e){["prayer","detail"].includes(e)&&(this.legendMode=e)},setPrayerFilter(e){[null,"noPrayer","hasPrayer","fullPrayer"].includes(e)&&(this.prayerFilter=e)},setEngagementFilter(e){[null,"notEngaged","hasEngagement"].includes(e)&&(this.engagementFilter=e)},setAdoptionFilter(e){[null,"notAdopted","hasAdoption"].includes(e)&&(this.adoptionFilter=e)},setReligionFilter(e){[null,"C","M","H","B","E","J","S","N","O","U"].includes(e)&&(this.religionFilter=e)},selectPeopleGroup(e){this.selectedPeopleGroup=e,e?(this._legendStateBeforeDetail=this.legendState,this.legendState="open",this._customLegendHeight=null,this.setLegendMode("detail")):(this.legendState=this._legendStateBeforeDetail||"open",this._customLegendHeight=null,this.setLegendMode("prayer"))},setLegendState(e){["collapsed","open","fullyOpen"].includes(e)&&(this.legendState=e)},toggleSearchMode(){this.searchMode=!this.searchMode},setSearchMode(e){this.searchMode=e},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},updateBreakpoint(e){let t;e<768?t="mobile":e<1024?t="tablet":e<1920?t="desktop":t="wide",t!==this.breakpoint&&(this.breakpoint=t)},updateWindowSize(e,t){this.windowSize.width=e,this.windowSize.height=t,this.updateBreakpoint(e)},showToast(e){const{message:t,type:o="info",duration:n=this.toastDuration,action:a=null,persistent:r=!1}=e,s={id:this.nextToastId++,message:t,type:o,duration:n,action:a,persistent:r,createdAt:Date.now()};return this.toasts.push(s),!r&&n>0&&setTimeout(()=>{this.removeToast(s.id)},n),s.id},showSuccess(e,t={}){return this.showToast({message:e,type:"success",...t})},showError(e,t={}){return this.showToast({message:e,type:"error",duration:7e3,...t})},showWarning(e,t={}){return this.showToast({message:e,type:"warning",...t})},showInfo(e,t={}){return this.showToast({message:e,type:"info",...t})},removeToast(e){const t=this.toasts.findIndex(o=>o.id===e);t!==-1&&this.toasts.splice(t,1)},clearAllToasts(){this.toasts=[]},openModal(e,t={}){this.openModals.includes(e)||(this.openModals.push(e),this.modalData.set(e,t),this.focusTrapActive=!0)},closeModal(e=null){if(e){const t=this.openModals.indexOf(e);t!==-1&&(this.openModals.splice(t,1),this.modalData.delete(e))}else{const t=this.openModals.pop();t&&this.modalData.delete(t)}this.openModals.length===0&&(this.focusTrapActive=!1)},closeAllModals(){this.openModals=[],this.modalData.clear(),this.focusTrapActive=!1},getModalData(e){return this.modalData.get(e)},showGlobalLoading(e="Loading..."){this.isGlobalLoading=!0,this.globalLoadingMessage=e},hideGlobalLoading(){this.isGlobalLoading=!1},setLoading(e,t=!0){t?this.loadingStates.set(e,!0):this.loadingStates.delete(e)},addToHistory(e){this.interactionHistory.push(e),this.interactionHistory.length>this.maxHistoryLength&&this.interactionHistory.shift()},clearHistory(){this.interactionHistory=[]},announce(e,t="polite"){this.screenReaderAnnouncement=e,setTimeout(()=>{this.screenReaderAnnouncement===e&&(this.screenReaderAnnouncement="")},1e3)},toggleKeyboardShortcuts(){this.keyboardShortcutsEnabled=!this.keyboardShortcutsEnabled},toggleDebugMode(){this.debugMode=!this.debugMode},togglePerformanceOverlay(){this.showPerformanceOverlay=!this.showPerformanceOverlay},toggleLegend(){this.legendState==="fullyOpen"?this.legendState="open":this.legendState==="open"?this.legendState="collapsed":this.legendState="open",this._customLegendHeight=null},openLegend(){this.legendState="open",this._customLegendHeight=null},fullyOpenLegend(){this.legendState="fullyOpen",this._customLegendHeight=null},collapseLegend(){this.legendState="collapsed",this._customLegendHeight=null},setLegendHeight(e){this._customLegendHeight=e},handleLegendItemClick(){this.legendState==="fullyOpen"&&(this.legendState="open")},enableSearchMode(){this.searchMode=!0},disableSearchMode(){this.searchMode=!1},toggleHamburgerMenu(){this.hamburgerMenuOpen=!this.hamburgerMenuOpen},openHamburgerMenu(){this.hamburgerMenuOpen=!0},closeHamburgerMenu(){this.hamburgerMenuOpen=!1},init(){const e=localStorage.getItem("theme");e&&this.setTheme(e),new ResizeObserver(o=>{for(const n of o)this.updateWindowSize(n.contentRect.width,n.contentRect.height)}).observe(document.documentElement),window.matchMedia&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>{this.theme==="auto"&&document.documentElement.setAttribute("data-theme",o.matches?"dark":"light")}),window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",o=>{this.reducedMotion=o.matches,document.documentElement.setAttribute("data-reduced-motion",o.matches)}))}}}),Np=_r("map",{state:()=>({maps:{},activeMapId:null,selectedRegion:null,selectedFamily:null,selectedAffinityBlock:null,selectedLanguage:null,selectedDialect:null,activeLegendTab:"family",selectedResource:null,selectedPeopleGroup:null,selectedPinIds:[],globalFilters:{},searchQuery:"",autoFly:{isActive:!1,speed:1,interval:5e3,currentIndex:0,items:[],timerId:null},guidedTour:{isActive:!1,currentStep:0,steps:[]},showClusters:!1,clusterMode:"region",clusterFilterProperty:null,clusterFilterValue:null,flySpeed:"normal",fullscreenMapId:null,preferences:{theme:"light",defaultMapStyle:"streets",enableAnimations:!0,autoSavePreferences:!0}}),getters:{getMapById:e=>t=>e.maps[t],activeMap:e=>e.activeMapId?e.maps[e.activeMapId]:null,hasMap:e=>t=>t in e.maps,allMapIds:e=>Object.keys(e.maps),hasSelection:e=>!!(e.selectedRegion||e.selectedFamily||e.selectedAffinityBlock||e.selectedPeopleGroup),isAutoFlying:e=>e.autoFly.isActive,isGuidedTourActive:e=>e.guidedTour.isActive,isMapFullscreen:e=>t=>e.fullscreenMapId===t},actions:{registerMap(e,t,o={}){let n=1.5;o.zoom!==void 0?n=o.zoom:t&&typeof t.getZoom=="function"&&(n=t.getZoom());let a=[0,0];if(o.center)a=o.center;else if(t&&typeof t.getCenter=="function"){const r=t.getCenter();r&&(a=[r.lng,r.lat])}this.maps[e]={instance:t,config:o,isReady:!1,zoom:n,center:a,registeredAt:Date.now()},this.activeMapId||(this.activeMapId=e)},setMapReady(e){const t=this.maps[e];t&&(t.isReady=!0)},updateMapState(e,t){const o=this.maps[e];o&&Object.assign(o,t)},unregisterMap(e){if(delete this.maps[e],this.activeMapId===e){const t=this.allMapIds;this.activeMapId=t.length>0?t[0]:null}},setActiveMap(e){e in this.maps&&(this.activeMapId=e)},selectRegion(e){this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedRegion=e},selectFamily(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedFamily=e},setActiveLegendTab(e){this.activeLegendTab=e},selectLanguage(e){this.selectedRegion=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedFamily=null,this.selectedDialect=null,this.selectedLanguage=e},selectDialect(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedDialect=e},selectAffinityBlock(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedPeopleGroup=null,this.selectedAffinityBlock=e},selectPeopleGroup(e){this.selectedPeopleGroup=e},selectResource(e){this.selectedRegion=null,this.selectedFamily=null,this.selectedAffinityBlock=null,this.selectedPeopleGroup=null,this.selectedResource===e?this.selectedResource=null:this.selectedResource=e},clearSelections(){this.selectedRegion=null,this.selectedFamily=null,this.selectedLanguage=null,this.selectedDialect=null,this.selectedAffinityBlock=null,this.selectedResource=null,this.selectedPeopleGroup=null,this.selectedPinIds=[],this.showClusters=!1,this.clusterMode="region"},setSelectedPinIds(e){this.selectedPinIds=e||[]},setFilter(e,t){this.globalFilters[e]=t},removeFilter(e){delete this.globalFilters[e]},clearFilters(){this.globalFilters={},this.searchQuery=""},setSearchQuery(e){this.searchQuery=e},startAutoFly(e,t=1){this.stopAutoFly(),this.autoFly.isActive=!0,this.autoFly.speed=t,this.autoFly.items=e,this.autoFly.currentIndex=0},stopAutoFly(){this.autoFly.timerId&&(clearInterval(this.autoFly.timerId),this.autoFly.timerId=null),this.autoFly.isActive=!1,this.autoFly.currentIndex=0},setAutoFlySpeed(e){this.autoFly.speed=Math.max(.5,Math.min(2,e))},nextAutoFlyItem(){if(!this.autoFly.isActive||this.autoFly.items.length===0)return;this.autoFly.currentIndex=(this.autoFly.currentIndex+1)%this.autoFly.items.length;const e=this.autoFly.items[this.autoFly.currentIndex];e.type==="region"?this.selectRegion(e):e.type==="family"&&this.selectFamily(e)},toggleClusters(e){typeof e=="boolean"?this.showClusters=e:this.showClusters=!this.showClusters},setClusterMode(e){["region","language-family","affinity-block","mst","resource"].includes(e)&&(this.clusterMode=e)},setClusterFilter(e,t){this.clusterFilterProperty=e||null,this.clusterFilterValue=t||null},clearClusterFilter(){this.clusterFilterProperty=null,this.clusterFilterValue=null},setFlySpeed(e){["slow","normal","fast"].includes(e)&&(this.flySpeed=e)},setSelectedFamily(e){this.selectFamily(e)},clearSelectedFamily(){this.selectFamily(null)},setSelectedRegion(e){this.selectRegion(e)},clearSelectedRegion(){this.selectRegion(null)},clearSelectedResource(){this.selectResource(null)},clearSelectedLanguage(){this.selectLanguage(null)},clearSelectedDialect(){this.selectDialect(null)},toggleFullscreen(e){this.fullscreenMapId===e?this.fullscreenMapId=null:this.fullscreenMapId=e},loadPreferences(){try{const e=localStorage.getItem("mapUserPreferences");if(e){const t=JSON.parse(e);this.preferences={...this.preferences,...t}}}catch(e){console.error("[mapStore] Failed to load preferences:",e)}},savePreferences(){try{localStorage.setItem("mapUserPreferences",JSON.stringify(this.preferences))}catch(e){console.error("[mapStore] Failed to save preferences:",e)}},setPreference(e,t){this.preferences[e]=t,this.preferences.autoSavePreferences&&this.savePreferences()}}}),Fp=_r("data",{state:()=>({sources:{},loadingStates:{}}),actions:{async load(e,t){if(!this.sources[e]){this.loadingStates[e]={isLoading:!0,error:null};try{const o=await t();this.sources[e]=cn({features:o,timestamp:Date.now()}),this.loadingStates[e]={isLoading:!1,error:null}}catch(o){console.error(`[dataStore] Failed to load source "${e}":`,o),this.loadingStates[e]={isLoading:!1,error:o}}}},clearSource(e){delete this.sources[e],delete this.loadingStates[e]},cacheSourceData(e,t){this.sources[e]=cn({features:t.normalizedData||[],timestamp:t.timestamp||Date.now()})},hasSourceData(e){return!!this.sources[e]},getSourceData(e){return this.sources[e]?{normalizedData:this.sources[e].features}:null}},getters:{getData:e=>t=>{var o;return((o=e.sources[t])==null?void 0:o.features)??null},isLoading:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.isLoading)??!1},getError:e=>t=>{var o;return((o=e.loadingStates[t])==null?void 0:o.error)??null}}}),Ao=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o},Rp={class:"profile-loader"},Dp={key:0,class:"profile-error"},Op={key:1,class:"profile-error"},Bp=Ao({__name:"ProfileLoader",props:{profileConfig:{type:String,default:""}},setup(e){const t=e,o=Q(()=>{if(!t.profileConfig)return null;try{return JSON.parse(t.profileConfig)}catch{return console.error("[ProfileLoader] Invalid profile-config JSON:",t.profileConfig),null}}),n=Q(()=>{var x;return((x=o.value)==null?void 0:x.profile)||null}),a=Q(()=>{var x;return((x=o.value)==null?void 0:x.tk)||""}),r=Q(()=>{var x;return((x=o.value)==null?void 0:x.dataSource)||"doxa-csv"}),s=Q(()=>{var x;return((x=o.value)==null?void 0:x.colorSet)||"default"}),i=Q(()=>{var x;return((x=o.value)==null?void 0:x.instanceId)||"doxa-map-"+Math.random().toString(36).slice(2,9)}),l=$e("profileModules",null);if(!l)throw new Error('[ProfileLoader] No profileModules provided. Bundle entry must `app.provide("profileModules", import.meta.glob("./profiles/*.vue"))`');const c=Q(()=>{if(!n.value)return null;const x=`./profiles/${n.value}.vue`;return l[x]?Za(l[x]):(console.error(`[ProfileLoader] Profile not found: "${n.value}". Available:`,Object.keys(l)),null)});wt("mapboxToken",a),wt("dataSource",r),wt("colorSet",s),wt("profileConfig",o),wt("instanceId",i);const u=Ip(),f=Np(),v=Fp();return wt("uiStore",u),wt("mapStore",f),wt("dataStore",v),(x,T)=>(J(),ne("div",Rp,[o.value?c.value?(J(),Je(ld(c.value),{key:2})):(J(),ne("div",Op,[G("p",null,[T[1]||(T[1]=ht("⚠️ Profile ",-1)),G("strong",null,'"'+ye(n.value)+'"',1),T[2]||(T[2]=ht(" not found.",-1))])])):(J(),ne("div",Dp,[...T[0]||(T[0]=[G("p",null,[ht("⚠️ "),G("strong",null,"doxa-map"),ht(": missing or invalid "),G("code",null,"profile-config"),ht(" prop.")],-1),G("p",null,[ht("Example: "),G("code",null,`profile-config='{"profile":"example-map","tk":"pk.eyJ..."}'`)],-1)])]))]))}},[["__scopeId","data-v-858dd5a1"]]),Up={backToLegend:"العودة إلى المفتاح",closeDetailView:"إغلاق عرض التفاصيل"},Gp={prayForThem:"صلِّ من أجلهم",adoptThem:"تبنَّهم",moreInfo:"مزيد من المعلومات",zoomIn:"تكبير",zoomOut:"تصغير",switchToLightMode:"التبديل إلى الوضع الفاتح",switchToDarkMode:"التبديل إلى الوضع الداكن",resetView:"إعادة تعيين العرض",toggleFullscreen:"تبديل ملء الشاشة",aboutThisMap:"حول هذه الخريطة",closeMenu:"إغلاق القائمة",reloadMap:"إعادة تحميل الخريطة",showClusters:"إظهار المجموعات",clusterSettings:"إعدادات المجموعات",startAutoFly:"بدء الطيران التلقائي",stopFlight:"إيقاف الطيران",speedLabel:"السرعة:",speedOption:{slow:"بطيء",normal:"عادي",fast:"سريع"},shareEmbed:"مشاركة وتضمين"},jp={labels:{country:"الدولة:",population:"السكان:",language:"اللغة:",religion:"الديانة:",languageFamily:"العائلة اللغوية:"},messages:{noDescription:"لا يوجد وصف متاح."}},Kp={title:{prayer:"تقدم الصلاة",engagement:"تقدم الانخراط",adoption:"تقدم التبني",languageFamilies:"العائلات اللغوية",doxaRegions:"مناطق Doxa",affinityBlocs:"كتل القرابة",gospelResources:"موارد الإنجيل"},header:{collapsed:"وسيلة الإيضاح",peopleGroupFallback:"مجموعة الشعب"},prayer:{needsPrayer:"يحتاج إلى صلاة",hasPrayer:"لديه صلاة",fullPrayerCoverage:"تغطية صلاة كاملة"},engagement:{needsEngagement:"يحتاج إلى انخراط",hasEngagement:"لديه انخراط"},adoption:{needsAdoption:"يحتاج إلى تبني",hasAdoption:"لديه تبني"},columns:{upgs:"UUPGs",population:"السكان"},footer:{total:"الإجمالي"}},Hp={menuComingSoon:"القائمة قادمة قريباً"},zp={clusterByRegion:"حسب منطقة Doxa",clusterByLanguageFamily:"حسب العائلة اللغوية",clusterByGospelResource:"حسب مورد الإنجيل"},Vp={header:"دورة الصلاة الحالية",lap:"الدورة",upgs:"UUPGs",separator:" من "},Wp={placeholder:"شعب، مكان، لغة، ديانة",labels:{people:"الشعب:",place:"المكان:",language:"اللغة:",religion:"الديانة:"}},Yp={backToLegend:"Zurück zur Legende",closeDetailView:"Detailansicht schließen"},qp={prayForThem:"Für sie beten",adoptThem:"Sie adoptieren",moreInfo:"Mehr Infos",zoomIn:"Vergrößern",zoomOut:"Verkleinern",switchToLightMode:"Zum hellen Modus wechseln",switchToDarkMode:"Zum dunklen Modus wechseln",resetView:"Ansicht zurücksetzen",toggleFullscreen:"Vollbild umschalten",aboutThisMap:"Über diese Karte",closeMenu:"Menü schließen",reloadMap:"Karte neu laden",showClusters:"Cluster anzeigen",clusterSettings:"Cluster-Einstellungen",startAutoFly:"Auto-Flug starten",stopFlight:"Flug stoppen",speedLabel:"Geschwindigkeit:",speedOption:{slow:"Langsam",normal:"Normal",fast:"Schnell"},shareEmbed:"Teilen und einbetten"},Jp={labels:{country:"Land:",population:"Bevölkerung:",language:"Sprache:",religion:"Religion:",languageFamily:"Sprachfamilie:"},messages:{noDescription:"Keine Beschreibung verfügbar."}},Xp={title:{prayer:"Gebetsfortschritt",engagement:"Engagement-Fortschritt",adoption:"Adoptionsfortschritt",languageFamilies:"Sprachfamilien",doxaRegions:"Doxa-Regionen",affinityBlocs:"Affinitätsblöcke",gospelResources:"Evangeliumsressourcen"},header:{collapsed:"Legende",peopleGroupFallback:"Volksgruppe"},prayer:{needsPrayer:"Braucht Gebet",hasPrayer:"Hat Gebet",fullPrayerCoverage:"Vollständige Gebetsabdeckung"},engagement:{needsEngagement:"Braucht Engagement",hasEngagement:"Hat Engagement"},adoption:{needsAdoption:"Braucht Adoption",hasAdoption:"Hat Adoption"},columns:{upgs:"UUPGs",population:"Bevölkerung"},footer:{total:"Gesamt"}},Zp={menuComingSoon:"Menü folgt in Kürze"},Qp={clusterByRegion:"Nach Doxa-Region",clusterByLanguageFamily:"Nach Sprachfamilie",clusterByGospelResource:"Nach Evangeliumsressource"},eg={header:"AKTUELLE GEBETSRUNDE",lap:"Runde",upgs:"UUPGs",separator:" von "},tg={placeholder:"Volk, Ort, Sprache, Religion",labels:{people:"Volk:",place:"Ort:",language:"Sprache:",religion:"Religion:"}},og={backToLegend:"Back to Legend",closeDetailView:"Close detail view"},ng={prayForThem:"Pray for them",adoptThem:"Adopt",moreInfo:"More info",zoomIn:"Zoom in",zoomOut:"Zoom out",switchToLightMode:"Switch to light mode",switchToDarkMode:"Switch to dark mode",resetView:"Reset view",toggleFullscreen:"Toggle fullscreen",aboutThisMap:"About this map",closeMenu:"Close menu",reloadMap:"Reload Map",showClusters:"Show Clusters",clusterSettings:"Cluster Settings",startAutoFly:"Start Auto Fly",stopFlight:"Stop Flight",speedLabel:"Speed:",speedOption:{slow:"Slow",normal:"Normal",fast:"Fast"},shareEmbed:"Share & embed"},ag={labels:{country:"Country:",population:"Population:",language:"Language:",religion:"Religion:",languageFamily:"Language Family:"},messages:{noDescription:"No description available."}},rg={title:{prayer:"Prayer Progress",engagement:"Engagement Progress",adoption:"Adoption Progress",languageFamilies:"Language Families",doxaRegions:"Doxa Regions",affinityBlocs:"Affinity Blocs",gospelResources:"Gospel Resources"},header:{default:"Legend",collapsed:"Legend",peopleGroupFallback:"People Group"},prayer:{needsPrayer:"Needs Prayer",hasPrayer:"Has Prayer",fullPrayerCoverage:"Full Prayer Coverage"},engagement:{needsEngagement:"Unengaged",hasEngagement:"Engaged"},adoption:{needsAdoption:"Needs Adoption",hasAdoption:"Has Adoption"},columns:{upgs:"UUPGs",population:"Population"},footer:{total:"Total"}},sg={menuComingSoon:"Menu coming soon"},ig={clusterByRegion:"By Doxa Region",clusterByLanguageFamily:"By Language Family",clusterByGospelResource:"By Gospel Resource"},lg={header:"CURRENT PRAYER LAP",lap:"Lap",upgs:"UUPGs",separator:" of "},cg={placeholder:"People, place, language, religion",labels:{people:"People:",place:"Place:",language:"Language:",religion:"Religion:"}},ug={backToLegend:"Volver a la leyenda",closeDetailView:"Cerrar vista de detalle"},dg={prayForThem:"Ora por ellos",adoptThem:"Adóptalos",moreInfo:"Más información",zoomIn:"Acercar",zoomOut:"Alejar",switchToLightMode:"Cambiar a modo claro",switchToDarkMode:"Cambiar a modo oscuro",resetView:"Restablecer vista",toggleFullscreen:"Alternar pantalla completa",aboutThisMap:"Acerca de este mapa",closeMenu:"Cerrar menú",reloadMap:"Recargar mapa",showClusters:"Mostrar clústeres",clusterSettings:"Ajustes de clústeres",startAutoFly:"Iniciar vuelo automático",stopFlight:"Detener vuelo",speedLabel:"Velocidad:",speedOption:{slow:"Lenta",normal:"Normal",fast:"Rápida"},shareEmbed:"Compartir e incrustar"},pg={labels:{country:"País:",population:"Población:",language:"Idioma:",religion:"Religión:",languageFamily:"Familia lingüística:"},messages:{noDescription:"No hay descripción disponible."}},gg={title:{prayer:"Progreso de oración",engagement:"Progreso de implicación",adoption:"Progreso de adopción",languageFamilies:"Familias lingüísticas",doxaRegions:"Regiones Doxa",affinityBlocs:"Bloques de afinidad",gospelResources:"Recursos del Evangelio"},header:{collapsed:"Leyenda",peopleGroupFallback:"Grupo de personas"},prayer:{needsPrayer:"Necesita oración",hasPrayer:"Tiene oración",fullPrayerCoverage:"Cobertura de oración completa"},engagement:{needsEngagement:"Necesita implicación",hasEngagement:"Tiene implicación"},adoption:{needsAdoption:"Necesita adopción",hasAdoption:"Tiene adopción"},columns:{upgs:"UUPGs",population:"Población"},footer:{total:"Total"}},fg={menuComingSoon:"Menú próximamente"},hg={clusterByRegion:"Por región Doxa",clusterByLanguageFamily:"Por familia lingüística",clusterByGospelResource:"Por recurso del Evangelio"},mg={header:"VUELTA DE ORACIÓN ACTUAL",lap:"Vuelta",upgs:"UUPGs",separator:" de "},bg={placeholder:"Pueblo, lugar, idioma, religión",labels:{people:"Pueblo:",place:"Lugar:",language:"Idioma:",religion:"Religión:"}},yg={backToLegend:"Retour à la légende",closeDetailView:"Fermer la vue détaillée"},_g={prayForThem:"Priez pour eux",adoptThem:"Adoptez-les",moreInfo:"Plus d'infos",zoomIn:"Zoom avant",zoomOut:"Zoom arrière",switchToLightMode:"Passer au mode clair",switchToDarkMode:"Passer au mode sombre",resetView:"Réinitialiser la vue",toggleFullscreen:"Basculer en plein écran",aboutThisMap:"À propos de cette carte",closeMenu:"Fermer le menu",reloadMap:"Recharger la carte",showClusters:"Afficher les clusters",clusterSettings:"Paramètres des clusters",startAutoFly:"Démarrer le vol auto",stopFlight:"Arrêter le vol",speedLabel:"Vitesse :",speedOption:{slow:"Lente",normal:"Normale",fast:"Rapide"},shareEmbed:"Partager et intégrer"},vg={labels:{country:"Pays :",population:"Population :",language:"Langue :",religion:"Religion :",languageFamily:"Famille de langues :"},messages:{noDescription:"Aucune description disponible."}},wg={title:{prayer:"Progression de la prière",engagement:"Progression de l'engagement",adoption:"Progression de l'adoption",languageFamilies:"Familles de langues",doxaRegions:"Régions Doxa",affinityBlocs:"Blocs d'affinité",gospelResources:"Ressources de l'Évangile"},header:{collapsed:"Légende",peopleGroupFallback:"Groupe de personnes"},prayer:{needsPrayer:"Besoin de prière",hasPrayer:"Prière en cours",fullPrayerCoverage:"Couverture de prière complète"},engagement:{needsEngagement:"Besoin d'engagement",hasEngagement:"Engagement en cours"},adoption:{needsAdoption:"Besoin d'adoption",hasAdoption:"Adoption en cours"},columns:{upgs:"UUPGs",population:"Population"},footer:{total:"Total"}},kg={menuComingSoon:"Menu bientôt disponible"},Sg={clusterByRegion:"Par région Doxa",clusterByLanguageFamily:"Par famille de langues",clusterByGospelResource:"Par ressource de l'Évangile"},Ag={header:"TOUR DE PRIÈRE ACTUEL",lap:"Tour",upgs:"UUPGs",separator:" sur "},xg={placeholder:"Peuple, lieu, langue, religion",labels:{people:"Peuple :",place:"Lieu :",language:"Langue :",religion:"Religion :"}},Lg={backToLegend:"लेजेंड पर वापस जाएं",closeDetailView:"विवरण दृश्य बंद करें"},Tg={prayForThem:"उनके लिए प्रार्थना करें",adoptThem:"उन्हें गोद लें",moreInfo:"अधिक जानकारी",zoomIn:"ज़ूम इन",zoomOut:"ज़ूम आउट",switchToLightMode:"लाइट मोड पर जाएं",switchToDarkMode:"डार्क मोड पर जाएं",resetView:"दृश्य रीसेट करें",toggleFullscreen:"फ़ुलस्क्रीन टॉगल करें",aboutThisMap:"इस मानचित्र के बारे में",closeMenu:"मेनू बंद करें",reloadMap:"मानचित्र पुनः लोड करें",showClusters:"क्लस्टर दिखाएं",clusterSettings:"क्लस्टर सेटिंग्स",startAutoFly:"ऑटो फ्लाई शुरू करें",stopFlight:"उड़ान रोकें",speedLabel:"गति:",speedOption:{slow:"धीमी",normal:"सामान्य",fast:"तेज़"},shareEmbed:"साझा करें और एम्बेड करें"},Eg={labels:{country:"देश:",population:"जनसंख्या:",language:"भाषा:",religion:"धर्म:",languageFamily:"भाषा परिवार:"},messages:{noDescription:"कोई विवरण उपलब्ध नहीं है।"}},Cg={title:{prayer:"प्रार्थना प्रगति",engagement:"सहभागिता प्रगति",adoption:"गोद लेने की प्रगति",languageFamilies:"भाषा परिवार",doxaRegions:"Doxa क्षेत्र",affinityBlocs:"समानता समूह",gospelResources:"सुसमाचार संसाधन"},header:{collapsed:"किंवदंती",peopleGroupFallback:"जनजाति समूह"},prayer:{needsPrayer:"प्रार्थना चाहिए",hasPrayer:"प्रार्थना है",fullPrayerCoverage:"पूर्ण प्रार्थना कवरेज"},engagement:{needsEngagement:"सहभागिता चाहिए",hasEngagement:"सहभागिता है"},adoption:{needsAdoption:"गोद लेना चाहिए",hasAdoption:"गोद लिया गया"},columns:{upgs:"UUPGs",population:"जनसंख्या"},footer:{total:"कुल"}},$g={menuComingSoon:"मेनू शीघ्र आ रहा है"},Pg={clusterByRegion:"Doxa क्षेत्र के अनुसार",clusterByLanguageFamily:"भाषा परिवार के अनुसार",clusterByGospelResource:"सुसमाचार संसाधन के अनुसार"},Mg={header:"वर्तमान प्रार्थना चक्र",lap:"चक्र",upgs:"UUPGs",separator:" में से "},Ig={placeholder:"लोग, स्थान, भाषा, धर्म",labels:{people:"लोग:",place:"स्थान:",language:"भाषा:",religion:"धर्म:"}},Ng={backToLegend:"Torna alla legenda",closeDetailView:"Chiudi vista dettaglio"},Fg={prayForThem:"Prega per loro",adoptThem:"Adottali",moreInfo:"Più informazioni",zoomIn:"Ingrandisci",zoomOut:"Riduci",switchToLightMode:"Passa alla modalità chiara",switchToDarkMode:"Passa alla modalità scura",resetView:"Reimposta vista",toggleFullscreen:"Attiva/disattiva schermo intero",aboutThisMap:"Informazioni su questa mappa",closeMenu:"Chiudi menu",reloadMap:"Ricarica mappa",showClusters:"Mostra cluster",clusterSettings:"Impostazioni cluster",startAutoFly:"Avvia volo automatico",stopFlight:"Ferma volo",speedLabel:"Velocità:",speedOption:{slow:"Lenta",normal:"Normale",fast:"Veloce"},shareEmbed:"Condividi e incorpora"},Rg={labels:{country:"Paese:",population:"Popolazione:",language:"Lingua:",religion:"Religione:",languageFamily:"Famiglia linguistica:"},messages:{noDescription:"Nessuna descrizione disponibile."}},Dg={title:{prayer:"Avanzamento della preghiera",engagement:"Avanzamento dell'impegno",adoption:"Avanzamento dell'adozione",languageFamilies:"Famiglie linguistiche",doxaRegions:"Regioni Doxa",affinityBlocs:"Blocchi di affinità",gospelResources:"Risorse del Vangelo"},header:{collapsed:"Legenda",peopleGroupFallback:"Gruppo di persone"},prayer:{needsPrayer:"Necessita preghiera",hasPrayer:"Ha preghiera",fullPrayerCoverage:"Copertura di preghiera completa"},engagement:{needsEngagement:"Necessita impegno",hasEngagement:"Ha impegno"},adoption:{needsAdoption:"Necessita adozione",hasAdoption:"Ha adozione"},columns:{upgs:"UUPGs",population:"Popolazione"},footer:{total:"Totale"}},Og={menuComingSoon:"Menu in arrivo"},Bg={clusterByRegion:"Per regione Doxa",clusterByLanguageFamily:"Per famiglia linguistica",clusterByGospelResource:"Per risorsa del Vangelo"},Ug={header:"GIRO DI PREGHIERA ATTUALE",lap:"Giro",upgs:"UUPGs",separator:" di "},Gg={placeholder:"Popolo, luogo, lingua, religione",labels:{people:"Popolo:",place:"Luogo:",language:"Lingua:",religion:"Religione:"}},jg={backToLegend:"Voltar à legenda",closeDetailView:"Fechar vista de detalhe"},Kg={prayForThem:"Ore por eles",adoptThem:"Adote-os",moreInfo:"Mais informações",zoomIn:"Ampliar",zoomOut:"Reduzir",switchToLightMode:"Mudar para modo claro",switchToDarkMode:"Mudar para modo escuro",resetView:"Repor vista",toggleFullscreen:"Alternar ecrã inteiro",aboutThisMap:"Sobre este mapa",closeMenu:"Fechar menu",reloadMap:"Recarregar mapa",showClusters:"Mostrar clusters",clusterSettings:"Definições de clusters",startAutoFly:"Iniciar voo automático",stopFlight:"Parar voo",speedLabel:"Velocidade:",speedOption:{slow:"Lenta",normal:"Normal",fast:"Rápida"},shareEmbed:"Partilhar e incorporar"},Hg={labels:{country:"País:",population:"População:",language:"Língua:",religion:"Religião:",languageFamily:"Família linguística:"},messages:{noDescription:"Sem descrição disponível."}},zg={title:{prayer:"Progresso da oração",engagement:"Progresso do envolvimento",adoption:"Progresso da adoção",languageFamilies:"Famílias linguísticas",doxaRegions:"Regiões Doxa",affinityBlocs:"Blocos de afinidade",gospelResources:"Recursos do Evangelho"},header:{collapsed:"Legenda",peopleGroupFallback:"Grupo de pessoas"},prayer:{needsPrayer:"Precisa de oração",hasPrayer:"Tem oração",fullPrayerCoverage:"Cobertura de oração completa"},engagement:{needsEngagement:"Precisa de envolvimento",hasEngagement:"Tem envolvimento"},adoption:{needsAdoption:"Precisa de adoção",hasAdoption:"Tem adoção"},columns:{upgs:"UUPGs",population:"População"},footer:{total:"Total"}},Vg={menuComingSoon:"Menu em breve"},Wg={clusterByRegion:"Por região Doxa",clusterByLanguageFamily:"Por família linguística",clusterByGospelResource:"Por recurso do Evangelho"},Yg={header:"VOLTA DE ORAÇÃO ATUAL",lap:"Volta",upgs:"UUPGs",separator:" de "},qg={placeholder:"Povo, local, língua, religião",labels:{people:"Povo:",place:"Local:",language:"Língua:",religion:"Religião:"}},Jg={backToLegend:"Înapoi la legendă",closeDetailView:"Închide vizualizarea detaliată"},Xg={prayForThem:"Roagă-te pentru ei",adoptThem:"Adoptă-i",moreInfo:"Mai multe informații",zoomIn:"Mărește",zoomOut:"Micșorează",switchToLightMode:"Comută la modul luminos",switchToDarkMode:"Comută la modul întunecat",resetView:"Resetează vizualizarea",toggleFullscreen:"Comută ecran complet",aboutThisMap:"Despre această hartă",closeMenu:"Închide meniul",reloadMap:"Reîncarcă harta",showClusters:"Arată clusterele",clusterSettings:"Setări clustere",startAutoFly:"Pornește zborul automat",stopFlight:"Oprește zborul",speedLabel:"Viteză:",speedOption:{slow:"Lent",normal:"Normal",fast:"Rapid"},shareEmbed:"Partajează și încorporează"},Zg={labels:{country:"Țară:",population:"Populație:",language:"Limbă:",religion:"Religie:",languageFamily:"Familie de limbi:"},messages:{noDescription:"Nicio descriere disponibilă."}},Qg={title:{prayer:"Progresul rugăciunii",engagement:"Progresul implicării",adoption:"Progresul adopției",languageFamilies:"Familii de limbi",doxaRegions:"Regiuni Doxa",affinityBlocs:"Blocuri de afinitate",gospelResources:"Resurse ale Evangheliei"},header:{collapsed:"Legendă",peopleGroupFallback:"Grup de popoare"},prayer:{needsPrayer:"Necesită rugăciune",hasPrayer:"Are rugăciune",fullPrayerCoverage:"Acoperire completă de rugăciune"},engagement:{needsEngagement:"Necesită implicare",hasEngagement:"Are implicare"},adoption:{needsAdoption:"Necesită adopție",hasAdoption:"Are adopție"},columns:{upgs:"UUPGs",population:"Populație"},footer:{total:"Total"}},ef={menuComingSoon:"Meniu în curând"},tf={clusterByRegion:"După regiune Doxa",clusterByLanguageFamily:"După familia de limbi",clusterByGospelResource:"După resursa Evangheliei"},of={header:"TURUL DE RUGĂCIUNE CURENT",lap:"Tur",upgs:"UUPGs",separator:" din "},nf={placeholder:"Popor, loc, limbă, religie",labels:{people:"Popor:",place:"Loc:",language:"Limbă:",religion:"Religie:"}},af={backToLegend:"Назад к легенде",closeDetailView:"Закрыть подробный вид"},rf={prayForThem:"Молитесь о них",adoptThem:"Усыновите их",moreInfo:"Подробнее",zoomIn:"Приблизить",zoomOut:"Отдалить",switchToLightMode:"Переключить на светлый режим",switchToDarkMode:"Переключить на тёмный режим",resetView:"Сбросить вид",toggleFullscreen:"Полноэкранный режим",aboutThisMap:"Об этой карте",closeMenu:"Закрыть меню",reloadMap:"Перезагрузить карту",showClusters:"Показать кластеры",clusterSettings:"Настройки кластеров",startAutoFly:"Начать авто-полёт",stopFlight:"Остановить полёт",speedLabel:"Скорость:",speedOption:{slow:"Медленно",normal:"Нормально",fast:"Быстро"},shareEmbed:"Поделиться и встроить"},sf={labels:{country:"Страна:",population:"Население:",language:"Язык:",religion:"Религия:",languageFamily:"Языковая семья:"},messages:{noDescription:"Описание недоступно."}},lf={title:{prayer:"Прогресс молитвы",engagement:"Прогресс вовлечённости",adoption:"Прогресс усыновления",languageFamilies:"Языковые семьи",doxaRegions:"Регионы Doxa",affinityBlocs:"Блоки родства",gospelResources:"Евангельские ресурсы"},header:{collapsed:"Условные обозначения",peopleGroupFallback:"Народная группа"},prayer:{needsPrayer:"Нуждается в молитве",hasPrayer:"Есть молитва",fullPrayerCoverage:"Полное молитвенное покрытие"},engagement:{needsEngagement:"Нуждается в вовлечённости",hasEngagement:"Есть вовлечённость"},adoption:{needsAdoption:"Нуждается в усыновлении",hasAdoption:"Есть усыновление"},columns:{upgs:"UUPGs",population:"Население"},footer:{total:"Всего"}},cf={menuComingSoon:"Меню скоро появится"},uf={clusterByRegion:"По региону Doxa",clusterByLanguageFamily:"По языковой семье",clusterByGospelResource:"По евангельскому ресурсу"},df={header:"ТЕКУЩИЙ КРУГ МОЛИТВЫ",lap:"Круг",upgs:"UUPGs",separator:" из "},pf={placeholder:"Народ, место, язык, религия",labels:{people:"Народ:",place:"Место:",language:"Язык:",religion:"Религия:"}},gf={backToLegend:"返回图例",closeDetailView:"关闭详情视图"},ff={prayForThem:"为他们祷告",adoptThem:"认领他们",moreInfo:"更多信息",zoomIn:"放大",zoomOut:"缩小",switchToLightMode:"切换至浅色模式",switchToDarkMode:"切换至深色模式",resetView:"重置视图",toggleFullscreen:"切换全屏",aboutThisMap:"关于此地图",closeMenu:"关闭菜单",reloadMap:"重新加载地图",showClusters:"显示聚类",clusterSettings:"聚类设置",startAutoFly:"开始自动飞行",stopFlight:"停止飞行",speedLabel:"速度:",speedOption:{slow:"慢",normal:"正常",fast:"快"},shareEmbed:"分享与嵌入"},hf={labels:{country:"国家:",population:"人口:",language:"语言:",religion:"宗教:",languageFamily:"语系:"},messages:{noDescription:"暂无描述。"}},mf={title:{prayer:"祷告进度",engagement:"参与进度",adoption:"认领进度",languageFamilies:"语系",doxaRegions:"Doxa 区域",affinityBlocs:"亲缘板块",gospelResources:"福音资源"},header:{collapsed:"图例",peopleGroupFallback:"民族群体"},prayer:{needsPrayer:"需要祷告",hasPrayer:"已有祷告",fullPrayerCoverage:"全面祷告覆盖"},engagement:{needsEngagement:"需要参与",hasEngagement:"已有参与"},adoption:{needsAdoption:"需要认领",hasAdoption:"已有认领"},columns:{upgs:"UUPGs",population:"人口"},footer:{total:"总计"}},bf={menuComingSoon:"菜单即将推出"},yf={clusterByRegion:"按 Doxa 区域",clusterByLanguageFamily:"按语系",clusterByGospelResource:"按福音资源"},_f={header:"当前祷告轮次",lap:"第",upgs:"UUPGs",separator:" / "},vf={placeholder:"民族、地点、语言、宗教",labels:{people:"民族:",place:"地点:",language:"语言:",religion:"宗教:"}};/*!
* shared v9.14.5
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function wf(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const ua=typeof window<"u",io=(e,t=!1)=>t?Symbol.for(e):Symbol(e),kf=(e,t,o)=>Sf({l:e,k:t,s:o}),Sf=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Xe=e=>typeof e=="number"&&isFinite(e),Af=e=>el(e)==="[object Date]",lo=e=>el(e)==="[object RegExp]",da=e=>Le(e)&&Object.keys(e).length===0,it=Object.assign,xf=Object.create,Re=(e=null)=>xf(e);let Ji;const Qt=()=>Ji||(Ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Re());function Xi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function Zi(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Lf(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,a,r)=>`${a}="${Zi(r)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,a,r)=>`${a}='${Zi(r)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{e=e.replace(n,"$1javascript&#58;")}),e}const Tf=Object.prototype.hasOwnProperty;function Ct(e,t){return Tf.call(e,t)}const He=Array.isArray,Ge=e=>typeof e=="function",le=e=>typeof e=="string",Ee=e=>typeof e=="boolean",Pe=e=>e!==null&&typeof e=="object",Ef=e=>Pe(e)&&Ge(e.then)&&Ge(e.catch),Qi=Object.prototype.toString,el=e=>Qi.call(e),Le=e=>{if(!Pe(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},Cf=e=>e==null?"":He(e)||Le(e)&&e.toString===Qi?JSON.stringify(e,null,2):String(e);function $f(e,t=""){return e.reduce((o,n,a)=>a===0?o+n:o+t+n,"")}function pa(e){let t=e;return()=>++t}const ga=e=>!Pe(e)||He(e);function fa(e,t){if(ga(e)||ga(t))throw new Error("Invalid value");const o=[{src:e,des:t}];for(;o.length;){const{src:n,des:a}=o.pop();Object.keys(n).forEach(r=>{r!=="__proto__"&&(Pe(n[r])&&!Pe(a[r])&&(a[r]=Array.isArray(n[r])?[]:Re()),ga(a[r])||ga(n[r])?a[r]=n[r]:o.push({src:n[r],des:a[r]}))})}}/*!
* message-compiler v9.14.5
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function Pf(e,t,o){return{line:e,column:t,offset:o}}function ha(e,t,o){return{start:e,end:t}}const Mf=/\{([0-9a-zA-Z]+)\}/g;function tl(e,...t){return t.length===1&&If(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Mf,(o,n)=>t.hasOwnProperty(n)?t[n]:"")}const ol=Object.assign,nl=e=>typeof e=="string",If=e=>e!==null&&typeof e=="object";function al(e,t=""){return e.reduce((o,n,a)=>a===0?o+n:o+t+n,"")}const vr={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},Nf={[vr.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function Ff(e,t,...o){const n=tl(Nf[e],...o||[]),a={message:String(n),code:e};return t&&(a.location=t),a}const _e={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},Rf={[_e.EXPECTED_TOKEN]:"Expected token: '{0}'",[_e.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[_e.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[_e.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[_e.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[_e.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[_e.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[_e.EMPTY_PLACEHOLDER]:"Empty placeholder",[_e.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[_e.INVALID_LINKED_FORMAT]:"Invalid linked format",[_e.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[_e.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[_e.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[_e.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[_e.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[_e.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Ko(e,t,o={}){const{domain:n,messages:a,args:r}=o,s=tl((a||Rf)[e]||"",...r||[]),i=new SyntaxError(String(s));return i.code=e,t&&(i.location=t),i.domain=n,i}function Df(e){throw e}const eo=" ",Of="\r",pt=`
`,Bf="\u2028",Uf="\u2029";function Gf(e){const t=e;let o=0,n=1,a=1,r=0;const s=O=>t[O]===Of&&t[O+1]===pt,i=O=>t[O]===pt,l=O=>t[O]===Uf,c=O=>t[O]===Bf,u=O=>s(O)||i(O)||l(O)||c(O),f=()=>o,v=()=>n,x=()=>a,T=()=>r,w=O=>s(O)||l(O)||c(O)?pt:t[O],E=()=>w(o),_=()=>w(o+r);function S(){return r=0,u(o)&&(n++,a=0),s(o)&&o++,o++,a++,t[o]}function g(){return s(o+r)&&r++,r++,t[o+r]}function k(){o=0,n=1,a=1,r=0}function A(O=0){r=O}function L(){const O=o+r;for(;O!==o;)S();r=0}return{index:f,line:v,column:x,peekOffset:T,charAt:w,currentChar:E,currentPeek:_,next:S,peek:g,reset:k,resetPeek:A,skipToPeek:L}}const co=void 0,jf=".",rl="'",Kf="tokenizer";function Hf(e,t={}){const o=t.location!==!1,n=Gf(e),a=()=>n.index(),r=()=>Pf(n.line(),n.column(),n.index()),s=r(),i=a(),l={currentType:14,offset:i,startLoc:s,endLoc:s,lastType:14,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=t;function f(p,h,F,...K){const re=c();if(h.column+=F,h.offset+=F,u){const ee=o?ha(re.startLoc,h):null,R=Ko(p,ee,{domain:Kf,args:K});u(R)}}function v(p,h,F){p.endLoc=r(),p.currentType=h;const K={type:h};return o&&(K.loc=ha(p.startLoc,p.endLoc)),F!=null&&(K.value=F),K}const x=p=>v(p,14);function T(p,h){return p.currentChar()===h?(p.next(),h):(f(_e.EXPECTED_TOKEN,r(),0,h),"")}function w(p){let h="";for(;p.currentPeek()===eo||p.currentPeek()===pt;)h+=p.currentPeek(),p.peek();return h}function E(p){const h=w(p);return p.skipToPeek(),h}function _(p){if(p===co)return!1;const h=p.charCodeAt(0);return h>=97&&h<=122||h>=65&&h<=90||h===95}function S(p){if(p===co)return!1;const h=p.charCodeAt(0);return h>=48&&h<=57}function g(p,h){const{currentType:F}=h;if(F!==2)return!1;w(p);const K=_(p.currentPeek());return p.resetPeek(),K}function k(p,h){const{currentType:F}=h;if(F!==2)return!1;w(p);const K=p.currentPeek()==="-"?p.peek():p.currentPeek(),re=S(K);return p.resetPeek(),re}function A(p,h){const{currentType:F}=h;if(F!==2)return!1;w(p);const K=p.currentPeek()===rl;return p.resetPeek(),K}function L(p,h){const{currentType:F}=h;if(F!==8)return!1;w(p);const K=p.currentPeek()===".";return p.resetPeek(),K}function O(p,h){const{currentType:F}=h;if(F!==9)return!1;w(p);const K=_(p.currentPeek());return p.resetPeek(),K}function $(p,h){const{currentType:F}=h;if(!(F===8||F===12))return!1;w(p);const K=p.currentPeek()===":";return p.resetPeek(),K}function m(p,h){const{currentType:F}=h;if(F!==10)return!1;const K=()=>{const ee=p.currentPeek();return ee==="{"?_(p.peek()):ee==="@"||ee==="%"||ee==="|"||ee===":"||ee==="."||ee===eo||!ee?!1:ee===pt?(p.peek(),K()):I(p,!1)},re=K();return p.resetPeek(),re}function U(p){w(p);const h=p.currentPeek()==="|";return p.resetPeek(),h}function H(p){const h=w(p),F=p.currentPeek()==="%"&&p.peek()==="{";return p.resetPeek(),{isModulo:F,hasSpace:h.length>0}}function I(p,h=!0){const F=(re=!1,ee="",R=!1)=>{const V=p.currentPeek();return V==="{"?ee==="%"?!1:re:V==="@"||!V?ee==="%"?!0:re:V==="%"?(p.peek(),F(re,"%",!0)):V==="|"?ee==="%"||R?!0:!(ee===eo||ee===pt):V===eo?(p.peek(),F(!0,eo,R)):V===pt?(p.peek(),F(!0,pt,R)):!0},K=F();return h&&p.resetPeek(),K}function W(p,h){const F=p.currentChar();return F===co?co:h(F)?(p.next(),F):null}function ue(p){const h=p.charCodeAt(0);return h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57||h===95||h===36}function C(p){return W(p,ue)}function M(p){const h=p.charCodeAt(0);return h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57||h===95||h===36||h===45}function j(p){return W(p,M)}function se(p){const h=p.charCodeAt(0);return h>=48&&h<=57}function fe(p){return W(p,se)}function Z(p){const h=p.charCodeAt(0);return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}function ce(p){return W(p,Z)}function oe(p){let h="",F="";for(;h=fe(p);)F+=h;return F}function ke(p){E(p);const h=p.currentChar();return h!=="%"&&f(_e.EXPECTED_TOKEN,r(),0,h),p.next(),"%"}function ie(p){let h="";for(;;){const F=p.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F==="%")if(I(p))h+=F,p.next();else break;else if(F===eo||F===pt)if(I(p))h+=F,p.next();else{if(U(p))break;h+=F,p.next()}else h+=F,p.next()}return h}function Fe(p){E(p);let h="",F="";for(;h=j(p);)F+=h;return p.currentChar()===co&&f(_e.UNTERMINATED_CLOSING_BRACE,r(),0),F}function ge(p){E(p);let h="";return p.currentChar()==="-"?(p.next(),h+=`-${oe(p)}`):h+=oe(p),p.currentChar()===co&&f(_e.UNTERMINATED_CLOSING_BRACE,r(),0),h}function Te(p){return p!==rl&&p!==pt}function Ae(p){E(p),T(p,"'");let h="",F="";for(;h=W(p,Te);)h==="\\"?F+=z(p):F+=h;const K=p.currentChar();return K===pt||K===co?(f(_e.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),K===pt&&(p.next(),T(p,"'")),F):(T(p,"'"),F)}function z(p){const h=p.currentChar();switch(h){case"\\":case"'":return p.next(),`\\${h}`;case"u":return he(p,h,4);case"U":return he(p,h,6);default:return f(_e.UNKNOWN_ESCAPE_SEQUENCE,r(),0,h),""}}function he(p,h,F){T(p,h);let K="";for(let re=0;re<F;re++){const ee=ce(p);if(!ee){f(_e.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${h}${K}${p.currentChar()}`);break}K+=ee}return`\\${h}${K}`}function N(p){return p!=="{"&&p!=="}"&&p!==eo&&p!==pt}function d(p){E(p);let h="",F="";for(;h=W(p,N);)F+=h;return F}function y(p){let h="",F="";for(;h=C(p);)F+=h;return F}function b(p){const h=F=>{const K=p.currentChar();return K==="{"||K==="%"||K==="@"||K==="|"||K==="("||K===")"||!K||K===eo?F:(F+=K,p.next(),h(F))};return h("")}function P(p){E(p);const h=T(p,"|");return E(p),h}function D(p,h){let F=null;switch(p.currentChar()){case"{":return h.braceNest>=1&&f(_e.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),p.next(),F=v(h,2,"{"),E(p),h.braceNest++,F;case"}":return h.braceNest>0&&h.currentType===2&&f(_e.EMPTY_PLACEHOLDER,r(),0),p.next(),F=v(h,3,"}"),h.braceNest--,h.braceNest>0&&E(p),h.inLinked&&h.braceNest===0&&(h.inLinked=!1),F;case"@":return h.braceNest>0&&f(_e.UNTERMINATED_CLOSING_BRACE,r(),0),F=B(p,h)||x(h),h.braceNest=0,F;default:{let re=!0,ee=!0,R=!0;if(U(p))return h.braceNest>0&&f(_e.UNTERMINATED_CLOSING_BRACE,r(),0),F=v(h,1,P(p)),h.braceNest=0,h.inLinked=!1,F;if(h.braceNest>0&&(h.currentType===5||h.currentType===6||h.currentType===7))return f(_e.UNTERMINATED_CLOSING_BRACE,r(),0),h.braceNest=0,Y(p,h);if(re=g(p,h))return F=v(h,5,Fe(p)),E(p),F;if(ee=k(p,h))return F=v(h,6,ge(p)),E(p),F;if(R=A(p,h))return F=v(h,7,Ae(p)),E(p),F;if(!re&&!ee&&!R)return F=v(h,13,d(p)),f(_e.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,F.value),E(p),F;break}}return F}function B(p,h){const{currentType:F}=h;let K=null;const re=p.currentChar();switch((F===8||F===9||F===12||F===10)&&(re===pt||re===eo)&&f(_e.INVALID_LINKED_FORMAT,r(),0),re){case"@":return p.next(),K=v(h,8,"@"),h.inLinked=!0,K;case".":return E(p),p.next(),v(h,9,".");case":":return E(p),p.next(),v(h,10,":");default:return U(p)?(K=v(h,1,P(p)),h.braceNest=0,h.inLinked=!1,K):L(p,h)||$(p,h)?(E(p),B(p,h)):O(p,h)?(E(p),v(h,12,y(p))):m(p,h)?(E(p),re==="{"?D(p,h)||K:v(h,11,b(p))):(F===8&&f(_e.INVALID_LINKED_FORMAT,r(),0),h.braceNest=0,h.inLinked=!1,Y(p,h))}}function Y(p,h){let F={type:14};if(h.braceNest>0)return D(p,h)||x(h);if(h.inLinked)return B(p,h)||x(h);switch(p.currentChar()){case"{":return D(p,h)||x(h);case"}":return f(_e.UNBALANCED_CLOSING_BRACE,r(),0),p.next(),v(h,3,"}");case"@":return B(p,h)||x(h);default:{if(U(p))return F=v(h,1,P(p)),h.braceNest=0,h.inLinked=!1,F;const{isModulo:re,hasSpace:ee}=H(p);if(re)return ee?v(h,0,ie(p)):v(h,4,ke(p));if(I(p))return v(h,0,ie(p));break}}return F}function q(){const{currentType:p,offset:h,startLoc:F,endLoc:K}=l;return l.lastType=p,l.lastOffset=h,l.lastStartLoc=F,l.lastEndLoc=K,l.offset=a(),l.startLoc=r(),n.currentChar()===co?v(l,14):Y(n,l)}return{nextToken:q,currentOffset:a,currentPosition:r,context:c}}const zf="parser",Vf=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Wf(e,t,o){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||o,16);return n<=55295||n>=57344?String.fromCodePoint(n):"<22>"}}}function Yf(e={}){const t=e.location!==!1,{onError:o,onWarn:n}=e;function a(g,k,A,L,...O){const $=g.currentPosition();if($.offset+=L,$.column+=L,o){const m=t?ha(A,$):null,U=Ko(k,m,{domain:zf,args:O});o(U)}}function r(g,k,A,L,...O){const $=g.currentPosition();if($.offset+=L,$.column+=L,n){const m=t?ha(A,$):null;n(Ff(k,m,O))}}function s(g,k,A){const L={type:g};return t&&(L.start=k,L.end=k,L.loc={start:A,end:A}),L}function i(g,k,A,L){t&&(g.end=k,g.loc&&(g.loc.end=A))}function l(g,k){const A=g.context(),L=s(3,A.offset,A.startLoc);return L.value=k,i(L,g.currentOffset(),g.currentPosition()),L}function c(g,k){const A=g.context(),{lastOffset:L,lastStartLoc:O}=A,$=s(5,L,O);return $.index=parseInt(k,10),g.nextToken(),i($,g.currentOffset(),g.currentPosition()),$}function u(g,k,A){const L=g.context(),{lastOffset:O,lastStartLoc:$}=L,m=s(4,O,$);return m.key=k,A===!0&&(m.modulo=!0),g.nextToken(),i(m,g.currentOffset(),g.currentPosition()),m}function f(g,k){const A=g.context(),{lastOffset:L,lastStartLoc:O}=A,$=s(9,L,O);return $.value=k.replace(Vf,Wf),g.nextToken(),i($,g.currentOffset(),g.currentPosition()),$}function v(g){const k=g.nextToken(),A=g.context(),{lastOffset:L,lastStartLoc:O}=A,$=s(8,L,O);return k.type!==12?(a(g,_e.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),$.value="",i($,L,O),{nextConsumeToken:k,node:$}):(k.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,$t(k)),$.value=k.value||"",i($,g.currentOffset(),g.currentPosition()),{node:$})}function x(g,k){const A=g.context(),L=s(7,A.offset,A.startLoc);return L.value=k,i(L,g.currentOffset(),g.currentPosition()),L}function T(g){const k=g.context(),A=s(6,k.offset,k.startLoc);let L=g.nextToken();if(L.type===9){const O=v(g);A.modifier=O.node,L=O.nextConsumeToken||g.nextToken()}switch(L.type!==10&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(L)),L=g.nextToken(),L.type===2&&(L=g.nextToken()),L.type){case 11:L.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(L)),A.key=x(g,L.value||"");break;case 5:L.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(L)),A.key=u(g,L.value||"");break;case 6:L.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(L)),A.key=c(g,L.value||"");break;case 7:L.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(L)),A.key=f(g,L.value||"");break;default:{a(g,_e.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const O=g.context(),$=s(7,O.offset,O.startLoc);return $.value="",i($,O.offset,O.startLoc),A.key=$,i(A,O.offset,O.startLoc),{nextConsumeToken:L,node:A}}}return i(A,g.currentOffset(),g.currentPosition()),{node:A}}function w(g){const k=g.context(),A=k.currentType===1?g.currentOffset():k.offset,L=k.currentType===1?k.endLoc:k.startLoc,O=s(2,A,L);O.items=[];let $=null,m=null;do{const I=$||g.nextToken();switch($=null,I.type){case 0:I.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(I)),O.items.push(l(g,I.value||""));break;case 6:I.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(I)),O.items.push(c(g,I.value||""));break;case 4:m=!0;break;case 5:I.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(I)),O.items.push(u(g,I.value||"",!!m)),m&&(r(g,vr.USE_MODULO_SYNTAX,k.lastStartLoc,0,$t(I)),m=null);break;case 7:I.value==null&&a(g,_e.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,$t(I)),O.items.push(f(g,I.value||""));break;case 8:{const W=T(g);O.items.push(W.node),$=W.nextConsumeToken||null;break}}}while(k.currentType!==14&&k.currentType!==1);const U=k.currentType===1?k.lastOffset:g.currentOffset(),H=k.currentType===1?k.lastEndLoc:g.currentPosition();return i(O,U,H),O}function E(g,k,A,L){const O=g.context();let $=L.items.length===0;const m=s(1,k,A);m.cases=[],m.cases.push(L);do{const U=w(g);$||($=U.items.length===0),m.cases.push(U)}while(O.currentType!==14);return $&&a(g,_e.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),i(m,g.currentOffset(),g.currentPosition()),m}function _(g){const k=g.context(),{offset:A,startLoc:L}=k,O=w(g);return k.currentType===14?O:E(g,A,L,O)}function S(g){const k=Hf(g,ol({},e)),A=k.context(),L=s(0,A.offset,A.startLoc);return t&&L.loc&&(L.loc.source=g),L.body=_(k),e.onCacheKey&&(L.cacheKey=e.onCacheKey(g)),A.currentType!==14&&a(k,_e.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,g[A.offset]||""),i(L,k.currentOffset(),k.currentPosition()),L}return{parse:S}}function $t(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function qf(e,t={}){const o={ast:e,helpers:new Set};return{context:()=>o,helper:r=>(o.helpers.add(r),r)}}function sl(e,t){for(let o=0;o<e.length;o++)wr(e[o],t)}function wr(e,t){switch(e.type){case 1:sl(e.cases,t),t.helper("plural");break;case 2:sl(e.items,t);break;case 6:{wr(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Jf(e,t={}){const o=qf(e);o.helper("normalize"),e.body&&wr(e.body,o);const n=o.context();e.helpers=Array.from(n.helpers)}function Xf(e){const t=e.body;return t.type===2?il(t):t.cases.forEach(o=>il(o)),e}function il(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let o=0;o<e.items.length;o++){const n=e.items[o];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=al(t);for(let o=0;o<e.items.length;o++){const n=e.items[o];(n.type===3||n.type===9)&&delete n.value}}}}const Zf="minifier";function Ho(e){switch(e.t=e.type,e.type){case 0:{const t=e;Ho(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,o=t.cases;for(let n=0;n<o.length;n++)Ho(o[n]);t.c=o,delete t.cases;break}case 2:{const t=e,o=t.items;for(let n=0;n<o.length;n++)Ho(o[n]);t.i=o,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Ho(t.key),t.k=t.key,delete t.key,t.modifier&&(Ho(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:throw Ko(_e.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Zf,args:[e.type]})}delete e.type}const Qf="parser";function eh(e,t){const{filename:o,breakLineCode:n,needIndent:a}=t,r=t.location!==!1,s={filename:o,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:a,indentLevel:0};r&&e.loc&&(s.source=e.loc.source);const i=()=>s;function l(w,E){s.code+=w}function c(w,E=!0){const _=E?n:"";l(a?_+" ".repeat(w):_)}function u(w=!0){const E=++s.indentLevel;w&&c(E)}function f(w=!0){const E=--s.indentLevel;w&&c(E)}function v(){c(s.indentLevel)}return{context:i,push:l,indent:u,deindent:f,newline:v,helper:w=>`_${w}`,needIndent:()=>s.needIndent}}function th(e,t){const{helper:o}=e;e.push(`${o("linked")}(`),zo(e,t.key),t.modifier?(e.push(", "),zo(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function oh(e,t){const{helper:o,needIndent:n}=e;e.push(`${o("normalize")}([`),e.indent(n());const a=t.items.length;for(let r=0;r<a&&(zo(e,t.items[r]),r!==a-1);r++)e.push(", ");e.deindent(n()),e.push("])")}function nh(e,t){const{helper:o,needIndent:n}=e;if(t.cases.length>1){e.push(`${o("plural")}([`),e.indent(n());const a=t.cases.length;for(let r=0;r<a&&(zo(e,t.cases[r]),r!==a-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function ah(e,t){t.body?zo(e,t.body):e.push("null")}function zo(e,t){const{helper:o}=e;switch(t.type){case 0:ah(e,t);break;case 1:nh(e,t);break;case 2:oh(e,t);break;case 6:th(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${o("interpolate")}(${o("list")}(${t.index}))`,t);break;case 4:e.push(`${o("interpolate")}(${o("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw Ko(_e.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Qf,args:[t.type]})}}const rh=(e,t={})=>{const o=nl(t.mode)?t.mode:"normal",n=nl(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:o==="arrow"?";":`
`,r=t.needIndent?t.needIndent:o!=="arrow",s=e.helpers||[],i=eh(e,{filename:n,breakLineCode:a,needIndent:r});i.push(o==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(r),s.length>0&&(i.push(`const { ${al(s.map(u=>`${u}: _${u}`),", ")} } = ctx`),i.newline()),i.push("return "),zo(i,e),i.deindent(r),i.push("}"),delete e.helpers;const{code:l,map:c}=i.context();return{ast:e,code:l,map:c?c.toJSON():void 0}};function sh(e,t={}){const o=ol({},t),n=!!o.jit,a=!!o.minify,r=o.optimize==null?!0:o.optimize,i=Yf(o).parse(e);return n?(r&&Xf(i),a&&Ho(i),{ast:i,code:""}):(Jf(i,o),rh(i,o))}/*!
* core-base v9.14.5
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function ih(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Qt().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Qt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Qt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function jt(e){return Pe(e)&&kr(e)===0&&(Ct(e,"b")||Ct(e,"body"))}const ll=["b","body"];function lh(e){return uo(e,ll)}const cl=["c","cases"];function ch(e){return uo(e,cl,[])}const ul=["s","static"];function uh(e){return uo(e,ul)}const dl=["i","items"];function dh(e){return uo(e,dl,[])}const pl=["t","type"];function kr(e){return uo(e,pl)}const gl=["v","value"];function ma(e,t){const o=uo(e,gl);if(o!=null)return o;throw Ln(t)}const fl=["m","modifier"];function ph(e){return uo(e,fl)}const hl=["k","key"];function gh(e){const t=uo(e,hl);if(t)return t;throw Ln(6)}function uo(e,t,o){for(let n=0;n<t.length;n++){const a=t[n];if(Ct(e,a)&&e[a]!=null)return e[a]}return o}const ml=[...ll,...cl,...ul,...dl,...hl,...fl,...gl,...pl];function Ln(e){return new Error(`unhandled node type: ${e}`)}const po=[];po[0]={w:[0],i:[3,0],"[":[4],o:[7]},po[1]={w:[1],".":[2],"[":[4],o:[7]},po[2]={w:[2],i:[3,0],0:[3,0]},po[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},po[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},po[5]={"'":[4,0],o:8,l:[5,0]},po[6]={'"':[4,0],o:8,l:[6,0]};const fh=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function hh(e){return fh.test(e)}function mh(e){const t=e.charCodeAt(0),o=e.charCodeAt(e.length-1);return t===o&&(t===34||t===39)?e.slice(1,-1):e}function bh(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function yh(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:hh(t)?mh(t):"*"+t}function _h(e){const t=[];let o=-1,n=0,a=0,r,s,i,l,c,u,f;const v=[];v[0]=()=>{s===void 0?s=i:s+=i},v[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},v[2]=()=>{v[0](),a++},v[3]=()=>{if(a>0)a--,n=4,v[0]();else{if(a=0,s===void 0||(s=yh(s),s===!1))return!1;v[1]()}};function x(){const T=e[o+1];if(n===5&&T==="'"||n===6&&T==='"')return o++,i="\\"+T,v[0](),!0}for(;n!==null;)if(o++,r=e[o],!(r==="\\"&&x())){if(l=bh(r),f=po[n],c=f[l]||f.l||8,c===8||(n=c[0],c[1]!==void 0&&(u=v[c[1]],u&&(i=r,u()===!1))))return;if(n===7)return t}}const bl=new Map;function vh(e,t){return Pe(e)?e[t]:null}function wh(e,t){if(!Pe(e))return null;let o=bl.get(t);if(o||(o=_h(t),o&&bl.set(t,o)),!o)return null;const n=o.length;let a=e,r=0;for(;r<n;){const s=o[r];if(ml.includes(s)&&jt(a))return null;const i=a[s];if(i===void 0||Ge(a))return null;a=i,r++}return a}const kh=e=>e,Sh=e=>"",Ah="text",xh=e=>e.length===0?"":$f(e),Lh=Cf;function yl(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Th(e){const t=Xe(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Xe(e.named.count)||Xe(e.named.n))?Xe(e.named.count)?e.named.count:Xe(e.named.n)?e.named.n:t:t}function Eh(e,t){t.count||(t.count=e),t.n||(t.n=e)}function Ch(e={}){const t=e.locale,o=Th(e),n=Pe(e.pluralRules)&&le(t)&&Ge(e.pluralRules[t])?e.pluralRules[t]:yl,a=Pe(e.pluralRules)&&le(t)&&Ge(e.pluralRules[t])?yl:void 0,r=_=>_[n(o,_.length,a)],s=e.list||[],i=_=>s[_],l=e.named||Re();Xe(e.pluralIndex)&&Eh(o,l);const c=_=>l[_];function u(_){const S=Ge(e.messages)?e.messages(_):Pe(e.messages)?e.messages[_]:!1;return S||(e.parent?e.parent.message(_):Sh)}const f=_=>e.modifiers?e.modifiers[_]:kh,v=Le(e.processor)&&Ge(e.processor.normalize)?e.processor.normalize:xh,x=Le(e.processor)&&Ge(e.processor.interpolate)?e.processor.interpolate:Lh,T=Le(e.processor)&&le(e.processor.type)?e.processor.type:Ah,E={list:i,named:c,plural:r,linked:(_,...S)=>{const[g,k]=S;let A="text",L="";S.length===1?Pe(g)?(L=g.modifier||L,A=g.type||A):le(g)&&(L=g||L):S.length===2&&(le(g)&&(L=g||L),le(k)&&(A=k||A));const O=u(_)(E),$=A==="vnode"&&He(O)&&L?O[0]:O;return L?f(L)($,A):$},message:u,type:T,interpolate:x,normalize:v,values:it(Re(),s,l)};return E}let Tn=null;function $h(e){Tn=e}function Ph(e,t,o){Tn&&Tn.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:o})}const Mh=Ih("function:translate");function Ih(e){return t=>Tn&&Tn.emit(e,t)}const Nh=vr.__EXTEND_POINT__,xo=pa(Nh),Fh={FALLBACK_TO_TRANSLATE:xo(),CANNOT_FORMAT_NUMBER:xo(),FALLBACK_TO_NUMBER_FORMAT:xo(),CANNOT_FORMAT_DATE:xo(),FALLBACK_TO_DATE_FORMAT:xo(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:xo(),__EXTEND_POINT__:xo()},_l=_e.__EXTEND_POINT__,Lo=pa(_l),Pt={INVALID_ARGUMENT:_l,INVALID_DATE_ARGUMENT:Lo(),INVALID_ISO_DATE_ARGUMENT:Lo(),NOT_SUPPORT_NON_STRING_MESSAGE:Lo(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:Lo(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:Lo(),NOT_SUPPORT_LOCALE_TYPE:Lo(),__EXTEND_POINT__:Lo()};function Kt(e){return Ko(e,null,void 0)}function Sr(e,t){return t.locale!=null?vl(t.locale):vl(e.locale)}let Ar;function vl(e){if(le(e))return e;if(Ge(e)){if(e.resolvedOnce&&Ar!=null)return Ar;if(e.constructor.name==="Function"){const t=e();if(Ef(t))throw Kt(Pt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ar=t}else throw Kt(Pt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Kt(Pt.NOT_SUPPORT_LOCALE_TYPE)}function Rh(e,t,o){return[...new Set([o,...He(t)?t:Pe(t)?Object.keys(t):le(t)?[t]:[o]])]}function wl(e,t,o){const n=le(o)?o:Vo,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let r=a.__localeChainCache.get(n);if(!r){r=[];let s=[o];for(;He(s);)s=kl(r,s,t);const i=He(t)||!Le(t)?t:t.default?t.default:null;s=le(i)?[i]:i,He(s)&&kl(r,s,!1),a.__localeChainCache.set(n,r)}return r}function kl(e,t,o){let n=!0;for(let a=0;a<t.length&&Ee(n);a++){const r=t[a];le(r)&&(n=Dh(e,t[a],o))}return n}function Dh(e,t,o){let n;const a=t.split("-");do{const r=a.join("-");n=Oh(e,r,o),a.splice(-1,1)}while(a.length&&n===!0);return n}function Oh(e,t,o){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(He(o)||Le(o))&&o[a]&&(n=o[a])}return n}const Bh="9.14.5",ba=-1,Vo="en-US",Sl="",Al=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Uh(){return{upper:(e,t)=>t==="text"&&le(e)?e.toUpperCase():t==="vnode"&&Pe(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&le(e)?e.toLowerCase():t==="vnode"&&Pe(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&le(e)?Al(e):t==="vnode"&&Pe(e)&&"__v_isVNode"in e?Al(e.children):e}}let xl;function Ll(e){xl=e}let Tl;function Gh(e){Tl=e}let El;function jh(e){El=e}let Cl=null;const Kh=e=>{Cl=e},Hh=()=>Cl;let $l=null;const Pl=e=>{$l=e},zh=()=>$l;let Ml=0;function Vh(e={}){const t=Ge(e.onWarn)?e.onWarn:wf,o=le(e.version)?e.version:Bh,n=le(e.locale)||Ge(e.locale)?e.locale:Vo,a=Ge(n)?Vo:n,r=He(e.fallbackLocale)||Le(e.fallbackLocale)||le(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,s=Le(e.messages)?e.messages:xr(a),i=Le(e.datetimeFormats)?e.datetimeFormats:xr(a),l=Le(e.numberFormats)?e.numberFormats:xr(a),c=it(Re(),e.modifiers,Uh()),u=e.pluralRules||Re(),f=Ge(e.missing)?e.missing:null,v=Ee(e.missingWarn)||lo(e.missingWarn)?e.missingWarn:!0,x=Ee(e.fallbackWarn)||lo(e.fallbackWarn)?e.fallbackWarn:!0,T=!!e.fallbackFormat,w=!!e.unresolving,E=Ge(e.postTranslation)?e.postTranslation:null,_=Le(e.processor)?e.processor:null,S=Ee(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter,k=Ge(e.messageCompiler)?e.messageCompiler:xl,A=Ge(e.messageResolver)?e.messageResolver:Tl||vh,L=Ge(e.localeFallbacker)?e.localeFallbacker:El||Rh,O=Pe(e.fallbackContext)?e.fallbackContext:void 0,$=e,m=Pe($.__datetimeFormatters)?$.__datetimeFormatters:new Map,U=Pe($.__numberFormatters)?$.__numberFormatters:new Map,H=Pe($.__meta)?$.__meta:{};Ml++;const I={version:o,cid:Ml,locale:n,fallbackLocale:r,messages:s,modifiers:c,pluralRules:u,missing:f,missingWarn:v,fallbackWarn:x,fallbackFormat:T,unresolving:w,postTranslation:E,processor:_,warnHtmlMessage:S,escapeParameter:g,messageCompiler:k,messageResolver:A,localeFallbacker:L,fallbackContext:O,onWarn:t,__meta:H};return I.datetimeFormats=i,I.numberFormats=l,I.__datetimeFormatters=m,I.__numberFormatters=U,__INTLIFY_PROD_DEVTOOLS__&&Ph(I,o,H),I}const xr=e=>({[e]:Re()});function Lr(e,t,o,n,a){const{missing:r,onWarn:s}=e;if(r!==null){const i=r(e,o,t,a);return le(i)?i:t}else return t}function En(e,t,o){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,o,t)}function Wh(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Yh(e,t){const o=t.indexOf(e);if(o===-1)return!1;for(let n=o+1;n<t.length;n++)if(Wh(e,t[n]))return!0;return!1}function Tr(e){return o=>qh(o,e)}function qh(e,t){const o=lh(t);if(o==null)throw Ln(0);if(kr(o)===1){const r=ch(o);return e.plural(r.reduce((s,i)=>[...s,Il(e,i)],[]))}else return Il(e,o)}function Il(e,t){const o=uh(t);if(o!=null)return e.type==="text"?o:e.normalize([o]);{const n=dh(t).reduce((a,r)=>[...a,Er(e,r)],[]);return e.normalize(n)}}function Er(e,t){const o=kr(t);switch(o){case 3:return ma(t,o);case 9:return ma(t,o);case 4:{const n=t;if(Ct(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(Ct(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw Ln(o)}case 5:{const n=t;if(Ct(n,"i")&&Xe(n.i))return e.interpolate(e.list(n.i));if(Ct(n,"index")&&Xe(n.index))return e.interpolate(e.list(n.index));throw Ln(o)}case 6:{const n=t,a=ph(n),r=gh(n);return e.linked(Er(e,r),a?Er(e,a):void 0,e.type)}case 7:return ma(t,o);case 8:return ma(t,o);default:throw new Error(`unhandled node on format message part: ${o}`)}}const Nl=e=>e;let Wo=Re();function Fl(e,t={}){let o=!1;const n=t.onError||Df;return t.onError=a=>{o=!0,n(a)},{...sh(e,t),detectError:o}}const Jh=(e,t)=>{if(!le(e))throw Kt(Pt.NOT_SUPPORT_NON_STRING_MESSAGE);{Ee(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||Nl)(e),a=Wo[n];if(a)return a;const{code:r,detectError:s}=Fl(e,t),i=new Function(`return ${r}`)();return s?i:Wo[n]=i}};function Xh(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&le(e)){Ee(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||Nl)(e),a=Wo[n];if(a)return a;const{ast:r,detectError:s}=Fl(e,{...t,location:!1,jit:!0}),i=Tr(r);return s?i:Wo[n]=i}else{const o=e.cacheKey;if(o){const n=Wo[o];return n||(Wo[o]=Tr(e))}else return Tr(e)}}const Rl=()=>"",kt=e=>Ge(e);function Dl(e,...t){const{fallbackFormat:o,postTranslation:n,unresolving:a,messageCompiler:r,fallbackLocale:s,messages:i}=e,[l,c]=Cr(...t),u=Ee(c.missingWarn)?c.missingWarn:e.missingWarn,f=Ee(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,v=Ee(c.escapeParameter)?c.escapeParameter:e.escapeParameter,x=!!c.resolvedMessage,T=le(c.default)||Ee(c.default)?Ee(c.default)?r?l:()=>l:c.default:o?r?l:()=>l:"",w=o||T!=="",E=Sr(e,c);v&&Zh(c);let[_,S,g]=x?[l,E,i[E]||Re()]:Ol(e,l,E,s,f,u),k=_,A=l;if(!x&&!(le(k)||jt(k)||kt(k))&&w&&(k=T,A=k),!x&&(!(le(k)||jt(k)||kt(k))||!le(S)))return a?ba:l;let L=!1;const O=()=>{L=!0},$=kt(k)?k:Bl(e,l,S,k,A,O);if(L)return k;const m=tm(e,S,g,c),U=Ch(m),H=Qh(e,$,U);let I=n?n(H,l):H;if(v&&le(I)&&(I=Lf(I)),__INTLIFY_PROD_DEVTOOLS__){const W={timestamp:Date.now(),key:le(l)?l:kt(k)?k.key:"",locale:S||(kt(k)?k.locale:""),format:le(k)?k:kt(k)?k.source:"",message:I};W.meta=it({},e.__meta,Hh()||{}),Mh(W)}return I}function Zh(e){He(e.list)?e.list=e.list.map(t=>le(t)?Xi(t):t):Pe(e.named)&&Object.keys(e.named).forEach(t=>{le(e.named[t])&&(e.named[t]=Xi(e.named[t]))})}function Ol(e,t,o,n,a,r){const{messages:s,onWarn:i,messageResolver:l,localeFallbacker:c}=e,u=c(e,n,o);let f=Re(),v,x=null;const T="translate";for(let w=0;w<u.length&&(v=u[w],f=s[v]||Re(),(x=l(f,t))===null&&(x=f[t]),!(le(x)||jt(x)||kt(x)));w++)if(!Yh(v,u)){const E=Lr(e,t,v,r,T);E!==t&&(x=E)}return[x,v,f]}function Bl(e,t,o,n,a,r){const{messageCompiler:s,warnHtmlMessage:i}=e;if(kt(n)){const c=n;return c.locale=c.locale||o,c.key=c.key||t,c}if(s==null){const c=()=>n;return c.locale=o,c.key=t,c}const l=s(n,em(e,o,a,n,i,r));return l.locale=o,l.key=t,l.source=n,l}function Qh(e,t,o){return t(o)}function Cr(...e){const[t,o,n]=e,a=Re();if(!le(t)&&!Xe(t)&&!kt(t)&&!jt(t))throw Kt(Pt.INVALID_ARGUMENT);const r=Xe(t)?String(t):(kt(t),t);return Xe(o)?a.plural=o:le(o)?a.default=o:Le(o)&&!da(o)?a.named=o:He(o)&&(a.list=o),Xe(n)?a.plural=n:le(n)?a.default=n:Le(n)&&it(a,n),[r,a]}function em(e,t,o,n,a,r){return{locale:t,key:o,warnHtmlMessage:a,onError:s=>{throw r&&r(s),s},onCacheKey:s=>kf(t,o,s)}}function tm(e,t,o,n){const{modifiers:a,pluralRules:r,messageResolver:s,fallbackLocale:i,fallbackWarn:l,missingWarn:c,fallbackContext:u}=e,v={locale:t,modifiers:a,pluralRules:r,messages:x=>{let T=s(o,x);if(T==null&&u){const[,,w]=Ol(u,x,t,i,l,c);T=s(w,x)}if(le(T)||jt(T)){let w=!1;const _=Bl(e,x,t,T,x,()=>{w=!0});return w?Rl:_}else return kt(T)?T:Rl}};return e.processor&&(v.processor=e.processor),n.list&&(v.list=n.list),n.named&&(v.named=n.named),Xe(n.plural)&&(v.pluralIndex=n.plural),v}function Ul(e,...t){const{datetimeFormats:o,unresolving:n,fallbackLocale:a,onWarn:r,localeFallbacker:s}=e,{__datetimeFormatters:i}=e,[l,c,u,f]=$r(...t),v=Ee(u.missingWarn)?u.missingWarn:e.missingWarn;Ee(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const x=!!u.part,T=Sr(e,u),w=s(e,a,T);if(!le(l)||l==="")return new Intl.DateTimeFormat(T,f).format(c);let E={},_,S=null;const g="datetime format";for(let L=0;L<w.length&&(_=w[L],E=o[_]||{},S=E[l],!Le(S));L++)Lr(e,l,_,v,g);if(!Le(S)||!le(_))return n?ba:l;let k=`${_}__${l}`;da(f)||(k=`${k}__${JSON.stringify(f)}`);let A=i.get(k);return A||(A=new Intl.DateTimeFormat(_,it({},S,f)),i.set(k,A)),x?A.formatToParts(c):A.format(c)}const Gl=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function $r(...e){const[t,o,n,a]=e,r=Re();let s=Re(),i;if(le(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw Kt(Pt.INVALID_ISO_DATE_ARGUMENT);const c=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();i=new Date(c);try{i.toISOString()}catch{throw Kt(Pt.INVALID_ISO_DATE_ARGUMENT)}}else if(Af(t)){if(isNaN(t.getTime()))throw Kt(Pt.INVALID_DATE_ARGUMENT);i=t}else if(Xe(t))i=t;else throw Kt(Pt.INVALID_ARGUMENT);return le(o)?r.key=o:Le(o)&&Object.keys(o).forEach(l=>{Gl.includes(l)?s[l]=o[l]:r[l]=o[l]}),le(n)?r.locale=n:Le(n)&&(s=n),Le(a)&&(s=a),[r.key||"",i,r,s]}function jl(e,t,o){const n=e;for(const a in o){const r=`${t}__${a}`;n.__datetimeFormatters.has(r)&&n.__datetimeFormatters.delete(r)}}function Kl(e,...t){const{numberFormats:o,unresolving:n,fallbackLocale:a,onWarn:r,localeFallbacker:s}=e,{__numberFormatters:i}=e,[l,c,u,f]=Pr(...t),v=Ee(u.missingWarn)?u.missingWarn:e.missingWarn;Ee(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const x=!!u.part,T=Sr(e,u),w=s(e,a,T);if(!le(l)||l==="")return new Intl.NumberFormat(T,f).format(c);let E={},_,S=null;const g="number format";for(let L=0;L<w.length&&(_=w[L],E=o[_]||{},S=E[l],!Le(S));L++)Lr(e,l,_,v,g);if(!Le(S)||!le(_))return n?ba:l;let k=`${_}__${l}`;da(f)||(k=`${k}__${JSON.stringify(f)}`);let A=i.get(k);return A||(A=new Intl.NumberFormat(_,it({},S,f)),i.set(k,A)),x?A.formatToParts(c):A.format(c)}const Hl=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Pr(...e){const[t,o,n,a]=e,r=Re();let s=Re();if(!Xe(t))throw Kt(Pt.INVALID_ARGUMENT);const i=t;return le(o)?r.key=o:Le(o)&&Object.keys(o).forEach(l=>{Hl.includes(l)?s[l]=o[l]:r[l]=o[l]}),le(n)?r.locale=n:Le(n)&&(s=n),Le(a)&&(s=a),[r.key||"",i,r,s]}function zl(e,t,o){const n=e;for(const a in o){const r=`${t}__${a}`;n.__numberFormatters.has(r)&&n.__numberFormatters.delete(r)}}ih();/*!
* vue-i18n v9.14.5
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const om="9.14.5";function nm(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Qt().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Qt().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Qt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Qt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Qt().__INTLIFY_PROD_DEVTOOLS__=!1)}const am=Fh.__EXTEND_POINT__,to=pa(am);to(),to(),to(),to(),to(),to(),to(),to(),to();const Vl=Pt.__EXTEND_POINT__,mt=pa(Vl),tt={UNEXPECTED_RETURN_TYPE:Vl,INVALID_ARGUMENT:mt(),MUST_BE_CALL_SETUP_TOP:mt(),NOT_INSTALLED:mt(),NOT_AVAILABLE_IN_LEGACY_MODE:mt(),REQUIRED_VALUE:mt(),INVALID_VALUE:mt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:mt(),NOT_INSTALLED_WITH_PROVIDE:mt(),UNEXPECTED_ERROR:mt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:mt(),BRIDGE_SUPPORT_VUE_2_ONLY:mt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:mt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:mt(),__EXTEND_POINT__:mt()};function nt(e,...t){return Ko(e,null,void 0)}const Mr=io("__translateVNode"),Ir=io("__datetimeParts"),Nr=io("__numberParts"),Wl=io("__setPluralRules"),Yl=io("__injectWithOption"),Fr=io("__dispose");function Cn(e){if(!Pe(e)||jt(e))return e;for(const t in e)if(Ct(e,t))if(!t.includes("."))Pe(e[t])&&Cn(e[t]);else{const o=t.split("."),n=o.length-1;let a=e,r=!1;for(let s=0;s<n;s++){if(o[s]==="__proto__")throw new Error(`unsafe key: ${o[s]}`);if(o[s]in a||(a[o[s]]=Re()),!Pe(a[o[s]])){r=!0;break}a=a[o[s]]}if(r||(jt(a)?ml.includes(o[n])||delete e[t]:(a[o[n]]=e[t],delete e[t])),!jt(a)){const s=a[o[n]];Pe(s)&&Cn(s)}}return e}function ya(e,t){const{messages:o,__i18n:n,messageResolver:a,flatJson:r}=t,s=Le(o)?o:He(n)?Re():{[e]:Re()};if(He(n)&&n.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:l,resource:c}=i;l?(s[l]=s[l]||Re(),fa(c,s[l])):fa(c,s)}else le(i)&&fa(JSON.parse(i),s)}),a==null&&r)for(const i in s)Ct(s,i)&&Cn(s[i]);return s}function ql(e){return e.type}function Jl(e,t,o){let n=Pe(t.messages)?t.messages:Re();"__i18nGlobal"in o&&(n=ya(e.locale.value,{messages:n,__i18n:o.__i18nGlobal}));const a=Object.keys(n);a.length&&a.forEach(r=>{e.mergeLocaleMessage(r,n[r])});{if(Pe(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(Pe(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function Xl(e){return Ve(bn,null,e,0)}const Zl="__INTLIFY_META__",Ql=()=>[],rm=()=>!1;let ec=0;function tc(e){return(t,o,n,a)=>e(o,n,ro()||void 0,a)}const sm=()=>{const e=ro();let t=null;return e&&(t=ql(e)[Zl])?{[Zl]:t}:null};function Rr(e={},t){const{__root:o,__injectWithOption:n}=e,a=o===void 0,r=e.flatJson,s=ua?me:Ts,i=!!e.translateExistCompatible;let l=Ee(e.inheritLocale)?e.inheritLocale:!0;const c=s(o&&l?o.locale.value:le(e.locale)?e.locale:Vo),u=s(o&&l?o.fallbackLocale.value:le(e.fallbackLocale)||He(e.fallbackLocale)||Le(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),f=s(ya(c.value,e)),v=s(Le(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),x=s(Le(e.numberFormats)?e.numberFormats:{[c.value]:{}});let T=o?o.missingWarn:Ee(e.missingWarn)||lo(e.missingWarn)?e.missingWarn:!0,w=o?o.fallbackWarn:Ee(e.fallbackWarn)||lo(e.fallbackWarn)?e.fallbackWarn:!0,E=o?o.fallbackRoot:Ee(e.fallbackRoot)?e.fallbackRoot:!0,_=!!e.fallbackFormat,S=Ge(e.missing)?e.missing:null,g=Ge(e.missing)?tc(e.missing):null,k=Ge(e.postTranslation)?e.postTranslation:null,A=o?o.warnHtmlMessage:Ee(e.warnHtmlMessage)?e.warnHtmlMessage:!0,L=!!e.escapeParameter;const O=o?o.modifiers:Le(e.modifiers)?e.modifiers:{};let $=e.pluralRules||o&&o.pluralRules,m;m=(()=>{a&&Pl(null);const R={version:om,locale:c.value,fallbackLocale:u.value,messages:f.value,modifiers:O,pluralRules:$,missing:g===null?void 0:g,missingWarn:T,fallbackWarn:w,fallbackFormat:_,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:A,escapeParameter:L,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};R.datetimeFormats=v.value,R.numberFormats=x.value,R.__datetimeFormatters=Le(m)?m.__datetimeFormatters:void 0,R.__numberFormatters=Le(m)?m.__numberFormatters:void 0;const V=Vh(R);return a&&Pl(V),V})(),En(m,c.value,u.value);function H(){return[c.value,u.value,f.value,v.value,x.value]}const I=Q({get:()=>c.value,set:R=>{c.value=R,m.locale=c.value}}),W=Q({get:()=>u.value,set:R=>{u.value=R,m.fallbackLocale=u.value,En(m,c.value,R)}}),ue=Q(()=>f.value),C=Q(()=>v.value),M=Q(()=>x.value);function j(){return Ge(k)?k:null}function se(R){k=R,m.postTranslation=R}function fe(){return S}function Z(R){R!==null&&(g=tc(R)),S=R,m.missing=g}const ce=(R,V,de,xe,De,at)=>{H();let Qe;try{__INTLIFY_PROD_DEVTOOLS__,a||(m.fallbackContext=o?zh():void 0),Qe=R(m)}finally{__INTLIFY_PROD_DEVTOOLS__,a||(m.fallbackContext=void 0)}if(de!=="translate exists"&&Xe(Qe)&&Qe===ba||de==="translate exists"&&!Qe){const[X,te]=V();return o&&E?xe(o):De(X)}else{if(at(Qe))return Qe;throw nt(tt.UNEXPECTED_RETURN_TYPE)}};function oe(...R){return ce(V=>Reflect.apply(Dl,null,[V,...R]),()=>Cr(...R),"translate",V=>Reflect.apply(V.t,V,[...R]),V=>V,V=>le(V))}function ke(...R){const[V,de,xe]=R;if(xe&&!Pe(xe))throw nt(tt.INVALID_ARGUMENT);return oe(V,de,it({resolvedMessage:!0},xe||{}))}function ie(...R){return ce(V=>Reflect.apply(Ul,null,[V,...R]),()=>$r(...R),"datetime format",V=>Reflect.apply(V.d,V,[...R]),()=>Sl,V=>le(V))}function Fe(...R){return ce(V=>Reflect.apply(Kl,null,[V,...R]),()=>Pr(...R),"number format",V=>Reflect.apply(V.n,V,[...R]),()=>Sl,V=>le(V))}function ge(R){return R.map(V=>le(V)||Xe(V)||Ee(V)?Xl(String(V)):V)}const Ae={normalize:ge,interpolate:R=>R,type:"vnode"};function z(...R){return ce(V=>{let de;const xe=V;try{xe.processor=Ae,de=Reflect.apply(Dl,null,[xe,...R])}finally{xe.processor=null}return de},()=>Cr(...R),"translate",V=>V[Mr](...R),V=>[Xl(V)],V=>He(V))}function he(...R){return ce(V=>Reflect.apply(Kl,null,[V,...R]),()=>Pr(...R),"number format",V=>V[Nr](...R),Ql,V=>le(V)||He(V))}function N(...R){return ce(V=>Reflect.apply(Ul,null,[V,...R]),()=>$r(...R),"datetime format",V=>V[Ir](...R),Ql,V=>le(V)||He(V))}function d(R){$=R,m.pluralRules=$}function y(R,V){return ce(()=>{if(!R)return!1;const de=le(V)?V:c.value,xe=D(de),De=m.messageResolver(xe,R);return i?De!=null:jt(De)||kt(De)||le(De)},()=>[R],"translate exists",de=>Reflect.apply(de.te,de,[R,V]),rm,de=>Ee(de))}function b(R){let V=null;const de=wl(m,u.value,c.value);for(let xe=0;xe<de.length;xe++){const De=f.value[de[xe]]||{},at=m.messageResolver(De,R);if(at!=null){V=at;break}}return V}function P(R){const V=b(R);return V??(o?o.tm(R)||{}:{})}function D(R){return f.value[R]||{}}function B(R,V){if(r){const de={[R]:V};for(const xe in de)Ct(de,xe)&&Cn(de[xe]);V=de[R]}f.value[R]=V,m.messages=f.value}function Y(R,V){f.value[R]=f.value[R]||{};const de={[R]:V};if(r)for(const xe in de)Ct(de,xe)&&Cn(de[xe]);V=de[R],fa(V,f.value[R]),m.messages=f.value}function q(R){return v.value[R]||{}}function p(R,V){v.value[R]=V,m.datetimeFormats=v.value,jl(m,R,V)}function h(R,V){v.value[R]=it(v.value[R]||{},V),m.datetimeFormats=v.value,jl(m,R,V)}function F(R){return x.value[R]||{}}function K(R,V){x.value[R]=V,m.numberFormats=x.value,zl(m,R,V)}function re(R,V){x.value[R]=it(x.value[R]||{},V),m.numberFormats=x.value,zl(m,R,V)}ec++,o&&ua&&(Ye(o.locale,R=>{l&&(c.value=R,m.locale=R,En(m,c.value,u.value))}),Ye(o.fallbackLocale,R=>{l&&(u.value=R,m.fallbackLocale=R,En(m,c.value,u.value))}));const ee={id:ec,locale:I,fallbackLocale:W,get inheritLocale(){return l},set inheritLocale(R){l=R,R&&o&&(c.value=o.locale.value,u.value=o.fallbackLocale.value,En(m,c.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:ue,get modifiers(){return O},get pluralRules(){return $||{}},get isGlobal(){return a},get missingWarn(){return T},set missingWarn(R){T=R,m.missingWarn=T},get fallbackWarn(){return w},set fallbackWarn(R){w=R,m.fallbackWarn=w},get fallbackRoot(){return E},set fallbackRoot(R){E=R},get fallbackFormat(){return _},set fallbackFormat(R){_=R,m.fallbackFormat=_},get warnHtmlMessage(){return A},set warnHtmlMessage(R){A=R,m.warnHtmlMessage=R},get escapeParameter(){return L},set escapeParameter(R){L=R,m.escapeParameter=R},t:oe,getLocaleMessage:D,setLocaleMessage:B,mergeLocaleMessage:Y,getPostTranslationHandler:j,setPostTranslationHandler:se,getMissingHandler:fe,setMissingHandler:Z,[Wl]:d};return ee.datetimeFormats=C,ee.numberFormats=M,ee.rt=ke,ee.te=y,ee.tm=P,ee.d=ie,ee.n=Fe,ee.getDateTimeFormat=q,ee.setDateTimeFormat=p,ee.mergeDateTimeFormat=h,ee.getNumberFormat=F,ee.setNumberFormat=K,ee.mergeNumberFormat=re,ee[Yl]=n,ee[Mr]=z,ee[Ir]=N,ee[Nr]=he,ee}function im(e){const t=le(e.locale)?e.locale:Vo,o=le(e.fallbackLocale)||He(e.fallbackLocale)||Le(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=Ge(e.missing)?e.missing:void 0,a=Ee(e.silentTranslationWarn)||lo(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=Ee(e.silentFallbackWarn)||lo(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=Ee(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,l=Le(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Ge(e.postTranslation)?e.postTranslation:void 0,f=le(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,v=!!e.escapeParameterHtml,x=Ee(e.sync)?e.sync:!0;let T=e.messages;if(Le(e.sharedMessages)){const L=e.sharedMessages;T=Object.keys(L).reduce(($,m)=>{const U=$[m]||($[m]={});return it(U,L[m]),$},T||{})}const{__i18n:w,__root:E,__injectWithOption:_}=e,S=e.datetimeFormats,g=e.numberFormats,k=e.flatJson,A=e.translateExistCompatible;return{locale:t,fallbackLocale:o,messages:T,flatJson:k,datetimeFormats:S,numberFormats:g,missing:n,missingWarn:a,fallbackWarn:r,fallbackRoot:s,fallbackFormat:i,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:f,escapeParameter:v,messageResolver:e.messageResolver,inheritLocale:x,translateExistCompatible:A,__i18n:w,__root:E,__injectWithOption:_}}function Dr(e={},t){{const o=Rr(im(e)),{__extender:n}=e,a={id:o.id,get locale(){return o.locale.value},set locale(r){o.locale.value=r},get fallbackLocale(){return o.fallbackLocale.value},set fallbackLocale(r){o.fallbackLocale.value=r},get messages(){return o.messages.value},get datetimeFormats(){return o.datetimeFormats.value},get numberFormats(){return o.numberFormats.value},get availableLocales(){return o.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(r){},get missing(){return o.getMissingHandler()},set missing(r){o.setMissingHandler(r)},get silentTranslationWarn(){return Ee(o.missingWarn)?!o.missingWarn:o.missingWarn},set silentTranslationWarn(r){o.missingWarn=Ee(r)?!r:r},get silentFallbackWarn(){return Ee(o.fallbackWarn)?!o.fallbackWarn:o.fallbackWarn},set silentFallbackWarn(r){o.fallbackWarn=Ee(r)?!r:r},get modifiers(){return o.modifiers},get formatFallbackMessages(){return o.fallbackFormat},set formatFallbackMessages(r){o.fallbackFormat=r},get postTranslation(){return o.getPostTranslationHandler()},set postTranslation(r){o.setPostTranslationHandler(r)},get sync(){return o.inheritLocale},set sync(r){o.inheritLocale=r},get warnHtmlInMessage(){return o.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){o.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return o.escapeParameter},set escapeParameterHtml(r){o.escapeParameter=r},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(r){},get pluralizationRules(){return o.pluralRules||{}},__composer:o,t(...r){const[s,i,l]=r,c={};let u=null,f=null;if(!le(s))throw nt(tt.INVALID_ARGUMENT);const v=s;return le(i)?c.locale=i:He(i)?u=i:Le(i)&&(f=i),He(l)?u=l:Le(l)&&(f=l),Reflect.apply(o.t,o,[v,u||f||{},c])},rt(...r){return Reflect.apply(o.rt,o,[...r])},tc(...r){const[s,i,l]=r,c={plural:1};let u=null,f=null;if(!le(s))throw nt(tt.INVALID_ARGUMENT);const v=s;return le(i)?c.locale=i:Xe(i)?c.plural=i:He(i)?u=i:Le(i)&&(f=i),le(l)?c.locale=l:He(l)?u=l:Le(l)&&(f=l),Reflect.apply(o.t,o,[v,u||f||{},c])},te(r,s){return o.te(r,s)},tm(r){return o.tm(r)},getLocaleMessage(r){return o.getLocaleMessage(r)},setLocaleMessage(r,s){o.setLocaleMessage(r,s)},mergeLocaleMessage(r,s){o.mergeLocaleMessage(r,s)},d(...r){return Reflect.apply(o.d,o,[...r])},getDateTimeFormat(r){return o.getDateTimeFormat(r)},setDateTimeFormat(r,s){o.setDateTimeFormat(r,s)},mergeDateTimeFormat(r,s){o.mergeDateTimeFormat(r,s)},n(...r){return Reflect.apply(o.n,o,[...r])},getNumberFormat(r){return o.getNumberFormat(r)},setNumberFormat(r,s){o.setNumberFormat(r,s)},mergeNumberFormat(r,s){o.mergeNumberFormat(r,s)},getChoiceIndex(r,s){return-1}};return a.__extender=n,a}}const Or={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function lm({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,a)=>[...n,...a.type===Ie?a.children:[a]],[]):t.reduce((o,n)=>{const a=e[n];return a&&(o[n]=a()),o},Re())}function oc(e){return Ie}const nc=gn({name:"i18n-t",props:it({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Xe(e)||!isNaN(e)}},Or),setup(e,t){const{slots:o,attrs:n}=t,a=e.i18n||gt({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(o).filter(f=>f!=="_"),s=Re();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=le(e.plural)?+e.plural:e.plural);const i=lm(t,r),l=a[Mr](e.keypath,i,s),c=it(Re(),n),u=le(e.tag)||Pe(e.tag)?e.tag:oc();return Ti(u,c,l)}}});function cm(e){return He(e)&&!le(e[0])}function ac(e,t,o,n){const{slots:a,attrs:r}=t;return()=>{const s={part:!0};let i=Re();e.locale&&(s.locale=e.locale),le(e.format)?s.key=e.format:Pe(e.format)&&(le(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((v,x)=>o.includes(x)?it(Re(),v,{[x]:e.format[x]}):v,Re()));const l=n(e.value,s,i);let c=[s.key];He(l)?c=l.map((v,x)=>{const T=a[v.type],w=T?T({[v.type]:v.value,index:x,parts:l}):[v.value];return cm(w)&&(w[0].key=`${v.type}-${x}`),w}):le(l)&&(c=[l]);const u=it(Re(),r),f=le(e.tag)||Pe(e.tag)?e.tag:oc();return Ti(f,u,c)}}const rc=gn({name:"i18n-n",props:it({value:{type:Number,required:!0},format:{type:[String,Object]}},Or),setup(e,t){const o=e.i18n||gt({useScope:e.scope,__useComponent:!0});return ac(e,t,Hl,(...n)=>o[Nr](...n))}}),sc=gn({name:"i18n-d",props:it({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Or),setup(e,t){const o=e.i18n||gt({useScope:e.scope,__useComponent:!0});return ac(e,t,Gl,(...n)=>o[Ir](...n))}});function um(e,t){const o=e;if(e.mode==="composition")return o.__getInstance(t)||e.global;{const n=o.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function dm(e){const t=s=>{const{instance:i,modifiers:l,value:c}=s;if(!i||!i.$)throw nt(tt.UNEXPECTED_ERROR);const u=um(e,i.$),f=ic(c);return[Reflect.apply(u.t,u,[...lc(f)]),u]};return{created:(s,i)=>{const[l,c]=t(i);ua&&e.global===c&&(s.__i18nWatcher=Ye(c.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=c,s.textContent=l},unmounted:s=>{ua&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const l=s.__composer,c=ic(i);s.textContent=Reflect.apply(l.t,l,[...lc(c)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function ic(e){if(le(e))return{path:e};if(Le(e)){if(!("path"in e))throw nt(tt.REQUIRED_VALUE,"path");return e}else throw nt(tt.INVALID_VALUE)}function lc(e){const{path:t,locale:o,args:n,choice:a,plural:r}=e,s={},i=n||{};return le(o)&&(s.locale=o),Xe(a)&&(s.plural=a),Xe(r)&&(s.plural=r),[t,i,s]}function pm(e,t,...o){const n=Le(o[0])?o[0]:{},a=!!n.useI18nComponentName;(Ee(n.globalInstall)?n.globalInstall:!0)&&([a?"i18n":nc.name,"I18nT"].forEach(s=>e.component(s,nc)),[rc.name,"I18nN"].forEach(s=>e.component(s,rc)),[sc.name,"I18nD"].forEach(s=>e.component(s,sc))),e.directive("t",dm(t))}function gm(e,t,o){return{beforeCreate(){const n=ro();if(!n)throw nt(tt.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const r=a.i18n;if(a.__i18n&&(r.__i18n=a.__i18n),r.__root=t,this===this.$root)this.$i18n=cc(e,r);else{r.__injectWithOption=!0,r.__extender=o.__vueI18nExtend,this.$i18n=Dr(r);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=cc(e,a);else{this.$i18n=Dr({__i18n:a.__i18n,__injectWithOption:!0,__extender:o.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&Jl(t,a,a),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,s)=>this.$i18n.te(r,s),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),o.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=ro();if(!n)throw nt(tt.UNEXPECTED_ERROR);const a=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),o.__deleteInstance(n),delete this.$i18n}}}function cc(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Wl](t.pluralizationRules||e.pluralizationRules);const o=ya(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(o).forEach(n=>e.mergeLocaleMessage(n,o[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const fm=io("global-vue-i18n");function hm(e={},t){const o=__VUE_I18N_LEGACY_API__&&Ee(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Ee(e.globalInjection)?e.globalInjection:!0,a=__VUE_I18N_LEGACY_API__&&o?!!e.allowComposition:!0,r=new Map,[s,i]=mm(e,o),l=io("");function c(v){return r.get(v)||null}function u(v,x){r.set(v,x)}function f(v){r.delete(v)}{const v={get mode(){return __VUE_I18N_LEGACY_API__&&o?"legacy":"composition"},get allowComposition(){return a},async install(x,...T){if(x.__VUE_I18N_SYMBOL__=l,x.provide(x.__VUE_I18N_SYMBOL__,v),Le(T[0])){const _=T[0];v.__composerExtend=_.__composerExtend,v.__vueI18nExtend=_.__vueI18nExtend}let w=null;!o&&n&&(w=xm(x,v.global)),__VUE_I18N_FULL_INSTALL__&&pm(x,v,...T),__VUE_I18N_LEGACY_API__&&o&&x.mixin(gm(i,i.__composer,v));const E=x.unmount;x.unmount=()=>{w&&w(),v.dispose(),E()}},get global(){return i},dispose(){s.stop()},__instances:r,__getInstance:c,__setInstance:u,__deleteInstance:f};return v}}function gt(e={}){const t=ro();if(t==null)throw nt(tt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw nt(tt.NOT_INSTALLED);const o=bm(t),n=_m(o),a=ql(t),r=ym(e,a);if(__VUE_I18N_LEGACY_API__&&o.mode==="legacy"&&!e.__useComponent){if(!o.allowComposition)throw nt(tt.NOT_AVAILABLE_IN_LEGACY_MODE);return Sm(t,r,n,e)}if(r==="global")return Jl(n,e,a),n;if(r==="parent"){let l=vm(o,t,e.__useComponent);return l==null&&(l=n),l}const s=o;let i=s.__getInstance(t);if(i==null){const l=it({},e);"__i18n"in a&&(l.__i18n=a.__i18n),n&&(l.__root=n),i=Rr(l),s.__composerExtend&&(i[Fr]=s.__composerExtend(i)),km(s,t,i),s.__setInstance(t,i)}return i}function mm(e,t,o){const n=Ia();{const a=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Dr(e)):n.run(()=>Rr(e));if(a==null)throw nt(tt.UNEXPECTED_ERROR);return[n,a]}}function bm(e){{const t=$e(e.isCE?fm:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw nt(e.isCE?tt.NOT_INSTALLED_WITH_PROVIDE:tt.UNEXPECTED_ERROR);return t}}function ym(e,t){return da(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function _m(e){return e.mode==="composition"?e.global:e.global.__composer}function vm(e,t,o=!1){let n=null;const a=t.root;let r=wm(t,o);for(;r!=null;){const s=e;if(e.mode==="composition")n=s.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(r);i!=null&&(n=i.__composer,o&&n&&!n[Yl]&&(n=null))}if(n!=null||a===r)break;r=r.parent}return n}function wm(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function km(e,t,o){ao(()=>{},t),er(()=>{const n=o;e.__deleteInstance(t);const a=n[Fr];a&&(a(),delete n[Fr])},t)}function Sm(e,t,o,n={}){const a=t==="local",r=Ts(null);if(a&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw nt(tt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=Ee(n.inheritLocale)?n.inheritLocale:!le(n.locale),i=me(!a||s?o.locale.value:le(n.locale)?n.locale:Vo),l=me(!a||s?o.fallbackLocale.value:le(n.fallbackLocale)||He(n.fallbackLocale)||Le(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:i.value),c=me(ya(i.value,n)),u=me(Le(n.datetimeFormats)?n.datetimeFormats:{[i.value]:{}}),f=me(Le(n.numberFormats)?n.numberFormats:{[i.value]:{}}),v=a?o.missingWarn:Ee(n.missingWarn)||lo(n.missingWarn)?n.missingWarn:!0,x=a?o.fallbackWarn:Ee(n.fallbackWarn)||lo(n.fallbackWarn)?n.fallbackWarn:!0,T=a?o.fallbackRoot:Ee(n.fallbackRoot)?n.fallbackRoot:!0,w=!!n.fallbackFormat,E=Ge(n.missing)?n.missing:null,_=Ge(n.postTranslation)?n.postTranslation:null,S=a?o.warnHtmlMessage:Ee(n.warnHtmlMessage)?n.warnHtmlMessage:!0,g=!!n.escapeParameter,k=a?o.modifiers:Le(n.modifiers)?n.modifiers:{},A=n.pluralRules||a&&o.pluralRules;function L(){return[i.value,l.value,c.value,u.value,f.value]}const O=Q({get:()=>r.value?r.value.locale.value:i.value,set:b=>{r.value&&(r.value.locale.value=b),i.value=b}}),$=Q({get:()=>r.value?r.value.fallbackLocale.value:l.value,set:b=>{r.value&&(r.value.fallbackLocale.value=b),l.value=b}}),m=Q(()=>r.value?r.value.messages.value:c.value),U=Q(()=>u.value),H=Q(()=>f.value);function I(){return r.value?r.value.getPostTranslationHandler():_}function W(b){r.value&&r.value.setPostTranslationHandler(b)}function ue(){return r.value?r.value.getMissingHandler():E}function C(b){r.value&&r.value.setMissingHandler(b)}function M(b){return L(),b()}function j(...b){return r.value?M(()=>Reflect.apply(r.value.t,null,[...b])):M(()=>"")}function se(...b){return r.value?Reflect.apply(r.value.rt,null,[...b]):""}function fe(...b){return r.value?M(()=>Reflect.apply(r.value.d,null,[...b])):M(()=>"")}function Z(...b){return r.value?M(()=>Reflect.apply(r.value.n,null,[...b])):M(()=>"")}function ce(b){return r.value?r.value.tm(b):{}}function oe(b,P){return r.value?r.value.te(b,P):!1}function ke(b){return r.value?r.value.getLocaleMessage(b):{}}function ie(b,P){r.value&&(r.value.setLocaleMessage(b,P),c.value[b]=P)}function Fe(b,P){r.value&&r.value.mergeLocaleMessage(b,P)}function ge(b){return r.value?r.value.getDateTimeFormat(b):{}}function Te(b,P){r.value&&(r.value.setDateTimeFormat(b,P),u.value[b]=P)}function Ae(b,P){r.value&&r.value.mergeDateTimeFormat(b,P)}function z(b){return r.value?r.value.getNumberFormat(b):{}}function he(b,P){r.value&&(r.value.setNumberFormat(b,P),f.value[b]=P)}function N(b,P){r.value&&r.value.mergeNumberFormat(b,P)}const d={get id(){return r.value?r.value.id:-1},locale:O,fallbackLocale:$,messages:m,datetimeFormats:U,numberFormats:H,get inheritLocale(){return r.value?r.value.inheritLocale:s},set inheritLocale(b){r.value&&(r.value.inheritLocale=b)},get availableLocales(){return r.value?r.value.availableLocales:Object.keys(c.value)},get modifiers(){return r.value?r.value.modifiers:k},get pluralRules(){return r.value?r.value.pluralRules:A},get isGlobal(){return r.value?r.value.isGlobal:!1},get missingWarn(){return r.value?r.value.missingWarn:v},set missingWarn(b){r.value&&(r.value.missingWarn=b)},get fallbackWarn(){return r.value?r.value.fallbackWarn:x},set fallbackWarn(b){r.value&&(r.value.missingWarn=b)},get fallbackRoot(){return r.value?r.value.fallbackRoot:T},set fallbackRoot(b){r.value&&(r.value.fallbackRoot=b)},get fallbackFormat(){return r.value?r.value.fallbackFormat:w},set fallbackFormat(b){r.value&&(r.value.fallbackFormat=b)},get warnHtmlMessage(){return r.value?r.value.warnHtmlMessage:S},set warnHtmlMessage(b){r.value&&(r.value.warnHtmlMessage=b)},get escapeParameter(){return r.value?r.value.escapeParameter:g},set escapeParameter(b){r.value&&(r.value.escapeParameter=b)},t:j,getPostTranslationHandler:I,setPostTranslationHandler:W,getMissingHandler:ue,setMissingHandler:C,rt:se,d:fe,n:Z,tm:ce,te:oe,getLocaleMessage:ke,setLocaleMessage:ie,mergeLocaleMessage:Fe,getDateTimeFormat:ge,setDateTimeFormat:Te,mergeDateTimeFormat:Ae,getNumberFormat:z,setNumberFormat:he,mergeNumberFormat:N};function y(b){b.locale.value=i.value,b.fallbackLocale.value=l.value,Object.keys(c.value).forEach(P=>{b.mergeLocaleMessage(P,c.value[P])}),Object.keys(u.value).forEach(P=>{b.mergeDateTimeFormat(P,u.value[P])}),Object.keys(f.value).forEach(P=>{b.mergeNumberFormat(P,f.value[P])}),b.escapeParameter=g,b.fallbackFormat=w,b.fallbackRoot=T,b.fallbackWarn=x,b.missingWarn=v,b.warnHtmlMessage=S}return Hs(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw nt(tt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const b=r.value=e.proxy.$i18n.__composer;t==="global"?(i.value=b.locale.value,l.value=b.fallbackLocale.value,c.value=b.messages.value,u.value=b.datetimeFormats.value,f.value=b.numberFormats.value):a&&y(b)}),d}const Am=["locale","fallbackLocale","availableLocales"],uc=["t","rt","d","n","tm","te"];function xm(e,t){const o=Object.create(null);return Am.forEach(a=>{const r=Object.getOwnPropertyDescriptor(t,a);if(!r)throw nt(tt.UNEXPECTED_ERROR);const s=Ke(r.value)?{get(){return r.value.value},set(i){r.value.value=i}}:{get(){return r.get&&r.get()}};Object.defineProperty(o,a,s)}),e.config.globalProperties.$i18n=o,uc.forEach(a=>{const r=Object.getOwnPropertyDescriptor(t,a);if(!r||!r.value)throw nt(tt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,r)}),()=>{delete e.config.globalProperties.$i18n,uc.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}if(nm(),__INTLIFY_JIT_COMPILATION__?Ll(Xh):Ll(Jh),Gh(wh),jh(wl),__INTLIFY_PROD_DEVTOOLS__){const e=Qt();e.__INTLIFY__=!0,$h(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const Lm=Object.assign({"./locales/ar/aria.json":Up,"./locales/ar/buttons.json":Gp,"./locales/ar/detail.json":jp,"./locales/ar/legend.json":Kp,"./locales/ar/messages.json":Hp,"./locales/ar/options.json":zp,"./locales/ar/prayerLaps.json":Vp,"./locales/ar/search.json":Wp,"./locales/de/aria.json":Yp,"./locales/de/buttons.json":qp,"./locales/de/detail.json":Jp,"./locales/de/legend.json":Xp,"./locales/de/messages.json":Zp,"./locales/de/options.json":Qp,"./locales/de/prayerLaps.json":eg,"./locales/de/search.json":tg,"./locales/en/aria.json":og,"./locales/en/buttons.json":ng,"./locales/en/detail.json":ag,"./locales/en/legend.json":rg,"./locales/en/messages.json":sg,"./locales/en/options.json":ig,"./locales/en/prayerLaps.json":lg,"./locales/en/search.json":cg,"./locales/es/aria.json":ug,"./locales/es/buttons.json":dg,"./locales/es/detail.json":pg,"./locales/es/legend.json":gg,"./locales/es/messages.json":fg,"./locales/es/options.json":hg,"./locales/es/prayerLaps.json":mg,"./locales/es/search.json":bg,"./locales/fr/aria.json":yg,"./locales/fr/buttons.json":_g,"./locales/fr/detail.json":vg,"./locales/fr/legend.json":wg,"./locales/fr/messages.json":kg,"./locales/fr/options.json":Sg,"./locales/fr/prayerLaps.json":Ag,"./locales/fr/search.json":xg,"./locales/hi/aria.json":Lg,"./locales/hi/buttons.json":Tg,"./locales/hi/detail.json":Eg,"./locales/hi/legend.json":Cg,"./locales/hi/messages.json":$g,"./locales/hi/options.json":Pg,"./locales/hi/prayerLaps.json":Mg,"./locales/hi/search.json":Ig,"./locales/it/aria.json":Ng,"./locales/it/buttons.json":Fg,"./locales/it/detail.json":Rg,"./locales/it/legend.json":Dg,"./locales/it/messages.json":Og,"./locales/it/options.json":Bg,"./locales/it/prayerLaps.json":Ug,"./locales/it/search.json":Gg,"./locales/pt/aria.json":jg,"./locales/pt/buttons.json":Kg,"./locales/pt/detail.json":Hg,"./locales/pt/legend.json":zg,"./locales/pt/messages.json":Vg,"./locales/pt/options.json":Wg,"./locales/pt/prayerLaps.json":Yg,"./locales/pt/search.json":qg,"./locales/ro/aria.json":Jg,"./locales/ro/buttons.json":Xg,"./locales/ro/detail.json":Zg,"./locales/ro/legend.json":Qg,"./locales/ro/messages.json":ef,"./locales/ro/options.json":tf,"./locales/ro/prayerLaps.json":of,"./locales/ro/search.json":nf,"./locales/ru/aria.json":af,"./locales/ru/buttons.json":rf,"./locales/ru/detail.json":sf,"./locales/ru/legend.json":lf,"./locales/ru/messages.json":cf,"./locales/ru/options.json":uf,"./locales/ru/prayerLaps.json":df,"./locales/ru/search.json":pf,"./locales/zh/aria.json":gf,"./locales/zh/buttons.json":ff,"./locales/zh/detail.json":hf,"./locales/zh/legend.json":mf,"./locales/zh/messages.json":bf,"./locales/zh/options.json":yf,"./locales/zh/prayerLaps.json":_f,"./locales/zh/search.json":vf}),$n={};for(const[e,t]of Object.entries(Lm)){const o=e.match(/\.\/locales\/([^/]+)\/([^/]+)\.json$/);if(!o)continue;const[,n,a]=o;$n[n]??($n[n]={}),$n[n][a]=t}const Tm=["ar","de","en","es","fr","hi","it","pt","ro","ru","zh"],Em=new Set(["ar"]);function Cm(){var o;const t=(((o=document==null?void 0:document.documentElement)==null?void 0:o.lang)||"").split("-")[0].toLowerCase();return Tm.includes(t)?t:"en"}function $m(){return hm({legacy:!1,globalInjection:!0,locale:Cm(),fallbackLocale:"en",messages:$n,missingWarn:!1,fallbackWarn:!1})}const Pm=Object.assign({"./profiles/doxa-simple-map.vue":()=>La(()=>Promise.resolve().then(()=>Q_),void 0)});if(typeof window<"u"&&((Jc=window.mapboxgl)!=null&&Jc.setRTLTextPlugin))try{window.mapboxgl.setRTLTextPlugin("https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js",null,!0)}catch{}function dc(){return yp(Bp,{configureApp(e){e.use(Lp()),e.use($m()),e.provide("profileModules",Pm)}})}const Mm=dc(),Im=dc();typeof customElements<"u"&&(customElements.get("doxa-map")||customElements.define("doxa-map",Mm),customElements.get("doxa-simple-map")||customElements.define("doxa-simple-map",Im));const pc="https://api.mapbox.com/mapbox-gl-js/v3.3.0/mapbox-gl.css";async function Nm(e){const t=e.getRootNode();if(!(t instanceof ShadowRoot))return;const o=r=>new Promise(s=>setTimeout(s,r)),n=t.querySelector(`link[href="${pc}"]`);if(n){if(n.sheet)return;await Promise.race([new Promise(r=>{n.addEventListener("load",r,{once:!0}),n.addEventListener("error",r,{once:!0})}),o(2e3)]);return}const a=document.createElement("link");a.rel="stylesheet",a.href=pc,await Promise.race([new Promise(r=>{a.addEventListener("load",r,{once:!0}),a.addEventListener("error",r,{once:!0}),t.prepend(a)}),o(2e3)])}function Fm({containerRef:e,accessToken:t,style:o,center:n=[20,10],zoom:a=2,minZoom:r=.5,maxZoom:s=18,pitch:i=0,bearing:l=0}){const c=me(null),u=me(!1);async function f(){if(typeof mapboxgl>"u"){console.error("mapboxgl is not available. Add the Mapbox GL JS script to your page.");return}if(!e.value){console.error("containerRef.value is null — call initializeMap() inside onMounted()");return}if(!t){console.error('No Mapbox access token provided. Pass "tk" in profile-config JSON.');return}if(!t.startsWith("pk.")){console.error('Mapbox token looks invalid (expected "pk." prefix). Got:',t.slice(0,10)+"...");return}await Nm(e.value),await new Promise(_=>requestAnimationFrame(_));const x=e.value,T=x.clientWidth,w=x.clientHeight;if(T===0||w===0){console.error(`[useMapInstance] Container has ZERO dimensions (${T}×${w}). Map will be invisible. Check that parent elements have CSS sizing.`);let _=x.parentElement,S=0;for(;_&&S<5;)_=_.parentElement,S++}const E=t;mapboxgl.accessToken=E,c.value=new mapboxgl.Map({accessToken:E,container:e.value,style:o,center:n,zoom:a,minZoom:r,maxZoom:s,pitch:i,bearing:l,attributionControl:!1}),c.value.on("style.load",()=>{requestAnimationFrame(()=>{var _;(_=c.value)==null||_.resize(),u.value=!0})})}function v(){c.value&&(c.value.remove(),c.value=null,u.value=!1)}return{map:c,isMapReady:u,initializeMap:f,destroy:v}}const We={Chamacoco:"Zamucoan",Ninam:"Yanomaman",Yagua:"Yaguan",Muinane:"Witotoan",Finnish:"Uralic","Hill Mari":"Uralic",Mansi:"Uralic","Meadow Mari":"Uralic","North Saami":"Uralic",Carabayo:"Unclassified",Kujarge:"Unclassified",Shabo:"Unclassified",Ainu:"Turkic",Kazakh:"Turkic","Khorasani Turkish":"Turkic",Kyrgyz:"Turkic","Northern Uzbek":"Turkic","South Azerbaijani":"Turkic",Turkish:"Turkic",Tuvan:"Turkic",Uyghur:"Turkic",Amundava:"Tupian",Araweté:"Tupian","Asurini of Xingú":"Tupian","Avá-Canoeiro":"Tupian",Awetí:"Tupian",Kamayurá:"Tupian",Karo:"Tupian",Morerebi:"Tupian",Tenharim:"Tupian","Uru-Eu-Wau-Wau":"Tupian","Uru-Pa-In":"Tupian",Wayampi:"Tupian","Zo’é":"Tupian",Evenki:"Tungusic",Xibe:"Tungusic",Carapana:"Tucanoan",Cubeo:"Tucanoan",Desano:"Tucanoan",Macuna:"Tucanoan",Piratapuyo:"Tucanoan",Siona:"Tucanoan",Siriano:"Tucanoan",Tucano:"Tucanoan",Tuyuca:"Tucanoan",Waimaha:"Tucanoan",Tay:"Trans-New Guinea",Adi:"Sino-Tibetan",Akha:"Sino-Tibetan","Amdo Tibetan":"Sino-Tibetan",Axi:"Sino-Tibetan",Biyo:"Sino-Tibetan","Boro (India)":"Sino-Tibetan",Brokkat:"Sino-Tibetan",Bugun:"Sino-Tibetan",Byangsi:"Sino-Tibetan","Central Lalo":"Sino-Tibetan","Central Tibetan":"Sino-Tibetan",Chak:"Sino-Tibetan",Chalikha:"Sino-Tibetan",Chaudangsi:"Sino-Tibetan",Chocangacakha:"Sino-Tibetan",Darlong:"Sino-Tibetan",Dhimal:"Sino-Tibetan","Digaro-Mishmi":"Sino-Tibetan",Dzalakha:"Sino-Tibetan","Eastern Nisu":"Sino-Tibetan",Ersu:"Sino-Tibetan",Gahri:"Sino-Tibetan",Gongduk:"Sino-Tibetan",Gyalsumdo:"Sino-Tibetan",Hani:"Sino-Tibetan","Idu-Mishmi":"Sino-Tibetan",Kaike:"Sino-Tibetan",Kanashi:"Sino-Tibetan",Katso:"Sino-Tibetan",Khamba:"Sino-Tibetan",Koireng:"Sino-Tibetan",Kucong:"Sino-Tibetan",Kurtokha:"Sino-Tibetan",Ladakhi:"Sino-Tibetan",Lakha:"Sino-Tibetan","Lang’e":"Sino-Tibetan",Lhokpu:"Sino-Tibetan",Lolopo:"Sino-Tibetan",Lunanakha:"Sino-Tibetan","Mandarin Chinese":"Sino-Tibetan",Meitei:"Sino-Tibetan","Miju-Mishmi":"Sino-Tibetan",Mpi:"Sino-Tibetan",Na:"Sino-Tibetan",Namuyi:"Sino-Tibetan",Narua:"Sino-Tibetan",Naxi:"Sino-Tibetan","Northern Muji":"Sino-Tibetan",Nuosu:"Sino-Tibetan",Nupbikha:"Sino-Tibetan",Nyenkha:"Sino-Tibetan",Olekha:"Sino-Tibetan",Pahari:"Sino-Tibetan",Pattani:"Sino-Tibetan","Phana’":"Sino-Tibetan",Phula:"Sino-Tibetan",Phunoi:"Sino-Tibetan",Puma:"Sino-Tibetan",Puroik:"Sino-Tibetan",Raji:"Sino-Tibetan",Rawat:"Sino-Tibetan",Sani:"Sino-Tibetan",Sherdukpen:"Sino-Tibetan",Sherpa:"Sino-Tibetan",Shuhi:"Sino-Tibetan",Sila:"Sino-Tibetan",Singpho:"Sino-Tibetan",Sunwar:"Sino-Tibetan","Tawang Monpa":"Sino-Tibetan",Tseku:"Sino-Tibetan",Tshangla:"Sino-Tibetan",Usoi:"Sino-Tibetan","Western Minyag":"Sino-Tibetan","Wusa Nasu":"Sino-Tibetan","Xiang Chinese":"Sino-Tibetan",Yakkha:"Sino-Tibetan","Youle Jinuo":"Sino-Tibetan","Yue Chinese":"Sino-Tibetan",Zakhring:"Sino-Tibetan","Afghan Sign Language":"Sign Language","Albanian Sign Language":"Sign Language","Algerian Sign Language":"Sign Language","American Sign Language":"Sign Language","Armenian Sign Language":"Sign Language","British Sign Language":"Sign Language","Bulgarian Sign Language":"Sign Language","Cambodian Sign Language":"Sign language","Cuban Sign Language":"Sign Language","Egyptian Sign Language":"Sign Language","Greek Sign Language":"Sign Language","Guinean Sign Language":"Sign Language","Hong Kong Sign Language":"Sign Language","Icelandic Sign Language":"Sign Language","Iranian Sign Language":"Sign Language","Israeli Sign Language":"Sign Language","Jamaican Sign Language":"Sign Language","Jordanian Sign Language":"Sign Language","Laos Sign Language":"Sign Language","Libyan Sign Language":"Sign Language","Maltese Sign Language":"Sign Language","Mauritian Sign Language":"Sign Language","Moroccan Sign Language":"Sign Language","Mozambican Sign Language":"Sign Language","Myanmar Sign Language":"Sign language","Natural Sign Language":"Sign Language","Pakistan Sign Language":"Sign Language","Papua New Guinean Sign Language":"Sign language","Russian Sign Language":"Sign Language","Saudi Arabian Sign Language":"Sign Language","Sign Language of the Netherlands":"Sign Language","Solomon Islands Sign Language":"Sign Language","Sri Lankan Sign Language":"Sign Language","Swedish Sign Language":"Sign Language","Turkish Sign Language":"Sign Language","Northern Conchucos Ancash Quechua":"Quechuan","Northern Pastaza Quichua":"Quechuan",Hupdë:"Puinavean",Amahuaca:"Panoan",Korubo:"Panoan",Sharanahua:"Panoan","Shipibo-Conibo":"Panoan",Yaminahua:"Panoan",Yawanawa:"Panoan",Afitti:"Nilo-Saharan",Assangori:"Nilo-Saharan","Beli (South Sudan)":"Nilo-Saharan",Berta:"Nilo-Saharan",Burun:"Nilo-Saharan","Dar Daju Daju":"Nilo-Saharan","Dar Fur Daju":"Nilo-Saharan","Dar Sila Daju":"Nilo-Saharan",Dazaga:"Nilo-Saharan","Dendi (Benin)":"Nilo-Saharan",Dilling:"Nilo-Saharan",Fur:"Nilo-Saharan",Gbaya:"Nilo-Saharan",Ghulfan:"Nilo-Saharan",Gwama:"Nilo-Saharan","Humburi Senni Songhay":"Nilo-Saharan",Jopadhola:"Nilo-Saharan",Kadaru:"Nilo-Saharan",Kanga:"Nilo-Saharan",Karanga:"Nilo-Saharan",Karko:"Nilo-Saharan",Kebu:"Nilo-Saharan",Keiga:"Nilo-Saharan",Keliko:"Nilo-Saharan",Kendeje:"Nilo-Saharan",Kibet:"Nilo-Saharan","Komo (Sudan)":"Nilo-Saharan",Korandje:"Nilo-Saharan",Kulfa:"Nilo-Saharan",Kwegu:"Nilo-Saharan",Laarim:"Nilo-Saharan",Logorik:"Nilo-Saharan",Majang:"Nilo-Saharan","Manga Kanuri":"Nilo-Saharan",Mango:"Nilo-Saharan",Mararit:"Nilo-Saharan",Marfa:"Nilo-Saharan",Midob:"Nilo-Saharan","Mo’da":"Nilo-Saharan",Morom:"Nilo-Saharan",Moru:"Nilo-Saharan",Naba:"Nilo-Saharan",Nara:"Nilo-Saharan",Njalgulgule:"Nilo-Saharan",Nuer:"Nilo-Saharan","Nyamusa-Molo":"Nilo-Saharan",Nyangatom:"Nilo-Saharan","Olu’bo":"Nilo-Saharan",Opo:"Nilo-Saharan",Päri:"Nilo-Saharan","Sara Kaba Naa":"Nilo-Saharan",Surbakhal:"Nilo-Saharan",Tadaksahak:"Nilo-Saharan","Tama (Chad)":"Nilo-Saharan",Temein:"Nilo-Saharan",Thuri:"Nilo-Saharan","Tirmaga-Chai Suri":"Nilo-Saharan",Toposa:"Nilo-Saharan",Tumtum:"Nilo-Saharan","Wali (Sudan)":"Nilo-Saharan","Yerwa Kanuri":"Nilo-Saharan",Yulu:"Nilo-Saharan",Zaghawa:"Nilo-Saharan","Adamawa Fulfulde":"Niger-Congo",Akaselem:"Niger-Congo","Amba (Uganda)":"Niger-Congo",Anii:"Niger-Congo",Baangi:"Niger-Congo",Badyara:"Niger-Congo","Bago-Kusuntu":"Niger-Congo",Bai:"Niger-Congo","Bainouk-Gunyaamolo":"Niger-Congo",Bamanankan:"Niger-Congo","Banda-Mbrès":"Niger-Congo",Bandial:"Niger-Congo",Bankagooma:"Niger-Congo","Belanda Viri":"Niger-Congo",Bemba:"Niger-Congo",Bolgo:"Niger-Congo","Bon Gula":"Niger-Congo",Bua:"Niger-Congo",Chichewa:"Niger-Congo","Chung (Cameroon)":"Niger-Congo","Ci Gbe":"Niger-Congo",Degema:"Niger-Congo",Dek:"Niger-Congo",Dhimba:"Niger-Congo",Dogoso:"Niger-Congo","East Limba":"Niger-Congo",Engenni:"Niger-Congo",Epie:"Niger-Congo",Éwé:"Niger-Congo",Fania:"Niger-Congo",Foodo:"Niger-Congo",Fwe:"Niger-Congo",Gciriku:"Niger-Congo",Gwa:"Niger-Congo",Herero:"Niger-Congo",Ibuoro:"Niger-Congo","Jenaama Bozo":"Niger-Congo",Jita:"Niger-Congo",Jula:"Niger-Congo",Kabiyè:"Niger-Congo",Kadung:"Niger-Congo",Kakabe:"Niger-Congo",Kalamsé:"Niger-Congo","Kami (Tanzania)":"Niger-Congo","Kango (Bas-Uélé District)":"Niger-Congo",Kasem:"Niger-Congo","Kelengaxo Bozo":"Niger-Congo",Khe:"Niger-Congo",Khisa:"Niger-Congo",Kim:"Niger-Congo",Kinyarwanda:"Niger-Congo",Kipfokomu:"Niger-Congo",Kitharaka:"Niger-Congo",Kiyombe:"Niger-Congo",Ko:"Niger-Congo",Koalib:"Niger-Congo",Koke:"Niger-Congo",Konongo:"Niger-Congo","Koro Nulu":"Niger-Congo","Koro Zuba":"Niger-Congo",Kuhane:"Niger-Congo",Kunda:"Niger-Congo",Kuranko:"Niger-Congo",Kuria:"Niger-Congo",Kwangali:"Niger-Congo",Lame:"Niger-Congo",Laru:"Niger-Congo",Lopa:"Niger-Congo","Makhuwa-Meetto":"Niger-Congo","Makhuwa-Shirima":"Niger-Congo","Malawi Nyiha":"Niger-Congo",Mandinka:"Niger-Congo",Mankanya:"Niger-Congo",Mansoanka:"Niger-Congo",Mbukushu:"Niger-Congo","Mende (Sierra Leone)":"Niger-Congo",Miyobe:"Niger-Congo",Mushungulu:"Niger-Congo","Mwali Comorian":"Niger-Congo","Mwera (Chimwera)":"Niger-Congo",Ndemli:"Niger-Congo",Ndengereko:"Niger-Congo",Ndumu:"Niger-Congo",Ndunga:"Niger-Congo","Ndzwani Comorian":"Niger-Congo",Ngile:"Niger-Congo","Northwest Gbaya":"Niger-Congo",Notre:"Niger-Congo",Nyamwanga:"Niger-Congo",Nyankore:"Niger-Congo",Nyengo:"Niger-Congo",Okpamheri:"Niger-Congo",Osatu:"Niger-Congo","Pana (Burkina Faso)":"Niger-Congo",Pulaar:"Niger-Congo",Pular:"Niger-Congo",Rufiji:"Niger-Congo","Sankaran Maninka":"Niger-Congo",Sapo:"Niger-Congo","Senara Sénoufo":"Niger-Congo",Shanga:"Niger-Congo",Sininkere:"Niger-Congo","Southern Ngbandi":"Niger-Congo",Swahili:"Niger-Congo","Syenara Sénoufo":"Niger-Congo",Tagbu:"Niger-Congo",Tagoi:"Niger-Congo",Tegali:"Niger-Congo",Tem:"Niger-Congo","Tiéyaxo Bozo":"Niger-Congo",Tiyaa:"Niger-Congo",Tocho:"Niger-Congo","Tonga (Zambia)":"Niger-Congo",Totela:"Niger-Congo","Toura (Côte d’Ivoire)":"Niger-Congo",Tswa:"Niger-Congo",Tumbuka:"Niger-Congo",Ukaan:"Niger-Congo",Uneme:"Niger-Congo",Vai:"Niger-Congo",Vute:"Niger-Congo",Waama:"Niger-Congo",Warnang:"Niger-Congo",Wolof:"Niger-Congo",Yao:"Niger-Congo",Yauma:"Niger-Congo",Yom:"Niger-Congo","Zan Gula":"Niger-Congo",Zande:"Niger-Congo",Zigula:"Niger-Congo",Mamaindê:"Nambikwara",Aghul:"Nakh-Daghestanian",Akhvakh:"Nakh-Daghestanian",Andi:"Nakh-Daghestanian",Avar:"Nakh-Daghestanian",Bagvalal:"Nakh-Daghestanian",Botlikh:"Nakh-Daghestanian",Chamalal:"Nakh-Daghestanian",Chechen:"Nakh-Daghestanian",Dargwa:"Nakh-Daghestanian",Kaitag:"Nakh-Daghestanian",Karata:"Nakh-Daghestanian",Khvarshi:"Nakh-Daghestanian",Tindi:"Nakh-Daghestanian",Pirahã:"Muran",Bonan:"Mongolic","China Buriat":"Mongolic",Daur:"Mongolic","Kalmyk-Oirat":"Mongolic","Peripheral Mongolian":"Mongolic","Russia Buriat":"Mongolic",Tagdal:"Mixed language",Wutunhua:"Mixed language","Ashéninka Perené":"Maipurean",Baniwa:"Maipurean",Cabiyarí:"Maipurean",Curripaco:"Maipurean","Enawené-Nawé":"Maipurean",Kanamarí:"Maipurean",Mehináku:"Maipurean","Pichis Ashéninka":"Maipurean",Waurá:"Maipurean",Bangime:"Language isolate",Burushaski:"Language isolate","Ai-Cham":"Kra-Dai",Aiton:"Kra-Dai","Dai Zhuang":"Kra-Dai",Duoluo:"Kra-Dai","Green Gelao":"Kra-Dai","Guibian Zhuang":"Kra-Dai",Hlai:"Kra-Dai",Jiamao:"Kra-Dai",Kang:"Kra-Dai",Khün:"Kra-Dai",Kuan:"Kra-Dai",Lachi:"Kra-Dai","Laha (Viet Nam)":"Kra-Dai",Lao:"Kra-Dai",Lü:"Kra-Dai","Mak (China)":"Kra-Dai","Northeastern Thai":"Kra-Dai","Northern Dong":"Kra-Dai","Northern Thai":"Kra-Dai",Nyaw:"Kra-Dai",Phake:"Kra-Dai","Phu Thai":"Kra-Dai",Qabiao:"Kra-Dai",Qau:"Kra-Dai","Qiubei Zhuang":"Kra-Dai",Shan:"Kra-Dai","Southern Dong":"Kra-Dai",Sui:"Kra-Dai","T’en":"Kra-Dai","Tai Daeng":"Kra-Dai","Tai Dam":"Kra-Dai","Tai Hongjin":"Kra-Dai","Tai Nüa":"Kra-Dai","Tai Ya":"Kra-Dai","Tai Yo":"Kra-Dai","Ts’ün-Lao":"Kra-Dai","Yang Zhuang":"Kra-Dai",Yerong:"Kra-Dai",Yong:"Kra-Dai",Yoy:"Kra-Dai",Khoekhoe:"Khoe-Kwadi",Karajá:"Karajá","Pará Gavião":"Jean",Suyá:"Jean",Japanese:"Japonic","Oki-No-Erabu":"Japonic","Toku-No-Shima":"Japonic",Yaeyama:"Japonic",Yoron:"Japonic","Adivasi Oriya":"Indo-European",Afrikaans:"Indo-European","Alviri-Vidari":"Indo-European",Angika:"Indo-European",Assamese:"Indo-European",Bagheli:"Indo-European",Bagri:"Indo-European",Bashkardi:"Indo-European",Bateri:"Indo-European",Bengali:"Indo-European",Bhojpuri:"Indo-European",Bhunjia:"Indo-European",Bilaspuri:"Indo-European",Bosnian:"Indo-European","Braj Bhasha":"Indo-European",Brokskat:"Indo-European",Bundeli:"Indo-European",Catalan:"Indo-European",Chambeali:"Indo-European",Chhattisgarhi:"Indo-European",Dameli:"Indo-European",Dari:"Indo-European",Dhundari:"Indo-European",Dogri:"Indo-European",Domari:"Indo-European",Dutch:"Indo-European","Eastern Balochi":"Indo-European","Eastern Panjabi":"Indo-European","Eastern Yiddish":"Indo-European",English:"Indo-European",French:"Indo-European",Gaddi:"Indo-European",Garhwali:"Indo-European",Gawri:"Indo-European",Gowro:"Indo-European",Gujarati:"Indo-European",Gujari:"Indo-European",Halbi:"Indo-European",Haroti:"Indo-European",Haryanvi:"Indo-European",Hindi:"Indo-European","Indus Kohistani":"Indo-European","Iranian Persian":"Indo-European",Ishkashimi:"Indo-European",Kacchi:"Indo-European",Kalkoti:"Indo-European",Kanauji:"Indo-European",Kangri:"Indo-European",Karingani:"Indo-European",Kashmiri:"Indo-European",Kati:"Indo-European",Khunsari:"Indo-European",Konkani:"Indo-European",Kudmali:"Indo-European",Kumaoni:"Indo-European",Kumzari:"Indo-European",Laki:"Indo-European",Lasi:"Indo-European",Luwati:"Indo-European",Magahi:"Indo-European",Maithili:"Indo-European",Maldivian:"Indo-European",Malvi:"Indo-European",Marathi:"Indo-European","Marwari (India)":"Indo-European",Mewari:"Indo-European",Munji:"Indo-European",Nepali:"Indo-European",Nimadi:"Indo-European","Northern Kurdish":"Indo-European",Odia:"Indo-European","Pahari-Potwari":"Indo-European",Palula:"Indo-European",Panchpargania:"Indo-European",Pangwali:"Indo-European",Parachi:"Indo-European",Portuguese:"Indo-European",Russian:"Indo-European",Sadri:"Indo-European",Sanglechi:"Indo-European",Sarikoli:"Indo-European",Savi:"Indo-European",Semnani:"Indo-European",Serbian:"Indo-European",Shabak:"Indo-European",Shahrudi:"Indo-European",Shekhawati:"Indo-European",Shina:"Indo-European",Shughni:"Indo-European",Shumashti:"Indo-European",Sindhi:"Indo-European",Sivandi:"Indo-European",Soi:"Indo-European","Southern Balochi":"Indo-European",Spanish:"Indo-European",Tajik:"Indo-European",Talysh:"Indo-European",Urdu:"Indo-European",Ushojo:"Indo-European",Vaghri:"Indo-European","Vlax Romani":"Indo-European",Wagdi:"Indo-European",Wakhi:"Indo-European",Waneci:"Indo-European","Western Balochi":"Indo-European",Yadgha:"Indo-European","Bu-Nao Bunu":"Hmong-Mien","Central Mashan Miao":"Hmong-Mien","Chuanqiandian Cluster Miao":"Hmong-Mien","Eastern Xiangxi Miao":"Hmong-Mien","Iu Mien":"Hmong-Mien","Luopohe Miao":"Hmong-Mien","Northern Qiandong Miao":"Hmong-Mien","Pa-Hng":"Hmong-Mien","Southwestern Huishui Miao":"Hmong-Mien","Wunai Bunu":"Hmong-Mien","Younuo Bunu":"Hmong-Mien",Amarakaeri:"Harákmbut",Huachipaeri:"Harákmbut",Cuiba:"Guajiboan",Macaguán:"Guajiboan",Tlicho:"Eyak-Athabaskan",Kannada:"Dravidian",Kodava:"Dravidian","Korra Koraga":"Dravidian","Kota (India)":"Dravidian",Kudiya:"Dravidian",Malapandaram:"Dravidian",Malayalam:"Dravidian",Muthuvan:"Dravidian",Ravula:"Dravidian",Sholaga:"Dravidian",Tamil:"Dravidian",Telugu:"Dravidian",Tulu:"Dravidian",Vishavan:"Dravidian","Andaman Hindi Creole":"Creole","Cocos Islands Malay":"Creole","Juba Arabic":"Creole",Nubi:"Creole",Barí:"Chibchan","Barro Negro Tunebo":"Chibchan","Western Tunebo":"Chibchan",Ikpeng:"Cariban","Kuikúro-Kalapálo":"Cariban",Pemon:"Cariban",Trió:"Cariban","Waimiri-Atroarí":"Cariban",Waiwai:"Cariban",Yukpa:"Cariban",Borôro:"Bororoan",Chachi:"Barbacoan","Abai Sungai":"Austronesian",Ambelau:"Austronesian",Asilulu:"Austronesian",Balaesang:"Austronesian","Batak Alas-Kluet":"Austronesian","Batak Dairi":"Austronesian","Batak Karo":"Austronesian",Bonerate:"Austronesian",Bonggi:"Austronesian",Brunei:"Austronesian","Brunei Bisaya":"Austronesian",Buol:"Austronesian","Central Malay":"Austronesian","Central Sama":"Austronesian","Coastal Konjo":"Austronesian",Dampelas:"Austronesian","Dibabawon Manobo":"Austronesian",Dondo:"Austronesian",Gane:"Austronesian","Geser-Gorom":"Austronesian","Highland Konjo":"Austronesian",Hitu:"Austronesian",Iban:"Austronesian",Indonesian:"Austronesian","Kadazan Dusun":"Austronesian",Kiput:"Austronesian",Komodo:"Austronesian",Kompane:"Austronesian",Lahanan:"Austronesian","Lampung Nyo":"Austronesian","Larike-Wakasihu":"Austronesian",Lola:"Austronesian",Luhu:"Austronesian",Malay:"Austronesian",Mariri:"Austronesian",Moronene:"Austronesian",Rukai:"Austronesian","Sabah Bisaya":"Austronesian","Seit-Kaitetu":"Austronesian",Sula:"Austronesian","Tae’":"Austronesian",Tajio:"Austronesian",Tomini:"Austronesian",Tutong:"Austronesian",Ujir:"Austronesian",Aheu:"Austro-Asiatic",Alak:"Austro-Asiatic",Bit:"Austro-Asiatic","Bo (Laos)":"Austro-Asiatic",Bondo:"Austro-Asiatic",Brao:"Austro-Asiatic",Bugan:"Austro-Asiatic",Chong:"Austro-Asiatic",Chut:"Austro-Asiatic",Danau:"Austro-Asiatic",Halang:"Austro-Asiatic","Halang Doan":"Austro-Asiatic",Hu:"Austro-Asiatic",Hung:"Austro-Asiatic",Ir:"Austro-Asiatic",Kensiu:"Austro-Asiatic",Khmu:"Austro-Asiatic",Khua:"Austro-Asiatic",Khuen:"Austro-Asiatic",Koda:"Austro-Asiatic","Kon Keu":"Austro-Asiatic",Kriang:"Austro-Asiatic",Kuay:"Austro-Asiatic",Laven:"Austro-Asiatic",Maleng:"Austro-Asiatic","Man Met":"Austro-Asiatic",Mang:"Austro-Asiatic",Minriq:"Austro-Asiatic",Mlabri:"Austro-Asiatic",Nguôn:"Austro-Asiatic",Nyaheun:"Austro-Asiatic",Nyahkur:"Austro-Asiatic","O’du":"Austro-Asiatic",Ong:"Austro-Asiatic",Oy:"Austro-Asiatic",Pacoh:"Austro-Asiatic","Phong-Kniang":"Austro-Asiatic",Prai:"Austro-Asiatic",Puoc:"Austro-Asiatic",Rengao:"Austro-Asiatic",Rmeet:"Austro-Asiatic","Rumai Palaung":"Austro-Asiatic",Sapuan:"Austro-Asiatic","Shwe Palaung":"Austro-Asiatic","So (Laos)":"Austro-Asiatic",Sou:"Austro-Asiatic","Tai Loi":"Austro-Asiatic",Talieng:"Austro-Asiatic",Tareng:"Austro-Asiatic",Tho:"Austro-Asiatic",U:"Austro-Asiatic","Upper Ta’oih":"Austro-Asiatic",Vietnamese:"Austro-Asiatic","Western Katu":"Austro-Asiatic",Suruahá:"Arauan",Jarawa:"Andamanese",Öñge:"Andamanese",Sentinel:"Andamanese",Afar:"Afro-Asiatic","Alaba-K’abeena":"Afro-Asiatic",Alagwa:"Afro-Asiatic",Ale:"Afro-Asiatic","Algerian Arabic":"Afro-Asiatic",Amharic:"Afro-Asiatic",Arbore:"Afro-Asiatic","Baharna Arabic":"Afro-Asiatic",Barein:"Afro-Asiatic",Bedawiyet:"Afro-Asiatic",Bidiyo:"Afro-Asiatic",Bilen:"Afro-Asiatic",Birgit:"Afro-Asiatic",Boor:"Afro-Asiatic","Borana-Arsi-Guji Oromo":"Afro-Asiatic",Buduma:"Afro-Asiatic","Central Atlas Tamazight":"Afro-Asiatic","Chadian Arabic":"Afro-Asiatic",Chenoua:"Afro-Asiatic",Ciwogai:"Afro-Asiatic",Daasanach:"Afro-Asiatic",Dabarre:"Afro-Asiatic",Dangaléat:"Afro-Asiatic",Deno:"Afro-Asiatic",Diri:"Afro-Asiatic",Duwai:"Afro-Asiatic","Eastern Egyptian Bedawi Arabic":"Afro-Asiatic","Eastern Oromo":"Afro-Asiatic",Garre:"Afro-Asiatic",Geruma:"Afro-Asiatic",Giiwo:"Afro-Asiatic",Gorowa:"Afro-Asiatic","Gulf Arabic":"Afro-Asiatic","Hadrami Arabic":"Afro-Asiatic",Harsusi:"Afro-Asiatic",Hassaniyya:"Afro-Asiatic",Hausa:"Afro-Asiatic",Hebrew:"Afro-Asiatic","Hijazi Arabic":"Afro-Asiatic",Hobyót:"Afro-Asiatic",Hozo:"Afro-Asiatic",Jiiddu:"Afro-Asiatic",Jimi:"Afro-Asiatic",Jina:"Afro-Asiatic","Jonkor Bourmataguil":"Afro-Asiatic","Judeo-Iraqi Arabic":"Afro-Asiatic","Judeo-Moroccan Arabic":"Afro-Asiatic",Kabalai:"Afro-Asiatic",Kajakse:"Afro-Asiatic",Kariya:"Afro-Asiatic","Karo (Ethiopia)":"Afro-Asiatic",Kutto:"Afro-Asiatic","Levantine Arabic":"Afro-Asiatic",Libido:"Afro-Asiatic","Libyan Arabic":"Afro-Asiatic","Lishana Deni":"Afro-Asiatic",Maaka:"Afro-Asiatic",Maay:"Afro-Asiatic",Majera:"Afro-Asiatic",Male:"Afro-Asiatic",Maslam:"Afro-Asiatic",Masmaje:"Afro-Asiatic",Mburku:"Afro-Asiatic",Mehri:"Afro-Asiatic","Mesopotamian Arabic":"Afro-Asiatic",Migaama:"Afro-Asiatic",Mogum:"Afro-Asiatic","Moroccan Arabic":"Afro-Asiatic",Mositacha:"Afro-Asiatic",Mubi:"Afro-Asiatic",Mukulu:"Afro-Asiatic",Nafusi:"Afro-Asiatic","Najdi Arabic":"Afro-Asiatic",Nyam:"Afro-Asiatic","Omani Arabic":"Afro-Asiatic","Pa’a":"Afro-Asiatic",Saba:"Afro-Asiatic",Saho:"Afro-Asiatic","Sanaani Arabic":"Afro-Asiatic",Seze:"Afro-Asiatic",Shehri:"Afro-Asiatic",Shekkacho:"Afro-Asiatic",Sheko:"Afro-Asiatic","Shihhi Arabic":"Afro-Asiatic",Siwi:"Afro-Asiatic",Sokoro:"Afro-Asiatic",Soqotri:"Afro-Asiatic","South Levantine Arabic":"Afro-Asiatic","Standard Arabic":"Afro-Asiatic","Sudanese Arabic":"Afro-Asiatic","Ta’izzi-Adeni Arabic":"Afro-Asiatic","Tahaggart Tamahaq":"Afro-Asiatic",Taznatit:"Afro-Asiatic",Tigré:"Afro-Asiatic",Toram:"Afro-Asiatic",Tsamai:"Afro-Asiatic",Tumzabt:"Afro-Asiatic",Tunni:"Afro-Asiatic",Waata:"Afro-Asiatic","West Central Oromo":"Afro-Asiatic",Xamtanga:"Afro-Asiatic",Zumbun:"Afro-Asiatic"},Rm="peoplePraying",To=144,Eo={noPrayer:"#e74c3c",hasPrayer:"#f39c12",fullPrayer:"#22c55e"},Br=Eo,Dm={noPrayer:"Needs Prayer",hasPrayer:"Has Prayer",fullPrayer:"Has Full Prayer Coverage"};function Yo(e){var n;const t=e.peoplePraying??((n=e._raw)==null?void 0:n.people_praying)??null,o=Number(t)||0;return o>=To?"fullPrayer":o>0?"hasPrayer":"noPrayer"}function gc(e){return Eo[Yo(e)]}function Om(e){var o;const t=e.peoplePraying??((o=e._raw)==null?void 0:o.people_praying)??null;return t!==null&&t>0}function Bm(e){return Yo(e)==="fullPrayer"}function Um(e){return gc(e)}function fc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","peoplePraying"]:["get","peoplePraying"];return["case",[">=",t,To],Eo.fullPrayer,[">",t,0],Eo.hasPrayer,Eo.noPrayer]}const Gm={name:"Prayer Progress",propertyKey:Rm,palette:Eo,colors:Eo,labels:Dm,threshold:To,getColor:Um,applyColor:fc,buildColorExpression:fc,getPrayerLevel:Yo,getPrayerColor:gc,checkHasPrayer:Om,checkHasFullPrayer:Bm},jm="engagementStatus",go={notEngaged:"#e74c3c",hasEngagement:"#22c55e"},hc=go,Km={notEngaged:"Unengaged",hasEngagement:"Engaged"};function Hm(e){var n;const t=e.engagementStatus??((n=e._raw)==null?void 0:n.people_committed);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?go.hasEngagement:go.notEngaged}function mc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","engagementStatus"]:["get","engagementStatus"];return["case",["==",t,!0],go.hasEngagement,["==",t,1],go.hasEngagement,go.notEngaged]}const zm={name:"Engagement Progress",propertyKey:jm,palette:go,colors:go,labels:Km,getColor:Hm,applyColor:mc,buildColorExpression:mc},Vm="adoptionStatus",fo={notAdopted:"#e74c3c",hasAdoption:"#22c55e"},bc=fo,Wm={notAdopted:"Needs Adoption",hasAdopted:"Has Adoption"};function Ym(e){var n;const t=e.adoptionStatus??((n=e._raw)==null?void 0:n.adopted_by_churches);return t===!0||t===1||typeof t=="number"&&t>0||typeof t=="object"&&(t==null?void 0:t.value)?fo.hasAdoption:fo.notAdopted}function yc({colorSource:e="properties"}={}){const t=e==="feature-state"?["feature-state","adoptionStatus"]:["get","adoptionStatus"];return["case",["==",t,!0],fo.hasAdoption,["==",t,1],fo.hasAdoption,fo.notAdopted]}const qm={name:"Adoption Progress",propertyKey:Vm,palette:fo,colors:fo,labels:Wm,getColor:Ym,applyColor:yc,buildColorExpression:yc},_c="affinityBlock",qo="#95a5a6",Jo={A001:"Arab World",A002:"East Asian Peoples",A003:"Eurasian Peoples",A004:"Horn of Africa Peoples",A005:"Jewish",A006:"Malay Peoples",A007:"Persian-Median Peoples",A008:"South Asian Peoples",A009:"North American Peoples",A010:"Pacific Islanders",A011:"Southeast Asian Peoples",A012:"Sub-Saharan Peoples",A013:"Tibetan-Himalayan Peoples",A014:"Turkic Peoples",A015:"Latin-Caribbean Americans",A017:"Deaf"},Pn={A001:"#E74C3C",A002:"#3498DB",A003:"#2ECC71",A004:"#F39C12",A005:"#9B59B6",A006:"#1ABC9C",A007:"#E67E22",A008:"#34495E",A009:"#95A5A6",A010:"#5DADE2",A011:"#16A085",A012:"#C0392B",A013:"#8E44AD",A014:"#D35400",A015:"#27AE60",A017:"#000000"},Xo=Pn;Object.entries(Jo).reduce((e,[t,o])=>(e[o]=t,e),{});const Jm=Object.entries(Jo).reduce((e,[t,o])=>(e[o]=Xo[t],e),{}),Xm=Jo;function vc(e){return Jo[e]||"Unknown"}function wc(e){return Xo[e]||qo}function Zm(e){return e?typeof e=="string"&&/^A\d{3}$/.test(e)?Xo[e]||qo:Jm[e]||qo:qo}function Qm(){return Object.entries(Jo).map(([e,t])=>({code:e,name:t,color:Xo[e]}))}function eb(e){return{code:e,name:Jo[e]||"Unknown",color:Xo[e]||qo}}function tb(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return wc(t)}function ob(e){var o;const t=e.affinityBlock||((o=e._raw)==null?void 0:o.ROP1);return vc(t)}function kc(){const e=["match",["get",_c]];return Object.entries(Xo).forEach(([t,o])=>{e.push(t,o)}),e.push(qo),e}const nb={name:"Affinity Block",propertyKey:_c,palette:Pn,colors:Pn,names:Xm,getColor:tb,applyColor:kc,buildColorExpression:kc,getName:ob,getAffinityBlockName:vc,getAffinityBlockColor:Zm,getAffinityBlockColorByCode:wc,getAffinityBlocksArray:Qm,getAffinityBlockData:eb},Sc="languageFamily",ab="#000000",Zo={"Indo-European":"#e74c3c",Dravidian:"#ff9800","Afro-Asiatic":"#27ae60","Sino-Tibetan":"#3498db","Niger-Congo":"#9b59b6",Unclassified:"#95a5a6","Nilo-Saharan":"#e91e63","Khoe-Kwadi":"#00bcd4","Austro-Asiatic":"#00bcd4","Kra-Dai":"#8e44ad",Austronesian:"#ff69b4","Hmong-Mien":"#f44336",Turkic:"#ffc107","Nakh-Daghestanian":"#009688",Mongolic:"#795548",Uralic:"#607d8b",Tungusic:"#4caf50",Japonic:"#ff5722",Cariban:"#673ab7",Tupian:"#03a9f4",Tucanoan:"#8bc34a",Maipurean:"#ffc107",Panoan:"#cddc39",Guajiboan:"#9e9e9e",Chibchan:"#ff7043",Quechuan:"#ab47bc",Jean:"#26a69a",Harákmbut:"#7e57c2",Nambikwara:"#42a5f5",Muran:"#66bb6a",Karajá:"#ffa726",Bororoan:"#ef5350",Arauan:"#5c6bc0",Yanomaman:"#26c6da",Yaguan:"#d4e157",Witotoan:"#78909c",Zamucoan:"#8d6e63",Puinavean:"#aed581",Barbacoan:"#4db6ac","Eyak-Athabaskan":"#7986cb","Trans-New Guinea":"#ba68c8",Andamanese:"#4dd0e1","Sign Language":"#212121",Creole:"#9575cd","Mixed language":"#a1887f","Language isolate":"#90a4ae",Unknown:"#000000"};function Mt(e){return Zo[e]||ab}const rb=(()=>{const e=o=>String(o||"").toLowerCase().trim(),t={};for(const o of Object.keys(Zo))t[e(o)]=o;return t})();function Ur(e){if(!e)return"Unknown";const t=String(e).trim();return rb[t.toLowerCase()]||t}function sb(e){var t;return Mt(e.languageFamily||((t=e._normalized)==null?void 0:t.languageFamily))}function Ac(){const e=["match",["get",Sc]];return Object.entries(Zo).forEach(([t,o])=>{e.push(t,o)}),e.push("#95a5a6"),e}const ib={name:"Language Family",propertyKey:Sc,palette:Zo,colors:Zo,getColor:sb,applyColor:Ac,buildColorExpression:Ac,getLanguageFamilyColor:Mt,canonicalFamilyName:Ur};function lb(e){if(!e)return"hsl(0, 60%, 50%)";let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return`hsl(${Math.abs(t%360)}, 60%, 50%)`}const xc="doxaRegion",cb="#0098FF",Lc="#95a5a6",Mn={Africa:"#e74c3c",Asia:"#3498db",Europe:"#2ecc71","Latin America & Caribbean":"#f39c12","Middle East":"#9b59b6","No WAGF Region/Bloc":"#1a1a2e","North America & Non-Spanish Caribbean":"#1abc9c",Oceania:"#e67e22"},Tc={Africa:"#e74c3c","East Asia":"#3498db",Asia:"#3498db",Eurasia:"#2ecc71",Europe:"#2ecc71","Latin America":"#f39c12","Latin America & Caribbean":"#f39c12",Caribbean:"#f39c12","Middle East":"#9b59b6","North America":"#1abc9c","North America (non-spanish)":"#1abc9c","North America & Non-Spanish Caribbean":"#1abc9c",Pacific:"#e67e22",Oceania:"#e67e22","South Asia":"#e67e22","No WAGF Region/Bloc":"#1a1a2e",Unknown:"#0098FF"};function ub(e){if(!e)return cb;const t=Tc[e];return t||lb(e)}function db(e){var o;const t=e.doxaRegion||((o=e._normalized)==null?void 0:o.doxaRegion);return Mn[t]||Lc}function Ec(){const e=["match",["get",xc]];return Object.entries(Mn).forEach(([t,o])=>{e.push(t,o)}),e.push(Lc),e}const pb={name:"DOXA Region",propertyKey:xc,palette:Mn,colors:Mn,aliases:Tc,getColor:db,applyColor:Ec,buildColorExpression:Ec,getRegionColor:ub},gb="resourceType",oo={bible:"#3498db",jesusFilm:"#20c997",radio:"#9b59b6",gospel:"#f39c12",audio:"#1abc9c",stories:"#e74c3c",hasResources:"#27ae60",noResources:"#2c3e50"},_a=["bible","jesusFilm","radio","gospel","audio","stories"],Cc={bible:"Bible",jesusFilm:"Jesus Film",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",hasResources:"Has Resources",noResources:"No Resources"},fb=Cc;function va(e){return{bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories"}[e]}function hb(e){var t;for(const o of _a)if((e[o]||((t=e._raw)==null?void 0:t[va(o)]))==="Available")return oo.hasResources;return oo.noResources}function mb(e){var t;for(const o of _a)if((e[o]||((t=e._raw)==null?void 0:t[va(o)]))==="Available")return!0;return!1}function bb(e){var t;for(const o of _a)if((e[o]||((t=e._raw)==null?void 0:t[va(o)]))==="Available")return o;return"noResources"}function $c(){return["case",["any",["==",["get","bible"],"Available"],["==",["get","jesusFilm"],"Available"],["==",["get","radio"],"Available"],["==",["get","gospel"],"Available"],["==",["get","audio"],"Available"],["==",["get","stories"],"Available"]],oo.hasResources,oo.noResources]}const yb={name:"Gospel Resources",propertyKey:gb,palette:oo,colors:oo,names:Cc,priority:_a,getColor:hb,applyColor:$c,buildColorExpression:$c,hasAnyResource:mb,getResourceType:bb,getCSVColumn:va},_b="religion",Gr="#94a3b8",jr={C:"Christianity",M:"Islam",H:"Hinduism",B:"Buddhism",E:"Ethnoreligion",J:"Judaism",S:"Sikhism",N:"Unaffiliated",O:"Other",U:"Unknown"},St={C:"#3b82f6",M:"#ef4444",H:"#f59e0b",B:"#facc15",E:"#84cc16",J:"#a855f7",S:"#ec4899",N:"#71717a",O:"#ff6b2b",U:"#94a3b8"};function Pc(e){if(!e||typeof e!="string")return"U";const t=e.charAt(0).toUpperCase();return jr[t]?t:"U"}function vb(e){var o,n,a;const t=(e==null?void 0:e.religion)||((n=(o=e==null?void 0:e._raw)==null?void 0:o.religion)==null?void 0:n.value)||((a=e==null?void 0:e._raw)==null?void 0:a.religion);return St[Pc(t)]||Gr}function Mc(){return["match",["slice",["coalesce",["get","religion"],""],0,1],"C",St.C,"M",St.M,"H",St.H,"B",St.B,"E",St.E,"J",St.J,"S",St.S,"N",St.N,"O",St.O,Gr]}const wb={propertyKey:_b,palette:St,families:jr,getColor:vb,applyColor:Mc,buildColorExpression:Mc,fallback:Gr},ze={LANGUAGE_FAMILY:"languageFamily",AFFINITY_BLOCK:"affinityBlock",DOXA_REGION:"doxaRegion",RESOURCE:"resource",PRAYER_PROGRESS:"prayerProgress",ENGAGEMENT:"engagement",ADOPTION:"adoption",RELIGION:"religion"},Ic={[ze.LANGUAGE_FAMILY]:ib,[ze.AFFINITY_BLOCK]:nb,[ze.DOXA_REGION]:pb,[ze.RESOURCE]:yb,[ze.PRAYER_PROGRESS]:Gm,[ze.ENGAGEMENT]:zm,[ze.ADOPTION]:qm,[ze.RELIGION]:wb};function Nc(e){return Ic[e]||Ic[ze.LANGUAGE_FAMILY]}function Kr(e,t={}){return Nc(e).applyColor(t)}(()=>{const e=o=>String(o||"").toLowerCase().replace(/[^a-z0-9]+/g,""),t={};for(const o of Object.keys(Mn))t[e(o)]=o;return t.na="No WAGF Region/Bloc",t})();function Hr(e){return e==null?"":typeof e=="object"?e.label||e.value||"":String(e)}const kb=[[/ sign language$/i,"Sign Language"]];function Sb(e){const t=Hr(e.languageFamily);if(t)return t;const o=Hr(e.language||e.primary_language);if(!o||typeof o!="string")return"";const n=o.trim(),a=n.split(",").map(s=>s.trim()).filter(Boolean);if(a.length>=2){const s=[...a].reverse().join(" ");if(We[s])return We[s];if(a.length>=3){const i=[a[1],a[0]].join(" ");if(We[i])return We[i]}}if(We[n])return We[n];const r=n.replace(/\s*\(.*?\)\s*$/,"").trim();if(r!==n&&We[r])return We[r];for(const[s,i]of kb)if(s.test(n))return i;return""}function Ab(e){const{mapId:t="unknown",dataSourceId:o="doxa-csv",dataSourceManager:n=null,dataStore:a=null,markRaw:r=O=>O}=e;n||console.error("useMapData: dataSourceManager is required!");const s=me(!1),i=me(null),l=me(!1),c=me([]),u=me([]),f=me(null),v=me([]),x=me([]),T=me([]),w=me(null);async function E(){if(!n)throw new Error("dataSourceManager is required for useMapData");s.value=!0,i.value=null;try{if(await n.init(),a&&a.hasSourceData&&a.hasSourceData(o)){const C=a.getSourceData(o);u.value=r(C.normalizedData||[])}else{const C=await n.setActiveSource(o);for(const M of C){const j=Hr(M.language||M.primary_language);j&&(M.language=j);const se=Sb(M);M.languageFamily=Ur(se)}u.value=r(C),a&&a.cacheSourceData&&a.cacheSourceData(o,{normalizedData:C,timestamp:Date.now()})}c.value=r(u.value.map(C=>({id:C.uniqueId,slug:C.slug||"",rop3:C.peopleGroupId,peopleId3:C.peopleId3,name:C.name,language:C.language,languageFamily:C.languageFamily,country:C.country,population:C.population,status:C.engagementStatus||C.status,latitude:C.latitude,longitude:C.longitude,lng:C.longitude,lat:C.latitude,description:C.description,imageUrl:C.imageUrl,doxaRegion:C.doxaRegion||C.wagfRegion||"",peoplePraying:C.peoplePraying??null,_normalized:C})));const O=n.getDataByLanguageFamily();v.value=Object.entries(O).map(([C,M])=>{const j=M.reduce((se,fe)=>{const Z=parseInt(fe.population)||0;return se+Z},0);return{name:C,count:M.length,peopleGroupCount:M.length,population:j,groups:M}}).sort((C,M)=>M.count-C.count);const $=n.getDataByRegion();x.value=Object.entries($).map(([C,M])=>{const j=M.reduce((se,fe)=>{const Z=parseInt(fe.population)||0;return se+Z},0);return{name:C,count:M.length,peopleGroupCount:M.length,population:j,groups:M}}).sort((C,M)=>C.name.localeCompare(M.name));const m={bible:{count:0,population:0,groups:[]},jesusFilm:{count:0,population:0,groups:[]},radio:{count:0,population:0,groups:[]},gospel:{count:0,population:0,groups:[]},audio:{count:0,population:0,groups:[]},stories:{count:0,population:0,groups:[]},hasResources:{count:0,population:0,groups:[]},noResources:{count:0,population:0,groups:[]}};u.value.forEach(C=>{const M=parseInt(C.population)||0;let j=!1;C.bible==="Available"&&(m.bible.count++,m.bible.population+=M,m.bible.groups.push(C),j=!0),C.jesusFilm==="Available"&&(m.jesusFilm.count++,m.jesusFilm.population+=M,m.jesusFilm.groups.push(C),j=!0),C.radio==="Available"&&(m.radio.count++,m.radio.population+=M,m.radio.groups.push(C),j=!0),C.gospel==="Available"&&(m.gospel.count++,m.gospel.population+=M,m.gospel.groups.push(C),j=!0),C.audio==="Available"&&(m.audio.count++,m.audio.population+=M,m.audio.groups.push(C),j=!0),C.stories==="Available"&&(m.stories.count++,m.stories.population+=M,m.stories.groups.push(C),j=!0),j?(m.hasResources.count++,m.hasResources.population+=M,m.hasResources.groups.push(C)):(m.noResources.count++,m.noResources.population+=M,m.noResources.groups.push(C))});const U=u.value.length,H=u.value.reduce((C,M)=>C+(parseInt(M.population)||0),0),I={bible:"Bible",jesusFilm:"Jesus Film",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",hasResources:"Has Resources",noResources:"No Resources"},W={bible:{count:U-m.bible.count,population:H-m.bible.population},jesusFilm:{count:U-m.jesusFilm.count,population:H-m.jesusFilm.population},radio:{count:U-m.radio.count,population:H-m.radio.population},gospel:{count:U-m.gospel.count,population:H-m.gospel.population},audio:{count:U-m.audio.count,population:H-m.audio.population},stories:{count:U-m.stories.count,population:H-m.stories.population}},ue="#2c3e50";return T.value=[{name:I.bible,key:"bible",count:m.bible.count,population:m.bible.population,isParent:!0,children:[{name:"No Bible",key:"noBible",count:W.bible.count,population:W.bible.population,color:ue}]},{name:I.jesusFilm,key:"jesusFilm",count:m.jesusFilm.count,population:m.jesusFilm.population,isParent:!0,children:[{name:"No Jesus Film",key:"noJesusFilm",count:W.jesusFilm.count,population:W.jesusFilm.population,color:ue}]},{name:I.radio,key:"radio",count:m.radio.count,population:m.radio.population,isParent:!0,children:[{name:"No Radio",key:"noRadio",count:W.radio.count,population:W.radio.population,color:ue}]},{name:I.gospel,key:"gospel",count:m.gospel.count,population:m.gospel.population,isParent:!0,children:[{name:"No Gospel",key:"noGospel",count:W.gospel.count,population:W.gospel.population,color:ue}]},{name:I.audio,key:"audio",count:m.audio.count,population:m.audio.population,isParent:!0,children:[{name:"No Audio",key:"noAudio",count:W.audio.count,population:W.audio.population,color:ue}]},{name:I.stories,key:"stories",count:m.stories.count,population:m.stories.population,isParent:!0,children:[{name:"No Stories",key:"noStories",count:W.stories.count,population:W.stories.population,color:ue}]},{name:I.hasResources,key:"hasResources",count:m.hasResources.count,population:m.hasResources.population,isParent:!0,children:[{name:I.noResources,key:"noResources",count:m.noResources.count,population:m.noResources.population,color:ue}]}],w.value=n.getStats(),l.value=!0,{peopleGroups:c.value,normalizedPeopleGroups:u.value,languageFamiliesData:v.value,doxaRegionsData:x.value,resourcesData:T.value,stats:w.value}}catch(O){throw console.error(`Failed to load data for map "${t}":`,O),i.value=O.message||"Failed to load data",O}finally{s.value=!1}}async function _(){var O,$,m;try{const U={},H=u.value||[];for(const I of H){const W=I.countryIso||(($=(O=I._raw)==null?void 0:O.country_code)==null?void 0:$.value)||"",ue=(m=I._raw)==null?void 0:m.wagf_region,C=I.wagfRegionLabel||I.doxaRegionLabel||(ue&&typeof ue=="object"?ue.label:"")||I.doxaRegion||I.wagfRegion||"";W&&C&&!U[W]&&(U[W]=C)}return f.value={isoToRegion:U},f.value}catch(U){throw console.error(`Error building regions data for map "${t}":`,U),i.value=U.message||"Failed to build regions",U}}function S(){return n?n.getDataByLanguageFamily():{}}function g(){return n?n.getDataByRegion():{}}function k(O){return S()[O]||[]}function A(O){return g()[O]||[]}function L(){c.value=[],u.value=[],f.value=null,v.value=[],x.value=[],T.value=[],w.value=null,l.value=!1,i.value=null}return{isLoading:s,isInitialized:l,error:i,peopleGroups:c,normalizedPeopleGroups:u,regionsData:f,languageFamiliesData:v,doxaRegionsData:x,resourcesData:T,stats:w,loadData:E,loadRegionsData:_,getDataByLanguageFamily:S,getDataByRegion:g,getPeopleGroupsByFamily:k,getPeopleGroupsByRegion:A,clearData:L}}const xb={Africa:{zoom:1.3,center:[16.6512,26.3538]},Asia:{zoom:.8,center:[98.2654,49.9282]},Europe:{zoom:1.4,center:[22.7826,70.1026]},"Latin America & Caribbean":{zoom:1.8,center:[-60.4619,10.1428]},"Middle East":{zoom:1.7,center:[22.9056,39.5752]},"No WAGF Region/Bloc":{zoom:.6,center:[-8.2363,44.2392]},"North America & Non-Spanish Caribbean":{zoom:2.1,center:[-68.1935,31.4282]},Oceania:{zoom:1.5,center:[161.6257,-.668]}},wa={circleRadius:{standard:["interpolate",["linear"],["zoom"],0,3,2,3.5,4,4,5,5,6,6.5,7,8,8,10,10,14,12,18,14,22],highlighted:["interpolate",["linear"],["zoom"],0,4,4,5,8,12,12,20],faded:["interpolate",["linear"],["zoom"],0,2,4,2.5,8,5,12,8],compact:["interpolate",["linear"],["zoom"],0,2,4,3,8,6,12,10],large:["interpolate",["linear"],["zoom"],0,4,4,6,8,14,12,24],touchTarget:["interpolate",["linear"],["zoom"],0,14,2,18,4,22,6,24,8,26,10,28,12,32,14,40]},circleStrokeWidth:{standard:["interpolate",["linear"],["zoom"],0,.5,4,.75,8,1,12,1.5],thick:["interpolate",["linear"],["zoom"],0,1,4,1.5,8,2,12,3]}};function Lb(e){return xb[e]||null}function zr(e="standard"){return wa.circleRadius[e]||wa.circleRadius.standard}function Tb(e="standard"){return wa.circleStrokeWidth[e]||wa.circleStrokeWidth.standard}function Eb(e={}){const{getMap:t=()=>null,mapId:o="unknown",getLanguageFamilyColor:n=()=>"#999999",getNormalizedPeopleGroups:a=()=>[]}=e,r=$e("uiStore"),s=me([]);function i(_){const S=n(_.languageFamily),g="https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg";let k=_.imageUrl;(!k||k.includes("NoImageAvailable"))&&(k=g);const A=(_.name||"U")[0].toUpperCase(),L=["#e74c3c","#3498db","#2ecc71","#f39c12","#9b59b6","#1abc9c","#e67e22","#34495e"],O=A.charCodeAt(0)%L.length;return`
<div style="
width: 300px;
background: white;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
">
<!-- Header with Avatar and Name -->
<div style="
display: flex;
align-items: center;
padding: 12px;
border-bottom: 1px solid #efefef;
">
<!-- Avatar -->
<div style="
width: 32px;
height: 32px;
border-radius: 4px;
background-color: ${L[O]};
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
font-size: 16px;
margin-right: 10px;
flex-shrink: 0;
">
${A}
</div>
<!-- Name and Status -->
<div style="flex: 1; min-width: 0;">
<h3 style="
margin: 0;
font-size: 14px;
font-weight: 600;
color: #262626;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
">${_.name}</h3>
<p style="
margin: 2px 0 0 0;
font-size: 12px;
color: #8e8e8e;
">${_.country||"Unknown"} • ${_.status||"Unknown Status"}</p>
</div>
</div>
<!-- Image -->
<div style="
width: 100%;
height: 200px;
background-color: #fafafa;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
">
<img
src="${k}"
alt="${_.name}"
style="
width: 100%;
height: 100%;
object-fit: cover;
"
onerror="this.onerror=null; this.src='${g}'"
/>
</div>
<!-- Info Section -->
<div style="padding: 12px;">
<p style="margin: 0 0 6px 0; font-size: 13px;">
<strong>Language:</strong> ${_.language||"Unknown"}
</p>
<p style="margin: 0 0 6px 0; font-size: 13px;">
<strong>Family:</strong>
<span style="background: ${S}; color: white; padding: 2px 8px; border-radius: 4px; font-size: 12px;">
${_.languageFamily||"Unknown"}
</span>
</p>
${_.population?`<p style="margin: 0 0 6px 0; font-size: 13px;"><strong>Population:</strong> ${_.population}</p>`:""}
${_.description?`<p style="margin: 8px 0; font-size: 13px; color: #262626; line-height: 1.4;">${_.description}</p>`:""}
</div>
</div>
`}function l(_){const S=_.iso_3166_1_alpha_3||"",g=_.name_en||_.name||S,k=a(),A=S.toUpperCase(),L=k.filter(H=>{const I=(H.countryIso||H.country||"").toUpperCase();return I&&I===A}),O=L.length,$=L[0],m=($==null?void 0:$.wagfRegionLabel)||($==null?void 0:$.doxaRegionLabel)||($==null?void 0:$.doxaRegion)||($==null?void 0:$.wagfRegion)||"—",U=($==null?void 0:$.wagfBlockLabel)||($==null?void 0:$.wagfBlock)||"—";return`
<div style="padding: 8px; min-width: 220px;">
<h3 style="margin: 0 0 8px 0; font-size: 16px; font-weight: 600; color: #333;">
${g}
</h3>
<p style="margin: 4px 0; font-size: 14px;">
<strong>WAGF Region:</strong> ${m}
</p>
<p style="margin: 4px 0; font-size: 14px;">
<strong>WAGF Block:</strong> ${U}
</p>
<p style="margin: 4px 0; font-size: 14px;">
<strong>Country:</strong> ${g} (${S})
</p>
<p style="margin: 4px 0; font-size: 14px;">
<strong>UUPG Count:</strong> ${O}
</p>
</div>
`}function c(_){const S=t();if(!S)return;const g=_||"language-family-pins";if(!S.getLayer(g))return;const k=A=>{try{const L=A.features[0],O=L.properties,$=L.geometry.coordinates.slice();for(;Math.abs(A.lngLat.lng-$[0])>180;)$[0]+=A.lngLat.lng>$[0]?360:-360;if(r&&r.legendMode!==void 0){r.selectPeopleGroup(L),r.isMobile&&r.legendState==="collapsed"&&r.setLegendState("open"),r.isMobile||window.dispatchEvent(new CustomEvent("doxa:openDesktopLegend",{detail:{mapId:o}}));return}new mapboxgl.Popup({maxWidth:"320px",className:"people-group-popup"}).setLngLat($).setHTML(i(O)).addTo(S)}catch(L){console.error(` [${o}] Pin click handler error:`,L)}};S.on("click",g,k),s.value.push({event:"click",layer:g,handler:k})}function u(){const _=t();if(!_)return;const S="regions-fill";if(!_.getLayer(S))return;const g=k=>{const A=["language-family-pins","language-family-pins-hitbox","people-groups-pins"];for(const L of A)if(_.getLayer(L)){const O=_.queryRenderedFeatures(k.point,{layers:[L]});if(O&&O.length>0)return}if(k.features&&k.features.length>0){const L=k.features[0].properties;new mapboxgl.Popup().setLngLat(k.lngLat).setHTML(l(L)).addTo(_)}};_.on("click",S,g),s.value.push({event:"click",layer:S,handler:g})}function f(){const _=t();if(!_)return;const S="clusters";if(!_.getLayer(S))return;const g=k=>{const A=_.queryRenderedFeatures(k.point,{layers:[S]});if(!A.length)return;const L=A[0].properties.cluster_id,O=A[0].source;_.getSource(O).getClusterExpansionZoom(L,($,m)=>{$||_.easeTo({center:A[0].geometry.coordinates,zoom:m})})};_.on("click",S,g),s.value.push({event:"click",layer:S,handler:g})}function v(_){const S=t();if(!S||!S.getLayer(_))return;const g=()=>{S.getCanvas().style.cursor="pointer"},k=()=>{S.getCanvas().style.cursor=""};S.on("mouseenter",_,g),S.on("mouseleave",_,k),s.value.push({event:"mouseenter",layer:_,handler:g}),s.value.push({event:"mouseleave",layer:_,handler:k})}function x(){c(),v("language-family-pins"),c("language-family-pins-hitbox"),v("language-family-pins-hitbox"),f(),v("clusters")}function T(){u(),v("regions-fill")}function w(){const _=t();_&&(_.getLayer("language-family-pins")&&x(),_.getLayer("regions-fill")&&T(),_.getLayer("people-groups-pins")&&(c(),v("people-groups-pins")))}function E(){const _=t();if(_){for(const{event:S,layer:g,handler:k}of s.value)try{_.off(S,g,k)}catch{}s.value=[]}}return{attachAllEventHandlers:w,attachLanguageFamilyEvents:x,attachRegionEvents:T,attachPinClickHandler:c,attachRegionClickHandler:u,attachClusterClickHandler:f,attachCursorHandlers:v,detachAllEventHandlers:E,generatePinPopupContent:i,generateRegionPopupContent:l,registeredHandlers:s}}const Cb=[[/ sign language$/i,"Sign Language"]];function $b(e){if(!e||typeof e!="string")return null;const t=e.trim(),o=t.split(",").map(a=>a.trim()).filter(Boolean);if(o.length>=2){const a=[...o].reverse().join(" ");if(We[a])return We[a];if(o.length>=3){const r=[o[1],o[0]].join(" ");if(We[r])return We[r]}}if(We[t])return We[t];const n=t.replace(/\s*\(.*?\)\s*$/,"").trim();if(n!==t&&We[n])return We[n];for(const[a,r]of Cb)if(a.test(t))return r;return null}function Pb(e={}){const{getMap:t=()=>null,mapId:o="unknown",getLanguageFamilyColor:n=()=>"#999999",getNormalizedPeopleGroups:a=()=>[]}=e,r=Eb({getMap:t,mapId:o,getLanguageFamilyColor:n,getNormalizedPeopleGroups:a}),s=me({languageFamilyPins:!1,regions:!1,peopleGroups:!1,familyConnections:!1}),i=me({});function l(Z,ce="languageFamily"){const oe=t();if(!oe||!(Z!=null&&Z.length))return;const ke=Kr(ce),ie=Z.map(z=>{var he,N,d,y,b,P,D,B,Y,q,p,h,F,K,re,ee,R,V,de;return{type:"Feature",properties:{uniqueId:z.id||z.uniqueId,slug:z.slug||((he=z._normalized)==null?void 0:he.slug)||"",rop3:z.rop3||z.peopleGroupId,peopleId3:z.peopleId3||"",name:z.name,language:z.language,languageFamily:z.languageFamily||((N=z._normalized)==null?void 0:N.languageFamily)||$b(z.language)||"Unknown",affinityBlock:z.affinityBlock||z.affbloc||z.Affbloc||((d=z._normalized)==null?void 0:d.affinityBlock)||"Unknown",affinityBlockLabel:z.affinityBlockLabel||((y=z._normalized)==null?void 0:y.affinityBlockLabel)||"",cluster:z.cluster||((b=z._normalized)==null?void 0:b.cluster)||"",clusterLabel:z.clusterLabel||((P=z._normalized)==null?void 0:P.clusterLabel)||"",peopleGroup:z.peopleGroup||((D=z._normalized)==null?void 0:D.peopleGroup)||"",peopleGroupLabel:z.peopleGroupLabel||((B=z._normalized)==null?void 0:B.peopleGroupLabel)||"",doxaRegion:z.doxaRegion||((Y=z._normalized)==null?void 0:Y.doxaRegion)||"Unknown",wagfBlock:z.wagfBlock||((q=z._normalized)==null?void 0:q.wagfBlock)||"",wagfBlockLabel:z.wagfBlockLabel||((p=z._normalized)==null?void 0:p.wagfBlockLabel)||"",wagfRegionLabel:z.wagfRegionLabel||((h=z._normalized)==null?void 0:h.wagfRegionLabel)||"",country:z.country,countryIso:z.countryIso,countryIsoLabel:z.countryIsoLabel,countryName:z.countryName,religion:z.religion,religionCode:z.religionCode,religionLabel:z.religionLabel,religionName:z.religionName,population:z.population,status:z.status,description:z.description||"",imageUrl:z.imageUrl||"",peoplePraying:Number(z.peoplePraying??((F=z._normalized)==null?void 0:F.peoplePraying)??0),engagementStatus:z.engagementStatus===!0||z.engagementStatus===1||!1,adoptionStatus:z.adoptionStatus===!0||z.adoptionStatus===1||!1,bible:z.bible||((K=z._normalized)==null?void 0:K.bible)||"Not Available",jesusFilm:z.jesusFilm||((re=z._normalized)==null?void 0:re.jesusFilm)||"Not Available",radio:z.radio||((ee=z._normalized)==null?void 0:ee.radio)||"Not Available",gospel:z.gospel||((R=z._normalized)==null?void 0:R.gospel)||"Not Available",audio:z.audio||((V=z._normalized)==null?void 0:V.audio)||"Not Available",stories:z.stories||((de=z._normalized)==null?void 0:de.stories)||"Not Available",lng:parseFloat(z.longitude||z.lng)||0},geometry:{type:"Point",coordinates:[parseFloat(z.longitude||z.lng),parseFloat(z.latitude||z.lat)]}}}).filter(z=>!isNaN(z.geometry.coordinates[0])&&!isNaN(z.geometry.coordinates[1])),Fe=.04,ge=z=>`${z.geometry.coordinates[0]},${z.geometry.coordinates[1]}`,Te=new Map;for(const z of ie){const he=ge(z);Te.has(he)||Te.set(he,[]),Te.get(he).push(z)}for(const z of Te.values()){if(z.length<2)continue;const[he,N]=z[0].geometry.coordinates,d=z.length;for(let y=0;y<d;y++){const b=2*Math.PI*y/d;z[y].geometry.coordinates=[he+Fe*Math.cos(b),N+Fe*Math.sin(b)]}}const Ae={type:"FeatureCollection",features:ie};oe.addSource("language-families",{type:"geojson",data:Ae,promoteId:"uniqueId"}),oe.addLayer({id:"language-family-pins-shadow",type:"circle",source:"language-families",paint:{"circle-radius":zr("standard"),"circle-color":"rgba(0,0,0,0.12)","circle-blur":.8,"circle-translate":[0,1],"circle-stroke-width":0,"circle-opacity":1}}),oe.addLayer({id:"language-family-pins",type:"circle",source:"language-families",paint:{"circle-radius":zr("standard"),"circle-color":ke,"circle-stroke-width":Tb("standard"),"circle-stroke-color":"rgba(0,0,0,0.2)","circle-opacity":1,"circle-stroke-opacity":1,"circle-opacity-transition":{duration:250}}}),oe.addLayer({id:"language-family-pins-hitbox",type:"circle",source:"language-families",paint:{"circle-radius":zr("touchTarget"),"circle-color":"rgba(0,0,0,0)","circle-stroke-width":0,"circle-opacity":0}}),s.value.languageFamilyPins=!0,r.attachLanguageFamilyEvents()}function c(Z,ce="doxa-regions"){const oe=t();if(!oe)return;oe.getLayer("regions-fill")&&oe.removeLayer("regions-fill"),oe.getLayer("regions-border")&&oe.removeLayer("regions-border"),oe.getSource("regions")&&oe.removeSource("regions");const ke={Africa:"#e74c3c",Asia:"#3498db",Europe:"#2ecc71","Latin America & Caribbean":"#f39c12","Middle East":"#9b59b6","North America & Non-Spanish Caribbean":"#1abc9c",Oceania:"#e67e22"},ie="#cccccc",Fe=Z&&Z.isoToRegion?Z.isoToRegion:{},ge=[],Te={};for(const[he,N]of Object.entries(Fe)){const d=ke[N];d&&ge.push(he,d),Te[N]||(Te[N]=[]),Te[N].push(he)}i.value=Te;const Ae=ge.length?["match",["get","iso_3166_1_alpha_3"],...ge,ie]:ie,z=oe.getLayer("language-family-pins-shadow")?"language-family-pins-shadow":oe.getLayer("language-family-pins")?"language-family-pins":void 0;oe.addSource("regions",{type:"vector",url:"mapbox://mapbox.country-boundaries-v1"}),oe.addLayer({id:"regions-fill",type:"fill",source:"regions","source-layer":"country_boundaries",paint:{"fill-color":Ae,"fill-opacity":ce==="none"?.1:.2,"fill-antialias":!0,"fill-opacity-transition":{duration:300}}},z),oe.addLayer({id:"regions-border",type:"line",source:"regions","source-layer":"country_boundaries",paint:{"line-color":"rgba(60,60,80,0.35)","line-width":.6}},z),s.value.regions=!0,r.attachRegionEvents()}function u(Z,ce){const oe=t();if(!oe||!Z||!(ce!=null&&ce.length))return;f();const ke=ce.filter(Ae=>{var he;return(Ae.languageFamily||((he=Ae._normalized)==null?void 0:he.languageFamily)||"Unknown")===Z});if(ke.length<2)return;const ie=n(Z),Fe=[],ge=15,Te=[...ke].sort((Ae,z)=>(Ae.longitude||Ae.lng)-(z.longitude||z.lng));for(let Ae=0;Ae<Te.length;Ae++){const z=Te[Ae],he=z.longitude||z.lng,N=z.latitude||z.lat;for(let d=Ae+1;d<Math.min(Ae+15,Te.length);d++){const y=Te[d],b=y.longitude||y.lng,P=y.latitude||y.lat;Math.sqrt(Math.pow(he-b,2)+Math.pow(N-P,2))<ge&&Fe.push({type:"Feature",properties:{family:Z},geometry:{type:"LineString",coordinates:[[he,N],[b,P]]}})}}oe.addSource("family-connections",{type:"geojson",data:{type:"FeatureCollection",features:Fe}}),oe.addLayer({id:"family-connection-lines",type:"line",source:"family-connections",paint:{"line-color":ie,"line-width":.75,"line-opacity":.5}},"language-family-pins"),s.value.familyConnections=!0}function f(){const Z=t();Z&&(Z.getLayer("family-connection-lines")&&Z.removeLayer("family-connection-lines"),Z.getSource("family-connections")&&Z.removeSource("family-connections"),s.value.familyConnections=!1)}function v(Z,ce){const oe=t();if(!oe)return;const ke=oe.getSource(Z);ke&&ke.setData(ce)}function x(Z,ce=null){const oe=t();oe&&(oe.getLayer(Z)&&oe.removeLayer(Z),oe.getSource(ce||Z)&&oe.removeSource(ce||Z))}function T(Z){const ce=t();return ce?!!ce.getLayer(Z):!1}function w(Z,ce,oe){const ke=t();!ke||!ke.getLayer(Z)||ke.setPaintProperty(Z,ce,oe)}function E(){r.detachAllEventHandlers()}let _=null,S=!1,g=0;const k="prayer-glow-base",A=4,L=[];for(let Z=0;Z<A;Z++)L.push("prayer-glow-ring-"+Z);const O=[k,...L],$=6,m=.3,U=2.5;function H(){return["case",[">=",["get","peoplePraying"],To],"#15803d",[">",["get","peoplePraying"],0],"#d97706","rgba(0,0,0,0)"]}const I=[0,5,2,6,4,7,5,9,6,12,7,14,8,18,10,25,12,32,14,40];function W(Z,ce){const oe=["interpolate",["linear"],["zoom"]];for(let ke=0;ke<Z.length;ke+=2)oe.push(Z[ke],Z[ke+1]*ce);return oe}function ue(){const Z=t();if(!Z||!Z.getSource("language-families"))return;const ce=[">",["get","peoplePraying"],0],oe=H();if(!O.every(ie=>Z.getLayer(ie))){for(const ie of O)if(Z.getLayer(ie))try{Z.removeLayer(ie)}catch{}Z.addLayer({id:k,type:"circle",source:"language-families",filter:ce,paint:{"circle-radius":W(I,1),"circle-color":oe,"circle-blur":.3,"circle-opacity":.45,"circle-stroke-width":0}},"language-family-pins");for(const ie of L)Z.addLayer({id:ie,type:"circle",source:"language-families",filter:ce,paint:{"circle-radius":W(I,1),"circle-color":"rgba(0,0,0,0)","circle-blur":0,"circle-opacity":1,"circle-stroke-width":2,"circle-stroke-color":oe,"circle-stroke-opacity":0}},"language-family-pins")}}function C(){const Z=t();if(Z)for(const ce of O)Z.getLayer(ce)&&Z.removeLayer(ce)}function M(Z){const ce=t();if(!ce)return;const oe=[">",["get","peoplePraying"],0],ke=Z?["all",oe,Z]:oe;for(const ie of O)if(ce.getLayer(ie))try{ce.setFilter(ie,ke)}catch{}}function j(){const Z=t();if(Z){if(ue(),_&&(cancelAnimationFrame(_),_=null),S=!0,Z.getLayer("language-family-pins"))try{Z.setLayoutProperty("language-family-pins","circle-sort-key",["case",[">=",["get","peoplePraying"],To],1,[">",["get","peoplePraying"],0],1,3])}catch{}se()}}function se(){_&&(cancelAnimationFrame(_),_=null);const Z=++g;let ce=performance.now();function oe(ke){if(!S||Z!==g)return;const ie=t();if(!ie||!O.some(ge=>ie.getLayer(ge))){_=null;return}const Fe=(ke-ce)/1e3;for(let ge=0;ge<A;ge++){const Te=L[ge];if(!ie.getLayer(Te))continue;const Ae=ge*($/A),he=((Fe-Ae)%$+$)%$/$,N=m+he*(U-m),d=.5*(1-he);try{ie.setPaintProperty(Te,"circle-radius",W(I,N)),ie.setPaintProperty(Te,"circle-stroke-opacity",d),ie.setPaintProperty(Te,"circle-stroke-width",2.5),ie.setPaintProperty(Te,"circle-blur",0)}catch{}}_=requestAnimationFrame(oe)}_=requestAnimationFrame(oe)}function fe(){S=!1,_&&(cancelAnimationFrame(_),_=null);try{C();const Z=t();Z&&Z.getLayer("language-family-pins")&&Z.setLayoutProperty("language-family-pins","circle-sort-key",void 0)}catch{}}return{layersAdded:s,regionIsoMap:i,addLanguageFamilyLayer:l,addRegionsLayer:c,addFamilyConnectionLines:u,removeFamilyConnectionLines:f,updateLayerSource:v,removeLayer:x,hasLayer:T,setPaintProperty:w,mapEvents:r,startPrayerGlow:j,stopPrayerGlow:fe,syncGlowFilter:M,cleanup:E}}const Vr="#1a1a1a",ho="selected-pin-highlight";function Mb(e=Vr){const t=document.createElement("div");t.className="doxa-go-pin-wrapper";const o=`pinGrad-${Math.random().toString(36).slice(2,8)}`;return t.innerHTML=`
<style>
/* Angled, brush-style pin (qa: 2026-05-06 user feedback — wanted a more
hand-drawn / painterly feel like the reference image they shared).
Slight tilt + diagonal gradient + a stronger drop-shadow gives the pin
a "set down on the map" look without rendering raster art. */
.doxa-go-pin-wrapper {
position: relative;
width: 32px;
height: 40px;
pointer-events: none;
overflow: visible;
}
.doxa-go-pin__svg {
position: relative;
width: 32px;
height: 40px;
filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.4));
}
</style>
<svg
class="doxa-go-pin__svg"
viewBox="-2 -2 32 40"
xmlns="http://www.w3.org/2000/svg"
aria-label="Selected people group"
>
<defs>
<linearGradient id="${o}" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="${e}" stop-opacity="0.92"/>
<stop offset="55%" stop-color="${e}" stop-opacity="1"/>
<stop offset="100%" stop-color="#000" stop-opacity="0.85"/>
</linearGradient>
</defs>
<path
d="M14 1 C6.8 1 1 6.8 1 14 C1 24 14 35 14 35 C14 35 27 24 27 14 C27 6.8 21.2 1 14 1 Z"
fill="none" stroke="white" stroke-width="2" stroke-linejoin="round"
/>
<path
d="M14 1 C6.8 1 1 6.8 1 14 C1 24 14 35 14 35 C14 35 27 24 27 14 C27 6.8 21.2 1 14 1 Z"
fill="url(#${o})"
/>
</svg>
`,t}function Ib(e={}){const{getMap:t=()=>null}=e,o=$e("uiStore");let n=null,a=null;const r=$e("getActivePinColor",null);let s=Vr,i=null;function l(){const w=t();w&&(w.getLayer(ho)||w.getSource("language-families")&&w.addLayer({id:ho,type:"circle",source:"language-families",paint:{"circle-radius":["interpolate",["linear"],["zoom"],0,3,2,3.5,4,4,5,5,6,6.5,7,8,8,10,10,14,12,18,14,22],"circle-color":s,"circle-opacity":1,"circle-stroke-width":2,"circle-stroke-color":"#FFFFFF","circle-stroke-opacity":1},filter:["==",["get","uniqueId"],"__none__"]}))}function c(){(!n||i!==s)&&(n=Mb(s),i=s)}function u(w,E){const _=t();_&&(c(),a&&a.remove(),a=new mapboxgl.Marker({element:n,anchor:"bottom",offset:[0,0]}).setLngLat([w,E]).addTo(_))}function f(){a&&(a.remove(),a=null)}function v(w){var L,O;const E=t();if(!E)return;const _=(r==null?void 0:r(w==null?void 0:w.properties))??Vr;if(_!==s&&(s=_,E.getLayer(ho)&&E.setPaintProperty(ho,"circle-color",s)),l(),!w){E.getLayer(ho)&&E.setFilter(ho,["==",["get","uniqueId"],"__none__"]),f();return}const S=((L=w.properties)==null?void 0:L.uniqueId)||"__none__",g=(O=w.geometry)==null?void 0:O.coordinates;if(!g)return;E.getLayer(ho)&&E.setFilter(ho,["==",["get","uniqueId"],S]);const[k,A]=g;u(k,A)}Ye(()=>o.selectedPeopleGroup,w=>{v(w)});function x(){l()}function T(){f(),n=null}return{initialize:x,cleanup:T,updateSelectedPin:v}}function mo(e,t){const o=t||Nb(e);ao(()=>{var i;const n=ro();if(!n)return;const a=(i=n.proxy)==null?void 0:i.$el;if(!a)return;const r=a.getRootNode();if(!(r instanceof ShadowRoot)||r.querySelector(`style[data-shadow-styles="${o}"]`))return;const s=document.createElement("style");s.setAttribute("data-shadow-styles",o),s.textContent=e,r.appendChild(s)})}function Nb(e){let t=0;for(let o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o),t|=0;return"s"+Math.abs(t).toString(36)}const Fb={_meta:{_comment:"Merged from doxa-research-mfe (winner on drift) + doxa-simple-map-mfe (adds keys research lacks). Single source of truth for all 1040-maps bundles.",mergedFrom:["doxa-research-mfe/src/config/sources.json","doxa-simple-map-mfe/src/config/sources.json"],mergedAt:"2026-05-08",rule:"research wins on conflict; simple adds missing"},activeSource:"pray-tools",sources:{"pray-tools":{id:"pray-tools",name:"Prayer.Tools API",type:"rest-api",description:"pray.doxa.life live API — people-group prayer, engagement, and adoption data. Base URL read from window.MAP_APP_API_URL or VITE_API_BASE_URL at runtime.",endpoints:{bulk:"/api/people-groups/list",detail:"/api/people-groups/detail/{slug}",statistics:"/api/people-groups/statistics"},queryParams:{lang:"en"},defaultFields:["slug","name","latitude","longitude","wagf_region","wagf_block","wagf_member","rop1","imb_reg_of_people_2","imb_reg_of_people_25","imb_reg_of_people_3","country_code","religion","population","has_photo","image_url","people_praying","people_committed","adopted_by_churches","engagement_status","primary_language","imb_language_family","imb_language_class","imb_language_speakers"],pollFields:["slug","people_praying"],pollInterval:3e5,fallbackSourceId:null,fieldMappings:{uniqueId:"slug",slug:"slug",name:"name",latitude:"latitude",longitude:"longitude",wagfRegion:"wagf_region",doxaRegion:"wagf_region",wagfBlock:"wagf_block",wagfMember:"wagf_member",affinityBlock:"rop1",countryIso:"country_code",religion:"religion",religionCode:"religion",population:"population",hasPhoto:"has_photo",imageUrl:"image_url",photoUrl:"image_url",peoplePraying:"people_praying",peopleCommitted:"people_committed",engagementStatus:"engagement_status",adoptionStatus:"adopted_by_churches",language:"primary_language",cluster:"imb_reg_of_people_2",peopleGroup:"imb_reg_of_people_25",peopleGroupCountry:"imb_reg_of_people_3",languageFamily:"imb_language_family",languageClass:"imb_language_class",languageSpeakers:"imb_language_speakers"},imageConfig:{useField:"imageUrl",fallbackField:null,fallbackUrlTemplate:null,placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg",useSvgPlaceholder:!0}},"doxa-api":{id:"doxa-api",name:"DOXA API",type:"api",url:"https://uupg.doxa.life/wp-json/dt-public/disciple-tools-people-groups-api/v1/data/all/",description:"DOXA WordPress API with detailed descriptions and photos",fieldMappings:{uniqueId:"dt_id",peopleGroupId:"dt_id",peopleId3:"",name:"imb_display_name",slug:"slug",description:"imb_people_description",country:"imb_isoalpha3",countryIso:"imb_isoalpha3",region:"doxa_wagf_region",wagfRegion:"doxa_wagf_region",doxaRegion:"doxa_wagf_region",wagfBlock:"doxa_wagf_block",latitude:"imb_lat",longitude:"imb_lng",population:"imb_population",religion:"imb_reg_of_religion",religionCode:"imb_reg_of_religion_3",hasPhoto:"imb_has_photo",photoUrl:"imb_picture_url",photoCredit:"imb_picture_credit_html"},imageConfig:{useField:"photoUrl",fallbackField:null,fallbackUrlTemplate:null,placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg"}},"doxa-csv":{id:"doxa-csv",name:"DOXA People Groups CSV",type:"csv",path:"assets/data/Joshua-project-ids-Doxa-1439.csv",description:"People groups dataset from DOXA / Joshua Project",fieldMappings:{uniqueId:"ROP3",peopleGroupId:"ROP3",countryCode:"ROG",peopleId3:"PeopleID3",name:"Name",displayName:"NmDisp",alternateName:"NmAlt",description:"PeopleDesc",locationDescription:"LocationDe",country:"Ctry",countryIso:"ISOalpha3",region:"Regn",subRegion:"RegnSub",wagfRegion:"WAGF Region",doxaRegion:"WAGF Region",wagfBlock:"WAGF BLOCK",affinityBloc:"Affbloc",affinityBlock:"ROP1",affinityCode:"AffCd",affinityName:"Aff",peopleCluster:"PplClstr",ethneName:"Ethne",latitude:"Latitude",longitude:"Longitude",population:"Pop",populationClass:"PopCls",status:"Status",engagementStatus:"EngStat",evangelicalLevel:"EvngLvl",gsec:"GSEC",gsecBrief:"GSECbrf",gsecLong:"GSEClng",spiScore:"SPI",spiDescription:"SPIdesc",language:"Lang",languageCode:"ROL",languageFamily:"LangFamily",religion:"Rlgn",religionCode:"ROR",religionDescription:"RORdesc",religionBase:"RlgnBs",religionDiv:"RlgnDiv",bible:"Bible",jesusFilm:"Jesus",radio:"Radio",gospel:"Gospel",audio:"Audio",stories:"Stories",resourcesTotal:"ResTot",bibleLevel:"LvlBible",yearPublished:"YrPub",photoCredit:"PicCrdt",photoUrl:"PicURL",hasPhoto:"Photo",isIndigenous:"Indigenous"},imageConfig:{useField:"photoUrl",fallbackField:"peopleId3",fallbackUrlTemplate:"https://joshuaproject.net/assets/media/profiles/photos/p{peopleId3}.jpg",placeholderUrl:"https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg"}}},systemFields:{uniqueId:{description:"Unique identifier per row (slug for API, ROP3+ROG for CSV)",required:!0},peopleGroupId:{description:"People group ID — same group can appear in multiple countries",required:!0},name:{description:"People group display name",required:!0},latitude:{description:"Latitude coordinate for map pin",required:!0},longitude:{description:"Longitude coordinate for map pin",required:!0},engagementStatus:{description:"Boolean — true if engaged_status = 'engaged'",required:!1},adoptionStatus:{description:"Boolean — true if adopted_by_churches > 0",required:!1},peoplePraying:{description:"Number of people currently praying for this group — from pray-tools API",required:!1},peopleCommitted:{description:"Raw count of committed workers for this group — source of engagementStatus",required:!1},languageFamily:{description:"Language family name",required:!1},religion:{description:"Primary religion",required:!1},population:{description:"Population count",required:!1},doxaRegion:{description:"WAGF/DOXA region name",required:!1},photoUrl:{description:"URL to people group photo",required:!1},description:{description:"People group description text",required:!1}}},Wr={};function Fc(){return typeof window<"u"&&window.MAP_APP_API_URL||typeof{url:xa&&xa.tagName.toUpperCase()==="SCRIPT"&&xa.src||new URL("doxa-simple-map.js",document.baseURI).href}<"u"&&(Wr==null?void 0:Wr.VITE_API_BASE_URL)||""}class Rb{constructor(){this.sourcesConfig=null,this.activeSource=null,this.rawData=[],this.normalizedData=[],this.dataByUniqueId=new Map,this.baseUrl=typeof window<"u"&&window.MAP_APP_BASE_URL||"./",this.cache=new Map,this.cacheEnabled=!0,this.cacheTTL=5*60*1e3}async init(){return this.sourcesConfig=Fb,this.sourcesConfig}getActiveSourceId(){var t;return((t=this.sourcesConfig)==null?void 0:t.activeSource)||"doxa-csv"}getSourceConfig(t){var o,n;return(n=(o=this.sourcesConfig)==null?void 0:o.sources)==null?void 0:n[t]}async setActiveSource(t){const o=this.getSourceConfig(t);if(!o)throw new Error(`Source not found: ${t}`);if(this.activeSource=o,this.cacheEnabled&&this.cache.has(t)){const n=this.cache.get(t);return this.normalizedData=n.normalizedData,this.dataByUniqueId=n.dataByUniqueId,this.normalizedData}return o.type==="csv"?await this.loadCSVData(o):o.type==="api"?await this.loadAPIData(o):o.type==="rest-api"&&await this.loadRestApiData(o),this.cacheEnabled&&this.cache.set(t,{normalizedData:this.normalizedData,dataByUniqueId:this.dataByUniqueId,timestamp:Date.now()}),this.normalizedData}clearCache(t=null){t?this.cache.delete(t):this.cache.clear()}isCached(t){return this.cache.has(t)}async loadActiveSource(){return this.sourcesConfig||await this.init(),this.setActiveSource(this.getActiveSourceId())}parseCSV(t){const o=[],n=[];let a="",r=!1,s=[],i=!0;for(let l=0;l<t.length;l++){const c=t[l],u=t[l+1];if(c==='"')r&&u==='"'?(a+='"',l++):r=!r;else if(c===","&&!r)s.push(a.trim()),a="";else if((c===`
`||c==="\r")&&!r){if(c==="\r"&&u===`
`&&l++,a||s.length>0){if(s.push(a.trim()),a="",i)n.push(...s),i=!1;else if(s.length>1){const f={};n.forEach((v,x)=>{f[v]=s[x]||""}),o.push(f)}s=[]}}else a+=c}if((a||s.length>0)&&(s.push(a.trim()),!i&&s.length>1)){const l={};n.forEach((c,u)=>{l[c]=s[u]||""}),o.push(l)}return{headers:n,data:o}}async loadCSVData(t){try{const n=await(await fetch(this.baseUrl+t.path)).text(),{headers:a,data:r}=this.parseCSV(n);return this.rawData=r,this.validateFieldMappings(t.fieldMappings,a,t.name),this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load CSV data:",o),o}}validateFieldMappings(t,o,n){const a=new Set(o.map(s=>s.trim())),r=[];for(const[s,i]of Object.entries(t||{}))if(Array.isArray(i))for(const l of i)a.has(l)||r.push({systemField:s,sourceField:l,isComposite:!0});else i&&!a.has(i)&&r.push({systemField:s,sourceField:i,isComposite:!1});r.length>0&&console.warn(`[DataSourceManager] ${n}: missing CSV columns:`,r)}async loadAPIData(t){try{const n=await(await fetch(t.url||t.endpoint)).json();return this.rawData=Array.isArray(n)?n:n.posts||n.data||n.peopleGroups||n.results||[],this.normalizeData(t),this.normalizedData}catch(o){throw console.error("Failed to load API data:",o),o}}async loadRestApiData(t){var l,c;const o=Fc(),n=((l=t.endpoints)==null?void 0:l.bulk)||"/api/people-groups/list",a=((c=t.defaultFields)==null?void 0:c.join(","))||"",r=[];a&&r.push(`fields=${a}`);const s={...t.queryParams||{}};for(const[u,f]of Object.entries(s))r.push(`${u}=${encodeURIComponent(f)}`);r.push(`_=${Date.now()}`);const i=`${o}${n}?${r.join("&")}`;try{const u=await fetch(i,{cache:"no-store"});if(!u.ok)throw new Error(`HTTP ${u.status}: ${u.statusText}`);const f=u.headers.get("content-type")||"";if(!f.includes("application/json"))throw new Error(`API returned "${f}" instead of JSON. Server at ${o} may be down or misconfigured.`);const v=await u.json();return this.rawData=Array.isArray(v)?v:v.posts||v.data||v.results||[],this.normalizeData(t),this.normalizedData}catch(u){throw console.error(`[rest-api] Failed to load from ${t.id}:`,u),u}}normalizeData(t){const o=t.fieldMappings||{};this.normalizedData=[],this.dataByUniqueId=new Map;for(const n of this.rawData){const a={};for(const[l,c]of Object.entries(o))if(Array.isArray(c)){const u=c.map(f=>this.getFieldValue(n,f));a[l]=u.join("_")}else a[l]=this.getFieldValue(n,c);if(a.latitude=parseFloat(a.latitude)||0,a.longitude=parseFloat(a.longitude)||0,a.latitude===0&&a.longitude===0)continue;a.populationNum=this.parsePopulation(a.population),a.imageUrl=this.getImageUrl(a,t.imageConfig);const r=a.engagementStatus;r!=null&&(typeof r=="object"&&"value"in r?(a.engagementStatusLabel=r.label||r.value,a.engagementStatus=r.value==="engaged"):a.engagementStatus=r===!0||r===1||r==="1"||r==="true"||typeof r=="number"&&r>0||typeof r=="string"&&parseInt(r,10)>0);const s=a.adoptionStatus;s!=null&&(a.adoptionStatus=s===!0||s===1||s==="1"||s==="true"||typeof s=="object"&&!!(s!=null&&s.value)||typeof s=="number"&&s>0||typeof s=="string"&&parseInt(s,10)>0);const i=["doxaRegion","wagfRegion","wagfBlock","wagfMember","affinityBlock","cluster","peopleGroup","countryIso","religion","religionCode"];for(const l of i){const c=a[l];c!=null&&typeof c=="object"&&"value"in c?(a[l+"Label"]=c.label||c.value,a[l]=c.value):c!=null&&typeof c=="string"&&c!==""&&(a[l+"Label"]||(a[l+"Label"]=c))}a.countryName=a.countryIsoLabel||a.country||a.countryIso||"",a.religionName=a.religionLabel||a.religion||"",a._raw=n,this.normalizedData.push(a),this.dataByUniqueId.set(a.uniqueId,a)}this.rawData=null}getFieldValue(t,o){if(!o)return"";if(t[o]!==void 0)return t[o];const n=o.trim();if(t[n]!==void 0)return t[n];for(const a of Object.keys(t))if(a.trim()===n||a.includes(n)||n.includes(a.trim()))return t[a];return""}parsePopulation(t){if(!t)return 0;const o=String(t).replace(/,/g,"").trim(),n=parseInt(o,10);return isNaN(n)?0:n}getImageUrl(t,o){if(!o)return"";const n=o.placeholderUrl||"",a=t[o.useField];return a&&String(a).trim()&&!String(a).includes("NoImageAvailable")?a:n}getData(){return this.normalizedData}getByUniqueId(t){return this.dataByUniqueId.get(t)}getByCoordinates(t,o,n=1e-4){return this.normalizedData.find(a=>Math.abs(a.latitude-t)<n&&Math.abs(a.longitude-o)<n)}getByPeopleGroupId(t){return this.normalizedData.filter(o=>o.peopleGroupId===t)}getLanguageFamilies(){const t=new Set;return this.normalizedData.forEach(o=>{o.languageFamily&&t.add(o.languageFamily)}),Array.from(t).sort()}getDataByLanguageFamily(){const t={};return this.normalizedData.forEach(o=>{const n=o.languageFamily||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getDataByRegion(){const t={};return this.normalizedData.forEach(o=>{const n=o.doxaRegion||"Unknown";t[n]||(t[n]=[]),t[n].push(o)}),t}getStats(){return{totalRecords:this.normalizedData.length,withPeopleId3:this.normalizedData.filter(t=>t.peopleId3).length,withPhotos:this.normalizedData.filter(t=>t.imageUrl&&!String(t.imageUrl).includes("NoImageAvailable")).length,languageFamilies:this.getLanguageFamilies().length,countries:new Set(this.normalizedData.map(t=>t.country)).size,regions:Object.keys(this.getDataByRegion()).length}}}const bo={center:[20,10],zoom:1.8,pitch:20,bearing:0};function Db(e){return(e==null?void 0:e.properties)||e||{}}function ka(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function Ob(e){if(!e||typeof e!="string")return null;const t=e.split(",").map(n=>n.trim()).filter(Boolean);if(t.length>=2){const n=[...t].reverse().join(" ");if(We[n])return We[n];if(t.length>=3){const a=[t[1],t[0]].join(" ");if(We[a])return We[a]}}if(We[e])return We[e];const o=e.replace(/\s*\(.*?\)\s*$/,"").trim();return o!==e&&We[o]?We[o]:null}const Bb=[[/ sign language$/i,"Sign Language"]];function Ub(e){if(!e||typeof e!="string")return"— Unknown —";const t=e.indexOf(",");return t>0?e.slice(0,t).trim():e.trim()}function Gb(e){if(!e||typeof e!="string")return null;const t=e.indexOf(",");return t>=0&&e.slice(t+1).trim()||null}function jb(e){var s,i,l,c;const t=e.language_family??e.languageFamily??((s=e._raw)==null?void 0:s.LanguageFamily)??((i=e._raw)==null?void 0:i.language_family),o=ka(t),n=Ur(o);if(n&&n!=="Unknown")return n;const a=e.primary_language??e.primaryLanguage??((l=e._raw)==null?void 0:l.PrimaryLanguage)??((c=e._raw)==null?void 0:c.primary_language),r=ka(a);if(r){const u=String(r).trim(),f=Ob(u);if(f)return f;for(const[v,x]of Bb)if(v.test(u))return x}return"Unknown"}function Kb(e){var a,r;const t=((a=e._raw)==null?void 0:a.primary_language)??((r=e._raw)==null?void 0:r.PrimaryLanguage);if(t){const s=ka(t);if(s)return String(s).trim()}const o=e.primary_language??e.primaryLanguage??e.language,n=ka(o);return n&&String(n).trim()||"— Unknown —"}function Hb(e){var o,n;const t=e.population??((o=e._raw)==null?void 0:o.Population)??((n=e._raw)==null?void 0:n.population)??0;return parseInt(t,10)||0}function zb(e,t){var o,n;return(e==null?void 0:e.id)??t.id??t.peopleGroupId??((o=t._raw)==null?void 0:o.PeopleID3)??((n=t._raw)==null?void 0:n.PeopleID)??null}function Vb(e,t){return(e==null?void 0:e.clusterId)??t.clusterId??null}function Wb(e,t){var a,r,s,i;const o=parseFloat(t.latitude??t.lat??((a=t._raw)==null?void 0:a.Latitude)??((r=t._raw)==null?void 0:r.latitude)),n=parseFloat(t.longitude??t.lng??((s=t._raw)==null?void 0:s.Longitude)??((i=t._raw)==null?void 0:i.longitude));return!isFinite(o)||!isFinite(n)?null:[n,o]}function Yb(e,t){return t.peopleGroupCount!==e.peopleGroupCount?t.peopleGroupCount-e.peopleGroupCount:(t.population||0)-(e.population||0)}function Sa(e,t){return(t.population||0)!==(e.population||0)?(t.population||0)-(e.population||0):t.peopleGroupCount-e.peopleGroupCount}function Rc(e,t={}){t.aggregator;const o=Io({});function n(w){return!!o[w]}function a(w){o[w]=!o[w]}function r(w){const E=new Set(Array.isArray(w)?w:[]);for(const _ of Object.keys(o))E.has(_)||(o[_]=!1);for(const _ of E)o[_]=!0}const s=Q(()=>{const w=(e==null?void 0:e.value)||[],E=new Map;for(const _ of w){const S=Db(_),g=jb(S),k=Kb(S),A=Ub(k),L=Gb(k),O=Hb(S),$=zb(_,S),m=Vb(_,S),U=Wb(_,S);let H=E.get(g);H||(H={key:g,peopleGroupCount:0,population:0,pinIds:[],coords:[],clusterId:null,languages:new Map},E.set(g,H)),H.peopleGroupCount+=1,H.population+=O,$!=null&&H.pinIds.push($),U&&H.coords.push(U),m&&!H.clusterId&&(H.clusterId=m);let I=H.languages.get(A);if(I||(I={key:A,peopleGroupCount:0,population:0,pinIds:[],coords:[],clusterId:null,dialects:new Map},H.languages.set(A,I)),I.peopleGroupCount+=1,I.population+=O,$!=null&&I.pinIds.push($),U&&I.coords.push(U),m&&!I.clusterId&&(I.clusterId=m),L){let W=I.dialects.get(L);W?W.originalLabels.add(k):(W={key:L,peopleGroupCount:0,population:0,pinIds:[],coords:[],originalLabels:new Set([k])},I.dialects.set(L,W)),W.peopleGroupCount+=1,W.population+=O,$!=null&&W.pinIds.push($),U&&W.coords.push(U)}}return E}),i=t.showAllKnown!==!1,l=Q(()=>{const w=s.value,E=[],_=new Set;for(const S of w.values())E.push({key:S.key,label:S.key,color:Mt(S.key),peopleGroupCount:S.peopleGroupCount,population:S.population,kind:S.clusterId?"cluster":"family",clusterId:S.clusterId||void 0,pinIds:S.pinIds,coords:S.coords}),_.add(S.key);if(i)for(const S of Object.keys(Zo))_.has(S)||E.push({key:S,label:S,color:Mt(S),peopleGroupCount:0,population:0,kind:"family",pinIds:[],coords:[]});return E.sort(Yb),E});function c(w){const E=s.value.get(w);if(!E)return[];const _=[];for(const S of E.languages.values())_.push({key:`${w}__${S.key}`,label:S.key,color:Mt(w),peopleGroupCount:S.peopleGroupCount,population:S.population,kind:S.clusterId?"cluster":"language",familyKey:w,clusterId:S.clusterId||void 0,pinIds:S.pinIds,coords:S.coords,hasDialects:S.dialects.size>0});return _.sort(Sa),_}function u(w){const E=w.indexOf("__");if(E<0)return[];const _=w.slice(0,E),S=w.slice(E+2),g=s.value.get(_);if(!g)return[];const k=g.languages.get(S);if(!k)return[];const A=[];for(const L of k.dialects.values())A.push({key:`${w}__${L.key}`,label:`${S}, ${L.key}`,dialectOnly:L.key,color:Mt(_),peopleGroupCount:L.peopleGroupCount,population:L.population,kind:"dialect",languageKey:S,familyKey:_,pinIds:L.pinIds,coords:L.coords,originalLabels:Array.from(L.originalLabels)});return A.sort(Sa),A}const f=Q(()=>{const w=s.value,E=[];for(const _ of w.values())for(const S of _.languages.values())E.push({key:`${_.key}__${S.key}`,label:S.key,color:Mt(_.key),peopleGroupCount:S.peopleGroupCount,population:S.population,kind:S.clusterId?"cluster":"language",familyKey:_.key,clusterId:S.clusterId||void 0,pinIds:S.pinIds,coords:S.coords,hasDialects:S.dialects.size>0});return E.sort(Sa),E}),v=Q(()=>{const w=s.value,E=[];for(const _ of w.values())for(const S of _.languages.values())for(const g of S.dialects.values())E.push({key:`${_.key}__${S.key}__${g.key}`,label:`${S.key}, ${g.key}`,dialectOnly:g.key,color:Mt(_.key),peopleGroupCount:g.peopleGroupCount,population:g.population,kind:"dialect",languageKey:S.key,familyKey:_.key,pinIds:g.pinIds,coords:g.coords,originalLabels:Array.from(g.originalLabels)});return E.sort(Sa),E});function x(w){let E=w;if(typeof w=="string"&&(E=l.value.find(S=>S.key===w),!E))return;const _={kind:E.kind,pinIds:E.pinIds||[],coords:E.coords||[]};E.kind==="family"&&(_.familyKey=E.label),E.kind==="language"&&(_.languageKey=E.label,_.familyKey=E.familyKey),E.kind==="dialect"&&(_.dialectKey=E.key,_.dialectOnly=E.dialectOnly||E.label,_.languageKey=E.languageKey,_.familyKey=E.familyKey,_.originalLabels=E.originalLabels||[]),E.kind==="cluster"&&(_.clusterId=E.clusterId),typeof window<"u"&&typeof window.CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("legend:highlight",{detail:_}))}const T=Q(()=>{const w=s.value,E=[];for(const _ of w.values()){const S=Mt(_.key),g=[];for(const A of _.languages.values()){A.key&&A.key!=="— Unknown —"&&g.push(A.key);for(const L of A.dialects.values())for(const O of L.originalLabels)O&&g.push(O)}const k={id:`fam:${_.key}`,label:_.key,color:S,count:_.peopleGroupCount,pop:_.population,filter:g.length>0?["any",["==",["get","languageFamily"],_.key],["in",["get","language"],["literal",Array.from(new Set(g))]]]:["==",["get","languageFamily"],_.key],children:[]};for(const A of _.languages.values()){const L=A.key,O={id:`lang:${_.key}__${L}`,label:L,color:S,count:A.peopleGroupCount,pop:A.population,filter:["any",["==",["get","language"],L],["==",["slice",["get","language"],0,L.length+1],L+","],["in"," "+L,["get","language"]]],children:[]};for(const $ of A.dialects.values()){const m=Array.from($.originalLabels);O.children.push({id:`dial:${_.key}__${L}__${$.key}`,label:`${L}, ${$.key}`,color:S,count:$.peopleGroupCount,pop:$.population,filter:m.length===1?["==",["get","language"],m[0]]:["in",["get","language"],["literal",m]],originalLabels:m,children:[]})}k.children.push(O)}E.push(k)}return E.sort((_,S)=>S.pop-_.pop||S.count-_.count),E});return{rows:l,languageRows:f,dialectRows:v,langTree:T,toggle:a,isExpanded:n,setExpansionToOnly:r,childRowsFor:c,dialectRowsFor:u,highlight:x}}const qb=[],Jb={Africa:"#e74c3c",Asia:"#3498db",Europe:"#2ecc71","Latin America & Caribbean":"#f39c12","Middle East":"#9b59b6","No WAGF Region/Bloc":"#95a5a6","North America & Non-Spanish Caribbean":"#1abc9c",Oceania:"#e67e22"},Dc={"Arab World":"#3aac4c",Deaf:"#FFFFFF","East Asian Peoples":"#f7ee6a","Eurasian Peoples":"#ffefbd","Horn of Africa Peoples":"#d37429",Jews:"#710f11","Latin-Caribbean Americans":"#e61e24","Malay Peoples":"#acd566","North American Peoples":"#f87d80","Pacific Islanders":"#418c71","Persian-Median":"#20306c","South Asian Peoples":"#a7892f","Southeast Asian Peoples":"#e84e21","Sub-Saharan Peoples":"#9e4821","Tibetan-Himalayan Peoples":"#426eb5","Turkic Peoples":"#b57bb5"};function Co(e,t){const a=Object.values(e.sources||{}).flatMap(r=>(r==null?void 0:r.features)||[]).filter(r=>t(r.properties||r));return{count:a.length,population:a.reduce((r,s)=>{var l;const i=s.properties||s;return r+(parseInt(i.population||((l=i._raw)==null?void 0:l.Population)||0)||0)},0)}}function Oc(e){var o;const t=e.engagementStatus??((o=e._raw)==null?void 0:o.people_committed);return t===!0||t===1||t==="1"||t==="true"||typeof t=="number"&&t>0||typeof t=="string"&&parseInt(t,10)>0}function Bc(e){var o;const t=e.adoptionStatus??((o=e._raw)==null?void 0:o.adopted_by_churches);return t===!0||t===1||t==="1"||t==="true"||typeof t=="number"&&t>0||typeof t=="string"&&parseInt(t,10)>0}const Xb={prayer:"legend.title.prayer",engagement:"legend.title.engagement",adoption:"legend.title.adoption","language-families":"legend.title.languageFamilies","language-family":"legend.title.languageFamilies","doxa-regions":"legend.title.doxaRegions","doxa-region":"legend.title.doxaRegions","affinity-blocs":"legend.title.affinityBlocs","gospel-resources":"legend.title.gospelResources",religion:"legend.title.religion"};function In(e){return e==="doxa-region"?"doxa-regions":e}function Zb(e){return e?e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString():"0"}function Qb(e){return(Number(e)||0).toLocaleString()}function Yr(e,t={}){const o=$e("dataStore"),n=$e("uiStore"),a=$e("mapStore"),{t:r}=gt(),s=Q(()=>{if(In(e.value)==="religion")return"Religion";const w=Xb[e.value];return w?r(w):""}),i=Q(()=>In(e.value)==="affinity-blocs"?qb:[{key:"count",label:r("legend.columns.upgs"),width:48},{key:"population",label:r("legend.columns.population"),width:48}]),l=Q(()=>{const T=In(e.value);return T==="prayer"?n.prayerFilter:T==="engagement"?n.engagementFilter:T==="adoption"?n.adoptionFilter:T==="language-families"?a.selectedFamily:T==="doxa-regions"?a.selectedRegion:T==="gospel-resources"?a.selectedResource:T==="religion"?n.religionFilter:null});function c(T){const w=In(e.value);w==="prayer"?n.setPrayerFilter(n.prayerFilter===T?null:T):w==="engagement"?n.setEngagementFilter(n.engagementFilter===T?null:T):w==="adoption"?n.setAdoptionFilter(n.adoptionFilter===T?null:T):w==="language-families"?a.selectFamily(a.selectedFamily===T?null:T):w==="doxa-regions"?a.selectRegion(a.selectedRegion===T?null:T):w==="gospel-resources"?a.selectResource(a.selectedResource===T?null:T):w==="religion"&&n.setReligionFilter(n.religionFilter===T?null:T)}const u=Q(()=>{var w,E,_,S;const T=In(e.value);if(T==="prayer"){const g=Co(o,L=>Yo(L)==="noPrayer"),k=Co(o,L=>Yo(L)==="hasPrayer"),A=Co(o,L=>Yo(L)==="fullPrayer");return[{key:"noPrayer",label:r("legend.prayer.needsPrayer"),color:Br.noPrayer,count:g.count,population:g.population,filterKey:"noPrayer",children:[{key:"hasPrayer",label:r("legend.prayer.hasPrayer"),color:Br.hasPrayer,count:k.count,population:k.population,filterKey:"hasPrayer"},{key:"fullPrayer",label:r("legend.prayer.fullPrayerCoverage"),color:Br.fullPrayer,count:A.count,population:A.population,filterKey:"fullPrayer"}]}]}if(T==="engagement"){const g=Co(o,A=>!Oc(A)),k=Co(o,A=>Oc(A));return[{key:"notEngaged",label:r("legend.engagement.needsEngagement"),color:hc.notEngaged,count:g.count,population:g.population,filterKey:"notEngaged",children:[{key:"hasEngagement",label:r("legend.engagement.hasEngagement"),color:hc.hasEngagement,count:k.count,population:k.population,filterKey:"hasEngagement"}]}]}if(T==="adoption"){const g=Co(o,A=>!Bc(A)),k=Co(o,A=>Bc(A));return[{key:"notAdopted",label:r("legend.adoption.needsAdoption"),color:bc.notAdopted,count:g.count,population:g.population,filterKey:"notAdopted",children:[{key:"hasAdoption",label:r("legend.adoption.hasAdoption"),color:bc.hasAdoption,count:k.count,population:k.population,filterKey:"hasAdoption"}]}]}if(T==="religion"){const g={},A=Object.values(o.sources||{}).flatMap($=>($==null?void 0:$.features)||[]);for(const $ of A){const m=$.properties||$,U=m.religion||((E=(w=m._raw)==null?void 0:w.religion)==null?void 0:E.value)||((_=m._raw)==null?void 0:_.religion)||"",H=Pc(U);g[H]||(g[H]={count:0,population:0}),g[H].count+=1,g[H].population+=parseInt(m.population||((S=m._raw)==null?void 0:S.Population)||0)||0}const L=new Set((t==null?void 0:t.excludeReligionFamilies)||[]);for(const $ of L)delete g[$];return Object.keys(g).sort(($,m)=>$==="C"?-1:m==="C"?1:g[m].population-g[$].population).map($=>({key:$,label:jr[$]||"Unknown",color:St[$]||"#94a3b8",count:g[$].count,population:g[$].population,filterKey:$,children:[]}))}if(T==="language-families")return(o.languageFamiliesData||[]).map(g=>({key:g.name,label:g.name,color:Mt(g.name),count:g.count,population:g.population,filterKey:g.name,children:[]}));if(T==="language-family"){const k={value:Object.values(o.sources||{}).flatMap(L=>(L==null?void 0:L.features)||[])},{rows:A}=Rc(k);return A.value.map(L=>({key:L.key,label:L.label,color:L.color,count:L.peopleGroupCount,population:L.population,filterKey:L.key,children:[]}))}if(T==="doxa-regions")return(o.doxaRegionsData||[]).map(g=>({key:g.name,label:g.name,color:Jb[g.name]||"#999",count:g.count,population:g.population,filterKey:g.name,children:[]}));if(T==="gospel-resources"){const g=o.resourcesData||[];return Object.keys(oo).map(k=>{const A=g.find(L=>L.key===k);return{key:k,label:fb[k]||k,color:oo[k],count:(A==null?void 0:A.count)||0,population:(A==null?void 0:A.population)||0,filterKey:k,children:((A==null?void 0:A.children)||[]).map(L=>({key:L.key,label:L.name||L.key,color:L.color||oo[k],count:L.count||0,population:L.population||0,filterKey:L.key}))}})}return T==="affinity-blocs"?Object.keys(Dc).map(g=>({key:g,label:g,color:Dc[g],filterKey:g,children:[]})):[]});function f(T,w){return T.reduce((E,_)=>{var g;let S=_[w]||0;return(g=_.children)!=null&&g.length&&(S+=f(_.children,w)),E+S},0)}const v=Q(()=>f(u.value,"count")),x=Q(()=>f(u.value,"population"));return{items:u,columns:i,title:s,activeFilter:l,setFilter:c,totalCount:v,totalPopulation:x,fmtPop:Zb,fmtCount:Qb}}const ey={key:0,class:"lrg-title-row"},ty={class:"lrg-title-caret-slot"},oy={class:"lrg-title"},ny={class:"lrg-row"},ay=["onClick"],ry={key:1,class:"lrg-caret-placeholder","aria-hidden":"true"},sy=["onClick"],iy={class:"lrg-name"},ly={class:"lrg-badge-inner"},cy=["onClick"],uy={class:"lrg-name"},dy={class:"lrg-badge-inner"},py={key:1,class:"lrg-footer"},gy={class:"lrg-footer-label"},Uc=Ao({__name:"LegendRows",props:{title:{type:String,default:""},items:{type:Array,required:!0},columns:{type:Array,default:()=>[]},activeFilter:{type:String,default:null},isDark:{type:Boolean,default:!1},hideColumnHeader:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1},totalCount:{type:Number,default:0},totalPopulation:{type:Number,default:0},fmtPop:{type:Function,default:e=>String(e||0)},fmtCount:{type:Function,default:e=>String(e||0)},disableCollapse:{type:Boolean,default:!1}},emits:["filter-click"],setup(e){const{t}=gt();mo(`
/* ── LegendRows — single flat grid with an invisible caret column.
Spec: docs/legend-spec.md. One parent grid (.lrg-items) with subgrid
children (.lrg-title-row, .lrg-row, .lrg-footer). Col 1 is the caret
column (doubles as the legend's left padding); last col is a matching
trailing track (right padding). Both are --lrg-caret-col wide so the
legend is visually symmetric without any outer left/right padding. ── */
.legend-row-group{--lrg-caret-col:30px;display:flex;flex-direction:column;height:100%;min-height:0;}
/* The grid + scroll container. Tracks:
[caret --lrg-caret-col] [name 1fr] [UPGS auto] [POPULATION auto] [trailing --lrg-caret-col].
Title row + every data row is a subgrid of these tracks.
align-content:start — CRITICAL: without this, grid auto-rows STRETCH to
fill flex:1 parent. Packing rows to the top keeps them at natural height. */
/* No top padding here — the sticky .lrg-title-row owns that space via its
own padding-top so its white/dark bg covers what would otherwise be a
transparent gutter that scrolled rows leak through (2026-04-27). */
.lrg-items{display:grid;grid-template-columns:var(--lrg-grid-cols, var(--lrg-caret-col) minmax(80px,1fr) auto auto var(--lrg-caret-col));grid-auto-rows:auto;align-content:start;column-gap:6px;row-gap:6px;padding:0 0 12px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;}
.lrg-items::-webkit-scrollbar{display:none;width:0;height:0;}
/* Title row — first row of the table. Plain (not colored). Shares tracks.
Col 1 = title caret slot, col 2 = title text, cols 3+ = column headers.
position:sticky keeps it visible when the user scrolls long row lists
(qa.md frozen-header request 2026-04-27). */
/* padding-top:12px is INSIDE the sticky element so the white/dark bg
covers the gutter that would otherwise be transparent. line-height:1.2
on the title (not 1) so cap-letter ascenders / G aren't clipped. */
.lrg-title-row{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;align-items:center;padding:12px 0 6px;position:sticky;top:0;z-index:5;background:#fff;}
.lrg-dark .lrg-title-row{background:#3b463d;}
.lrg-title-caret-slot{grid-column:1;align-self:center;display:flex;align-items:center;justify-content:center;line-height:1;}
.lrg-title{grid-column:2;align-self:center;font-weight:600;font-size:13px;line-height:1.2;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lrg-header-col{align-self:center;text-align:center;white-space:nowrap;font-size:10px;line-height:1.3;color:#888;text-transform:uppercase;letter-spacing:0.3px;font-weight:700;}
/* Data row — subgrid of .lrg-items. Caret lives in col 1 (real grid cell,
not absolute); the pill spans cols 2 to -2 so the trailing column stays
empty as right padding. */
.lrg-row{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;align-items:center;}
.lrg-row-child{margin-left:0;}
/* .lrg-item and .lrg-item-inner are layout-transparent on desktop so the
subgrid stays flat. LegendMobile.vue overrides these at higher specificity
so mobile keeps its own block layout. */
.lrg-item{display:contents;cursor:pointer;}
.lrg-item-inner{display:grid;grid-template-columns:subgrid;grid-column:2 / -2;align-items:center;border-radius:6px;min-height:36px;padding:6px 0;transition:opacity 0.15s ease;}
.lrg-item-inner:hover{opacity:0.92;}
.lrg-item.selected .lrg-item-inner{outline:2px solid rgba(0,0,0,0.25);outline-offset:-2px;}
/* Caret — real grid cell in col 1, centered. Zero padding per spec: the
column width IS the padding, the caret just sits in the middle of it. */
.lrg-caret{grid-column:1;justify-self:center;align-self:center;width:10px;height:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;background:none;border:none;padding:0;transition:transform 0.2s ease;outline:none;-webkit-tap-highlight-color:transparent;opacity:0.85;}
.lrg-caret:focus{outline:none;}
.lrg-caret.expanded{transform:rotate(90deg);}
/* Empty col-1 slot on non-tree rows — keeps subgrid flat without rendering
anything visible. */
.lrg-caret-placeholder{grid-column:1;display:block;}
/* Name — first pill column (col 2 of parent grid, col 1 of the subgrid). */
.lrg-name{grid-column:1;padding:0 0 0 8px;font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Badges — auto-placed into the remaining subgrid tracks. Centered in track.
Background darkens the row color by 28% (mix with #000) so white badge text
stays readable on bright rows like the engagement-tab "Engaged" green. The
previous mix used currentColor (which is white in light mode), so on bright
rows it LIGHTENED the badge — wrong direction. qa: 2026-05-02. */
.lrg-badge{display:flex;align-items:center;justify-content:center;}
.lrg-badge-inner{display:inline-block;background:color-mix(in srgb, var(--lrg-item-color, #888), #000 28%);border-radius:8px;padding:2px 10px;font-size:11px;font-weight:600;font-family:'Courier New',monospace;white-space:nowrap;min-width:32px;text-align:center;}
/* Footer — col 1 empty (matches caret column), col 2 label, trailing values. */
.lrg-footer{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;align-items:center;padding:5px 0;border-top:1px solid rgba(0,0,0,0.07);font-size:11px;font-weight:600;color:#555;background:#fff;position:sticky;bottom:0;}
.lrg-footer-caret-slot{grid-column:1;}
.lrg-footer-label{grid-column:2;color:#777;}
.lrg-footer-value{text-align:center;font-family:'Courier New',monospace;}
/* ── Light mode ── text over colored pills is white. Badge text gets the
same shadow as the label so the count/pop digits stay readable on bright
backgrounds (engagement-tab "Engaged" green was unreadable without it). */
.lrg-light .lrg-name{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,0.35);}
.lrg-light .lrg-badge-inner{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,0.4);}
.lrg-light .lrg-caret{color:#666;}
/* ── Dark mode ── */
.lrg-dark .lrg-name{color:#F3F3F1;text-shadow:0 1px 2px rgba(0,0,0,0.4);}
.lrg-dark .lrg-badge-inner{color:#F3F3F1;text-shadow:0 1px 2px rgba(0,0,0,0.4);}
.lrg-dark .lrg-caret{color:rgba(243,243,241,0.75);}
.lrg-dark .lrg-title{color:#F3F3F1;}
.lrg-dark .lrg-header-col{color:rgba(243,243,241,0.65);}
.lrg-dark .lrg-footer{background:#2a332a;border-top-color:rgba(255,255,255,0.1);color:rgba(243,243,241,0.75);}
.lrg-dark .lrg-footer-label{color:rgba(243,243,241,0.65);}
`,"legend-row-group");const o=e,n=Io({});function a(s){n[s]=!n[s]}const r=Q(()=>`var(--lrg-caret-col) minmax(80px, 1fr) ${o.columns.map(()=>"auto").join(" ")} var(--lrg-caret-col)`);return(s,i)=>(J(),ne("div",{class:Be(["legend-row-group",e.isDark?"lrg-dark":"lrg-light"])},[G("div",{class:"lrg-items",style:ct({"--lrg-grid-cols":r.value})},[!e.hideColumnHeader&&(e.title||e.columns.length)?(J(),ne("div",ey,[G("span",ty,[ta(s.$slots,"title-caret",{},void 0,!0)]),G("span",oy,ye(e.title),1),(J(!0),ne(Ie,null,Bt(e.columns,l=>(J(),ne("span",{key:l.key,class:"lrg-header-col"},ye(l.label),1))),128))])):we("",!0),(J(!0),ne(Ie,null,Bt(e.items,l=>(J(),ne(Ie,{key:l.key},[G("div",ny,[l.children&&l.children.length&&!e.disableCollapse?(J(),ne("button",{key:0,class:Be(["lrg-caret",{expanded:!n[l.key]}]),onClick:Et(c=>a(l.key),["stop"]),"aria-label":"Toggle children"},[...i[0]||(i[0]=[G("svg",{width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,ay)):(J(),ne("span",ry)),G("div",{class:Be(["lrg-item",{selected:e.activeFilter===l.filterKey}]),onClick:c=>s.$emit("filter-click",l.filterKey)},[G("div",{class:"lrg-item-inner",style:ct({backgroundColor:l.color,"--lrg-item-color":l.color})},[G("span",iy,ye(l.label),1),(J(!0),ne(Ie,null,Bt(e.columns,c=>(J(),ne("span",{key:c.key,class:"lrg-badge"},[G("span",ly,ye(c.key==="population"?e.fmtPop(l.population):e.fmtCount(l.count)),1)]))),128))],4)],10,sy)]),l.children&&l.children.length&&!n[l.key]?(J(!0),ne(Ie,{key:0},Bt(l.children,c=>(J(),ne("div",{key:c.key,class:"lrg-row lrg-row-child"},[i[1]||(i[1]=G("span",{class:"lrg-caret-placeholder","aria-hidden":"true"},null,-1)),G("div",{class:Be(["lrg-item",{selected:e.activeFilter===c.filterKey}]),onClick:u=>s.$emit("filter-click",c.filterKey)},[G("div",{class:"lrg-item-inner",style:ct({backgroundColor:c.color,"--lrg-item-color":c.color})},[G("span",uy,ye(c.label),1),(J(!0),ne(Ie,null,Bt(e.columns,u=>(J(),ne("span",{key:u.key,class:"lrg-badge"},[G("span",dy,ye(u.key==="population"?e.fmtPop(c.population):e.fmtCount(c.count)),1)]))),128))],4)],10,cy)]))),128)):we("",!0)],64))),128)),e.columns.length&&e.showFooter?(J(),ne("div",py,[i[2]||(i[2]=G("span",{class:"lrg-footer-caret-slot","aria-hidden":"true"},null,-1)),G("span",gy,ye(pe(t)("legend.footer.total")),1),(J(!0),ne(Ie,null,Bt(e.columns,l=>(J(),ne("span",{key:l.key,class:"lrg-footer-value"},ye(l.key==="population"?e.fmtPop(e.totalPopulation):e.fmtCount(e.totalCount)),1))),128))])):we("",!0)],4)],2))}},[["__scopeId","data-v-686c20a7"]]),Gc=["#e74c3c","#3498db","#2ecc71","#f39c12","#9b59b6","#1abc9c","#e67e22","#34495e"];function jc(e){const t=(e||"U")[0].toUpperCase(),o=t.charCodeAt(0)%Gc.length,n=Gc[o];return{letter:t,color:"#ffffff",backgroundColor:n}}function fy(e,t={}){const{size:o=32,borderRadius:n=4}=t,a=jc(e);return{width:`${o}px`,height:`${o}px`,borderRadius:`${n}px`,backgroundColor:a.backgroundColor,color:a.color,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"600",fontSize:`${Math.floor(o*.5)}px`,flexShrink:"0"}}const hy={key:0,class:"detail-header"},my={class:"header-left"},by={class:"header-text"},yy={class:"people-group-name"},_y={class:"people-group-subtitle"},vy=["aria-label"],wy={class:"detail-content"},ky={key:0,class:"pg-name-lead"},Sy={class:"action-buttons"},Ay={class:"quick-stats"},xy={class:"stat-item"},Ly={class:"stat-label"},Ty={class:"stat-value"},Ey={class:"stat-item"},Cy={class:"stat-label"},$y={class:"stat-value"},Py={class:"stat-item"},My={class:"stat-label"},Iy={class:"stat-value"},Ny={class:"stat-item"},Fy={class:"stat-label"},Ry={class:"stat-value"},Dy={key:1,class:"image-container position-inside"},Oy=["src","alt"],By={key:2,class:"description-section"},Uy={key:0,class:"description-text"},Gy={key:1,class:"description-text empty"},Kc="https://www.peoplegroups.org/images/pgphotosearch/NoImageAvailable_search.jpg",Hc=Ao({__name:"PeopleGroupDetail",props:{peopleGroup:{type:Object,required:!0},hideHeader:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},action:{type:String,default:"pray",validator:e=>["pray","adopt","none"].includes(e)}},setup(e){const{t,locale:o}=gt();mo(`
.people-group-detail{display:flex;flex-direction:column;height:100%;overflow-y:auto;}
.people-group-detail.dark-mode{background:#1a1a2e;color:#eee;}
.detail-header{display:flex;justify-content:space-between;align-items:flex-start;padding:16px;border-bottom:1px solid #e0e0e0;background:white;position:sticky;top:0;z-index:10;}
.dark-mode .detail-header{background:#16213e;border-bottom-color:#2d2d4e;}
.header-left{display:flex;gap:12px;align-items:center;flex:1;min-width:0;}
.header-text{flex:1;min-width:0;}
.people-group-name{margin:0;font-size:18px;font-weight:700;color:#333;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text;-webkit-user-select:text;cursor:text;}
.dark-mode .people-group-name{color:#fff;}
.people-group-subtitle{margin:4px 0 0 0;font-size:13px;color:#666;line-height:1.2;}
.dark-mode .people-group-subtitle{color:#aaa;}
.close-button{background:none;border:none;padding:4px;cursor:pointer;color:#666;transition:color 0.2s ease;flex-shrink:0;}
.dark-mode .close-button{color:#aaa;}
.close-button:hover{color:#333;}
.dark-mode .close-button:hover{color:#fff;}
.detail-content{padding:6px 12px 12px;flex:1;overflow-y:auto;}
.dark-mode .detail-content{background:#1a1a2e;}
.quick-stats{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;}
.stat-item{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;}
.stat-label{color:#666;font-weight:500;}
.dark-mode .stat-label{color:#9ca3af;}
.stat-value{color:#333;font-weight:600;text-align:right;}
.dark-mode .stat-value{color:#e5e7eb;}
/* Name lead — rendered when the parent legend hides its own header
(hideHeader=true). Stands in for the old legend-header title bar. */
.pg-name-lead{margin:0 0 8px 0;font-size:16px;font-weight:700;color:#333;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text;-webkit-user-select:text;cursor:text;}
.dark-mode .pg-name-lead{color:#F3F3F1;}
.action-buttons{display:flex;gap:8px;padding-top:4px;margin-bottom:10px;overflow-x:auto;padding-bottom:2px;}
.action-btn{display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all 0.2s ease;white-space:nowrap;flex-shrink:0;}
.action-btn.primary{background:#92b195;color:white;}
.action-btn.primary:hover{background:#73A17F;box-shadow:0 2px 4px rgba(146,177,149,0.3);}
.action-btn.secondary{background:#ecf0f1;color:#333;}
.dark-mode .action-btn.secondary{background:#2d2d4e;color:#e5e7eb;}
.action-btn.secondary:hover{background:#d5dbdb;}
.dark-mode .action-btn.secondary:hover{background:#3d3d5e;}
.btn-icon{flex-shrink:0;}
.image-container{margin-bottom:16px;border-radius:8px;overflow:hidden;background:#f5f5f5;position:relative;}
.dark-mode .image-container{background:#2d2d4e;}
.image-container.position-above{width:120px;height:150px;margin:0 auto 16px auto;}
.image-container.position-inside{width:200px;height:250px;margin:0 auto 16px auto;}
.people-group-image{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 0.3s ease;}
.people-group-image.loaded{opacity:1;}
.image-placeholder-svg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#f0f0f0;transition:opacity 0.3s ease;}
.dark-mode .image-placeholder-svg{background:#2d2d4e;}
.image-placeholder-svg.hidden{opacity:0;pointer-events:none;}
.description-section{margin-top:16px;padding-top:16px;border-top:1px solid #e0e0e0;}
.dark-mode .description-section{border-top-color:#2d2d4e;}
.description-text{margin:0;font-size:14px;line-height:1.6;color:#555;}
.dark-mode .description-text{color:#d1d5db;}
.description-text.empty{color:#999;font-style:italic;}
.dark-mode .description-text.empty{color:#6b7280;}
`,"legend-people-group-detail");const n=e,a=$e("uiStore"),r=Q(()=>a.legendState),s=Q(()=>a.isMobile),i=Q(()=>!s.value||r.value==="fullyOpen"),l=Q(()=>jc(n.peopleGroup.properties.name)),c=Q(()=>l.value.letter),u=Q(()=>fy(n.peopleGroup.properties.name,{size:32,borderRadius:4})),f=Q(()=>n.peopleGroup.properties),v=me(null),x=me(!1),T=Q(()=>f.value.slug||"");async function w(C){if(!C)return;const M=Fc();if(M)try{const j=await fetch(`${M}/api/people-groups/detail/${encodeURIComponent(C)}?lang=${encodeURIComponent(o.value)}`);if(!j.ok)throw new Error(`HTTP ${j.status}`);v.value=await j.json()}catch{v.value=null}}Ye(T,C=>{x.value=!1,v.value=null,w(C)},{immediate:!0});const E=Q(()=>{var C;return f.value.countryName||f.value.countryIsoLabel||f.value.country||f.value.countryIso||((C=f.value._raw)==null?void 0:C.Country)||""}),_=Q(()=>{var j;const C=f.value.status||((j=f.value._raw)==null?void 0:j.Status),M=E.value||"Unknown";return C?`${M} • ${C}`:M}),S=Q(()=>{var M;const C=f.value.language||((M=f.value._raw)==null?void 0:M.Language);if(!C)return"Unknown";if(typeof C=="object"&&C.label)return C.label;if(typeof C=="string"&&C.startsWith("{"))try{const j=JSON.parse(C);if(j!=null&&j.label)return j.label}catch{}return C}),g=Q(()=>{var C;return f.value.population||((C=f.value._raw)==null?void 0:C.Population)||0}),k=Q(()=>{var C;return f.value.religionName||f.value.religionLabel||f.value.religion||((C=f.value._raw)==null?void 0:C.Religion)||""}),A=Q(()=>{var C,M,j;return((C=v.value)==null?void 0:C.imb_people_description)||((M=v.value)==null?void 0:M.description)||f.value.description||((j=f.value._raw)==null?void 0:j.Description)||""}),L=Q(()=>{var C,M,j;return((C=v.value)==null?void 0:C.image_url)||((M=v.value)==null?void 0:M.imageUrl)||f.value.imageUrl||((j=f.value._raw)==null?void 0:j.ImageURL)||Kc}),O=Q(()=>{const C=parseInt(g.value);return C>=1e6?`${(C/1e6).toFixed(1)}M`:C>=1e3?`${(C/1e3).toFixed(1)}K`:C.toLocaleString()});function $(){a.selectPeopleGroup(null)}function m(C){return`https://pray.doxa.life/${encodeURIComponent(C)}?source=doxalife`}function U(C){var j;return`${typeof window<"u"&&((j=window.location)==null?void 0:j.origin)||"https://doxa.life"}/adopt/${encodeURIComponent(C)}/?source=doxalife`}function H(C){var j;return`${typeof window<"u"&&((j=window.location)==null?void 0:j.origin)||"https://doxa.life"}/research/${encodeURIComponent(C)}/`}function I(){const C=T.value;if(!C)return;const M=n.action==="adopt"?U(C):m(C);window.open(M,"_blank","noopener")}function W(){const C=T.value;C&&window.open(H(C),"_blank","noopener")}function ue(C){C.target.dataset.usedFallback||(C.target.dataset.usedFallback="true",C.target.src=Kc)}return(C,M)=>(J(),ne("div",{class:Be(["people-group-detail",{"dark-mode":e.dark}])},[e.hideHeader?we("",!0):(J(),ne("div",hy,[G("div",my,[G("div",{class:"avatar",style:ct(u.value)},ye(c.value),5),G("div",by,[G("h3",yy,ye(e.peopleGroup.properties.name),1),G("p",_y,ye(_.value),1)])]),G("button",{class:"close-button",onClick:$,"aria-label":pe(t)("aria.closeDetailView")},[...M[1]||(M[1]=[G("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[G("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,vy)])),G("div",wy,[e.hideHeader?(J(),ne("h3",ky,ye(e.peopleGroup.properties.name||pe(t)("legend.header.peopleGroupFallback")),1)):we("",!0),G("div",Sy,[e.action==="pray"||e.action==="adopt"?(J(),ne("button",{key:0,class:"action-btn primary",onClick:I},[M[2]||(M[2]=G("svg",{class:"btn-icon",width:"16",height:"16",viewBox:"0 0 16 16"},[G("path",{d:"M8 2L10 6L14 6.5L11 9.5L11.5 14L8 12L4.5 14L5 9.5L2 6.5L6 6L8 2Z",fill:"currentColor"})],-1)),G("span",null,ye(e.action==="adopt"?pe(t)("buttons.adoptThem"):pe(t)("buttons.prayForThem")),1)])):we("",!0),G("button",{class:"action-btn secondary",onClick:W},[M[3]||(M[3]=G("svg",{class:"btn-icon",width:"16",height:"16",viewBox:"0 0 16 16"},[G("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor","stroke-width":"2",fill:"none"}),G("path",{d:"M8 6V8M8 10H8.01",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),G("span",null,ye(pe(t)("buttons.moreInfo")),1)])]),G("div",Ay,[G("div",xy,[G("span",Ly,ye(pe(t)("detail.labels.country")),1),G("span",Ty,ye(E.value||"—"),1)]),G("div",Ey,[G("span",Cy,ye(pe(t)("detail.labels.population")),1),G("span",$y,ye(O.value||"—"),1)]),G("div",Py,[G("span",My,ye(pe(t)("detail.labels.language")),1),G("span",Iy,ye(S.value||"—"),1)]),G("div",Ny,[G("span",Fy,ye(pe(t)("detail.labels.religion")),1),G("span",Ry,ye(k.value||"—"),1)])]),i.value?(J(),ne("div",Dy,[G("div",{class:Be(["image-placeholder-svg",{hidden:x.value}])},[...M[4]||(M[4]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 120",width:"80",height:"96","aria-hidden":"true"},[G("circle",{cx:"50",cy:"36",r:"22",fill:"#ccc"}),G("ellipse",{cx:"50",cy:"95",rx:"36",ry:"28",fill:"#ccc"})],-1)])],2),L.value?(J(),ne("img",{key:0,src:L.value,alt:`${e.peopleGroup.properties.name} people group`,class:Be(["people-group-image",{loaded:x.value}]),onLoad:M[0]||(M[0]=j=>x.value=!0),onError:ue},null,42,Oy)):we("",!0)])):we("",!0),i.value?(J(),ne("div",By,[A.value?(J(),ne("p",Uy,ye(A.value),1)):(J(),ne("p",Gy,ye(pe(t)("detail.messages.noDescription")),1))])):we("",!0)])],2))}},[["__scopeId","data-v-0cd4696d"]]),zc={excludeReligionFamilies:["C"]},jy={class:"legend-reopen-label"},Ky=["aria-label"],Hy=["aria-label"],zy=["aria-label"],Vy=Ao({__name:"LegendDesktop",props:{legendType:{type:String,required:!0},initiallyCollapsed:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},popupAction:{type:String,default:"pray",validator:e=>["pray","adopt","none"].includes(e)},disableCollapse:{type:Boolean,default:!1}},setup(e){const t=Za(()=>La(()=>Promise.resolve().then(()=>qc),void 0)),{t:o}=gt();mo(`
/* ── Container — the card.
The LegendRows grid owns left/right padding via its caret + trailing
columns. The card itself only adds top/bottom breathing space via
.legend-content, and clips rounded corners via overflow:hidden. ── */
/* Transition: only the dimensions that actually change between expanded
and collapsed. Using 'all' would also animate top/left/position and cause
layout thrash on state flips. Emphasized-decelerate curve mirrors
Material Design 3 snap-open, settle-closed feel. */
/* top/left/width aligned to SemanticTreeLegend's .stl-panel (top:60px,
left:8px, width:380px) so the LegendDesktop card and the SemanticTreeLegend
sit at exactly the same position+size — no visible jump when the user
clicks a pin and the detail panel swaps in over the language-family legend
(qa: 2026-05-02). */
.legend-container{position:absolute;top:60px;left:8px;width:var(--map-legend-width,380px);max-height:calc(100vh - 80px);background:#fff;border-radius:16px;box-shadow:0 2px 8px rgba(0,0,0,0.12),0 1px 3px rgba(0,0,0,0.08);z-index:1000;overflow:hidden;display:flex;flex-direction:column;transition:width 200ms cubic-bezier(0.2,0,0,1),max-height 200ms cubic-bezier(0.2,0,0,1),min-width 200ms cubic-bezier(0.2,0,0,1),border-radius 200ms linear,box-shadow 200ms linear;will-change:width,max-height;}
/* Collapsed: pill imitates SemanticTreeLegend's .stl-reopen —
rounded pill (999px radius), dark background, subtle border,
floating shadow, uppercase monospace font. Hover lifts + glows.
Name track auto-sizes to fit title text. */
/* ── Reopen pill (collapsed state) — mirrors STL .stl-reopen ── */
.legend-reopen{position:absolute;left:8px;top:60px;z-index:1000;display:inline-flex;align-items:center;gap:8px;background:#0d1117;border:1px solid #30363d;border-radius:999px;color:#c9d1d9;cursor:pointer;height:36px;padding:0 14px 0 12px;box-shadow:0 4px 14px rgba(0,0,0,0.25);font:600 11px ui-monospace,monospace;text-transform:uppercase;letter-spacing:0.06em;max-width:320px;transition:color 0.12s,background 0.12s,border-color 0.12s,transform 0.12s,box-shadow 0.12s;}
.legend-reopen:hover{color:#fff;background:#1c2333;border-color:#73A17F;box-shadow:0 6px 20px rgba(59,70,61,0.25);transform:translateY(-1px);}
.legend-reopen-icon{color:#73A17F;flex-shrink:0;}
.legend-reopen-label{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:none;letter-spacing:0;font:600 12px system-ui,sans-serif;}
.legend-reopen-caret{color:#6e7681;flex-shrink:0;}
.legend-reopen:hover .legend-reopen-caret{color:#c9d1d9;}
.legend-reopen-light{background:#ffffff;border-color:#d0d7de;color:#1f2328;box-shadow:0 4px 16px rgba(31,35,40,0.18);}
.legend-reopen-light:hover{background:#f6f8fa;border-color:#3b463d;color:#3b463d;box-shadow:0 6px 20px rgba(59,70,61,0.2);}
.legend-reopen-light .legend-reopen-icon{color:#3b463d;}
.legend-reopen-light .legend-reopen-caret{color:#57606a;}
/* Collapsed pill light mode — mirrors STL's .stl-reopen[data-theme="light"] */
/* Card-level collapse caret — rendered into the #title-caret slot of
LegendRows. Matches SemanticTreeLegend's .stl-collapse-btn look:
22x20px, rounded-rect, subtle dark bg + border, right-chevron SVG
that rotates 180deg when expanded. */
.legend-collapse-caret{background:rgba(110,118,129,0.15);border:1px solid #30363d;border-radius:5px;color:#8b949e;cursor:pointer;width:22px;height:20px;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:color 0.1s,background 0.1s,transform 0.18s;outline:none;-webkit-tap-highlight-color:transparent;padding:0;}
.legend-collapse-caret:focus{outline:none;}
.legend-collapse-caret:hover{color:#c9d1d9;background:rgba(59,70,61,0.18);border-color:#73A17F;}
.legend-collapse-caret svg{transition:transform 0.18s;transform:rotate(180deg);}
.legend-collapse-caret.rotated svg{transform:rotate(0deg);}
/* Light mode caret — mirrors STL's [data-theme="light"] .stl-collapse-btn */
.legend-container:not(.legend-dark) .legend-collapse-caret{background:rgba(208,215,222,0.4);border-color:#d0d7de;color:#57606a;}
.legend-container:not(.legend-dark) .legend-collapse-caret:hover{background:rgba(59,70,61,0.12);border-color:#3b463d;color:#3b463d;}
/* Detail-mode close button — top-right of the card */
.detail-close-btn{position:absolute;top:10px;right:10px;background:none;border:none;padding:4px;cursor:pointer;color:#888;display:flex;align-items:center;justify-content:center;z-index:20;transition:color 0.2s ease;}
.detail-close-btn:hover{color:#333;}
/* Detail-mode collapse caret — top-left of the card, mirrors the inline
.legend-collapse-caret used by the data-view title row. Sits at z-index
above the PeopleGroupDetail sticky header (.detail-header z-index:10) so
it is always tappable even when the detail panel scrolls. The button is
only rendered in the detail-mode template branch (see <template> below). */
.detail-collapse-btn{position:absolute;top:10px;left:10px;z-index:20;background:transparent;border:none;color:transparent;cursor:pointer;width:28px;height:28px;padding:0;outline:none;-webkit-tap-highlight-color:transparent;}
.detail-collapse-btn:focus{outline:none;}
/* Inside the detail panel: leave a 32px left gutter on the title text so the
absolute-positioned .detail-collapse-btn at top:10px/left:10px does not
overlap the people-group name. Targets the .pg-name-lead inside any
.people-group-detail (which itself is rendered as a child of
.legend-content). Right gutter clears the .detail-close-btn the same way. */
.legend-container .people-group-detail .pg-name-lead{padding-left:28px;padding-right:32px;}
/* ── Content — no padding; left/right AND top/bottom are handled by the
LegendRows grid (caret + trailing columns + .lrg-items padding 12px 0).
Double-padding here would push the collapsed title row out of the
collapsed card. Title row stays visible when collapsed; data rows +
controls are hidden via .collapsed state below. ── */
.legend-content{padding:0;overflow-y:auto;overflow-x:hidden;flex:1;max-height:650px;display:flex;flex-direction:column;min-height:0;}
.legend-content.no-padding{padding:0;}
/* When collapsed, hide everything EXCEPT the title inside LegendRows.
The title row stays visible; column labels (UPGS/POPULATION) are hidden
so the collapsed state shows only "Legend" — feedback 2026-04-21. */
/* Tab-4 lang-fam tree height parity with tabs 1-3 (qa.md R6 + R8 A2).
Clamp to the same 36px pill when collapsed, hide column headers like
LegendRows does, AND disable position:sticky on the title row — sticky
creates its own stacking context that breaks the parent .legend-container's
border-radius clip, leaving the collapsed pill with a sharp-cut right edge. */
/* SemanticTreeLegend (PPLR-ported) collapse parity — preserve the rounded-pill
collapse-to-circle aesthetic from before. Hide everything below the titlebar
so only the title (containing our caret + "Legend"/breadcrumb) shows.
The .stl-inner border + box-shadow is also removed in collapsed state so the
inner doesn't double up on the .legend-container's pill chrome. */
.legend-section-label{padding:8px 12px 4px;font-size:11px;font-weight:700;color:#9ca3af;letter-spacing:0.5px;text-transform:uppercase;}
.legend-dark .legend-section-label{color:rgba(243,243,241,0.55);}
/* Desktop slim rows — scoped to .legend-container so mobile (.legend-mobile-sheet)
keeps its 44px tap targets. Original desktop rows were 36px tall with 6px
pill padding — too clunky per user feedback 2026-04-27. */
.legend-container .lrg-row,
.legend-container .lft-row{min-height:24px;}
.legend-container .lrg-item-inner,
.legend-container .lft-item-inner{min-height:24px;padding:2px 0;}
/* ── Items ── */
.legend-items-container{display:flex;flex-direction:column;gap:4px;}
.legend-item{padding:6px 10px;border-radius:4px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--map-font-md,13px);transition:all 0.2s;}
.legend-item-clickable{cursor:pointer;}
.legend-item-clickable:hover{transform:translateX(4px);box-shadow:0 2px 4px rgba(0,0,0,0.1);}
.legend-item-selected{outline:2px solid #333;outline-offset:2px;}
.legend-item-text{flex:1;font-weight:500;color:#333;}
.legend-item-count{font-size:var(--map-font-sm,11px);color:#555;background:rgba(0,0,0,0.08);padding:2px 7px;border-radius:10px;min-width:40px;text-align:right;margin-right:4px;}
.legend-item-population{font-size:var(--map-font-sm,11px);color:#555;background:rgba(0,0,0,0.08);padding:2px 7px;border-radius:10px;min-width:52px;text-align:right;margin-right:4px;}
.legend-export-btn{background:none;border:none;cursor:pointer;font-size:15px;padding:0 4px;}
.legend-tree-item{display:flex;flex-direction:column;gap:4px;}
.legend-tree-parent{display:flex;align-items:center;gap:6px;}
.legend-tree-caret{width:16px;height:16px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform 0.2s;font-size:12px;color:#666;}
.legend-tree-caret.expanded{transform:rotate(90deg);}
.legend-tree-child{margin-left:20px;display:flex;gap:6px;}
.legend-tree-caret-placeholder{width:16px;}
.legend-item-child{font-size:12px;}
/* ── Stats header ── */
.legend-stats-header{display:flex;align-items:center;padding:4px 0;background:#fff;border-bottom:1px solid rgba(0,0,0,0.07);font-weight:600;font-size:10px;color:#777;text-transform:uppercase;letter-spacing:0.4px;position:sticky;top:0;z-index:10;}
.legend-stats-label{flex:1;min-width:0;padding:0 10px;}
/* Stats column values — 10px right padding aligns with header's last-of-type gap
and gives a clean breathing space against the card's right edge. */
.legend-stats-value{width:58px;text-align:right;flex-shrink:0;font-family:'Courier New',monospace;padding-right:10px;white-space:pre;}
.legend-footer{display:flex;align-items:center;padding:5px 0;border-top:1px solid rgba(0,0,0,0.07);font-size:11px;font-weight:600;color:#555;background:#fff;}
.legend-footer-label{flex:1;padding-left:10px;color:#777;}
.legend-footer-value{width:56px;text-align:right;padding-right:10px;font-family:'Courier New',monospace;}
/* ── Scrollbar ── */
.legend-content::-webkit-scrollbar{width:4px;}
.legend-content::-webkit-scrollbar-track{background:transparent;}
.legend-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.18);border-radius:4px;}
.legend-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,0.3);}
/* ── Dark mode ── */
.legend-dark{background:#3b463d!important;border:1px solid rgba(255,255,255,0.10)!important;box-shadow:0 4px 16px rgba(0,0,0,0.5)!important;}
.legend-dark .legend-content{background:#3b463d;}
/* Dark mode caret already matches STL defaults (dark bg + light text).
Override only the hover glow to use the kingdom green accent. */
.legend-dark .legend-collapse-caret{background:rgba(110,118,129,0.15);border-color:#30363d;color:#8b949e;}
.legend-dark .legend-collapse-caret:hover{color:#c9d1d9;background:rgba(59,70,61,0.18);border-color:#73A17F;}
.legend-dark .detail-close-btn{color:rgba(243,243,241,0.75)!important;}
.legend-dark .detail-close-btn:hover{color:#F3F3F1!important;}
.legend-dark .legend-stats-header{background:#2a332a!important;color:rgba(243,243,241,0.65)!important;border-bottom-color:rgba(255,255,255,0.1)!important;}
.legend-dark .legend-footer{background:#2a332a!important;border-top-color:rgba(255,255,255,0.1)!important;color:rgba(243,243,241,0.75)!important;}
.legend-dark .legend-footer-label{color:rgba(243,243,241,0.65)!important;}
.legend-dark .legend-item-text{color:#F3F3F1!important;}
.legend-dark .legend-item-count{background:rgba(255,255,255,0.12)!important;color:rgba(243,243,241,0.9)!important;}
.legend-dark .legend-item-population{background:rgba(255,255,255,0.12)!important;color:rgba(243,243,241,0.9)!important;}
.legend-dark .legend-item-selected{outline-color:rgba(255,255,255,0.5)!important;}
.legend-dark .legend-tree-caret{color:rgba(243,243,241,0.7)!important;}
.legend-dark .legend-content::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);}
`,"legend-component");const n=e;$e("mapStore"),$e("dataStore");const a=$e("uiStore"),r=za(n,"legendType"),{items:s,columns:i,title:l,activeFilter:c,setFilter:u,totalCount:f,totalPopulation:v,fmtPop:x,fmtCount:T}=Yr(r,zc);$e("normalizedPeopleGroups",null);const w=$e("mapId",null),E=Q(()=>a.isMobile),_=Q(()=>a.legendMode),S=Q(()=>a.selectedPeopleGroup),g=me(n.initiallyCollapsed);let k=null;const A=Q(()=>{var $;return _.value==="detail"&&S.value?(($=S.value.properties)==null?void 0:$.name)||o("legend.header.peopleGroupFallback"):g.value?o("legend.header.collapsed"):l.value});function L(){g.value=!g.value}Ye(_,($,m)=>{$==="detail"&&m!=="detail"&&g.value&&(g.value=!1)});function O($){u($)}return ao(()=>{window.innerWidth<768&&(g.value=!0),k=$=>{var m;w&&((m=$.detail)!=null&&m.mapId)&&$.detail.mapId!==w||(g.value=!1)},window.addEventListener("doxa:openDesktopLegend",k)}),Bo(()=>{k&&window.removeEventListener("doxa:openDesktopLegend",k)}),($,m)=>E.value?(J(),Je(pe(t),{key:0,legendType:e.legendType,popupAction:e.popupAction,isDark:e.isDark,disableCollapse:e.disableCollapse},null,8,["legendType","popupAction","isDark","disableCollapse"])):g.value?(J(),ne("button",{key:1,class:Be(["legend-reopen",{"legend-reopen-light":!e.isDark}]),title:"Expand legend",onClick:m[0]||(m[0]=U=>g.value=!1)},[m[2]||(m[2]=G("svg",{class:"legend-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),G("span",jy,ye(pe(l)),1),m[3]||(m[3]=G("svg",{class:"legend-reopen-caret",width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)):(J(),ne("div",{key:2,class:Be(["legend-container",{"legend-dark":e.isDark}])},[_.value==="detail"?(J(),ne("button",{key:0,class:"detail-collapse-btn",onClick:Et(L,["stop"]),"aria-label":pe(o)("aria.toggleLegend")},null,8,Ky)):we("",!0),_.value==="detail"?(J(),ne("button",{key:1,class:"detail-close-btn",onClick:m[1]||(m[1]=Et(U=>pe(a).selectPeopleGroup(null),["stop"])),"aria-label":pe(o)("aria.backToLegend")},[...m[4]||(m[4]=[G("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[G("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,Hy)):we("",!0),G("div",{class:Be(["legend-content",{"no-padding":pe(i).length>0}])},[_.value==="detail"&&S.value?(J(),Je(Hc,{key:0,peopleGroup:S.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):e.legendType==="language-family"?(J(),ne(Ie,{key:1},[],64)):(J(),Je(Uc,{key:2,title:A.value,items:pe(s),columns:pe(i),activeFilter:pe(c),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:pe(f),totalPopulation:pe(v),fmtPop:pe(x),fmtCount:pe(T),onFilterClick:O},{"title-caret":Tt(()=>[G("button",{class:"legend-collapse-caret",onClick:Et(L,["stop"]),"aria-label":pe(o)("aria.toggleLegend")},[...m[5]||(m[5]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",style:{transform:"rotate(180deg)","transform-origin":"center"}})],-1)])],8,zy)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))],2)],2))}},[["__scopeId","data-v-6dbdb66e"]]),Vc="pplrInstance";function Wy(e){return{instanceId:e,selection:me(null),activeTab:me(0),isSearching:me(!1),geocoderText:me(""),pinDetail:me(null),theme:me("dark")}}function Yy(e){wt(Vc,e)}function qy(){return $e(Vc,null)}const Jy=["data-theme"],Xy={class:"stl-inner"},Zy={class:"stl-titlebar"},Qy={class:"stl-tb-caret-slot"},e_=["title"],t_={class:"stl-tb-eyebrow"},o_=["title"],n_={key:2,class:"stl-tb-title"},a_={key:0,class:"stl-tabs-wrap"},r_={class:"stl-tabs"},s_=["onClick"],i_=["title","onClick"],l_={key:0,class:"stl-info-pop"},c_={class:"stl-col-hdr"},u_={class:"stl-hdr-name"},d_={key:0,class:"stl-sort-arrow"},p_={key:0,class:"stl-sort-arrow"},g_=["onClick"],f_=["onClick"],h_={key:1,class:"stl-caret-sp"},m_={key:3,class:"stl-dot-sp"},b_={class:"stl-name"},y_={key:4,class:"stl-num"},__={key:5,class:"stl-num"},v_={class:"stl-x-slot"},w_={key:0,class:"stl-empty stl-loading"},k_={key:1,class:"stl-empty"},S_={key:2,class:"stl-empty"},A_={key:3,class:"stl-overflow"},x_={key:1,class:"stl-footer"},L_={class:"stl-footer-label"},T_={key:0,class:"stl-num stl-footer-num"},E_={key:1,class:"stl-num stl-footer-num"},C_=["data-theme"],$_={class:"stl-reopen-label"},Wc=Ao({__name:"SemanticTreeLegend",props:{nodes:{type:Array,default:()=>[]},tabs:{type:Array,default:null},columns:{type:Array,default:()=>["count","pop"]},title:{type:String,default:"Legend"},hideTabs:{type:Boolean,default:!1},columnLabel:{type:String,default:""},open:{type:Boolean,default:null},totalLabel:{type:String,default:""},totalCount:{type:Number,default:null},totalPop:{type:Number,default:null}},emits:["select","update:open"],setup(e,{emit:t}){const o=e,n=t,a=qy();function r(N,d=0){return N!=null&&N.length?Math.max(...N.map(y=>r(y.children??[],d+1))):d}function s(N,d,y=0){return y===d?N.slice():N.flatMap(b=>s(b.children??[],d,y+1))}function i(N,d,y=[]){var b;for(const P of N){if(P.id===d)return y;if((b=P.children)!=null&&b.length){const D=i(P.children,d,[...y,P]);if(D)return D}}return null}function l(N,d=new Set){var y;if(!((y=N==null?void 0:N.children)!=null&&y.length))return d;for(const b of N.children)d.add(b.id),l(b,d);return d}const c=Q(()=>r(o.nodes)),u=Q(()=>{const N=o.tabs??[],d=N.length||c.value+1;return Array.from({length:d},(y,b)=>N[b]??{id:`gen${b+1}`,label:`Generation ${b+1}`})}),f=me(0),v=me(new Set),x=me(null),T=me(o.open!==null?o.open:!0),w=me(null),E=me(null),_=me("desc"),S=Q({get:()=>o.hideTabs?0:a?a.activeTab.value:f.value,set:N=>{o.hideTabs||(a?a.activeTab.value=N:f.value=N)}}),g=Q({get:()=>a?a.selection.value:x.value,set:N=>{a?a.selection.value=N:x.value=N}}),k=Q(()=>{var N;return((N=g.value)==null?void 0:N.id)||null});Ye(()=>o.open,N=>{N!==null&&(T.value=N)}),Ye(()=>o.nodes,()=>{const N=a==null?void 0:a.activeTab.value;S.value=typeof N=="number"&&N>=0?N:0,v.value=new Set,g.value=null,n("select",null)},{deep:!1});let A=null;a&&Ye(()=>a.selection.value,N=>{if((N==null?void 0:N.id)===A)return;if(!N){A=null;return}A=N.id;const d=i(o.nodes,N.id)||[];typeof N.depth=="number"&&(S.value=Math.min(N.depth,u.value.length-1));const y=S.value,b=new Set;d.slice(y).forEach(P=>b.add(P.id)),v.value=b,n("select",N)});function L(N,d){const y=(d.pop??0)-(N.pop??0);return y!==0?y:(d.count??0)-(N.count??0)}const O=Q(()=>{if(!E.value)return L;const N=E.value,d=_.value==="asc"?1:-1;return(y,b)=>((y[N]??0)-(b[N]??0))*d});function $(N){E.value===N?_.value==="desc"?_.value="asc":(E.value=null,_.value="desc"):(E.value=N,_.value="desc")}const m=me([]),U=me(!1);let H=-1;function I(N){if(m.value[N]){U.value=!1;return}U.value=!0,H=N,setTimeout(()=>{if(H!==N)return;const d=[...s(o.nodes,N)].sort(O.value),y=[...m.value];y[N]=d,m.value=y,U.value=!1},0)}Ye(S,N=>I(N),{immediate:!0}),Ye(()=>[o.nodes,E.value,_.value],()=>{m.value=[],I(S.value)},{deep:!1});const W=Q(()=>m.value[S.value]||[]),ue=Q(()=>{var d;const N=(d=u.value[S.value])==null?void 0:d.topLimit;return N?W.value.slice(0,N):W.value}),C=Q(()=>{var d;const N=(d=u.value[S.value])==null?void 0:d.topLimit;return N?Math.max(0,W.value.length-N):0});function M(N,d,y,b,P){var D;for(const B of d)N.push({node:B,relDepth:y,parent:b,ancestors:P}),v.value.has(B.id)&&((D=B.children)!=null&&D.length)&&M(N,[...B.children].sort(O.value),y+1,B,[...P,B])}const j=Q(()=>{const N=[];M(N,ue.value,0,null,[]);for(let d=0;d<N.length;d++){const y=N[d],b=[];for(let P=0;P<y.relDepth;P++){const D=y.ancestors[P];let B=!1;for(let Y=d+1;Y<N.length;Y++){const q=N[Y];if(q.relDepth<=P)break;if(q.relDepth===P+1&&q.ancestors[P]===D){B=!0;break}q.relDepth>P+1&&q.ancestors[P]}if(P===y.relDepth-1){let Y=!1;for(let q=d+1;q<N.length;q++){const p=N[q];if(p.relDepth<y.relDepth)break;if(p.relDepth===y.relDepth&&p.parent===y.parent){Y=!0;break}}b.push(Y?"tee":"elbow")}else b.push(B?"pipe":"blank")}y.trunks=b}return N}),se=Q(()=>k.value!==null),fe=Q(()=>o.columns.includes("count")),Z=Q(()=>o.columns.includes("pop")),ce=Q(()=>g.value?l(g.value):new Set),oe=Q(()=>{var D;const N=g.value;if(!N)return null;const d=i(o.nodes,N.id);if(!d||!d.length)return null;const y=d[d.length-1],b=d.length-1,P=((D=u.value[b])==null?void 0:D.label)||"Parent";return{node:y,tabName:P}});function ke(N){k.value===N.id?(A=null,g.value=null,n("select",null)):(A=N.id,g.value=N,n("select",N))}function ie(N,d){d==null||d.stopPropagation();const y=new Set(v.value),b=y.has(N);if(b?y.delete(N):y.add(N),v.value=y,b&&g.value){const P=i(o.nodes,g.value.id);P&&P.some(D=>D.id===N)&&(A=null,g.value=null,n("select",null))}}function Fe(N){if(S.value===N){w.value=w.value===N?null:N;return}S.value=N,v.value=new Set,A=null,g.value=null,w.value=null,n("select",null)}function ge(N){N==null||N.stopPropagation(),A=null,g.value=null,n("select",null)}function Te(N,d){d==null||d.stopPropagation(),w.value=w.value===N?null:N}function Ae(N){return N?N>=1e6?(N/1e6).toFixed(1)+"M":N>=1e3?Math.round(N/1e3)+"k":N.toLocaleString():"—"}function z(N){return N!=null?N.toLocaleString():"—"}function he(N){var d;return{selected:k.value===N.node.id,descendant:se.value&&ce.value.has(N.node.id),child:N.relDepth>0,leaf:!((d=N.node.children)!=null&&d.length)}}return mo(`
.stl-inner {
--stl-pad-x: 10px;
--stl-gap: 6px;
--stl-caret-w: 14px;
--stl-dot-w: 8px;
--stl-num-w: 44px;
--stl-x-w: 22px;
flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
background: #161b22; border: 1px solid #30363d;
border-radius: 12px;
box-shadow: 0 6px 24px rgba(0,0,0,0.45);
overflow: hidden;
}
.stl-panel {
position: absolute; left: 8px; top: 60px; width: 380px; z-index: 4;
display: flex; flex-direction: column;
max-height: calc(100% - 72px);
transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s;
pointer-events: auto;
}
.stl-panel.closed { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.stl-panel.fit-content { max-height: calc(100% - 72px); }
.stl-titlebar {
display: flex; align-items: center; gap: 6px;
padding: 8px 12px; flex-shrink: 0;
border-bottom: 1px solid #21262d;
min-height: 32px;
}
.stl-tb-caret-slot { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stl-tb-caret-slot:empty { display: none; }
.stl-tb-title,
.stl-tb-eyebrow {
font: 600 10px ui-monospace, monospace;
color: #73A17F; text-transform: uppercase; letter-spacing: 0.07em;
flex-shrink: 0;
}
.stl-tb-eyebrow { color: #6e7681; font-size: 9px; letter-spacing: 0.08em; }
.stl-tb-dot {
width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 3px rgba(115,161,127,0.15);
}
.stl-tb-text {
flex: 1; min-width: 0;
font: 600 12px system-ui; color: #e6edf3;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stl-tabs-wrap { flex-shrink: 0; }
.stl-tabs {
display: flex; flex-wrap: nowrap; gap: 4px;
padding: 6px 8px;
border-bottom: 1px solid #21262d;
overflow-x: auto;
scrollbar-width: none;
}
.stl-tabs::-webkit-scrollbar { display: none; }
.stl-tab-chip {
display: inline-flex; align-items: stretch; flex-shrink: 0;
background: #1c2333; border: 1px solid #30363d; border-radius: 6px;
overflow: hidden; transition: border-color 0.12s, box-shadow 0.12s;
}
.stl-tab-chip:hover { border-color: #484f58; }
.stl-tab-chip.active {
background: #3b463d; border-color: #73A17F;
box-shadow: 0 0 0 2px rgba(115,161,127,0.22), 0 1px 4px rgba(59,70,61,0.4);
}
.stl-tab {
display: inline-flex; align-items: center;
background: transparent; border: none;
color: #8b949e; font: 600 10px ui-monospace, monospace;
text-transform: uppercase; letter-spacing: 0.04em;
padding: 4px 8px; cursor: pointer; white-space: nowrap;
}
.stl-tab:hover { color: #c9d1d9; }
.stl-tab-chip.active .stl-tab { color: #fff; }
.stl-tab-info {
background: rgba(110,118,129,0.15); border: none; border-left: 1px solid #30363d;
color: #6e7681; cursor: pointer;
width: 18px; padding: 0; font: 700 9px ui-monospace, monospace;
}
.stl-tab-info:hover { background: rgba(59,70,61,0.2); color: #73A17F; }
.stl-tab-chip.active .stl-tab-info {
border-left-color: rgba(0,0,0,0.3); color: #fff;
background: rgba(0,0,0,0.2);
}
.stl-info-pop {
margin: 2px 8px 6px; padding: 7px 10px;
background: #0d1117; border: 1px solid #30363d; border-radius: 6px;
font: 11px system-ui; color: #c9d1d9; line-height: 1.45;
}
.stl-col-hdr,
.stl-row {
display: flex; align-items: center; gap: var(--stl-gap);
padding: 0 var(--stl-pad-x);
}
.stl-col-hdr {
height: 26px; flex-shrink: 0;
background: #0d1117; border-bottom: 1px solid #21262d;
}
.stl-hdr-name {
flex: 1; min-width: 0;
font: 700 11px ui-monospace, monospace;
color: #8b949e; text-transform: uppercase; letter-spacing: 0.04em;
}
/* Center-aligned UUPGs/Pop column header (qa: 2026-05-02 — user explicitly
requested center over right-align so the header label sits on the same
x-center as the numeric value below; reduces eye drift across rows). */
.stl-hdr-num {
width: var(--stl-num-w); text-align: center; flex-shrink: 0;
font: 600 9px ui-monospace, monospace;
color: #6e7681; text-transform: uppercase; letter-spacing: 0.05em;
background: transparent; border: none; cursor: pointer;
padding: 0; transition: color 0.1s;
display: inline-flex; align-items: center; justify-content: center; gap: 3px;
}
.stl-hdr-num:hover { color: #c9d1d9; }
.stl-hdr-num.active { color: #73A17F; }
.stl-sort-arrow { font-size: 8px; }
.stl-rows { flex: 1; overflow-y: auto; padding-bottom: 6px; }
.stl-rows::-webkit-scrollbar { width: 6px; }
.stl-rows::-webkit-scrollbar-track { background: transparent; }
.stl-rows::-webkit-scrollbar-thumb { background: #21262d; border-radius: 3px; }
.stl-rows::-webkit-scrollbar-thumb:hover { background: #30363d; }
.stl-empty {
padding: 20px 12px; text-align: center;
font: 11px system-ui; color: #484f58;
}
.stl-loading {
display: inline-flex; align-items: center; gap: 8px;
width: 100%; justify-content: center;
color: #73A17F;
}
.stl-spinner {
width: 12px; height: 12px; border-radius: 50%;
border: 2px solid rgba(115,161,127,0.25);
border-top-color: #73A17F;
animation: stl-spin 0.7s linear infinite;
}
@keyframes stl-spin { to { transform: rotate(360deg); } }
.stl-overflow {
padding: 8px 10px; margin: 4px 0 0;
background: #0d1117; border-top: 1px dashed #30363d;
text-align: center; font: 10px system-ui; color: #6e7681;
}
.stl-overflow-hint { color: #73A17F; }
.stl-footer {
display: flex; align-items: center; gap: var(--stl-gap);
padding: 0 var(--stl-pad-x);
height: 30px; flex-shrink: 0;
border-top: 1px solid #21262d;
background: #0d1117;
}
.stl-footer-label {
flex: 1; min-width: 0;
font: 700 11px ui-monospace, monospace;
color: #8b949e; text-transform: uppercase; letter-spacing: 0.04em;
}
.stl-footer-num { color: #e6edf3; font-weight: 700; }
.stl-row {
min-height: 27px;
cursor: pointer; transition: opacity 0.12s, background 0.1s;
border-bottom: 1px solid rgba(33,38,45,0.45);
}
.stl-row:last-child { border-bottom: none; }
.stl-row:hover { background: rgba(255,255,255,0.04); }
.stl-row.child .stl-name { color: #adbac7; }
.stl-row.leaf .stl-name { font-style: italic; }
.stl-rows.has-sel .stl-row:not(.selected):not(.descendant) { opacity: 0.30; }
.stl-rows.has-sel .stl-row:not(.selected):not(.descendant):hover { opacity: 0.6; }
.stl-rows.has-sel .stl-row.descendant { opacity: 1; }
.stl-rows.has-sel .stl-row.selected {
opacity: 1;
background: rgba(255,255,255,0.05);
box-shadow:
inset 3px 0 0 0 var(--row-color, #73A17F),
inset 0 0 0 1px rgba(255,255,255,0.05),
0 0 14px -2px var(--row-color, rgba(115,161,127,0.4));
}
.stl-panel[data-theme="light"] .stl-rows.has-sel .stl-row.selected {
background: rgba(255,255,255,0.7);
box-shadow:
inset 3px 0 0 0 var(--row-color, #3b463d),
inset 0 0 0 1px rgba(0,0,0,0.04),
0 0 14px -2px var(--row-color, rgba(59,70,61,0.35));
}
.stl-caret-sp { width: var(--stl-caret-w); flex-shrink: 0; }
.stl-dot-sp { width: var(--stl-dot-w); flex-shrink: 0; }
.stl-x-slot {
width: var(--stl-x-w); flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
}
.stl-trunk { position: relative; flex-shrink: 0; width: 12px; align-self: stretch; }
.stl-trunk-pipe::before {
content: ''; position: absolute;
left: 5px; top: 0; bottom: 0; width: 1px;
background: var(--trunk-color, #6e7681);
opacity: 0.45;
}
.stl-trunk-tee::before {
content: ''; position: absolute;
left: 5px; top: 0; bottom: 0; width: 1px;
background: var(--trunk-color, #6e7681);
opacity: 0.45;
}
.stl-trunk-tee::after {
content: ''; position: absolute;
left: 5px; top: 50%; height: 1px; width: 7px;
background: var(--trunk-color, #6e7681);
opacity: 0.55;
}
.stl-trunk-elbow::before {
content: ''; position: absolute;
left: 5px; top: 0; height: 50%; width: 1px;
background: var(--trunk-color, #6e7681);
opacity: 0.45;
}
.stl-trunk-elbow::after {
content: ''; position: absolute;
left: 5px; top: calc(50% - 0.5px); height: 1px; width: 7px;
background: var(--trunk-color, #6e7681);
opacity: 0.55;
}
.stl-row.selected .stl-trunk-pipe::before,
.stl-row.selected .stl-trunk-tee::before,
.stl-row.selected .stl-trunk-tee::after,
.stl-row.selected .stl-trunk-elbow::before,
.stl-row.selected .stl-trunk-elbow::after,
.stl-row.descendant .stl-trunk-pipe::before,
.stl-row.descendant .stl-trunk-tee::before,
.stl-row.descendant .stl-trunk-tee::after,
.stl-row.descendant .stl-trunk-elbow::before,
.stl-row.descendant .stl-trunk-elbow::after {
opacity: 0.85;
}
.stl-caret {
background: none; border: none; padding: 0; cursor: pointer;
color: #6e7681; width: var(--stl-caret-w); height: var(--stl-caret-w); flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
border-radius: 3px;
}
.stl-caret svg { transition: transform 0.15s; }
.stl-caret.open svg { transform: rotate(90deg); }
.stl-caret:hover { color: #c9d1d9; background: rgba(255,255,255,0.06); }
.stl-dot {
width: var(--stl-dot-w); height: var(--stl-dot-w); border-radius: 50%; flex-shrink: 0;
box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.stl-row.selected .stl-dot {
box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 3px rgba(115,161,127,0.25);
}
.stl-name {
flex: 1; min-width: 0;
font: 11.5px system-ui, sans-serif; color: #e6edf3;
white-space: normal; word-wrap: break-word; overflow-wrap: break-word;
line-height: 1.3;
}
/* Center-aligned numeric data — paired with center-aligned header above. */
.stl-num {
width: var(--stl-num-w); text-align: center; flex-shrink: 0;
font: 10.5px ui-monospace, monospace; color: #8b949e;
font-variant-numeric: tabular-nums;
}
.stl-row.selected .stl-num { color: #e6edf3; }
.stl-x-chip {
background: rgba(110,118,129,0.12); border: none; border-radius: 50%;
color: #6e7681; cursor: pointer;
width: 16px; height: 16px;
display: flex; align-items: center; justify-content: center;
transition: color 0.12s, background 0.12s;
}
.stl-x-chip:hover { color: #c9d1d9; background: rgba(110,118,129,0.25); }
.stl-collapse-btn {
background: rgba(110,118,129,0.15); border: 1px solid #30363d; border-radius: 5px;
color: #8b949e; cursor: pointer;
width: 22px; height: 20px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
transition: color 0.1s, background 0.1s, transform 0.18s;
}
.stl-collapse-btn:hover { color: #c9d1d9; background: rgba(59,70,61,0.18); border-color: #73A17F; }
.stl-collapse-btn svg { transition: transform 0.18s; transform: rotate(180deg); }
.stl-reopen {
position: absolute; left: 8px; top: 60px; z-index: 3;
display: inline-flex; align-items: center; gap: 8px;
background: #0d1117; border: 1px solid #30363d;
border-radius: 999px;
color: #c9d1d9; cursor: pointer;
height: 36px;
padding: 0 14px 0 12px;
box-shadow: 0 4px 14px rgba(0,0,0,0.25);
font: 600 11px ui-monospace, monospace;
text-transform: uppercase; letter-spacing: 0.06em;
max-width: 320px;
transition: color 0.12s, background 0.12s, border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.stl-reopen:hover {
color: #fff; background: #1c2333; border-color: #73A17F;
box-shadow: 0 6px 20px rgba(59,70,61,0.25);
transform: translateY(-1px);
}
.stl-reopen-icon { color: #73A17F; flex-shrink: 0; }
.stl-reopen-label {
display: inline-flex; align-items: center; gap: 6px;
min-width: 0; max-width: 200px;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
text-transform: none; letter-spacing: 0;
font: 600 12px system-ui, sans-serif;
}
.stl-reopen-dot {
width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.stl-reopen-caret { color: #6e7681; flex-shrink: 0; }
.stl-reopen:hover .stl-reopen-caret { color: #c9d1d9; }
@media (max-width: 640px) {
.stl-panel { width: 92vw; max-width: 380px; top: 64px; max-height: calc(100vh - 72px); }
.stl-reopen { top: 64px; }
}
.stl-panel[data-theme="light"] .stl-inner {
background: #ffffff; border-color: #d0d7de;
box-shadow: 0 6px 24px rgba(31, 35, 40, 0.12);
}
.stl-panel[data-theme="light"] .stl-titlebar { border-color: #d8dee4; }
.stl-panel[data-theme="light"] .stl-tb-title,
.stl-panel[data-theme="light"] .stl-tb-eyebrow { color: #3b463d; }
.stl-panel[data-theme="light"] .stl-tb-eyebrow { color: #57606a; }
.stl-panel[data-theme="light"] .stl-tb-text { color: #1f2328; }
.stl-panel[data-theme="light"] .stl-collapse-btn {
background: rgba(208,215,222,0.4); border-color: #d0d7de; color: #57606a;
}
.stl-panel[data-theme="light"] .stl-collapse-btn:hover {
background: rgba(59,70,61,0.12); border-color: #3b463d; color: #3b463d;
}
.stl-panel[data-theme="light"] .stl-tabs { border-color: #d8dee4; }
.stl-panel[data-theme="light"] .stl-tab-chip { background: #f6f8fa; border-color: #d0d7de; }
.stl-panel[data-theme="light"] .stl-tab { color: #57606a; }
.stl-panel[data-theme="light"] .stl-tab:hover { color: #1f2328; }
.stl-panel[data-theme="light"] .stl-tab-chip.active {
background: #3b463d; border-color: #3b463d;
box-shadow: 0 0 0 2px rgba(59,70,61,0.18);
}
.stl-panel[data-theme="light"] .stl-tab-chip.active .stl-tab { color: #fff; }
.stl-panel[data-theme="light"] .stl-tab-info {
background: rgba(208,215,222,0.4); border-color: #d0d7de; color: #57606a;
}
.stl-panel[data-theme="light"] .stl-info-pop { background: #f6f8fa; border-color: #d0d7de; color: #1f2328; }
.stl-panel[data-theme="light"] .stl-col-hdr { background: #f6f8fa; border-color: #d8dee4; }
.stl-panel[data-theme="light"] .stl-hdr-name,
.stl-panel[data-theme="light"] .stl-hdr-num { color: #57606a; }
.stl-panel[data-theme="light"] .stl-hdr-num:hover { color: #3b463d; }
.stl-panel[data-theme="light"] .stl-hdr-num.active { color: #3b463d; }
.stl-panel[data-theme="light"] .stl-rows::-webkit-scrollbar-thumb { background: #d0d7de; }
.stl-panel[data-theme="light"] .stl-rows::-webkit-scrollbar-thumb:hover { background: #afb8c1; }
.stl-panel[data-theme="light"] .stl-empty,
.stl-panel[data-theme="light"] .stl-overflow {
color: #57606a; background: #f6f8fa; border-color: #d8dee4;
}
.stl-panel[data-theme="light"] .stl-overflow-hint { color: #3b463d; }
.stl-panel[data-theme="light"] .stl-footer { background: #f6f8fa; border-color: #d8dee4; }
.stl-panel[data-theme="light"] .stl-footer-label { color: #57606a; }
.stl-panel[data-theme="light"] .stl-footer-num { color: #1f2328; }
.stl-panel[data-theme="light"] .stl-row { border-color: rgba(208,215,222,0.5); }
.stl-panel[data-theme="light"] .stl-row:hover { background: rgba(59,70,61,0.04); }
.stl-panel[data-theme="light"] .stl-row.child .stl-name { color: #57606a; }
.stl-panel[data-theme="light"] .stl-name { color: #1f2328; }
.stl-panel[data-theme="light"] .stl-num { color: #57606a; }
.stl-panel[data-theme="light"] .stl-row.selected .stl-num { color: #1f2328; }
.stl-panel[data-theme="light"] .stl-caret { color: #57606a; }
.stl-panel[data-theme="light"] .stl-caret:hover { background: rgba(59,70,61,0.08); color: #3b463d; }
.stl-reopen[data-theme="light"] {
background: #ffffff; border-color: #d0d7de; color: #1f2328;
box-shadow: 0 4px 16px rgba(31,35,40,0.18);
}
.stl-reopen[data-theme="light"]:hover {
background: #f6f8fa; border-color: #3b463d; color: #3b463d;
box-shadow: 0 6px 20px rgba(59,70,61,0.2);
}
.stl-reopen[data-theme="light"] .stl-reopen-icon { color: #3b463d; }
.stl-reopen[data-theme="light"] .stl-reopen-caret { color: #57606a; }
.stl-panel[data-theme="light"] .stl-x-chip { color: #57606a; border-color: rgba(208,215,222,0.6); }
.stl-panel[data-theme="light"] .stl-x-chip:hover { color: #1f2328; background: rgba(208,215,222,0.3); border-color: #afb8c1; }
`,"semantic-tree-legend"),(N,d)=>{var y,b,P,D,B;return J(),ne(Ie,null,[G("div",{class:Be(["stl-panel",{closed:!T.value,"fit-content":e.hideTabs}]),"data-theme":((y=pe(a))==null?void 0:y.theme.value)||"dark"},[G("div",Xy,[G("div",Zy,[G("span",Qy,[ta(N.$slots,"title-caret",{},void 0,!0)]),N.$slots["title-caret"]?we("",!0):(J(),ne("button",{key:0,class:Be(["stl-collapse-btn",{closed:!T.value}]),title:T.value?"Collapse legend":"Expand legend",onClick:d[0]||(d[0]=Y=>{T.value=!T.value,n("update:open",T.value)})},[...d[5]||(d[5]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,e_)),oe.value&&g.value?(J(),ne(Ie,{key:1},[G("span",t_,ye(oe.value.tabName),1),oe.value.node.color?(J(),ne("span",{key:0,class:"stl-tb-dot",style:ct({background:oe.value.node.color})},null,4)):we("",!0),G("span",{class:"stl-tb-text",title:oe.value.node.label},ye(oe.value.node.label),9,o_)],64)):(J(),ne("span",n_,ye(e.title),1))]),e.hideTabs?we("",!0):(J(),ne("div",a_,[G("div",r_,[(J(!0),ne(Ie,null,Bt(u.value,(Y,q)=>(J(),ne("div",{key:Y.id,class:Be(["stl-tab-chip",{active:S.value===q}])},[G("button",{class:"stl-tab",onClick:p=>Fe(q)},ye(Y.label),9,s_),Y.info?(J(),ne("button",{key:0,class:"stl-tab-info",title:Y.info,onClick:p=>Te(q,p)},"i",8,i_)):we("",!0)],2))),128))]),w.value!==null&&((b=u.value[w.value])!=null&&b.info)?(J(),ne("div",l_,ye(u.value[w.value].info),1)):we("",!0)])),G("div",c_,[d[8]||(d[8]=G("span",{class:"stl-caret-sp"},null,-1)),d[9]||(d[9]=G("span",{class:"stl-dot-sp"},null,-1)),G("span",u_,ye(e.columnLabel||(e.hideTabs?e.title:((P=u.value[S.value])==null?void 0:P.label)||"Name")),1),fe.value?(J(),ne("button",{key:0,class:Be(["stl-hdr-num",{active:E.value==="count"}]),title:"Sort by UUPGs",onClick:d[1]||(d[1]=Y=>$("count"))},[d[6]||(d[6]=ht(" UUPGs ",-1)),E.value==="count"?(J(),ne("span",d_,ye(_.value==="desc"?"▼":"▲"),1)):we("",!0)],2)):we("",!0),Z.value?(J(),ne("button",{key:1,class:Be(["stl-hdr-num",{active:E.value==="pop"}]),title:"Sort by Population",onClick:d[2]||(d[2]=Y=>$("pop"))},[d[7]||(d[7]=ht(" Pop ",-1)),E.value==="pop"?(J(),ne("span",p_,ye(_.value==="desc"?"▼":"▲"),1)):we("",!0)],2)):we("",!0),d[10]||(d[10]=G("span",{class:"stl-x-slot"},null,-1))]),G("div",{class:Be(["stl-rows",{"has-sel":se.value}])},[(J(!0),ne(Ie,null,Bt(j.value,Y=>{var q,p;return J(),ne("div",{key:Y.node.id,class:Be(["stl-row",he(Y)]),style:ct({"--trunk-color":((q=Y.parent)==null?void 0:q.color)||"#6e7681","--row-color":Y.node.color||"#73A17F"}),onClick:h=>ke(Y.node)},[(J(!0),ne(Ie,null,Bt(Y.trunks,(h,F)=>(J(),ne("span",{key:`tr${F}`,class:Be(["stl-trunk",`stl-trunk-${h}`])},null,2))),128)),(p=Y.node.children)!=null&&p.length?(J(),ne("button",{key:0,class:Be(["stl-caret",{open:v.value.has(Y.node.id)}]),onClick:Et(h=>ie(Y.node.id,h),["stop"])},[...d[11]||(d[11]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,f_)):(J(),ne("span",h_)),Y.node.color?(J(),ne("span",{key:2,class:"stl-dot",style:ct({background:Y.node.color})},null,4)):(J(),ne("span",m_)),G("span",b_,ye(Y.node.label),1),fe.value?(J(),ne("span",y_,ye(z(Y.node.count)),1)):we("",!0),Z.value?(J(),ne("span",__,ye(Ae(Y.node.pop)),1)):we("",!0),G("span",v_,[k.value===Y.node.id?(J(),ne("button",{key:0,class:"stl-x-chip",title:"Clear selection",onClick:d[3]||(d[3]=Et(h=>ge(h),["stop"]))},[...d[12]||(d[12]=[G("svg",{width:"8",height:"8",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])])):we("",!0)])],14,g_)}),128)),U.value&&!j.value.length?(J(),ne("div",w_,[d[13]||(d[13]=G("span",{class:"stl-spinner"},null,-1)),G("span",null,"Loading "+ye(((D=u.value[S.value])==null?void 0:D.label)||"rows")+"…",1)])):!j.value.length&&e.nodes.length===0?(J(),ne("div",k_,"Loading data…")):j.value.length?we("",!0):(J(),ne("div",S_,"No data at this level")),C.value>0?(J(),ne("div",A_,[ht(" Showing top "+ye(u.value[S.value].topLimit.toLocaleString())+" of "+ye(W.value.length.toLocaleString())+" — ",1),d[14]||(d[14]=G("span",{class:"stl-overflow-hint"},"use the geocoder above to find the rest",-1))])):we("",!0)],2),e.totalLabel?(J(),ne("div",x_,[d[15]||(d[15]=G("span",{class:"stl-caret-sp"},null,-1)),d[16]||(d[16]=G("span",{class:"stl-dot-sp"},null,-1)),G("span",L_,ye(e.totalLabel),1),fe.value?(J(),ne("span",T_,ye(z(e.totalCount)),1)):we("",!0),Z.value?(J(),ne("span",E_,ye(Ae(e.totalPop)),1)):we("",!0),d[17]||(d[17]=G("span",{class:"stl-x-slot"},null,-1))])):we("",!0)])],10,Jy),T.value?we("",!0):(J(),ne("button",{key:0,class:"stl-reopen","data-theme":((B=pe(a))==null?void 0:B.theme.value)||"dark",title:"Expand legend",onClick:d[4]||(d[4]=Y=>{T.value=!0,n("update:open",!0)})},[d[18]||(d[18]=G("svg",{class:"stl-reopen-icon",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M2 4h8M2 6h8M2 8h5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)),G("span",$_,[g.value?(J(),ne(Ie,{key:0},[g.value.color?(J(),ne("span",{key:0,class:"stl-reopen-dot",style:ct({background:g.value.color})},null,4)):we("",!0),ht(" "+ye(g.value.label),1)],64)):(J(),ne(Ie,{key:1},[ht(ye(e.title),1)],64))]),d[19]||(d[19]=G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none",class:"stl-reopen-caret"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],8,C_))],64)}}},[["__scopeId","data-v-d5ce018a"]]);function P_(e={}){const{getMap:t=()=>null,mapId:o="unknown",mapStore:n=null,regionsGeoData:a=null,defaultCenter:r=(bo==null?void 0:bo.center)||[20,10],defaultZoom:s=bo==null?void 0:bo.zoom}=e,i={speed:.5,essential:!0,curve:1.2};function l(m,U,H={x:150,y:0}){const I=t();if(!I)return m;try{const W=I.getCanvas(),ue=W.width,C=W.height,M=I.project(m),j=window.devicePixelRatio||1,se=(H.x||0)*j,fe=(H.y||0)*j,Z={x:M.x-se,y:M.y-fe},ce=I.unproject(Z);return[ce.lng,ce.lat]}catch{return m}}function c(m,U=[]){const H=t();if(!H)return;let I=null,W=5;const ue=U.filter(M=>M.languageFamily===m);if(ue.length>0){let M=1/0,j=-1/0,se=1/0,fe=-1/0;if(ue.forEach(Z=>{Z.longitude&&Z.latitude&&(M=Math.min(M,Z.longitude),j=Math.max(j,Z.longitude),se=Math.min(se,Z.latitude),fe=Math.max(fe,Z.latitude))}),M!==1/0){I=[(M+j)/2,(se+fe)/2];const Z=j-M,ce=fe-se,oe=Math.max(Z,ce);oe>50?W=2:oe>20?W=3:oe>10?W=4:oe>5?W=5:W=6}}if(!I)return;const C=l(I);H.flyTo({center:C,zoom:W,...i})}function u(m){const U=t();if(!U)return;let H=null,I=4;const W=Lb(m);if(W)H=W.center,I=W.zoom||4;else if(a!=null&&a.features){const C=a.features.find(M=>{var j,se;return((j=M.properties)==null?void 0:j.region)===m||((se=M.properties)==null?void 0:se.name)===m});C&&(H=f(C))}if(!H)return;const ue=l(H);U.flyTo({center:ue,zoom:I,...i})}function f(m){if(!m||!m.geometry)return null;const{type:U,coordinates:H}=m.geometry;let I=[];if(U==="Polygon"?I=H[0]||[]:U==="MultiPolygon"&&H.forEach(C=>{I=I.concat(C[0]||[])}),I.length===0)return null;let W=0,ue=0;return I.forEach(C=>{W+=C[0],ue+=C[1]}),[W/I.length,ue/I.length]}function v(m,U={}){const H=t();if(!H)return;const I={center:m,...i,...U};H.flyTo(I)}function x(m,U){const H=t();if(!H||(m==null?void 0:m.longitude)==null||(m==null?void 0:m.latitude)==null)return;const I=U??Math.min(H.getZoom()+2,8);v([m.longitude,m.latitude],{zoom:I})}function T(m,U={top:40,right:40,bottom:40,left:40},H={}){const I=t();if(!I||!m)return;const W=H.maxZoom??4;I.fitBounds(m,{padding:U,maxZoom:W,...i})}function w(){const m=t();m&&m.flyTo({center:r,zoom:s,...i})}const E=80,_=800,S=5,g=5;function k(m){if(!m.length)return null;let U=1/0,H=-1/0,I=1/0,W=-1/0;for(const M of m){if(!Number.isFinite(M))continue;M<U&&(U=M),M>H&&(H=M);const j=M<0?M+360:M;j<I&&(I=j),j>W&&(W=j)}if(!Number.isFinite(U))return null;const ue=H-U,C=W-I;if(C<ue){const M=I>180?I-360:I;return{minLng:M,maxLng:M+C}}return{minLng:U,maxLng:H}}function A(m,U){if(!Array.isArray(m))return m;switch(m[0]){case"get":return U==null?void 0:U[m[1]];case"literal":return m[1];case"has":return U!=null&&m[1]in U;case"!has":return U==null||!(m[1]in U);case"!":return!A(m[1],U);case"coalesce":{for(let I=1;I<m.length;I++){const W=A(m[I],U);if(W!=null)return W}return null}case"to-number":{const I=A(m[1],U),W=Number(I);if(Number.isFinite(W))return W;if(m.length>2){const ue=Number(A(m[2],U));return Number.isFinite(ue)?ue:0}return NaN}case"to-string":{const I=A(m[1],U);return I==null?"":String(I)}case"to-boolean":return!!A(m[1],U);case"slice":{const I=A(m[1],U),W=A(m[2],U),ue=m.length>3?A(m[3],U):void 0;return typeof I!="string"?"":ue!=null?I.slice(W,ue):I.slice(W)}default:return m}}function L(m,U){if(m===!0)return!0;if(m===!1)return!1;if(!Array.isArray(m))return!!m;const H=m[0];if(H==="all"){for(let I=1;I<m.length;I++)if(!L(m[I],U))return!1;return!0}if(H==="any"){for(let I=1;I<m.length;I++)if(L(m[I],U))return!0;return!1}if(H==="!")return!L(m[1],U);if(H==="has")return U!=null&&m[1]in U;if(H==="!has")return U==null||!(m[1]in U);if(H==="=="||H==="!="||H===">"||H===">="||H==="<"||H==="<="){const I=typeof m[1]=="string"?U==null?void 0:U[m[1]]:A(m[1],U),W=A(m[2],U);switch(H){case"==":return I===W||I==null&&W==null;case"!=":return!(I===W||I==null&&W==null);case">":return I>W;case">=":return I>=W;case"<":return I<W;case"<=":return I<=W}}if(H==="in"){const I=A(m[1],U),W=A(m[2],U);return Array.isArray(W)||typeof W=="string"?W.includes(I):!1}if(H==="match"){const I=A(m[1],U),W=m.length-1;for(let ue=2;ue<W;ue+=2){const C=m[ue];if((Array.isArray(C)?C:[C]).includes(I))return!!A(m[ue+1],U)}return!!A(m[W],U)}return!1}function O(m,U){var W,ue;const H=m.getSource(U);if(!H)return[];const I=H._data??((ue=(W=H.serialize)==null?void 0:W.call(H))==null?void 0:ue.data);return I?Array.isArray(I==null?void 0:I.features)?I.features:(I==null?void 0:I.type)==="Feature"?[I]:[]:[]}function $(m,U={}){var ge,Te;const H=t();if(!H||!m)return;if(U.regionPolygonSource&&H.getSource(U.regionPolygonSource)){const Ae=O(H,U.regionPolygonSource),z=m.id??m.label,he=Ae.find(N=>{const d=(N==null?void 0:N.properties)||{};return d.region===z||d.name===z||d.id===z});if(he){const N=[];let d=1/0,y=-1/0;const b=D=>{for(const B of D)Array.isArray(B[0])?b(B):Number.isFinite(B[0])&&Number.isFinite(B[1])&&(N.push(B[0]),B[1]<d&&(d=B[1]),B[1]>y&&(y=B[1]))};(ge=he.geometry)!=null&&ge.coordinates&&b(he.geometry.coordinates);const P=k(N);if(P&&Number.isFinite(d)){H.fitBounds([[P.minLng,d],[P.maxLng,y]],{padding:E,maxZoom:S,duration:_,essential:!0});return}}}const I=U.sourceId??"language-families";if(!H.getSource(I))return;const W=U.matchExpr??m.filter;if(!W)return;const ue=O(H,I);if(!ue.length)return;const C=[];let M=1/0,j=-1/0,se=0,fe=0,Z=0;const ce=new Set;for(const Ae of ue){const z=Ae==null?void 0:Ae.properties;if(!L(W,z))continue;const he=z==null?void 0:z.uniqueId;if(he!=null){if(ce.has(he))continue;ce.add(he)}const N=(Te=Ae.geometry)==null?void 0:Te.coordinates;if(!Array.isArray(N)||N.length<2)continue;const d=N[0],y=N[1];!Number.isFinite(d)||!Number.isFinite(y)||(se===0&&(fe=d,Z=y),C.push(d),y<M&&(M=y),y>j&&(j=y),se++)}if(se===0)return;const oe=k(C),ke=oe?oe.minLng:0,ie=oe?oe.maxLng:0;if(se===1){H.flyTo({center:[fe,Z],zoom:g,duration:_,essential:!0});return}const Fe=[[ke,M],[ie,j]];try{const Ae=typeof H.cameraForBounds=="function"?H.cameraForBounds(Fe,{padding:E,maxZoom:S}):null,z=typeof H.getMinZoom=="function"?H.getMinZoom():null;if((Ae==null||typeof Ae.zoom=="number"&&typeof z=="number"&&Ae.zoom<z-.3)&&typeof z=="number"){const N=(ke+ie)/2,d=(M+j)/2;H.flyTo({center:[N,d],zoom:z,duration:_,essential:!0})}else H.fitBounds(Fe,{padding:E,maxZoom:S,duration:_,essential:!0})}catch{}}return{getOffsetCenter:l,slowFlyToFamily:c,slowFlyToRegion:u,flyTo:v,flyToCoords:x,fitBounds:T,resetView:w,zoomToLegendRow:$,calculateRegionCenterFromPolygon:f}}const M_={__name:"MapToolbar",props:{hasGeocoder:{type:Boolean,default:!0}},setup(e){return mo(`
.map-toolbar {
position: absolute;
top: 10px;
right: 10px;
display: flex;
flex-direction: column;
gap: var(--map-toolbar-gap, 8px);
z-index: 10;
}
@media (max-width: 767px) {
/* Mobile (with geocoder): drop the toolbar well below the search bar so
it doesn't sit flush against the search pill. Search = top:10,
height ~36, bottom:46. top:80 leaves a comfortable ~34px gap. */
.map-toolbar { top: 80px; gap: 6px; }
/* Mobile (no geocoder): collapse the reserved gap — controls sit flush
to the top of the map area with the same 10px inset used on desktop. */
.map-toolbar.map-toolbar--no-geocoder { top: 10px; gap: 6px; }
}
`,"map-toolbar"),(t,o)=>(J(),ne("div",{class:Be(["map-toolbar",{"map-toolbar--no-geocoder":!e.hasGeocoder}])},[ta(t.$slots,"default")],2))}},I_=["title","disabled"],Qo={__name:"MapControlButton",props:{isDark:{type:Boolean,default:!1},title:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){return mo(`
.mcb{
width:var(--map-btn-size,40px);height:var(--map-btn-size,40px);
background:#fff;
border:none;
border-radius:50%;
cursor:pointer;
display:flex;align-items:center;justify-content:center;
box-shadow:0 1px 4px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.10);
transition:background-color 0.2s,box-shadow 0.2s,transform 0.1s;
color:#333;
flex-shrink:0;
outline:none;
}
.mcb:hover:not(:disabled){background:#f0f0f0;box-shadow:0 2px 8px rgba(0,0,0,0.18),0 4px 16px rgba(0,0,0,0.12);}
.mcb:active:not(:disabled){transform:scale(0.93);}
.mcb:disabled{opacity:0.4;cursor:not-allowed;}
.mcb.active{background:#e8f0fe;color:#1a73e8;}
/* dark */
.mcb.dark{background:#3b463d;color:#F3F3F1;border:1px solid rgba(255,255,255,0.14);box-shadow:0 1px 4px rgba(0,0,0,0.4);}
.mcb.dark:hover:not(:disabled){background:#4e594f;box-shadow:0 2px 8px rgba(0,0,0,0.5);}
.mcb.dark.active{background:#4e594f;color:#92b195;}
@media(max-width:767px){.mcb{width:36px;height:36px;}}
`,"map-control-button"),(t,o)=>(J(),ne("button",{class:Be(["mcb",{dark:e.isDark,active:e.active}]),title:e.title,disabled:e.disabled,onClick:o[0]||(o[0]=n=>t.$emit("click"))},[ta(t.$slots,"default")],10,I_))}},N_={__name:"ZoomInButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1}},setup(e){const{t}=gt(),o=e;function n(){var a;(a=o.map)==null||a.zoomIn()}return(a,r)=>(J(),Je(Qo,{"is-dark":e.isDark,title:pe(t)("buttons.zoomIn"),onClick:n},{default:Tt(()=>[...r[0]||(r[0]=[G("span",{style:{"font-size":"20px","line-height":"1","font-weight":"600"}},"+",-1)])]),_:1},8,["is-dark","title"]))}},F_={__name:"ZoomOutButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1}},setup(e){const{t}=gt(),o=e;function n(){var a;(a=o.map)==null||a.zoomOut()}return(a,r)=>(J(),Je(Qo,{"is-dark":e.isDark,title:pe(t)("buttons.zoomOut"),onClick:n},{default:Tt(()=>[...r[0]||(r[0]=[G("span",{style:{"font-size":"22px","line-height":"1","font-weight":"600"}},"−",-1)])]),_:1},8,["is-dark","title"]))}},R_={__name:"LocationButton",props:{map:{type:Object,default:null},isDark:{type:Boolean,default:!1},center:{type:Array,default:()=>[20,10]},zoom:{type:Number,default:1.8},userZoom:{type:Number,default:10}},setup(e){const{t}=gt(),o=e;function n(){var r;(r=o.map)==null||r.flyTo({center:o.center,zoom:o.zoom,duration:1200})}function a(){if(o.map){if(typeof navigator>"u"||!navigator.geolocation){n();return}navigator.geolocation.getCurrentPosition(r=>{const{longitude:s,latitude:i}=r.coords;Number.isFinite(s)&&Number.isFinite(i)?o.map.flyTo({center:[s,i],zoom:o.userZoom,duration:1500}):n()},()=>n(),{enableHighAccuracy:!1,timeout:5e3,maximumAge:6e4})}}return(r,s)=>(J(),Je(Qo,{"is-dark":e.isDark,title:pe(t)("buttons.resetView"),onClick:a},{default:Tt(()=>[...s[0]||(s[0]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[G("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z"})],-1)])]),_:1},8,["is-dark","title"]))}},D_={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},O_={key:1,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},B_={__name:"FullscreenButton",props:{mapContainer:{type:Object,default:null},isDark:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:t}){const{t:o}=gt(),n=e,a=t,r=me(!1);let s=null,i=null,l=null,c=null,u=null,f=null,v=null,x=null,T=null,w=null,E=null,_=0,S=0,g=null,k=null;function A(){if(typeof document>"u")return!1;const C=typeof navigator<"u"&&navigator.userAgent||"";return/iPad|iPhone|iPod/.test(C)||C.includes("Mac")&&typeof document<"u"&&"ontouchend"in document?!1:!!(document.fullscreenEnabled||document.webkitFullscreenEnabled)}function L(){var C,M,j;return((j=(M=(C=n.mapContainer)==null?void 0:C.getRootNode)==null?void 0:M.call(C))==null?void 0:j.host)??null}function O(){var M,j;const C=(j=(M=n.mapContainer)==null?void 0:M.getRootNode)==null?void 0:j.call(M);return document.fullscreenElement||document.webkitFullscreenElement||(C&&C instanceof ShadowRoot?C.fullscreenElement:null)||null}function $(C){const M=C.requestFullscreen||C.webkitRequestFullscreen;if(!M)return Promise.reject(new Error("Fullscreen API unavailable"));const j=M.call(C);return j&&typeof j.then=="function"?j:Promise.resolve()}function m(){const C=document.exitFullscreen||document.webkitExitFullscreen;if(!C)return Promise.reject(new Error("Fullscreen API unavailable"));const M=C.call(document);return M&&typeof M.then=="function"?M:Promise.resolve()}function U(){const C=L();if(!C)return!1;if(l=C,i=C.style.cssText,C.style.position="fixed",C.style.top="0",C.style.left="0",C.style.right="0",C.style.bottom="0",C.style.width="100vw",C.style.height="100vh",C.style.height="100dvh",C.style.zIndex="2147483647",C.style.margin="0",C.style.borderRadius="0",C.style.touchAction="pan-x pan-y pinch-zoom",typeof document<"u"){_=window.scrollY||window.pageYOffset||0,S=window.scrollX||window.pageXOffset||0;const M=document.body,j=document.documentElement;c=M?M.style.overflow:null,u=j?j.style.overflow:null,f=M?M.style.position:null,v=M?M.style.top:null,x=M?M.style.left:null,T=M?M.style.width:null,w=M?M.style.touchAction:null,E=j?j.style.touchAction:null,j&&(j.style.overflow="hidden",j.style.touchAction="none"),M&&(M.style.overflow="hidden",M.style.position="fixed",M.style.top=`-${_}px`,M.style.left=`-${S}px`,M.style.width="100%",M.style.touchAction="none"),g=se=>{if(!l)return;const fe=se.target;fe&&(fe===l||l.contains&&l.contains(fe))||se.cancelable&&se.preventDefault()},k=se=>{if(!l)return;const fe=se.target;fe&&(fe===l||l.contains&&l.contains(fe))||se.cancelable&&se.preventDefault()},document.addEventListener("touchmove",g,{passive:!1,capture:!0}),document.addEventListener("wheel",k,{passive:!1,capture:!0})}return!0}function H(){if(l){if(l.style.cssText=i||"",l=null,i=null,typeof document<"u"){const C=document.body,M=document.documentElement;C&&(C.style.overflow=c??"",C.style.position=f??"",C.style.top=v??"",C.style.left=x??"",C.style.width=T??"",C.style.touchAction=w??""),M&&(M.style.overflow=u??"",M.style.touchAction=E??""),g&&(document.removeEventListener("touchmove",g,{capture:!0}),g=null),k&&(document.removeEventListener("wheel",k,{capture:!0}),k=null),typeof window<"u"&&(_||S)&&window.scrollTo(S,_)}c=null,u=null,f=null,v=null,x=null,T=null,w=null,E=null,_=0,S=0}}function I(){typeof window>"u"||window.requestAnimationFrame(()=>{window.dispatchEvent(new Event("resize"))})}function W(){if(!A()){r.value?(H(),r.value=!1,a("change",!1)):U()&&(r.value=!0,a("change",!0)),I();return}if(O())m().then(()=>{r.value=!1,a("change",!1)}).catch(()=>{});else{const M=L()??document.documentElement;$(M).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{$(document.documentElement).then(()=>{r.value=!0,a("change",!0)}).catch(()=>{})})}}function ue(){r.value=!!O(),a("change",r.value)}return ao(()=>{var M,j;document.addEventListener("fullscreenchange",ue),document.addEventListener("webkitfullscreenchange",ue);const C=(j=(M=n.mapContainer)==null?void 0:M.getRootNode)==null?void 0:j.call(M);C instanceof ShadowRoot&&(s=C,C.addEventListener("fullscreenchange",ue),C.addEventListener("webkitfullscreenchange",ue))}),Bo(()=>{document.removeEventListener("fullscreenchange",ue),document.removeEventListener("webkitfullscreenchange",ue),s&&(s.removeEventListener("fullscreenchange",ue),s.removeEventListener("webkitfullscreenchange",ue),s=null),l&&H()}),(C,M)=>(J(),Je(Qo,{"is-dark":e.isDark,active:r.value,title:pe(o)("buttons.toggleFullscreen"),onClick:W},{default:Tt(()=>[r.value?(J(),ne("svg",O_,[...M[1]||(M[1]=[G("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},null,-1)])])):(J(),ne("svg",D_,[...M[0]||(M[0]=[G("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},null,-1)])]))]),_:1},8,["is-dark","active","title"]))}},U_={style:{"font-size":"16px","line-height":"1"}},G_={__name:"ThemeToggleButton",props:{isDark:{type:Boolean,default:!1}},emits:["toggle"],setup(e){const{t}=gt();return(o,n)=>(J(),Je(Qo,{"is-dark":e.isDark,title:e.isDark?pe(t)("buttons.switchToLightMode"):pe(t)("buttons.switchToDarkMode"),onClick:n[0]||(n[0]=a=>o.$emit("toggle"))},{default:Tt(()=>[G("span",U_,ye(e.isDark?"☀️":"🌙"),1)]),_:1},8,["is-dark","title"]))}},j_={__name:"HelpButton",props:{isDark:{type:Boolean,default:!1}},emits:["open-help"],setup(e){const{t}=gt();return(o,n)=>(J(),Je(Qo,{"is-dark":e.isDark,title:pe(t)("buttons.aboutThisMap"),onClick:n[0]||(n[0]=a=>o.$emit("open-help"))},{default:Tt(()=>[...n[1]||(n[1]=[G("span",{style:{"font-size":"15px","font-weight":"700","font-family":"serif","line-height":"1"}},"?",-1)])]),_:1},8,["is-dark","title"]))}},K_=["dir"],H_={key:0,class:"dsm-tab-bar"},z_=["onClick"],V_={class:"dsm-map-area"},W_={key:0,class:"dsm-loading"},Y_={class:"dsm-legend-desktop-slot"},q_={class:"dsm-legend-mobile-slot"},J_={class:"dsm-help-modal"},en="language-family-pins-active",Aa="language-family-pins-pulse",Yc="language-family-pins-hitbox",X_="#b9bfc6",Z_="#4b5360",Q_=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"doxa-simple-map",setup(e){var at,Qe;const t=Za(()=>La(()=>Promise.resolve().then(()=>qc),void 0));mo(`
.dsm-root { position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden; }
.dsm-tab-bar { flex:0 0 auto;display:flex;align-items:center;background:#fff;border-bottom:2px solid #e0e0e0;box-shadow:0 2px 4px rgba(0,0,0,.08);height:48px;padding:0 12px;gap:4px;z-index:10; }
.dsm-tab { background:none;border:none;padding:0 20px;height:100%;font-size:14px;font-weight:500;color:#555;cursor:pointer;border-bottom:3px solid transparent;transition:color .15s,border-color .15s,background .15s;white-space:nowrap; }
.dsm-tab:hover { background:rgba(52,152,219,.06);color:#3498db; }
.dsm-tab.active { color:#3498db;border-bottom-color:#3498db;background:rgba(52,152,219,.06); }
.dsm-map-area { flex:1 1 0;position:relative;overflow:hidden; }
.dsm-map-canvas { position:absolute;inset:0; }
.dsm-loading { position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#f8f9fa;color:#555;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:14px;z-index:5; }
/* ── Light mode: geocoder ── */
/* Search bar matches legend width EXACTLY via the shared --map-legend-width
CSS variable (set by applyContainerScale). Responsive at same breakpoints. */
/* Outer control container: positioned 10px from top + left of the map area
(matches legend's 10px left inset). Locked to legend width. The Mapbox
default 10px child margin is NEUTRALIZED here by our positioning —
without this override the geocoder would nest-indent another 10px. */
.mapboxgl-ctrl-top-left { top:10px!important;left:10px!important;width:var(--map-legend-width,340px)!important;max-width:var(--map-legend-width,340px)!important;z-index:1200!important; }
.mapboxgl-ctrl-top-left .mapboxgl-ctrl { margin:0!important;float:none!important; }
/* Geocoder pill: inherit Mapbox's DEFAULT height + icon positions. Only
override width + rounded border + shadow. This keeps the search-icon
and X-button perfectly aligned by Mapbox's own calibrated CSS. */
.mapboxgl-ctrl-geocoder { width:100%!important;max-width:100%!important;min-width:0!important;border-radius:20px!important;box-shadow:0 2px 8px rgba(0,0,0,0.15)!important;background:#fff; }
.mapboxgl-ctrl-geocoder--input { border-radius:20px!important; }
/* Keep the clear (X) button visible whenever the input has text, not just
while focused. Mapbox's default only shows X on focus, so after picking
a search result on mobile (tap → input blurs) the X vanished until the
user tapped BACK into the input. :has + :not(:placeholder-shown) detects
a non-empty input. */
.mapboxgl-ctrl-geocoder:has(.mapboxgl-ctrl-geocoder--input:not(:placeholder-shown)) .mapboxgl-ctrl-geocoder--button { display:block!important; }
/* Suggestions dropdown — higher limit (20) can produce a tall list;
cap height + add overflow-y so the user can scroll through all matches
(e.g. many people-groups under "India"). Visible scrollbar styling. */
.mapboxgl-ctrl-geocoder--suggestions { z-index:1200!important;position:absolute;max-height:60vh!important;overflow-y:auto!important; }
.suggestions { border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.15);max-height:60vh!important;overflow-y:auto!important; }
.mapboxgl-ctrl-geocoder--suggestions::-webkit-scrollbar,
.suggestions::-webkit-scrollbar { width:8px; }
.mapboxgl-ctrl-geocoder--suggestions::-webkit-scrollbar-thumb,
.suggestions::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.3);border-radius:4px; }
.mapboxgl-ctrl-geocoder--suggestions::-webkit-scrollbar-track,
.suggestions::-webkit-scrollbar-track { background:rgba(0,0,0,0.05); }
/* ── DOXA custom suggestion rows — bold labels + compact meta ─────── */
/* GeocoderComponent.renderSuggestion() produces <div class="dg-main">
Name</div><div class="dg-meta"><span class="dg-field">…</span>…</div> */
.dg-main { font-weight:500;font-size:13px;color:#222;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.dg-main strong { font-weight:700; }
.dg-meta { margin-top:2px;display:flex;flex-wrap:wrap;gap:4px 10px;font-size:11px;color:#555;line-height:1.35; }
.dg-field strong { font-weight:600;color:#333;margin-right:2px; }
/* Dark theme variants */
.dsm-dark .dg-main { color:#F3F3F1; }
.dsm-dark .dg-meta { color:rgba(243,243,241,0.7); }
.dsm-dark .dg-field strong { color:#F3F3F1; }
@media(max-width:767px){
/* Mobile: centered full-width pill, using native Mapbox geocoder height + icons. */
.mapboxgl-ctrl-top-left { top:10px!important;left:10px!important;right:10px!important;width:calc(100% - 20px)!important;max-width:none!important; }
}
/* ── Dark mode: root class drives all child overrides ── */
.dsm-dark .mapboxgl-ctrl-geocoder { background:#4e594f!important;border:1px solid rgba(255,255,255,0.14)!important;box-shadow:0 2px 8px rgba(0,0,0,0.4)!important; }
.dsm-dark .mapboxgl-ctrl-geocoder--input { color:#F3F3F1!important;background:transparent!important; }
.dsm-dark .mapboxgl-ctrl-geocoder--input::placeholder { color:rgba(243,243,241,0.65)!important; }
/* X (clear) button — the SVG <svg> AND its wrapper <button> both need
dark-mode styling or Mapbox's default white fill bleeds through. */
.dsm-dark .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon { fill:rgba(243,243,241,0.75)!important; }
.dsm-dark .mapboxgl-ctrl-geocoder--button { background:transparent!important; }
.dsm-dark .mapboxgl-ctrl-geocoder--icon-close { fill:rgba(243,243,241,0.75)!important; }
.dsm-dark .mapboxgl-ctrl-geocoder--button:hover .mapboxgl-ctrl-geocoder--icon-close { fill:#F3F3F1!important; }
/* Suggestions dropdown — every wrapper level needs explicit dark bg.
Mapbox uses UL.suggestions > LI > A; the default .active / .selected
class on the top match keeps a light bg without these overrides. */
.dsm-dark .suggestions { background:#3b463d!important;border:1px solid rgba(255,255,255,0.12)!important; }
.dsm-dark .suggestions > li { background:transparent!important; }
.dsm-dark .suggestions > li > a { background:transparent!important;color:#F3F3F1!important; }
.dsm-dark .suggestions > li.active > a,
.dsm-dark .suggestions > li.selected > a,
.dsm-dark .suggestions > li:hover > a,
.dsm-dark .suggestions > li > a:hover,
.dsm-dark .suggestions > li > a:focus { background:rgba(255,255,255,0.1)!important;color:#F3F3F1!important; }
/* DOXA custom row bits inside dark mode — re-assert in case the row-<a>
sets a color that our .dg-* spans inherit from. */
.dsm-dark .dg-main { color:#F3F3F1!important; }
.dsm-dark .dg-meta { color:rgba(243,243,241,0.75)!important; }
.dsm-dark .dg-field strong { color:#F3F3F1!important; }
/* When the geocoder is disabled (FEATURES.geocoder=false), the legend
reflows up to fill the freed top slot — matches the geocoder pill
position (top:10px) instead of clearing it (top:54px). qa: 2026-05-06. */
.dsm-root.dsm-no-geocoder .legend-container,
.dsm-root.dsm-no-geocoder .legend-container.collapsed { top: 10px !important; }
.dsm-root.dsm-no-geocoder .stl-panel { top: 10px !important; }
.dsm-root.dsm-no-geocoder .stl-reopen { top: 10px !important; }
/* Desktop/mobile legend slot toggle */
.dsm-legend-mobile-slot { display:none; }
@media(max-width:767px){
.dsm-legend-mobile-slot { display:block; }
.dsm-legend-desktop-slot { display:none; }
}
/* Left/right scroll edges for mobile — transparent strips that allow
page scrolling via touch-action:pan-y on the map edges. */
.map-scroll-edge { position:absolute;top:0;bottom:0;width:40px;z-index:2;touch-action:pan-y;pointer-events:auto;background:transparent; }
.map-scroll-edge--left { left:0; }
.map-scroll-edge--right { right:0; }
/* ── Fullscreen ── */
:host(:fullscreen) { width:100vw!important;height:100vh!important;display:block!important; }
:host(:fullscreen) .dsm-root { position:fixed;inset:0; }
:host(:-webkit-full-screen) { width:100vw!important;height:100vh!important;display:block!important; }
:host(:-webkit-full-screen) .dsm-root { position:fixed;inset:0; }
/* ── Help modal ── */
.dsm-help-overlay { position:absolute;inset:0;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;z-index:2000; }
.dsm-help-modal { background:#2a332a;color:#F3F3F1;border-radius:12px;padding:28px 32px;max-width:420px;width:90%;position:relative;box-shadow:0 8px 32px rgba(0,0,0,0.4);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;z-index:2001; }
.dsm-help-modal h2 { margin:0 0 12px;font-size:18px;font-weight:600; }
.dsm-help-modal p { margin:0 0 10px;font-size:14px;line-height:1.6;color:#ccc; }
.dsm-help-modal p:last-of-type { margin-bottom:0; }
.dsm-help-close { position:absolute;top:12px;right:14px;background:none;border:none;color:#fff;font-size:20px;cursor:pointer;line-height:1;padding:4px 6px;border-radius:4px; }
.dsm-help-close:hover { background:rgba(255,255,255,0.12); }
`,"doxa-simple-map");const{t:o,locale:n}=gt(),a=["country-label","state-label","settlement-major-label","settlement-minor-label","place-label","continent-label","water-point-label","water-line-label"];function r(X){const te=ge==null?void 0:ge.value;if(te){for(const ae of a)if(te.getLayer(ae))try{te.setLayoutProperty(ae,"text-field",["coalesce",["get","name_"+X],["get","name_en"],["get","name"]])}catch{}}}const s=Q(()=>Em.has(n.value)),i={hamburgerMenu:!1,infoButton:!1,overlapDensity:!1,darkPinBorder:!1,geocoder:!1,activeOverlayEmphasis:!1},l=$e("profileConfig"),c=$e("mapboxToken"),u=$e("dataSource"),f=[{id:"prayer",label:"Prayer",colorStrategy:"prayer",legend:"prayer",popup:"prayer"}],v=Q(()=>{var X;return((X=l==null?void 0:l.value)==null?void 0:X.tabs)??f}),x=Q(()=>v.value.length>1),T=me(null),w=Q(()=>v.value.find(X=>X.id===T.value)??v.value[0]),E={prayer:"prayer",engagement:"engagement",adoption:"adoption"},_=Q(()=>{var X;return E[(X=w.value)==null?void 0:X.legend]??"prayer"}),S=Q(()=>{var X;return((X=w.value)==null?void 0:X.popup)==="adoption"?"adopt":"pray"}),g=$e("instanceId",null),k=(g==null?void 0:g.value)||g||"doxa-simple-map-"+Math.random().toString(36).slice(2,7);wt("mapId",k),wt("getActivePinColor",X=>{var ve,Ze,yo;const te=(ve=w.value)==null?void 0:ve.colorStrategy,ae=te==="engagement"?ze.ENGAGEMENT:te==="adoption"?ze.ADOPTION:ze.PRAYER_PROGRESS;return((yo=(Ze=Nc(ae))==null?void 0:Ze.getColor)==null?void 0:yo.call(Ze,X))??"#1a1a1a"});const A=Wy();Yy(A),A.theme.value="light";const L=Yr(za(()=>_.value));function O(X){const te=[];for(const ae of X){te.push({id:ae.key,label:ae.label,color:ae.color,count:ae.count??0,pop:ae.population??0,filter:ae.filterKey?["==",["get","_flat_filter"],ae.filterKey]:null,children:[]});for(const ve of ae.children||[])te.push({id:ve.key,label:ve.label,color:ve.color,count:ve.count??0,pop:ve.population??0,filter:ve.filterKey?["==",["get","_flat_filter"],ve.filterKey]:null,children:[]})}return te}const $=Q(()=>O(L.items.value)),m=Q(()=>"Legend"),U=Q(()=>{const X=_.value;return X==="prayer"?"Prayer Status":X==="engagement"?"Engagement Status":X==="adoption"?"Adoption Status":"Status"}),H=Q(()=>o("legend.footer.total")),I=Q(()=>L.totalCount.value),W=Q(()=>L.totalPopulation.value),ue=Q(()=>ie.legendState!=="collapsed");function C(X){X?ie.openLegend():ie.collapseLegend()}function M(X){var ve;if(!X){const Ze=_.value;Ze==="prayer"?ie.setPrayerFilter(null):Ze==="engagement"?ie.setEngagementFilter(null):Ze==="adoption"&&ie.setAdoptionFilter(null);return}const te=_.value;te==="prayer"?ie.setPrayerFilter(X.id):te==="engagement"?ie.setEngagementFilter(X.id):te==="adoption"&&ie.setAdoptionFilter(X.id);const ae=R(te,X.id);ae&&((ve=N.zoomToLegendRow)==null||ve.call(N,X,{matchExpr:ae}))}const j=me(null),se=me(null);let fe=null;function Z(X){const te=se.value;te&&(X>=700?(te.style.setProperty("--map-btn-size","40px"),te.style.setProperty("--map-toolbar-gap","8px"),te.style.setProperty("--map-font-md","13px"),te.style.setProperty("--map-font-sm","11px"),te.style.setProperty("--map-legend-width","400px")):X>=500?(te.style.setProperty("--map-btn-size","36px"),te.style.setProperty("--map-toolbar-gap","6px"),te.style.setProperty("--map-font-md","12px"),te.style.setProperty("--map-font-sm","10px"),te.style.setProperty("--map-legend-width","360px")):(te.style.setProperty("--map-btn-size","32px"),te.style.setProperty("--map-toolbar-gap","5px"),te.style.setProperty("--map-font-md","11px"),te.style.setProperty("--map-font-sm","10px"),te.style.setProperty("--map-legend-width","280px")))}const ce=me(!1),oe=$e("mapStore"),ke=$e("dataStore"),ie=$e("uiStore"),Fe=new Rb,{map:ge,initializeMap:Te,destroy:Ae}=Fm({containerRef:j,accessToken:c.value,style:"mapbox://styles/mapbox/light-v11",center:[20,10],zoom:1.8,pitch:((at=l==null?void 0:l.value)==null?void 0:at.pitch)??bo.pitch,bearing:((Qe=l==null?void 0:l.value)==null?void 0:Qe.bearing)??bo.bearing}),z=Ab({mapId:k,dataSourceId:u.value,dataSourceManager:Fe,dataStore:ke,markRaw:X=>X}),he=Pb({getMap:()=>ge.value,mapId:k,getLanguageFamilyColor:Mt,getNormalizedPeopleGroups:()=>z.normalizedPeopleGroups.value||[]}),N=P_({getMap:()=>ge.value,mapId:k,mapStore:oe,defaultCenter:[20,10],defaultZoom:1.8}),d=Ib({getMap:()=>ge.value});let y=[];const b=Q(()=>ie.theme==="dark");Ye(b,X=>{A.theme.value=X?"dark":"light"},{immediate:!0}),Ye(b,X=>{const te=ge.value;!te||!te.getLayer("language-family-pins")||te.setPaintProperty("language-family-pins","circle-stroke-color",X?"#ffffff":"rgba(0,0,0,0.45)")},{immediate:!1});function P(){if(!ge.value)return;ie.toggleTheme();const X=ie.theme==="dark"?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11";ge.value.setStyle(X),ge.value.once("style.load",()=>{var te,ae;if(y!=null&&y.length){const ve=v.value[0],Ze=(ve==null?void 0:ve.colorStrategy)==="engagement"?ze.ENGAGEMENT:(ve==null?void 0:ve.colorStrategy)==="adoption"?ze.ADOPTION:ze.PRAYER_PROGRESS;he.addLanguageFamilyLayer(y,Ze)}d.initialize(),r(n.value),(((te=w.value)==null?void 0:te.id)==="prayer"||((ae=w.value)==null?void 0:ae.colorStrategy)==="prayer")&&he.startPrayerGlow()})}function D(){ie.updateBreakpoint(window.innerWidth)}ao(()=>{ie.updateBreakpoint(window.innerWidth),ie.isMobile?ie.collapseLegend():ie.openLegend(),window.addEventListener("resize",D),se.value&&(Z(se.value.offsetWidth),fe=new ResizeObserver(X=>{for(const te of X)Z(te.contentRect.width)}),fe.observe(se.value))}),Bo(()=>{window.removeEventListener("resize",D),fe==null||fe.disconnect(),fe=null});const B=me(!1);function Y(X){if(X===T.value)return;T.value=X;const te=v.value.find(Ze=>Ze.id===X);if(!te||!ge.value)return;const ae=te.colorStrategy,ve=ae==="engagement"?ze.ENGAGEMENT:ae==="adoption"?ze.ADOPTION:ze.PRAYER_PROGRESS;if(ge.value.getLayer("language-family-pins")){const Ze=Kr(ve);ge.value.setPaintProperty("language-family-pins","circle-color",Ze),ge.value.getLayer(en)&&ge.value.setPaintProperty(en,"circle-color",Ze),h.forEach(yo=>{ge.value.getLayer(yo)&&ge.value.setPaintProperty(yo,"circle-color",Ze)})}te.id==="prayer"||te.colorStrategy==="prayer"?he.startPrayerGlow():he.stopPrayerGlow()}function q(X,te){if(X!=null&&X.getLayer(Yc))try{X.setFilter(Yc,te)}catch{}}let p={type:null,key:null};const h=[Aa];function F(){return b.value?Z_:X_}function K(){const X=w.value,te=(X==null?void 0:X.colorStrategy)==="engagement"?ze.ENGAGEMENT:(X==null?void 0:X.colorStrategy)==="adoption"?ze.ADOPTION:ze.PRAYER_PROGRESS;return Kr(te)}function re(X,te){return ee()}function ee(){return b.value?"#ffffff":"rgba(0,0,0,0.45)"}function R(X,te){if(X==="prayer"){const ae=["coalesce",["to-number",["get","peoplePraying"],0],0];if(te==="noPrayer")return["<=",ae,0];if(te==="hasPrayer")return["all",[">",ae,0],["<",ae,To]];if(te==="fullPrayer")return[">=",ae,To]}else if(X==="engagement"){const ae=["get","engagementStatus"];if(te==="hasEngagement")return["any",["==",ae,!0],["==",ae,1]];if(te==="notEngaged")return["all",["!=",ae,!0],["!=",ae,1]]}else if(X==="adoption"){const ae=["get","adoptionStatus"];if(te==="hasAdoption")return["any",["==",ae,!0],["==",ae,1]];if(te==="notAdopted")return["all",["!=",ae,!0],["!=",ae,1]]}return null}function V(){const X=ge.value;X!=null&&X.getLayer(Aa)&&(X.setFilter(Aa,["==","uniqueId",""]),X.setPaintProperty(Aa,"circle-opacity",0))}function de(){V();const X=ge.value;X!=null&&X.getLayer(en)&&X.setFilter(en,["==","uniqueId",""])}function xe(X,te){const ae=ge.value;if(!ae||!ae.getLayer("language-family-pins"))return;if(!te){p={type:null,key:null},ae.setPaintProperty("language-family-pins","circle-color",K()),ae.setPaintProperty("language-family-pins","circle-opacity",.9),ae.setPaintProperty("language-family-pins","circle-stroke-opacity",1),q(ae,null),he.syncGlowFilter(null),de();return}const ve=R(X,te);if(!ve){p={type:null,key:null},ae.setPaintProperty("language-family-pins","circle-color",K()),ae.setPaintProperty("language-family-pins","circle-opacity",.9),ae.setPaintProperty("language-family-pins","circle-stroke-opacity",1),q(ae,null),he.syncGlowFilter(null),de();return}p={type:X,key:te};{ae.setPaintProperty("language-family-pins","circle-color",K()),ae.setPaintProperty("language-family-pins","circle-opacity",["case",ve,1,.06]),ae.setPaintProperty("language-family-pins","circle-stroke-opacity",["case",ve,1,.06]),q(ae,ve),he.syncGlowFilter(ve);return}}Ye(b,()=>{const X=ge.value;X&&(X.getLayer(en)&&X.setPaintProperty(en,"circle-stroke-color",re(p.type,p.key)),p.key&&X.getLayer("language-family-pins")&&X.setPaintProperty("language-family-pins","circle-color",F()))}),Ye(()=>ie.prayerFilter,X=>xe("prayer",X)),Ye(()=>ie.engagementFilter,X=>xe("engagement",X)),Ye(()=>ie.adoptionFilter,X=>xe("adoption",X));async function De(X){var te,ae;oe.registerMap(k,ge.value);try{ge.value.setProjection("mercator")}catch{}if(X!=null&&X.length){y=X;const ve=v.value[0],Ze=(ve==null?void 0:ve.colorStrategy)==="engagement"?ze.ENGAGEMENT:(ve==null?void 0:ve.colorStrategy)==="adoption"?ze.ADOPTION:ze.PRAYER_PROGRESS;he.addLanguageFamilyLayer(X,Ze)}d.initialize(),r(n.value),oe.setMapReady(k),ce.value=!0,(((te=w.value)==null?void 0:te.id)==="prayer"||((ae=w.value)==null?void 0:ae.colorStrategy)==="prayer")&&he.startPrayerGlow()}return Ye(n,X=>r(X)),ao(async()=>{var te;T.value=((te=v.value[0])==null?void 0:te.id)??"prayer",ie.updateBreakpoint(window.innerWidth);const X=z.loadData().catch(ae=>(console.error("[doxa-simple-map] Data load failed:",ae),{normalizedPeopleGroups:[]}));if(await Te(),!ge.value){console.error("[doxa-simple-map] Map failed to initialize — check token and container");return}ge.value.once("style.load",async()=>{try{const{normalizedPeopleGroups:ae}=await X;await De(ae)}catch(ae){console.error("[doxa-simple-map] onMapReady failed:",ae)}})}),Bo(()=>{he.stopPrayerGlow(),de(),oe.unregisterMap(k),d.cleanup(),Ae()}),(X,te)=>(J(),ne("div",{ref_key:"dsmRoot",ref:se,class:Be(["dsm-root",{"dsm-dark":b.value,"dsm-rtl":s.value,"dsm-no-geocoder":!0}]),dir:s.value?"rtl":"ltr"},[x.value?(J(),ne("div",H_,[(J(!0),ne(Ie,null,Bt(v.value,ae=>(J(),ne("button",{key:ae.id,class:Be(["dsm-tab",{active:T.value===ae.id}]),onClick:ve=>Y(ae.id)},ye(ae.label),11,z_))),128))])):we("",!0),G("div",V_,[ce.value?we("",!0):(J(),ne("div",W_,"Loading map…")),G("div",{ref_key:"mapContainer",ref:j,class:"dsm-map-canvas"},null,512),we("",!0),we("",!0),we("",!0),G("div",Y_,[ce.value&&pe(ie).legendMode==="detail"&&pe(ie).selectedPeopleGroup?(J(),Je(Vy,{key:0,"legend-type":_.value,"popup-action":S.value,"initially-collapsed":!1,"is-dark":b.value},null,8,["legend-type","popup-action","is-dark"])):we("",!0),ce.value?Hu((J(),Je(Wc,{key:1,nodes:$.value,tabs:null,title:m.value,hideTabs:!0,columnLabel:U.value,"total-label":H.value,"total-count":I.value,"total-pop":W.value,open:ue.value,onSelect:M,"onUpdate:open":C},null,8,["nodes","title","columnLabel","total-label","total-count","total-pop","open"])),[[op,!(pe(ie).legendMode==="detail"&&pe(ie).selectedPeopleGroup)]]):we("",!0)]),G("div",q_,[ce.value?(J(),Je(pe(t),{key:0,"legend-type":_.value,"popup-action":S.value,"is-dark":b.value,"show-total":!0},null,8,["legend-type","popup-action","is-dark"])):we("",!0)]),te[9]||(te[9]=G("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),te[10]||(te[10]=G("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1)),ce.value?(J(),Je(M_,{key:4,"has-geocoder":i.geocoder},{default:Tt(()=>[Ve(N_,{map:pe(ge),"is-dark":b.value},null,8,["map","is-dark"]),Ve(F_,{map:pe(ge),"is-dark":b.value},null,8,["map","is-dark"]),Ve(R_,{map:pe(ge),"is-dark":b.value},null,8,["map","is-dark"]),Ve(B_,{"map-container":j.value,"is-dark":b.value},null,8,["map-container","is-dark"]),Ve(G_,{"is-dark":b.value,onToggle:P},null,8,["is-dark"]),i.infoButton?(J(),Je(j_,{key:0,"is-dark":b.value,onOpenHelp:te[2]||(te[2]=ae=>B.value=!0)},null,8,["is-dark"])):we("",!0)]),_:1},8,["has-geocoder"])):we("",!0),B.value?(J(),ne("div",{key:5,class:"dsm-help-overlay",onClick:te[4]||(te[4]=Et(ae=>B.value=!1,["self"]))},[G("div",J_,[G("button",{class:"dsm-help-close",onClick:te[3]||(te[3]=ae=>B.value=!1)},"×"),te[5]||(te[5]=G("h2",null,"About This Map",-1)),te[6]||(te[6]=G("p",null,"This map displays Unreached People Groups (UPGs) around the world — communities without meaningful access to the Gospel.",-1)),te[7]||(te[7]=G("p",null,"Use the tabs (if shown) to switch between Prayer and Engagement views. Click any dot to learn more about a people group.",-1)),te[8]||(te[8]=G("p",null,[ht("Data sourced from "),G("strong",null,"pray.doxa.life"),ht(".")],-1))])])):we("",!0)])],10,K_))}},[["__scopeId","data-v-bf7056c2"]])},Symbol.toStringTag,{value:"Module"})),e0="#6b7280";function t0(e,t){return e&&Pn[e]?Pn[e]:e0}function o0(e){return(e==null?void 0:e.properties)||e||{}}function qr(e){return e&&typeof e=="object"&&"label"in e?e.label||e.value||"":e}function n0(e){var t;return String(e.affinityBlock||qr((t=e._raw)==null?void 0:t.rop1)||"").trim()}function a0(e){var t;return String(e.affinityBlockLabel||(typeof((t=e._raw)==null?void 0:t.rop1)=="object"?e._raw.rop1.label:"")||"").trim()}function r0(e){var t;return String(e.cluster||qr((t=e._raw)==null?void 0:t.imb_reg_of_people_2)||"").trim()}function s0(e){var t;return String(e.clusterLabel||(typeof((t=e._raw)==null?void 0:t.imb_reg_of_people_2)=="object"?e._raw.imb_reg_of_people_2.label:"")||"").trim()}function i0(e){var t;return String(e.peopleGroup||qr((t=e._raw)==null?void 0:t.imb_reg_of_people_25)||"").trim()}function l0(e){var t;return String(e.peopleGroupLabel||(typeof((t=e._raw)==null?void 0:t.imb_reg_of_people_25)=="object"?e._raw.imb_reg_of_people_25.label:"")||e.name||"").trim()}function c0(e){var t;return String(e.uniqueId||e.slug||((t=e._raw)==null?void 0:t.slug)||"").trim()}function u0(e){var t;return String(e.name||e.displayName||((t=e._raw)==null?void 0:t.name)||"").trim()}function d0(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function p0(e){return String(e.countryName||e.country||e.countryIsoLabel||e.countryIso||"").trim()}function g0(e){const t=Q(()=>{const a=e&&e.value||[],r=new Map;for(const s of a){const i=o0(s),l=n0(i),c=a0(i)||l||"— Unknown —",u=r0(i),f=s0(i)||u||"— Unknown —",v=i0(i),x=l0(i)||v||"— Unknown —",T=c0(i),w=u0(i)||T,E=d0(i),_=p0(i);if(!T)continue;let S=r.get(l||"__unknown__");S||(S={code:l,label:c,count:0,pop:0,clusters:new Map},r.set(l||"__unknown__",S)),S.count+=1,S.pop+=E;let g=S.clusters.get(u||"__unknown__");g||(g={code:u,label:f,count:0,pop:0,peopleGroups:new Map},S.clusters.set(u||"__unknown__",g)),g.count+=1,g.pop+=E;let k=g.peopleGroups.get(v||"__unknown__");k||(k={code:v,label:x,count:0,pop:0,instances:[]},g.peopleGroups.set(v||"__unknown__",k)),k.count+=1,k.pop+=E,k.instances.push({id:T,name:w,country:_,pop:E})}return r}),o=Q(()=>{const a=t.value,r=[];for(const s of a.values()){const i=t0(s.code,s.label),l={id:`bloc:${s.code||s.label}`,label:s.label,color:i,count:s.count,pop:s.pop,filter:s.code?["==",["get","affinityBlock"],s.code]:["!",["has","affinityBlock"]],children:[]};for(const c of s.clusters.values()){const u={id:`cluster:${s.code}__${c.code||c.label}`,label:`${c.label} (Cluster)`,color:i,count:c.count,pop:c.pop,filter:c.code?["==",["get","cluster"],c.code]:["==",["get","affinityBlock"],s.code],children:[]};for(const f of c.peopleGroups.values()){const v={id:`pg:${s.code}__${c.code}__${f.code||f.label}`,label:`${f.label} (PG)`,color:i,count:f.count,pop:f.pop,filter:f.code?["==",["get","peopleGroup"],f.code]:["all",["==",["get","affinityBlock"],s.code],["==",["get","cluster"],c.code]],children:[]};f.instances.sort((x,T)=>T.pop-x.pop||x.country.localeCompare(T.country));for(const x of f.instances)v.children.push({id:`pgic:${x.id}`,label:`${x.country?`${x.name}, ${x.country}`:x.name} (PGIC)`,color:i,count:1,pop:x.pop,filter:["==",["get","uniqueId"],x.id],children:[]});u.children.push(v)}u.children.sort((f,v)=>v.count-f.count||v.pop-f.pop),l.children.push(u)}l.children.sort((c,u)=>u.count-c.count||u.pop-c.pop),r.push(l)}return r.sort((s,i)=>i.count-s.count||i.pop-s.pop),r});function n(a){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!a){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const r=String(a.id||""),s={kind:null,label:a.label,filterExpr:a.filter};r.startsWith("bloc:")?s.kind="bloc":r.startsWith("cluster:")?s.kind="cluster":r.startsWith("pg:")?s.kind="people-group":r.startsWith("pgic:")&&(s.kind="people-group-in-country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:s}))}return{aggregated:t,affinityTree:o,highlight:n}}const f0={Africa:"#e74c3c",Asia:"#3498db",Europe:"#2ecc71","Latin America & Caribbean":"#f39c12","Middle East":"#9b59b6","North America & Non-Spanish Caribbean":"#1abc9c",Oceania:"#e67e22"},h0="#95a5a6";function m0(e){return f0[e]||h0}function b0(e){return(e==null?void 0:e.properties)||e||{}}function y0(e){var o;const t=Number(e.population??e.populationNum??((o=e._raw)==null?void 0:o.population)??0);return Number.isFinite(t)?t:0}function _0(e){var t,o;return String(e.doxaRegion||e.wagfRegion||((o=(t=e._raw)==null?void 0:t.wagf_region)==null?void 0:o.value)||"").trim()}function v0(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_region;return String(e.wagfRegionLabel||e.doxaRegionLabel||(t&&typeof t=="object"?t.label:"")||e.doxaRegion||"").trim()}function w0(e){var t,o;return String(e.wagfBlock||((o=(t=e._raw)==null?void 0:t.wagf_block)==null?void 0:o.value)||"").trim()}function k0(e){var o;const t=(o=e._raw)==null?void 0:o.wagf_block;return String(e.wagfBlockLabel||(t&&typeof t=="object"?t.label:"")||e.wagfBlock||"").trim()}function S0(e){var t,o;return String(e.countryIso||((o=(t=e._raw)==null?void 0:t.country_code)==null?void 0:o.value)||"").trim().toUpperCase()}function A0(e){var o;const t=(o=e._raw)==null?void 0:o.country_code;return String(e.countryIsoLabel||(t&&typeof t=="object"?t.label:"")||e.countryIso||"").trim()}function x0(e){const t=Q(()=>{const a=e&&e.value||[],r=new Map;for(const s of a){const i=b0(s),l=_0(i),c=v0(i)||l||"— Unknown —",u=w0(i),f=k0(i)||u||"— Unknown —",v=S0(i),x=A0(i)||v||"— Unknown —",T=y0(i);if(!l||l==="na"||l==="none")continue;let w=r.get(l);if(w||(w={slug:l,label:c,count:0,pop:0,blocks:new Map},r.set(l,w)),w.count+=1,w.pop+=T,!u||u==="na")continue;let E=w.blocks.get(u);if(E||(E={slug:u,label:f,count:0,pop:0,countries:new Map},w.blocks.set(u,E)),E.count+=1,E.pop+=T,!v)continue;let _=E.countries.get(v);_||(_={iso:v,name:x,count:0,pop:0},E.countries.set(v,_)),_.count+=1,_.pop+=T}return r}),o=Q(()=>{const a=t.value,r=[];for(const s of a.values()){const i=m0(s.label),l=[],c=[],u=[...s.blocks.values()].sort((f,v)=>v.pop-f.pop||f.label.localeCompare(v.label));for(const f of u){const v=[],x=[],T=[...f.countries.values()].sort((w,E)=>E.pop-w.pop||w.name.localeCompare(E.name));for(const w of T)v.push(w.iso),l.push(w.iso),x.push({id:`country:${s.slug}__${f.slug}__${w.iso}`,label:w.name,color:i,count:w.count,pop:w.pop,filter:["==",["get","countryIso"],w.iso],isoCodes:[w.iso],children:[]});c.push({id:`block:${s.slug}__${f.slug}`,label:`${f.label} (Block)`,color:i,count:f.count,pop:f.pop,filter:["==",["get","wagfBlock"],f.slug],isoCodes:v,children:x})}r.push({id:`region:${s.slug}`,label:`${s.label} (Region)`,color:i,count:s.count,pop:s.pop,filter:["==",["get","doxaRegion"],s.slug],isoCodes:[...new Set(l)],children:c})}return r.sort((s,i)=>i.pop-s.pop||s.label.localeCompare(i.label)),r});function n(a){if(typeof window>"u"||typeof window.CustomEvent!="function")return;if(!a){window.dispatchEvent(new CustomEvent("legend:highlight",{detail:{kind:null}}));return}const r=String(a.id||""),s={kind:null,label:a.label,filterExpr:a.filter};r.startsWith("region:")?s.kind="region":r.startsWith("block:")?s.kind="block":r.startsWith("country:")&&(s.kind="country"),window.dispatchEvent(new CustomEvent("legend:highlight",{detail:s}))}return{aggregated:t,regionsTree:o,highlight:n}}const L0={class:"legend-sheet-root"},T0=["src","alt"],E0={key:0,class:"pull-tab-handle"},C0=["aria-label"],$0=["aria-label"],P0=["aria-label"],M0={class:"collapsed-detail-title"},I0={class:"legend-content"},N0=["aria-label"],F0=["aria-label"],qc=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"LegendMobile",props:{legendType:{type:String,required:!0},isDark:{type:Boolean,default:!1},popupAction:{type:String,default:"pray",validator:e=>["pray","adopt","none"].includes(e)},disableCollapse:{type:Boolean,default:!1},showTotal:{type:Boolean,default:!1}},setup(e){const{t}=gt();mo(`
/* ── Mobile bottom sheet — chrome only.
The TABLE (title + column labels + data rows) is rendered by LegendRows,
the SAME component desktop uses, with all the same default CSS. Mobile
no longer overrides any .lrg-* rule — the bottom sheet is purely
mobile chrome (pull tab, collapse/expand caret, touch drag). ── */
.floating-mini-image{position:absolute;left:16px;bottom:calc(30% + 16px);z-index:999;pointer-events:auto;cursor:pointer;}
.mini-image{width:120px;height:150px;object-fit:cover;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.25);display:block;}
/* Containment root: clamps absolute children to the map area. */
.legend-sheet-root{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.legend-sheet-root>*{pointer-events:auto;}
/* Sheet shell — no padding; drag strip and caret are absolutely
positioned overlays. Legend content owns the top padding, matching
desktop's arrangement so caret+title align on the same visual baseline. */
.legend-mobile-sheet{position:absolute;bottom:0;left:0;right:0;z-index:1000;background:white;border-top-left-radius:16px;border-top-right-radius:16px;box-shadow:0 -4px 20px rgba(0,0,0,0.2);transition:height 0.3s ease-out;display:flex;flex-direction:column;overflow:hidden;max-height:calc(100% - 80px);}
/* Drag strip — thin top overlay holding the pull-tab handle + touch
gestures. z-index puts it above content. */
.sheet-drag-strip{position:absolute;top:0;left:0;right:0;height:12px;display:flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;z-index:2;}
.pull-tab-handle{width:40px;height:4px;background:#ccc;border-radius:2px;}
/* Collapse caret — in-flow, injected via #title-caret slot into the title
row's column-1 caret slot (LegendRows .lrg-title-caret-slot or
SemanticTreeLegend .stl-tb-caret-slot). Vertical alignment with the
title text comes from the slot's align-items:center, so no absolute
positioning or padding offsets are needed (qa: 2026-05-02 iter-9). */
/* Collapse caret — matches STL's .stl-collapse-btn exactly (22x20px,
same bg/border/radius/hover as the desktop SemanticTreeLegend caret). */
.mobile-collapse-caret{width:22px;height:20px;display:flex;align-items:center;justify-content:center;background:rgba(208,215,222,0.4);border:1px solid #d0d7de;border-radius:5px;cursor:pointer;color:#57606a;padding:0;transition:transform 0.3s ease-out,color 0.1s,background 0.1s,border-color 0.1s;transform-origin:center;outline:none;-webkit-tap-highlight-color:transparent;flex-shrink:0;}
.mobile-collapse-caret:focus{outline:none;}
.mobile-collapse-caret:hover{color:#3b463d;background:rgba(59,70,61,0.12);border-color:#3b463d;}
.legend-mobile-sheet.sheet-dark .mobile-collapse-caret{background:rgba(110,118,129,0.15);border-color:#30363d;color:#8b949e;box-shadow:none;}
.legend-mobile-sheet.sheet-dark .mobile-collapse-caret:hover{color:#c9d1d9;background:rgba(59,70,61,0.18);border-color:#73A17F;}
/* Detail-mode collapse caret — top-left of the sheet when in detail mode
and the sheet is NOT collapsed. Mirrors the .detail-close-btn placement
on the right; gives the user an always-visible, finger-sized tap target
to collapse the sheet without having to find the 12px drag-strip. z-index
above .sheet-drag-strip (z:2) so the strip's @click doesn't steal taps. */
.detail-collapse-btn-mobile{position:absolute;top:10px;left:12px;background:transparent;border:none;padding:0;cursor:pointer;color:transparent;width:28px;height:28px;z-index:3;outline:none;-webkit-tap-highlight-color:transparent;}
.detail-collapse-btn-mobile:focus{outline:none;}
/* Detail-mode close X — top-right corner */
.detail-close-btn{position:absolute;top:10px;right:12px;background:none;border:none;padding:4px;cursor:pointer;color:#666;display:flex;align-items:center;justify-content:center;z-index:3;transition:color 0.2s ease;}
.detail-close-btn:hover{color:#333;}
/* Collapsed-detail footer — mimics LegendRows collapsed-state footer
(caret + centered title) but for PeopleGroupDetail mode. Renders only
when state=collapsed AND mode=detail (template v-if). Sits below the
12px drag-strip so the strip's tap+drag still works to expand. */
.collapsed-detail-footer{position:absolute;top:12px;left:0;right:0;height:36px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;cursor:pointer;background:transparent;z-index:4;}
.collapsed-detail-title{font:600 13px system-ui,sans-serif;letter-spacing:0.02em;line-height:1.4;color:#1f2328;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.legend-mobile-sheet.sheet-dark .collapsed-detail-title{color:#F3F3F1;}
/* Content padding — symmetric, 12px top/bottom only. Caret no longer needs
a wide left gutter (it's now in-flow inside the title row), and no right
padding keeps the scrollbar at the far edge.
display:flex+column gives child components (.stl-panel / .legend-row-group)
a DEFINITE height via flex:1 — height:100% on a non-flex parent with only
flex:1 (no explicit height) falls back to auto, which made the inner
scrollable shorter than the sheet on tier-3 fullyOpen and left a white
gap at the bottom (qa: 2026-05-02 iter-10).
IMPORTANT: NO backticks anywhere in this comment block — it lives
inside a JS template literal (useShadowStyles) and a stray backtick
silently closes the string and blanks the entire mobile stylesheet. */
.legend-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;padding:12px 0;-webkit-overflow-scrolling:touch;}
/* Constrain only the table/tree shells to the .legend-content viewport so
their inner scroll containers (.stl-rows / .lrg-items) bound correctly.
PeopleGroupDetail keeps its natural size and lets .legend-content scroll. */
.legend-mobile-sheet .legend-content>.stl-panel,
.legend-mobile-sheet .legend-content>.legend-row-group{flex:1;min-height:0;}
/* LegendRows --lrg-caret-col bumped from 10px → 28px on mobile so column 1
accommodates the slotted .mobile-collapse-caret (20px wide) with 4px
breathing room on each side — caret doesn't hug the sheet edge. The
title row's subgrid offsets the title text so it begins right after
the caret without overlap. Same widening on column 5 (right gutter)
keeps the table visually balanced. qa: 2026-05-02 iter-9. */
.legend-mobile-sheet .legend-row-group{--lrg-caret-col:24px;}
.legend-content::-webkit-scrollbar{width:4px;}
.legend-content::-webkit-scrollbar-track{background:transparent;}
.legend-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.18);border-radius:4px;}
.legend-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,0.3);}
/* Collapsed state — hide data rows AND column labels but keep the title
row visible. Mirrors desktop: collapsed legend shows only "Legend".
The title row becomes a centered flex layout so the slotted caret
and the title text sit beside each other, vertically and horizontally
centered in the 48px footer. */
.legend-mobile-sheet.collapsed .legend-content .lrg-row,
.legend-mobile-sheet.collapsed .legend-content .lrg-footer,
.legend-mobile-sheet.collapsed .legend-content .lrg-header-col,
.legend-mobile-sheet.collapsed .legend-content .lft-row,
.legend-mobile-sheet.collapsed .legend-content .lft-row-child,
.legend-mobile-sheet.collapsed .legend-content .lft-header-col{display:none!important;}
/* Fully-collapsed sheet (showing only "Legend" + caret) drops the
16px top-corner radius — square edges look cleaner when the sheet
is acting as a thin bottom footer. Rounded corners return when
expanded (user feedback 2026-04-27). */
.legend-mobile-sheet.collapsed{box-shadow:0 -2px 8px rgba(0,0,0,0.15);height:48px !important;min-height:48px;border-top-left-radius:0;border-top-right-radius:0;}
.legend-mobile-sheet.collapsed .legend-content{padding:0!important;display:flex;align-items:center;height:48px;}
.legend-mobile-sheet.collapsed .lrg-items,
.legend-mobile-sheet.collapsed .lft-items{padding:0!important;align-content:center;height:48px;}
/* Expanded state: SemanticTreeLegend's .stl-titlebar — caret is in the
slot now, so no padding-left hack. Mixed-case title (text-transform:none)
so it matches the other tabs ("Language Families" not "LANGUAGE FAMILIES").
Font matches the LegendRows .lrg-title weight. Tighten left padding from
PPLR's 12px → 8px so the caret sits closer to the sheet edge. */
.legend-mobile-sheet .stl-titlebar{padding:8px 12px 8px 8px!important;border-bottom:1px solid rgba(33,38,45,0.10)!important;}
.legend-mobile-sheet .stl-tb-title{text-transform:none!important;letter-spacing:0!important;font:600 14px system-ui,sans-serif!important;color:#1f2328!important;}
.legend-mobile-sheet.sheet-dark .stl-tb-title{color:#F3F3F1!important;}
/* Collapsed state: title rows become a centered flex layout so the slotted
caret and "Legend" text sit beside each other, both vertically and
horizontally centered in the 48px footer. gap:8px gives the caret a bit
of breathing room from the title text. */
.legend-mobile-sheet.collapsed .lrg-title-row,
.legend-mobile-sheet.collapsed .lft-title-row,
.legend-mobile-sheet.collapsed .stl-titlebar{padding:0 16px!important;display:flex;align-items:center;justify-content:center;gap:8px;height:48px;min-height:0!important;border-bottom:none!important;}
/* line-height:1.4 (not 1) so the descender of 'g' in "Legend" / "Engagement
Progress" isn't clipped at the bottom — qa: 2026-05-02. */
.legend-mobile-sheet.collapsed .stl-tb-title,
.legend-mobile-sheet.collapsed .lrg-title,
.legend-mobile-sheet.collapsed .lrg-title-row .lrg-title,
.legend-mobile-sheet.collapsed .lft-title{font-size:13px!important;letter-spacing:0.02em!important;line-height:1.4!important;}
/* Hide tree/data content when collapsed so only the title bar shows. */
.legend-mobile-sheet.collapsed .stl-tabs-wrap,
.legend-mobile-sheet.collapsed .stl-col-hdr,
.legend-mobile-sheet.collapsed .stl-rows,
.legend-mobile-sheet.collapsed .lrg-row,
.legend-mobile-sheet.collapsed .lrg-footer,
.legend-mobile-sheet.collapsed .lrg-header-col,
.legend-mobile-sheet.collapsed .lft-row,
.legend-mobile-sheet.collapsed .lft-row-child,
.legend-mobile-sheet.collapsed .lft-header-col{display:none!important;}
/* ── SemanticTreeLegend embedded-in-sheet overrides ──
The PPLR-ported SemanticTreeLegend was designed for standalone desktop
use — its .stl-panel uses absolute positioning anchored to the map area
with fixed width 380px, plus a separate .stl-reopen pill and
.stl-collapse-btn. Inside the mobile bottom sheet we just need the
inner tree rendering to fill the sheet's content area; the sheet
already provides drag-strip + collapse caret + chrome. Override
positioning, hide the desktop-only collapse affordances. */
.legend-mobile-sheet .stl-panel{position:static!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;width:100%!important;z-index:auto!important;display:flex;flex-direction:column;min-height:0;max-height:none!important;}
.legend-mobile-sheet .stl-panel.closed{transform:none!important;opacity:1!important;pointer-events:auto!important;}
.legend-mobile-sheet .stl-inner{border:none!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;}
/* Slim row height on mobile prayer/engagement/adoption tabs so they read
as thin/dense like desktop, not chunky touch-targets (qa: 2026-05-03 user
feedback — "desktop legend rows are thinner, can you make mobile match").
Drops .lrg-item-inner min-height 36→28, vertical padding 6→2, and tightens
the .lrg-items row-gap 6→3 for the same compact-table feel. */
.legend-mobile-sheet .lrg-item-inner{min-height:28px!important;padding:2px 0!important;}
.legend-mobile-sheet .lrg-items{row-gap:3px!important;}
/* min-height:0 is REQUIRED on .stl-rows for the flex:1+overflow:auto to
actually scroll inside the constrained mobile sheet. The base .stl-rows
only sets flex:1 — without min-height:0, the flex item's default
min-height:auto = content height, so a long list grows past the parent
instead of scrolling, leaving white space below the panel on tier-3
fullyOpen (qa: 2026-05-02 iter-11). LegendRows' .lrg-items already has
min-height:0 in its base CSS, which is why iter-10 fixed Prayer/Engagement/
Adoption but missed Language Families. */
.legend-mobile-sheet .stl-rows{min-height:0;}
.legend-mobile-sheet .stl-reopen{display:none!important;}
.legend-mobile-sheet .stl-collapse-btn{display:none!important;}
/* (Removed iter-1 rule that was setting padding-left:0 here — it was
overriding the iter-5 padding-left:36px rule above, causing the caret
to overlap the title text "Lan-guage Families" → "guage Families"
visible. qa: 2026-05-02.) Border-bottom color preserved. */
.legend-mobile-sheet .stl-titlebar{border-bottom-color:rgba(0,0,0,0.08)!important;}
/* ── Mobile language-family tree overrides ──
IMPORTANT: do NOT override .lft-title-row grid-template-columns here.
The desktop CSS makes the title-row a SUBGRID of .lft-items so the
UPGS / POPULATION column headers line up with the data rows' badges.
An explicit grid-template-columns on the title-row breaks subgrid
inheritance and causes the misaligned headers we saw in user feedback
(2026-04-27).
Tap-area: rows are 44px tall (Apple HIG) so the row is comfortably
tappable; the in-row caret stays slim like desktop. The colored pill
keeps its desktop look.
No backticks anywhere in this comment block — see the earlier note. */
.legend-mobile-sheet .lft-row{min-height:44px;column-gap:8px;}
.legend-mobile-sheet .lft-row-child{margin-left:0;}
.legend-mobile-sheet .lft-item-inner{min-height:36px;padding:6px 8px;}
.legend-mobile-sheet .lft-name{font-size:13px;}
/* Collapsed-state row hiding lives in the unified block above (handles
both .lrg-* and .lft-* in one place). */
/* ── Dark mode (class-based, driven by isDark prop) ── */
.sheet-dark{background:#3b463d!important;box-shadow:0 -4px 20px rgba(0,0,0,0.5)!important;}
/* Dark-mode caret — unified with STL palette (redundant with more-
specific selectors above, but kept for cascade safety). */
.sheet-dark .mobile-collapse-caret{background:rgba(110,118,129,0.15)!important;border-color:#30363d!important;color:#8b949e!important;}
.sheet-dark .mobile-collapse-caret:hover{color:#c9d1d9!important;background:rgba(59,70,61,0.18)!important;border-color:#73A17F!important;}
.sheet-dark .detail-close-btn{color:rgba(243,243,241,0.75)!important;}
.sheet-dark .detail-close-btn:hover{color:#F3F3F1!important;}
.sheet-dark .pull-tab-handle{background:rgba(243,243,241,0.3)!important;}
.sheet-dark .legend-content{background:#3b463d!important;}
.sheet-dark .legend-content::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.2);}
`,"legend-mobile-sheet");const o=e,n=$e("uiStore");$e("mapStore");const a=$e("dataStore"),r=$e("onSemanticTreeSelect",()=>{}),s=za(o,"legendType"),{items:i,columns:l,title:c,activeFilter:u,setFilter:f,totalCount:v,totalPopulation:x,fmtPop:T,fmtCount:w}=Yr(s,zc),E=$e("normalizedPeopleGroups",null),_=Q(()=>{var b,P;if((b=E==null?void 0:E.value)!=null&&b.length)return E.value;const y=[];for(const D in(a==null?void 0:a.sources)||{}){const B=a.sources[D];(P=B==null?void 0:B.features)!=null&&P.length&&y.push(...B.features)}return y}),S={get value(){return _.value}},{langTree:g}=Rc(S),{affinityTree:k}=g0(S),{regionsTree:A}=x0(S),L=[{id:"family",label:"Lang Family",info:"A language family is a group of languages descended from a common ancestor."},{id:"language",label:"Language",info:"A language is a system of communication used by a people."},{id:"dialect",label:"Dialect",info:"A dialect/variety is a regional or social form of a language."}],O=[{id:"bloc",label:"Bloc",info:"Affinity Bloc (rop1) — broadest grouping. 16 blocs total."},{id:"cluster",label:"Cluster",info:"Cluster (imb_reg_of_people_2, ROP 2) — finer grouping inside a bloc. 194 total."},{id:"group",label:"PG",info:"People Group (imb_reg_of_people_25, ROP 2.5) — abstract identity. 1,736 PGs."},{id:"pgic",label:"PGIC",info:"PG in Country (imb_reg_of_people_3 + country_code) — one row per PG-country pair. 2,106 rows."}],$=[{id:"region",label:"Region",info:'WAGF macro-region (e.g. "Asia", "Africa"). Color-coded on the map.'},{id:"block",label:"Block",info:'WAGF block — organizational sub-grouping within each region (e.g. "South East Asia").'},{id:"country",label:"Country",info:"Individual countries, listed by unreached-population size within their block."}],m=Q(()=>["prayer","engagement","adoption","religion"].includes(o.legendType));function U(y){const b=[];for(const P of y){b.push({id:P.key,label:P.label,color:P.color,count:P.count??0,pop:P.population??0,filter:P.filterKey?["==",["get","_flat_filter"],P.filterKey]:null,children:[]});for(const D of P.children||[])b.push({id:D.key,label:D.label,color:D.color,count:D.count??0,pop:D.population??0,filter:D.filterKey?["==",["get","_flat_filter"],D.filterKey]:null,children:[]})}return b}const H=Q(()=>m.value?U(i.value):o.legendType==="affinity-block"?k.value:o.legendType==="doxa-regions"?A.value:g.value),I=Q(()=>m.value?null:o.legendType==="affinity-block"?O:o.legendType==="doxa-regions"?$:L),W=Q(()=>m.value?"Legend":o.legendType==="affinity-block"?"People Groups":o.legendType==="doxa-regions"?"WAGF Regions":"Languages"),ue=Q(()=>o.legendType==="religion"?"UUPG Religions":o.legendType==="prayer"?"Prayer Status":o.legendType==="engagement"?"Engagement Status":o.legendType==="adoption"?"Adoption Status":m.value?"Status":""),C=me(0),M=me(0),j=me(0),se=me(!1),fe=Q(()=>n.legendState),Z=Q(()=>n.legendHeight),ce=Q(()=>n.caretRotation),oe=Q(()=>n.showPullTab),ke=Q(()=>n.legendMode),ie=Q(()=>n.selectedPeopleGroup),Fe=Q(()=>{var y;return ke.value==="detail"&&ie.value?((y=ie.value.properties)==null?void 0:y.name)||t("legend.header.peopleGroupFallback"):fe.value==="collapsed"?t("legend.header.collapsed"):c.value});function ge(y){n.handleLegendItemClick(),f(y)}function Te(){n.toggleLegend()}function Ae(){n.selectPeopleGroup(null),n.openLegend()}const z=Q(()=>{var b;if(!ie.value)return null;const y=ie.value.properties||{};return y.imageUrl||((b=y._raw)==null?void 0:b.ImageURL)||null});function he(y){var b;if(fe.value!=="collapsed"){C.value=y.touches[0].clientY;const P=y.currentTarget.parentElement;M.value=P.offsetHeight,j.value=((b=P.parentElement)==null?void 0:b.offsetHeight)||window.innerHeight,se.value=!0}}function N(y){if(!se.value)return;y.preventDefault();const b=y.touches[0].clientY,P=C.value-b,D=M.value+P,B=j.value||window.innerHeight,Y=B*.3,q=B-56,p=Math.max(Y,Math.min(q,D));n.setLegendHeight(`${p}px`)}function d(y){var K;se.value=!1;const b=(K=y==null?void 0:y.currentTarget)==null?void 0:K.parentElement,P=b?b.offsetHeight:M.value,D=M.value,B=j.value||window.innerHeight,Y=8,q=P>D+Y,p=P<D-Y;if(!q&&!p)return;if(ke.value!=="detail"){P<B*.12&&n.collapseLegend();return}const h=D>=B*.55,F=D>=B*.2&&!h;p&&h?n.openLegend():p&&F?n.collapseLegend():q?n.fullyOpenLegend():n.openLegend()}return ao(()=>{}),Bo(()=>{}),(y,b)=>{var P;return J(),ne("div",L0,[ke.value==="detail"&&ie.value&&fe.value==="open"&&z.value?(J(),ne("div",{key:0,class:"floating-mini-image",onClick:b[0]||(b[0]=D=>pe(n).fullyOpenLegend())},[G("img",{src:z.value,alt:(P=ie.value.properties)==null?void 0:P.name,class:"mini-image"},null,8,T0)])):we("",!0),G("div",{class:Be(["legend-mobile-sheet",[fe.value,{"sheet-dark":e.isDark}]]),style:ct({height:Z.value})},[G("div",{class:"sheet-drag-strip",onClick:Te,onTouchstart:b[1]||(b[1]=D=>oe.value?he(D):null),onTouchmove:b[2]||(b[2]=D=>oe.value?N(D):null),onTouchend:b[3]||(b[3]=D=>oe.value?d(D):null)},[oe.value?(J(),ne("div",E0)):we("",!0)],32),ke.value==="detail"&&fe.value!=="collapsed"?(J(),ne("button",{key:0,class:"detail-collapse-btn-mobile",onClick:Et(Te,["stop"]),"aria-label":pe(t)("aria.toggleLegend")},null,8,C0)):we("",!0),ke.value==="detail"&&fe.value!=="collapsed"?(J(),ne("button",{key:1,class:"detail-close-btn",onClick:Et(Ae,["stop"]),"aria-label":pe(t)("aria.backToLegend")},[...b[4]||(b[4]=[G("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none"},[G("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])],8,$0)):we("",!0),fe.value==="collapsed"&&ke.value==="detail"&&ie.value?(J(),ne("div",{key:2,class:"collapsed-detail-footer",onClick:Te},[G("button",{class:"mobile-collapse-caret",style:ct({transform:`rotate(${ce.value}deg)`}),"aria-label":pe(t)("aria.toggleLegend"),tabindex:"-1"},[...b[5]||(b[5]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,P0),G("span",M0,ye(Fe.value),1)])):we("",!0),G("div",I0,[ke.value==="detail"&&ie.value?(J(),ne(Ie,{key:0},[fe.value!=="collapsed"?(J(),Je(Hc,{key:0,peopleGroup:ie.value,hideHeader:!0,dark:e.isDark,action:e.popupAction},null,8,["peopleGroup","dark","action"])):we("",!0)],64)):e.legendType!=="default"?(J(),Je(Wc,{key:1,nodes:H.value,tabs:I.value,title:Fe.value||W.value,hideTabs:m.value,columnLabel:ue.value,columns:["count","pop"],"total-label":e.showTotal&&m.value?pe(t)("legend.footer.total"):"","total-count":pe(v),"total-pop":pe(x),onSelect:pe(r)},{"title-caret":Tt(()=>[G("button",{class:"mobile-collapse-caret",style:ct({transform:`rotate(${ce.value}deg)`}),onClick:Et(Te,["stop"]),"aria-label":pe(t)("aria.toggleLegend")},[...b[6]||(b[6]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,N0)]),_:1},8,["nodes","tabs","title","hideTabs","columnLabel","total-label","total-count","total-pop","onSelect"])):(J(),Je(Uc,{key:2,title:Fe.value,items:pe(i),columns:pe(l),activeFilter:pe(u),isDark:e.isDark,hideColumnHeader:!1,showFooter:!1,disableCollapse:!0,totalCount:pe(v),totalPopulation:pe(x),fmtPop:pe(T),fmtCount:pe(w),onFilterClick:ge},{"title-caret":Tt(()=>[G("button",{class:"mobile-collapse-caret",style:ct({transform:`rotate(${ce.value}deg)`}),onClick:Et(Te,["stop"]),"aria-label":pe(t)("aria.toggleLegend")},[...b[7]||(b[7]=[G("svg",{width:"9",height:"9",viewBox:"0 0 12 12",fill:"none"},[G("path",{d:"M4.5 3L7.5 6L4.5 9",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],12,F0)]),_:1},8,["title","items","columns","activeFilter","isDark","totalCount","totalPopulation","fmtPop","fmtCount"]))])],6)])}}},[["__scopeId","data-v-ea4ebd2e"]])},Symbol.toStringTag,{value:"Module"}))})();