// Generated, do not edit. sha256:a22e862b7b1defbcc74c1844981b5027dbd831d7e549f1dff573576ab6b2f26e import { t, locale } from '../i18n/index.js'; import { ROUTE_KEYS, TARGETS, PLACE_LABELS, targetHash } from '../../shared/config.js'; import { GUIDE_SECTIONS, GUIDE_GROUPS, splitPlaceTokens, guideText } from '../../shared/guide.js'; import { create as createTabs } from '../ui/tabs.js'; import { esc } from '../ui/escape.js'; import { CHEVRON_RIGHT, ADJUST } from '../ui/icons.js'; import { GUIDE_FIGURE_DRAWINGS } from '../ui/guide-figures.js'; import { placeAvailable } from '../routes.js'; export const title = () => t('guide.title'); export const headerInColumn = true; const ROUTE = ROUTE_KEYS.GUIDE; const IDS = GUIDE_SECTIONS.map(s => s.id); const BY_ID = new Map(GUIDE_SECTIONS.map(s => [s.id, s])); const GROUP_OF = new Map(GUIDE_GROUPS.flatMap(g => g.sections.map(id => [id, g.id]))); const texts = () => guideText(locale()); const titleOf = id => texts().sections[id].title; const shown = id => { const p = BY_ID.get(id)?.place; return !p || placeAvailable(TARGETS[p]); }; const parseHash = () => (location.hash || '').replace(/^#\/?/, '').split('/')[1] || null; const hashFor = id => targetHash({ route: ROUTE, tab: id }); const segLabel = id => { try { return t(PLACE_LABELS[id] || `nav.${id}`); } catch { return id; } }; const segsOf = key => { const { route, tab, sub } = TARGETS[key]; return [route, tab, sub].filter(Boolean); }; const placeName = key => segLabel(segsOf(key).at(-1)); function placeNameUnique(key) { const naam = placeName(key); const dubbel = Object.keys(TARGETS).some(k => k !== key && placeName(k) === naam); if (!dubbel) return naam; const segs = segsOf(key); return `${segLabel(segs.at(-2) ?? segs[0])} › ${naam}`; } const placeLink = (key, label, cls = '', after = '') => `${esc(label)}${after}`; const ICONS = Object.freeze({ adjust: ADJUST }); function inline(text) { return splitPlaceTokens(text).map(part => { if (typeof part === 'string') return esc(part); if (part.icon) return ICONS[part.icon] ? `` : ''; return placeAvailable(TARGETS[part.place]) ? placeLink(part.place, placeName(part.place)) : esc(placeName(part.place)); }).join(''); } const lead = (term, text) => `${esc(term)} ${inline(text)}`; function block(b) { if (typeof b === 'string') return `
${inline(b)}
`; if (b.heading) return `${esc(b.code)}`;
if (b.note) return `${lead(b.term, b.text)}
`; if (b.list) { return `