{
  "version": 3,
  "sources": ["../../../shared/playground/playground.ts", "../../../shared/outline/select.ts", "../../../shared/outline/tree.ts", "../../../shared/table/table.ts", "main.ts"],
  "sourcesContent": ["/*!\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n// This file implements the playground implementation of the documentation\n// page. The playground involves a \"play\" button that allows you to open up\n// a new link to play.golang.org using the example code.\n\n// The CSS is in static/frontend/unit/main/_doc.css\n\n/**\n * CSS classes used by PlaygroundExampleController\n */\nconst PlayExampleClassName = {\n  PLAY_HREF: '.js-exampleHref',\n  PLAY_CONTAINER: '.js-exampleContainer',\n  EXAMPLE_INPUT: '.Documentation-exampleCode',\n  EXAMPLE_OUTPUT: '.Documentation-exampleOutput',\n  EXAMPLE_ERROR: '.Documentation-exampleError',\n  PLAY_BUTTON: '.Documentation-examplePlayButton',\n  SHARE_BUTTON: '.Documentation-exampleShareButton',\n  FORMAT_BUTTON: '.Documentation-exampleFormatButton',\n  RUN_BUTTON: '.Documentation-exampleRunButton',\n};\n\n/**\n * This controller enables playground examples to expand their dropdown or\n * generate shareable Go Playground URLs.\n */\nexport class PlaygroundExampleController {\n  /**\n   * The anchor tag used to identify the container with an example href.\n   * There is only one in an example container div.\n   */\n  private readonly anchorEl: HTMLAnchorElement | null;\n\n  /**\n   * The error element\n   */\n  private readonly errorEl: Element | null;\n\n  /**\n   * Buttons that redirect to an example's playground, this element\n   * only exists in executable examples.\n   */\n  private readonly playButtonEl: Element | null;\n  private readonly shareButtonEl: Element | null;\n\n  /**\n   * Button that formats the code in an example's playground.\n   */\n  private readonly formatButtonEl: Element | null;\n\n  /**\n   * Button that runs the code in an example's playground, this element\n   * only exists in executable examples.\n   */\n  private readonly runButtonEl: Element | null;\n\n  /**\n   * The executable code of an example.\n   */\n  private readonly inputEl: HTMLTextAreaElement | null;\n\n  /**\n   * The output of the given example code. This only exists if the\n   * author of the package provides an output for this example.\n   */\n  private readonly outputEl: Element | null;\n\n  /**\n   * @param exampleEl The div that contains playground content for the given example.\n   */\n  constructor(private readonly exampleEl: HTMLDetailsElement) {\n    this.exampleEl = exampleEl;\n    this.anchorEl = exampleEl.querySelector('a');\n    this.errorEl = exampleEl.querySelector(PlayExampleClassName.EXAMPLE_ERROR);\n    this.playButtonEl = exampleEl.querySelector(PlayExampleClassName.PLAY_BUTTON);\n    this.shareButtonEl = exampleEl.querySelector(PlayExampleClassName.SHARE_BUTTON);\n    this.formatButtonEl = exampleEl.querySelector(PlayExampleClassName.FORMAT_BUTTON);\n    this.runButtonEl = exampleEl.querySelector(PlayExampleClassName.RUN_BUTTON);\n    this.inputEl = this.makeTextArea(exampleEl.querySelector(PlayExampleClassName.EXAMPLE_INPUT));\n    this.outputEl = exampleEl.querySelector(PlayExampleClassName.EXAMPLE_OUTPUT);\n\n    // This is legacy listener to be replaced the listener for shareButtonEl.\n    this.playButtonEl?.addEventListener('click', () => this.handleShareButtonClick());\n    this.shareButtonEl?.addEventListener('click', () => this.handleShareButtonClick());\n    this.formatButtonEl?.addEventListener('click', () => this.handleFormatButtonClick());\n    this.runButtonEl?.addEventListener('click', () => this.handleRunButtonClick());\n\n    if (!this.inputEl) return;\n\n    this.resize();\n    this.inputEl.addEventListener('keyup', () => this.resize());\n    this.inputEl.addEventListener('keydown', e => this.onKeydown(e));\n  }\n\n  /**\n   * Replace the pre element with a textarea. The examples are initially rendered\n   * as pre elements so they're fully visible when JS is disabled.\n   */\n  makeTextArea(el: Element | null): HTMLTextAreaElement {\n    const t = document.createElement('textarea');\n    t.classList.add('Documentation-exampleCode', 'code');\n    t.spellcheck = false;\n    t.value = el?.textContent ?? '';\n    el?.parentElement?.replaceChild(t, el);\n    return t;\n  }\n\n  /**\n   * Retrieve the hash value of the anchor element.\n   */\n  getAnchorHash(): string | undefined {\n    return this.anchorEl?.hash;\n  }\n\n  /**\n   * Expands the current playground example.\n   */\n  expand(): void {\n    this.exampleEl.open = true;\n  }\n\n  /**\n   * Resizes the input element to accommodate the amount of text present.\n   */\n  private resize(): void {\n    if (this.inputEl?.value) {\n      const numLineBreaks = (this.inputEl.value.match(/\\n/g) || []).length;\n      // min-height + lines x line-height + padding + border\n      this.inputEl.style.height = `${(20 + numLineBreaks * 20 + 12 + 2) / 16}rem`;\n    }\n  }\n\n  /**\n   * Handler to override keyboard behavior in the playground's\n   * textarea element.\n   *\n   * Tab key inserts tabs into the example playground instead of\n   * switching to the next interactive element.\n   * @param e input element keyboard event.\n   */\n  private onKeydown(e: KeyboardEvent) {\n    if (e.key === 'Tab') {\n      document.execCommand('insertText', false, '\\t');\n      e.preventDefault();\n    }\n  }\n\n  /**\n   * Changes the text of the example's input box.\n   */\n  private setInputText(output: string) {\n    if (this.inputEl) {\n      this.inputEl.value = output;\n    }\n  }\n\n  /**\n   * Changes the text of the example's output box.\n   */\n  private setOutputText(output: string) {\n    if (this.outputEl) {\n      this.outputEl.textContent = output;\n    }\n  }\n\n  private setOutputHTML(output: string) {\n    if (this.outputEl) {\n      this.outputEl.innerHTML = output;\n    }\n  }\n\n  /**\n   * Sets the error message text and overwrites\n   * output box to indicate a failed response.\n   */\n  private setErrorText(err: string) {\n    if (this.errorEl) {\n      this.errorEl.textContent = err;\n    }\n    this.setOutputText('An error has occurred\u2026');\n  }\n\n  private getCodeWithModFile(): string {\n    let codeWithModFile = this.inputEl?.value ?? '';\n    const moduleVars = document.querySelector<HTMLDivElement>('.js-playgroundVars')?.dataset ?? {};\n    if (moduleVars.modulepath !== 'std') {\n      codeWithModFile = codeWithModFile.concat(`\n-- go.mod --\nmodule play.ground\n\nrequire ${moduleVars.modulepath} ${moduleVars.version}\n`);\n    }\n\n    return codeWithModFile;\n  }\n\n  /**\n   * Opens a new window to play.golang.org using the\n   * example snippet's code in the playground.\n   */\n  private handleShareButtonClick() {\n    const PLAYGROUND_BASE_URL = 'https://play.golang.org/p/';\n\n    this.setOutputText('Waiting for remote server\u2026');\n\n    fetch('/play/share', {\n      method: 'POST',\n      body: this.getCodeWithModFile(),\n    })\n      .then(res => res.text())\n      .then(shareId => {\n        const href = PLAYGROUND_BASE_URL + shareId;\n        this.setOutputHTML(`<a href=\"${href}\">${href}</a>`);\n        window.open(href);\n      })\n      .catch(err => {\n        this.setErrorText(err);\n      });\n  }\n\n  /**\n   * Runs gofmt on the example snippet in the playground.\n   */\n  private handleFormatButtonClick() {\n    this.setOutputText('Waiting for remote server\u2026');\n    const body = new FormData();\n    body.append('body', this.inputEl?.value ?? '');\n\n    fetch('/play/fmt', {\n      method: 'POST',\n      body: body,\n    })\n      .then(res => res.json())\n      .then(({ Body, Error }) => {\n        this.setOutputText(Error || 'Done.');\n        if (Body) {\n          this.setInputText(Body);\n          this.resize();\n        }\n      })\n      .catch(err => {\n        this.setErrorText(err);\n      });\n  }\n\n  /**\n   * Runs the code snippet in the example playground.\n   */\n  private handleRunButtonClick() {\n    this.setOutputText('Waiting for remote server\u2026');\n\n    fetch('/play/compile', {\n      method: 'POST',\n      body: JSON.stringify({ body: this.getCodeWithModFile(), version: 2 }),\n    })\n      .then(res => res.json())\n      .then(async ({ Events, Errors }) => {\n        this.setOutputText(Errors || '');\n        for (const e of Events || []) {\n          this.setOutputText(e.Message);\n          await new Promise(resolve => setTimeout(resolve, e.Delay / 1000000));\n        }\n      })\n      .catch(err => {\n        this.setErrorText(err);\n      });\n  }\n}\n\nexport function initPlaygrounds(): void {\n  const exampleHashRegex = location.hash.match(/^#(example-.*)$/);\n  if (exampleHashRegex) {\n    const exampleHashEl = document.getElementById(exampleHashRegex[1]) as HTMLDetailsElement;\n    if (exampleHashEl) {\n      exampleHashEl.open = true;\n    }\n  }\n\n  // We use a spread operator to convert a nodelist into an array of elements.\n  const exampleHrefs = [\n    ...document.querySelectorAll<HTMLAnchorElement>(PlayExampleClassName.PLAY_HREF),\n  ];\n\n  /**\n   * Sometimes exampleHrefs and playContainers are in different order, so we\n   * find an exampleHref from a common hash.\n   * @param playContainer - playground container\n   */\n  const findExampleHash = (playContainer: PlaygroundExampleController) =>\n    exampleHrefs.find(ex => {\n      return ex.hash === playContainer.getAnchorHash();\n    });\n\n  for (const el of document.querySelectorAll(PlayExampleClassName.PLAY_CONTAINER)) {\n    // There should be the same amount of hrefs referencing examples as example containers.\n    const playContainer = new PlaygroundExampleController(el as HTMLDetailsElement);\n    const exampleHref = findExampleHash(playContainer);\n    if (exampleHref) {\n      exampleHref.addEventListener('click', () => {\n        playContainer.expand();\n      });\n    } else {\n      console.warn('example href not found');\n    }\n  }\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { TreeNavController } from './tree.js';\n\nexport class SelectNavController {\n  constructor(private el: Element) {\n    this.el.addEventListener('change', e => {\n      const target = e.target as HTMLSelectElement;\n      let href = target.value;\n      if (!target.value.startsWith('/')) {\n        href = '/' + href;\n      }\n      window.location.href = href;\n    });\n  }\n}\n\nexport function makeSelectNav(tree: TreeNavController): HTMLLabelElement {\n  const label = document.createElement('label');\n  label.classList.add('go-Label');\n  label.setAttribute('aria-label', 'Menu');\n  const select = document.createElement('select');\n  select.classList.add('go-Select', 'js-selectNav');\n  label.appendChild(select);\n  const outline = document.createElement('optgroup');\n  outline.label = 'Outline';\n  select.appendChild(outline);\n  const groupMap: Record<string, HTMLOptGroupElement> = {};\n  let group: HTMLOptGroupElement;\n  for (const t of tree.treeitems) {\n    if (Number(t.depth) > 4) continue;\n    if (t.groupTreeitem) {\n      group = groupMap[t.groupTreeitem.label];\n      if (!group) {\n        group = groupMap[t.groupTreeitem.label] = document.createElement('optgroup');\n        group.label = t.groupTreeitem.label;\n        select.appendChild(group);\n      }\n    } else {\n      group = outline;\n    }\n    const o = document.createElement('option');\n    o.label = t.label;\n    o.textContent = t.label;\n    o.value = (t.el as HTMLAnchorElement).href.replace(window.location.origin, '').replace('/', '');\n    group.appendChild(o);\n  }\n  tree.addObserver(t => {\n    const hash = (t.el as HTMLAnchorElement).hash;\n    const value = select.querySelector<HTMLOptionElement>(`[value$=\"${hash}\"]`)?.value;\n    if (value) {\n      select.value = value;\n    }\n  }, 50);\n  return label;\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * TreeNavController is the navigation tree component of the documentation page.\n * It adds accessiblity attributes to a tree, observes the heading elements\n * focus the topmost link for headings visible on the page, and implements the\n * WAI-ARIA Treeview Design Pattern with full\n * [keyboard support](https://www.w3.org/TR/wai-aria-practices/examples/treeview/treeview-2/treeview-2a.html#kbd_label).\n */\nexport class TreeNavController {\n  treeitems: TreeItem[];\n\n  /**\n   * firstChars is the first character of each treeitem in the same order\n   * as this.treeitems. We use this array to set focus by character when\n   * navigating the tree with a keyboard.\n   */\n  private firstChars: string[];\n  private firstTreeitem: TreeItem | null;\n  private lastTreeitem: TreeItem | null;\n  private observerCallbacks: ((t: TreeItem) => void)[];\n\n  constructor(private el: HTMLElement) {\n    this.treeitems = [];\n    this.firstChars = [];\n    this.firstTreeitem = null;\n    this.lastTreeitem = null;\n    this.observerCallbacks = [];\n    this.init();\n  }\n\n  private init(): void {\n    this.handleResize();\n    window.addEventListener('resize', this.handleResize);\n    this.findTreeItems();\n    this.updateVisibleTreeitems();\n    this.observeTargets();\n    if (this.firstTreeitem) {\n      this.firstTreeitem.el.tabIndex = 0;\n    }\n  }\n\n  private handleResize = (): void => {\n    this.el.style.setProperty('--js-tree-height', '100vh');\n    this.el.style.setProperty('--js-tree-height', this.el.clientHeight + 'px');\n  };\n\n  private observeTargets() {\n    this.addObserver(treeitem => {\n      this.expandTreeitem(treeitem);\n      this.setSelected(treeitem);\n      // TODO: Fix scroll issue in https://golang.org/issue/47450.\n      // treeitem.el.scrollIntoView({ block: 'nearest' });\n    });\n\n    const targets = new Map<string, boolean>();\n    const observer = new IntersectionObserver(\n      entries => {\n        for (const entry of entries) {\n          targets.set(entry.target.id, entry.isIntersecting || entry.intersectionRatio === 1);\n        }\n        for (const [id, isIntersecting] of targets) {\n          if (isIntersecting) {\n            const active = this.treeitems.find(t =>\n              (t.el as HTMLAnchorElement)?.href.endsWith(`#${id}`)\n            );\n            if (active) {\n              for (const fn of this.observerCallbacks) {\n                fn(active);\n              }\n            }\n            break;\n          }\n        }\n      },\n      {\n        threshold: 1.0,\n        rootMargin: '-60px 0px 0px 0px',\n      }\n    );\n\n    for (const href of this.treeitems.map(t => t.el.getAttribute('href'))) {\n      if (href) {\n        const id = href.replace(window.location.origin, '').replace('/', '').replace('#', '');\n        const target = document.getElementById(id);\n        if (target) {\n          observer.observe(target);\n        }\n      }\n    }\n  }\n\n  addObserver(fn: (t: TreeItem) => void, delay = 200): void {\n    this.observerCallbacks.push(debounce(fn, delay));\n  }\n\n  setFocusToNextItem(currentItem: TreeItem): void {\n    let nextItem = null;\n    for (let i = currentItem.index + 1; i < this.treeitems.length; i++) {\n      const ti = this.treeitems[i];\n      if (ti.isVisible) {\n        nextItem = ti;\n        break;\n      }\n    }\n    if (nextItem) {\n      this.setFocusToItem(nextItem);\n    }\n  }\n\n  setFocusToPreviousItem(currentItem: TreeItem): void {\n    let prevItem = null;\n    for (let i = currentItem.index - 1; i > -1; i--) {\n      const ti = this.treeitems[i];\n      if (ti.isVisible) {\n        prevItem = ti;\n        break;\n      }\n    }\n    if (prevItem) {\n      this.setFocusToItem(prevItem);\n    }\n  }\n\n  setFocusToParentItem(currentItem: TreeItem): void {\n    if (currentItem.groupTreeitem) {\n      this.setFocusToItem(currentItem.groupTreeitem);\n    }\n  }\n\n  setFocusToFirstItem(): void {\n    this.firstTreeitem && this.setFocusToItem(this.firstTreeitem);\n  }\n\n  setFocusToLastItem(): void {\n    this.lastTreeitem && this.setFocusToItem(this.lastTreeitem);\n  }\n\n  setSelected(currentItem: TreeItem): void {\n    for (const l1 of this.el.querySelectorAll('[aria-expanded=\"true\"]')) {\n      if (l1 === currentItem.el) continue;\n      if (!l1.nextElementSibling?.contains(currentItem.el)) {\n        l1.setAttribute('aria-expanded', 'false');\n      }\n    }\n    for (const l1 of this.el.querySelectorAll('[aria-selected]')) {\n      if (l1 !== currentItem.el) {\n        l1.setAttribute('aria-selected', 'false');\n      }\n    }\n    currentItem.el.setAttribute('aria-selected', 'true');\n    this.updateVisibleTreeitems();\n    this.setFocusToItem(currentItem, false);\n  }\n\n  expandTreeitem(treeitem: TreeItem): void {\n    let currentItem: TreeItem | null = treeitem;\n    while (currentItem) {\n      if (currentItem.isExpandable) {\n        currentItem.el.setAttribute('aria-expanded', 'true');\n      }\n      currentItem = currentItem.groupTreeitem;\n    }\n    this.updateVisibleTreeitems();\n  }\n\n  expandAllSiblingItems(currentItem: TreeItem): void {\n    for (const ti of this.treeitems) {\n      if (ti.groupTreeitem === currentItem.groupTreeitem && ti.isExpandable) {\n        this.expandTreeitem(ti);\n      }\n    }\n  }\n\n  collapseTreeitem(currentItem: TreeItem): void {\n    let groupTreeitem = null;\n\n    if (currentItem.isExpanded()) {\n      groupTreeitem = currentItem;\n    } else {\n      groupTreeitem = currentItem.groupTreeitem;\n    }\n\n    if (groupTreeitem) {\n      groupTreeitem.el.setAttribute('aria-expanded', 'false');\n      this.updateVisibleTreeitems();\n      this.setFocusToItem(groupTreeitem);\n    }\n  }\n\n  setFocusByFirstCharacter(currentItem: TreeItem, char: string): void {\n    let start: number, index: number;\n    char = char.toLowerCase();\n\n    // Get start index for search based on position of currentItem\n    start = currentItem.index + 1;\n    if (start === this.treeitems.length) {\n      start = 0;\n    }\n\n    // Check remaining slots in the menu\n    index = this.getIndexFirstChars(start, char);\n\n    // If not found in remaining slots, check from beginning\n    if (index === -1) {\n      index = this.getIndexFirstChars(0, char);\n    }\n\n    // If match was found...\n    if (index > -1) {\n      this.setFocusToItem(this.treeitems[index]);\n    }\n  }\n\n  private findTreeItems() {\n    const findItems = (el: HTMLElement, group: TreeItem | null) => {\n      let ti = group;\n      let curr = el.firstElementChild as HTMLElement;\n      while (curr) {\n        if (curr.tagName === 'A' || curr.tagName === 'SPAN') {\n          ti = new TreeItem(curr, this, group);\n          this.treeitems.push(ti);\n          this.firstChars.push(ti.label.substring(0, 1).toLowerCase());\n        }\n        if (curr.firstElementChild) {\n          findItems(curr, ti);\n        }\n        curr = curr.nextElementSibling as HTMLElement;\n      }\n    };\n    findItems(this.el as HTMLElement, null);\n    this.treeitems.map((ti, idx) => (ti.index = idx));\n  }\n\n  private updateVisibleTreeitems(): void {\n    this.firstTreeitem = this.treeitems[0];\n\n    for (const ti of this.treeitems) {\n      let parent = ti.groupTreeitem;\n      ti.isVisible = true;\n      while (parent && parent.el !== this.el) {\n        if (!parent.isExpanded()) {\n          ti.isVisible = false;\n        }\n        parent = parent.groupTreeitem;\n      }\n      if (ti.isVisible) {\n        this.lastTreeitem = ti;\n      }\n    }\n  }\n\n  private setFocusToItem(treeitem: TreeItem, focusEl = true) {\n    treeitem.el.tabIndex = 0;\n    if (focusEl) {\n      treeitem.el.focus();\n    }\n    for (const ti of this.treeitems) {\n      if (ti !== treeitem) {\n        ti.el.tabIndex = -1;\n      }\n    }\n  }\n\n  private getIndexFirstChars(startIndex: number, char: string): number {\n    for (let i = startIndex; i < this.firstChars.length; i++) {\n      if (this.treeitems[i].isVisible && char === this.firstChars[i]) {\n        return i;\n      }\n    }\n    return -1;\n  }\n}\n\nclass TreeItem {\n  el: HTMLElement;\n  groupTreeitem: TreeItem | null;\n  label: string;\n  isExpandable: boolean;\n  isVisible: boolean;\n  depth: number;\n  index: number;\n\n  private tree: TreeNavController;\n  private isInGroup: boolean;\n\n  constructor(el: HTMLElement, treeObj: TreeNavController, group: TreeItem | null) {\n    el.tabIndex = -1;\n    this.el = el;\n    this.groupTreeitem = group;\n    this.label = el.textContent?.trim() ?? '';\n    this.tree = treeObj;\n    this.depth = (group?.depth || 0) + 1;\n    this.index = 0;\n\n    const parent = el.parentElement;\n    if (parent?.tagName.toLowerCase() === 'li') {\n      parent?.setAttribute('role', 'none');\n    }\n    el.setAttribute('aria-level', this.depth + '');\n    if (el.getAttribute('aria-label')) {\n      this.label = el?.getAttribute('aria-label')?.trim() ?? '';\n    }\n\n    this.isExpandable = false;\n    this.isVisible = false;\n    this.isInGroup = !!group;\n\n    let curr = el.nextElementSibling;\n    while (curr) {\n      if (curr.tagName.toLowerCase() == 'ul') {\n        const groupId = `${group?.label ?? ''} nav group ${this.label}`.replace(/[\\W_]+/g, '_');\n        el.setAttribute('aria-owns', groupId);\n        el.setAttribute('aria-expanded', 'false');\n        curr.setAttribute('role', 'group');\n        curr.setAttribute('id', groupId);\n        this.isExpandable = true;\n        break;\n      }\n\n      curr = curr.nextElementSibling;\n    }\n    this.init();\n  }\n\n  private init() {\n    this.el.tabIndex = -1;\n    if (!this.el.getAttribute('role')) {\n      this.el.setAttribute('role', 'treeitem');\n    }\n    this.el.addEventListener('keydown', this.handleKeydown.bind(this));\n    this.el.addEventListener('click', this.handleClick.bind(this));\n    this.el.addEventListener('focus', this.handleFocus.bind(this));\n    this.el.addEventListener('blur', this.handleBlur.bind(this));\n  }\n\n  isExpanded() {\n    if (this.isExpandable) {\n      return this.el.getAttribute('aria-expanded') === 'true';\n    }\n\n    return false;\n  }\n\n  isSelected() {\n    return this.el.getAttribute('aria-selected') === 'true';\n  }\n\n  private handleClick(event: MouseEvent) {\n    // only process click events that directly happened on this treeitem\n    if (event.target !== this.el && event.target !== this.el.firstElementChild) {\n      return;\n    }\n    if (this.isExpandable) {\n      if (this.isExpanded() && this.isSelected()) {\n        this.tree.collapseTreeitem(this);\n      } else {\n        this.tree.expandTreeitem(this);\n      }\n      event.stopPropagation();\n    }\n    this.tree.setSelected(this);\n  }\n\n  private handleFocus() {\n    let el = this.el;\n    if (this.isExpandable) {\n      el = (el.firstElementChild as HTMLElement) ?? el;\n    }\n    el.classList.add('focus');\n  }\n\n  private handleBlur() {\n    let el = this.el;\n    if (this.isExpandable) {\n      el = (el.firstElementChild as HTMLElement) ?? el;\n    }\n    el.classList.remove('focus');\n  }\n\n  private handleKeydown(event: KeyboardEvent) {\n    if (event.altKey || event.ctrlKey || event.metaKey) {\n      return;\n    }\n\n    let captured = false;\n    switch (event.key) {\n      case ' ':\n      case 'Enter':\n        if (this.isExpandable) {\n          if (this.isExpanded() && this.isSelected()) {\n            this.tree.collapseTreeitem(this);\n          } else {\n            this.tree.expandTreeitem(this);\n          }\n          captured = true;\n        } else {\n          event.stopPropagation();\n        }\n        this.tree.setSelected(this);\n        break;\n\n      case 'ArrowUp':\n        this.tree.setFocusToPreviousItem(this);\n        captured = true;\n        break;\n\n      case 'ArrowDown':\n        this.tree.setFocusToNextItem(this);\n        captured = true;\n        break;\n\n      case 'ArrowRight':\n        if (this.isExpandable) {\n          if (this.isExpanded()) {\n            this.tree.setFocusToNextItem(this);\n          } else {\n            this.tree.expandTreeitem(this);\n          }\n        }\n        captured = true;\n        break;\n\n      case 'ArrowLeft':\n        if (this.isExpandable && this.isExpanded()) {\n          this.tree.collapseTreeitem(this);\n          captured = true;\n        } else {\n          if (this.isInGroup) {\n            this.tree.setFocusToParentItem(this);\n            captured = true;\n          }\n        }\n        break;\n\n      case 'Home':\n        this.tree.setFocusToFirstItem();\n        captured = true;\n        break;\n\n      case 'End':\n        this.tree.setFocusToLastItem();\n        captured = true;\n        break;\n\n      default:\n        if (event.key.length === 1 && event.key.match(/\\S/)) {\n          if (event.key == '*') {\n            this.tree.expandAllSiblingItems(this);\n          } else {\n            this.tree.setFocusByFirstCharacter(this, event.key);\n          }\n          captured = true;\n        }\n        break;\n    }\n\n    if (captured) {\n      event.stopPropagation();\n      event.preventDefault();\n    }\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction debounce<T extends (...args: any[]) => any>(func: T, wait: number) {\n  let timeout: ReturnType<typeof setTimeout> | null;\n  return (...args: Parameters<T>) => {\n    const later = () => {\n      timeout = null;\n      func(...args);\n    };\n    if (timeout) {\n      clearTimeout(timeout);\n    }\n    timeout = setTimeout(later, wait);\n  };\n}\n", "/*!\n * @license\n * Copyright 2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * Controller for a table element with expandable rows. Adds event listeners to\n * a toggle within a table row that controls visiblity of additional related\n * rows in the table.\n *\n * @example\n * ```typescript\n * import {ExpandableRowsTableController} from '/static/js/table';\n *\n * const el = document .querySelector<HTMLTableElement>('.js-myTableElement')\n * new ExpandableRowsTableController(el));\n * ```\n */\nexport class ExpandableRowsTableController {\n  private rows: HTMLTableRowElement[];\n  private toggles: HTMLButtonElement[];\n\n  /**\n   * Create a table controller.\n   * @param table - The table element to which the controller binds.\n   */\n  constructor(private table: HTMLTableElement, private toggleAll?: HTMLButtonElement | null) {\n    this.rows = Array.from(table.querySelectorAll<HTMLTableRowElement>('[data-aria-controls]'));\n    this.toggles = Array.from(this.table.querySelectorAll('[aria-expanded]'));\n    this.setAttributes();\n    this.attachEventListeners();\n    this.update();\n  }\n\n  /**\n   * setAttributes sets data-aria-* and data-id attributes to regular\n   * html attributes as a workaround for limitations from safehtml.\n   */\n  private setAttributes() {\n    for (const a of ['data-aria-controls', 'data-aria-labelledby', 'data-id']) {\n      this.table.querySelectorAll(`[${a}]`).forEach(t => {\n        t.setAttribute(a.replace('data-', ''), t.getAttribute(a) ?? '');\n        t.removeAttribute(a);\n      });\n    }\n  }\n\n  private attachEventListeners() {\n    this.rows.forEach(t => {\n      t.addEventListener('click', e => {\n        this.handleToggleClick(e);\n      });\n    });\n    this.toggleAll?.addEventListener('click', () => {\n      this.expandAllItems();\n    });\n\n    document.addEventListener('keydown', e => {\n      if ((e.ctrlKey || e.metaKey) && e.key === 'f') {\n        this.expandAllItems();\n      }\n    });\n  }\n\n  private handleToggleClick(e: MouseEvent) {\n    let target = e.currentTarget as HTMLTableRowElement | null;\n    if (!target?.hasAttribute('aria-expanded')) {\n      target = this.table.querySelector(\n        `button[aria-controls=\"${target?.getAttribute('aria-controls')}\"]`\n      );\n    }\n    const isExpanded = target?.getAttribute('aria-expanded') === 'true';\n    target?.setAttribute('aria-expanded', isExpanded ? 'false' : 'true');\n    e.stopPropagation();\n    this.update();\n  }\n\n  expandAllItems = (): void => {\n    this.toggles.map(t => t.setAttribute('aria-expanded', 'true'));\n    this.update();\n  };\n\n  private collapseAllItems = () => {\n    this.toggles.map(t => t.setAttribute('aria-expanded', 'false'));\n    this.update();\n  };\n\n  private update = () => {\n    this.updateVisibleItems();\n    setTimeout(() => this.updateGlobalToggle());\n  };\n\n  private updateVisibleItems() {\n    this.rows.map(t => {\n      const isExpanded = t?.getAttribute('aria-expanded') === 'true';\n      const rowIds = t?.getAttribute('aria-controls')?.trimEnd().split(' ');\n      rowIds?.map(id => {\n        const target = document.getElementById(`${id}`);\n        if (isExpanded) {\n          target?.classList.add('visible');\n          target?.classList.remove('hidden');\n        } else {\n          target?.classList.add('hidden');\n          target?.classList.remove('visible');\n        }\n      });\n    });\n  }\n\n  private updateGlobalToggle() {\n    if (!this.toggleAll) return;\n    if (this.rows.some(t => t.hasAttribute('aria-expanded'))) {\n      this.toggleAll.style.display = 'block';\n    }\n    const someCollapsed = this.toggles.some(el => el.getAttribute('aria-expanded') === 'false');\n    if (someCollapsed) {\n      this.toggleAll.innerText = 'Expand all';\n      this.toggleAll.onclick = this.expandAllItems;\n    } else {\n      this.toggleAll.innerText = 'Collapse all';\n      this.toggleAll.onclick = this.collapseAllItems;\n    }\n  }\n}\n", "import { initPlaygrounds } from 'static/shared/playground/playground';\nimport { SelectNavController, makeSelectNav } from 'static/shared/outline/select';\nimport { TreeNavController } from 'static/shared/outline/tree';\nimport { ExpandableRowsTableController } from 'static/shared/table/table';\n\ninitPlaygrounds();\n\nconst directories = document.querySelector<HTMLTableElement>('.js-expandableTable');\nif (directories) {\n  const table = new ExpandableRowsTableController(\n    directories,\n    document.querySelector<HTMLButtonElement>('.js-expandAllDirectories')\n  );\n  // Expand directories on page load with expand-directories query param.\n  if (window.location.search.includes('expand-directories')) {\n    table.expandAllItems();\n  }\n}\n\nconst treeEl = document.querySelector<HTMLElement>('.js-tree');\nif (treeEl) {\n  const treeCtrl = new TreeNavController(treeEl);\n  const select = makeSelectNav(treeCtrl);\n  const mobileNav = document.querySelector('.js-mainNavMobile');\n  if (mobileNav && mobileNav.firstElementChild) {\n    mobileNav?.replaceChild(select, mobileNav.firstElementChild);\n  }\n  if (select.firstElementChild) {\n    new SelectNavController(select.firstElementChild);\n  }\n}\n\n/**\n * Event handlers for expanding and collapsing the readme section.\n */\nconst readme = document.querySelector('.js-readme');\nconst readmeContent = document.querySelector('.js-readmeContent');\nconst readmeOutline = document.querySelector('.js-readmeOutline');\nconst readmeExpand = document.querySelectorAll('.js-readmeExpand');\nconst readmeCollapse = document.querySelector('.js-readmeCollapse');\nconst mobileNavSelect = document.querySelector<HTMLSelectElement>('.DocNavMobile-select');\nif (readme && readmeContent && readmeOutline && readmeExpand.length && readmeCollapse) {\n  if (readme.clientHeight > 320) {\n    readme?.classList.remove('UnitReadme--expanded');\n    readme?.classList.add('UnitReadme--toggle');\n  }\n  if (window.location.hash.includes('readme')) {\n    expandReadme();\n  }\n  mobileNavSelect?.addEventListener('change', e => {\n    if ((e.target as HTMLSelectElement).value.startsWith('readme-')) {\n      expandReadme();\n    }\n  });\n  readmeExpand.forEach(el =>\n    el.addEventListener('click', e => {\n      e.preventDefault();\n      expandReadme();\n      readme.scrollIntoView();\n    })\n  );\n  readmeCollapse.addEventListener('click', e => {\n    e.preventDefault();\n    readme.classList.remove('UnitReadme--expanded');\n    if (readmeExpand[1]) {\n      readmeExpand[1].scrollIntoView({ block: 'center' });\n    }\n  });\n  readmeContent.addEventListener('keyup', () => {\n    expandReadme();\n  });\n  readmeContent.addEventListener('click', () => {\n    expandReadme();\n  });\n  readmeOutline.addEventListener('click', () => {\n    expandReadme();\n  });\n  document.addEventListener('keydown', e => {\n    if ((e.ctrlKey || e.metaKey) && e.key === 'f') {\n      expandReadme();\n    }\n  });\n}\n\n/**\n * expandReadme expands the readme and adds the section-readme hash to the\n * URL so it stays expanded when navigating back from an external link.\n */\nfunction expandReadme() {\n  history.replaceState(null, '', `${location.pathname}#section-readme`);\n  readme?.classList.add('UnitReadme--expanded');\n}\n\n/**\n * Expand details items that are focused. This will expand\n * deprecated symbols when they are navigated to from the index\n * or a direct link.\n */\nfunction openDeprecatedSymbol() {\n  if (!location.hash) return;\n  const heading = document.getElementById(location.hash.slice(1));\n  const grandParent = heading?.parentElement?.parentElement as HTMLDetailsElement | null;\n  if (grandParent?.nodeName === 'DETAILS') {\n    grandParent.open = true;\n  }\n}\nopenDeprecatedSymbol();\nwindow.addEventListener('hashchange', () => openDeprecatedSymbol());\n\n/**\n * Listen for changes in the build context dropdown.\n */\ndocument.querySelectorAll('.js-buildContextSelect').forEach(el => {\n  el.addEventListener('change', e => {\n    window.location.search = `?GOOS=${(e.target as HTMLSelectElement).value}`;\n  });\n});\n"],
  "mappings": "AAgBA,IAAMA,EAAuB,CAC3B,UAAW,kBACX,eAAgB,uBAChB,cAAe,6BACf,eAAgB,+BAChB,cAAe,8BACf,YAAa,mCACb,aAAc,oCACd,cAAe,qCACf,WAAY,iCACd,EAMaC,EAAN,KAAkC,CA4CvC,YAA6BC,EAA+B,CAA/B,eAAAA,EA5E/B,IAAAC,EAAAC,EAAAC,EAAAC,EA6EI,KAAK,UAAYJ,EACjB,KAAK,SAAWA,EAAU,cAAc,GAAG,EAC3C,KAAK,QAAUA,EAAU,cAAcF,EAAqB,aAAa,EACzE,KAAK,aAAeE,EAAU,cAAcF,EAAqB,WAAW,EAC5E,KAAK,cAAgBE,EAAU,cAAcF,EAAqB,YAAY,EAC9E,KAAK,eAAiBE,EAAU,cAAcF,EAAqB,aAAa,EAChF,KAAK,YAAcE,EAAU,cAAcF,EAAqB,UAAU,EAC1E,KAAK,QAAU,KAAK,aAAaE,EAAU,cAAcF,EAAqB,aAAa,CAAC,EAC5F,KAAK,SAAWE,EAAU,cAAcF,EAAqB,cAAc,GAG3EG,EAAA,KAAK,eAAL,MAAAA,EAAmB,iBAAiB,QAAS,IAAM,KAAK,uBAAuB,IAC/EC,EAAA,KAAK,gBAAL,MAAAA,EAAoB,iBAAiB,QAAS,IAAM,KAAK,uBAAuB,IAChFC,EAAA,KAAK,iBAAL,MAAAA,EAAqB,iBAAiB,QAAS,IAAM,KAAK,wBAAwB,IAClFC,EAAA,KAAK,cAAL,MAAAA,EAAkB,iBAAiB,QAAS,IAAM,KAAK,qBAAqB,GAEvE,KAAK,UAEV,KAAK,OAAO,EACZ,KAAK,QAAQ,iBAAiB,QAAS,IAAM,KAAK,OAAO,CAAC,EAC1D,KAAK,QAAQ,iBAAiB,UAAWC,GAAK,KAAK,UAAUA,CAAC,CAAC,EACjE,CAMA,aAAaC,EAAyC,CAxGxD,IAAAL,EAAAC,EAyGI,IAAM,EAAI,SAAS,cAAc,UAAU,EAC3C,SAAE,UAAU,IAAI,4BAA6B,MAAM,EACnD,EAAE,WAAa,GACf,EAAE,OAAQD,EAAAK,GAAA,YAAAA,EAAI,cAAJ,KAAAL,EAAmB,IAC7BC,EAAAI,GAAA,YAAAA,EAAI,gBAAJ,MAAAJ,EAAmB,aAAa,EAAGI,GAC5B,CACT,CAKA,eAAoC,CApHtC,IAAAL,EAqHI,OAAOA,EAAA,KAAK,WAAL,YAAAA,EAAe,IACxB,CAKA,QAAe,CACb,KAAK,UAAU,KAAO,EACxB,CAKQ,QAAe,CAlIzB,IAAAA,EAmII,IAAIA,EAAA,KAAK,UAAL,MAAAA,EAAc,MAAO,CACvB,IAAMM,GAAiB,KAAK,QAAQ,MAAM,MAAM,KAAK,GAAK,CAAC,GAAG,OAE9D,KAAK,QAAQ,MAAM,OAAS,IAAI,GAAKA,EAAgB,GAAK,GAAK,GAAK,QAExE,CAUQ,UAAU,EAAkB,CAC9B,EAAE,MAAQ,QACZ,SAAS,YAAY,aAAc,GAAO,GAAI,EAC9C,EAAE,eAAe,EAErB,CAKQ,aAAaC,EAAgB,CAC/B,KAAK,UACP,KAAK,QAAQ,MAAQA,EAEzB,CAKQ,cAAcA,EAAgB,CAChC,KAAK,WACP,KAAK,SAAS,YAAcA,EAEhC,CAEQ,cAAcA,EAAgB,CAChC,KAAK,WACP,KAAK,SAAS,UAAYA,EAE9B,CAMQ,aAAaC,EAAa,CAC5B,KAAK,UACP,KAAK,QAAQ,YAAcA,GAE7B,KAAK,cAAc,6BAAwB,CAC7C,CAEQ,oBAA6B,CA5LvC,IAAAR,EAAAC,EAAAC,EAAAC,EA6LI,IAAIM,GAAkBR,GAAAD,EAAA,KAAK,UAAL,YAAAA,EAAc,QAAd,KAAAC,EAAuB,GACvCS,GAAaP,GAAAD,EAAA,SAAS,cAA8B,oBAAoB,IAA3D,YAAAA,EAA8D,UAA9D,KAAAC,EAAyE,CAAC,EAC7F,OAAIO,EAAW,aAAe,QAC5BD,EAAkBA,EAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,UAIrCC,EAAW,cAAcA,EAAW;AAAA,CAC7C,GAGUD,CACT,CAMQ,wBAAyB,CAC/B,IAAME,EAAsB,6BAE5B,KAAK,cAAc,iCAA4B,EAE/C,MAAM,cAAe,CACnB,OAAQ,OACR,KAAM,KAAK,mBAAmB,CAChC,CAAC,EACE,KAAKC,GAAOA,EAAI,KAAK,CAAC,EACtB,KAAKC,GAAW,CACf,IAAMC,EAAOH,EAAsBE,EACnC,KAAK,cAAc,YAAYC,MAASA,OAAU,EAClD,OAAO,KAAKA,CAAI,CAClB,CAAC,EACA,MAAMN,GAAO,CACZ,KAAK,aAAaA,CAAG,CACvB,CAAC,CACL,CAKQ,yBAA0B,CAtOpC,IAAAR,EAAAC,EAuOI,KAAK,cAAc,iCAA4B,EAC/C,IAAMc,EAAO,IAAI,SACjBA,EAAK,OAAO,QAAQd,GAAAD,EAAA,KAAK,UAAL,YAAAA,EAAc,QAAd,KAAAC,EAAuB,EAAE,EAE7C,MAAM,YAAa,CACjB,OAAQ,OACR,KAAMc,CACR,CAAC,EACE,KAAKH,GAAOA,EAAI,KAAK,CAAC,EACtB,KAAK,CAAC,CAAE,KAAAI,EAAM,MAAAC,CAAM,IAAM,CACzB,KAAK,cAAcA,GAAS,OAAO,EAC/BD,IACF,KAAK,aAAaA,CAAI,EACtB,KAAK,OAAO,EAEhB,CAAC,EACA,MAAMR,GAAO,CACZ,KAAK,aAAaA,CAAG,CACvB,CAAC,CACL,CAKQ,sBAAuB,CAC7B,KAAK,cAAc,iCAA4B,EAE/C,MAAM,gBAAiB,CACrB,OAAQ,OACR,KAAM,KAAK,UAAU,CAAE,KAAM,KAAK,mBAAmB,EAAG,QAAS,CAAE,CAAC,CACtE,CAAC,EACE,KAAKI,GAAOA,EAAI,KAAK,CAAC,EACtB,KAAK,MAAO,CAAE,OAAAM,EAAQ,OAAAC,CAAO,IAAM,CAClC,KAAK,cAAcA,GAAU,EAAE,EAC/B,QAAWf,KAAKc,GAAU,CAAC,EACzB,KAAK,cAAcd,EAAE,OAAO,EAC5B,MAAM,IAAI,QAAQgB,GAAW,WAAWA,EAAShB,EAAE,MAAQ,GAAO,CAAC,CAEvE,CAAC,EACA,MAAMI,GAAO,CACZ,KAAK,aAAaA,CAAG,CACvB,CAAC,CACL,CACF,EAEO,SAASa,GAAwB,CACtC,IAAMC,EAAmB,SAAS,KAAK,MAAM,iBAAiB,EAC9D,GAAIA,EAAkB,CACpB,IAAMC,EAAgB,SAAS,eAAeD,EAAiB,CAAC,CAAC,EAC7DC,IACFA,EAAc,KAAO,IAKzB,IAAMC,EAAe,CACnB,GAAG,SAAS,iBAAoC3B,EAAqB,SAAS,CAChF,EAOM4B,EAAmBC,GACvBF,EAAa,KAAKG,GACTA,EAAG,OAASD,EAAc,cAAc,CAChD,EAEH,QAAWrB,KAAM,SAAS,iBAAiBR,EAAqB,cAAc,EAAG,CAE/E,IAAM6B,EAAgB,IAAI5B,EAA4BO,CAAwB,EACxEuB,EAAcH,EAAgBC,CAAa,EAC7CE,EACFA,EAAY,iBAAiB,QAAS,IAAM,CAC1CF,EAAc,OAAO,CACvB,CAAC,EAED,QAAQ,KAAK,wBAAwB,EAG3C,CC/SO,IAAMG,EAAN,KAA0B,CAC/B,YAAoBC,EAAa,CAAb,QAAAA,EAClB,KAAK,GAAG,iBAAiB,SAAUC,GAAK,CACtC,IAAMC,EAASD,EAAE,OACbE,EAAOD,EAAO,MACbA,EAAO,MAAM,WAAW,GAAG,IAC9BC,EAAO,IAAMA,GAEf,OAAO,SAAS,KAAOA,CACzB,CAAC,CACH,CACF,EAEO,SAASC,EAAcC,EAA2C,CACvE,IAAMC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,UAAU,IAAI,UAAU,EAC9BA,EAAM,aAAa,aAAc,MAAM,EACvC,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,UAAU,IAAI,YAAa,cAAc,EAChDD,EAAM,YAAYC,CAAM,EACxB,IAAMC,EAAU,SAAS,cAAc,UAAU,EACjDA,EAAQ,MAAQ,UAChBD,EAAO,YAAYC,CAAO,EAC1B,IAAMC,EAAgD,CAAC,EACnDC,EACJ,QAAWC,KAAKN,EAAK,UAAW,CAC9B,GAAI,OAAOM,EAAE,KAAK,EAAI,EAAG,SACrBA,EAAE,eACJD,EAAQD,EAASE,EAAE,cAAc,KAAK,EACjCD,IACHA,EAAQD,EAASE,EAAE,cAAc,KAAK,EAAI,SAAS,cAAc,UAAU,EAC3ED,EAAM,MAAQC,EAAE,cAAc,MAC9BJ,EAAO,YAAYG,CAAK,IAG1BA,EAAQF,EAEV,IAAMI,EAAI,SAAS,cAAc,QAAQ,EACzCA,EAAE,MAAQD,EAAE,MACZC,EAAE,YAAcD,EAAE,MAClBC,EAAE,MAASD,EAAE,GAAyB,KAAK,QAAQ,OAAO,SAAS,OAAQ,EAAE,EAAE,QAAQ,IAAK,EAAE,EAC9FD,EAAM,YAAYE,CAAC,EAErB,OAAAP,EAAK,YAAYM,GAAK,CApDxB,IAAAE,EAqDI,IAAMC,EAAQH,EAAE,GAAyB,KACnCI,GAAQF,EAAAN,EAAO,cAAiC,YAAYO,KAAQ,IAA5D,YAAAD,EAA+D,MACzEE,IACFR,EAAO,MAAQQ,EAEnB,EAAG,EAAE,EACET,CACT,CC9CO,IAAMU,EAAN,KAAwB,CAa7B,YAAoBC,EAAiB,CAAjB,QAAAA,EAoBpB,KAAQ,aAAe,IAAY,CACjC,KAAK,GAAG,MAAM,YAAY,mBAAoB,OAAO,EACrD,KAAK,GAAG,MAAM,YAAY,mBAAoB,KAAK,GAAG,aAAe,IAAI,CAC3E,EAtBE,KAAK,UAAY,CAAC,EAClB,KAAK,WAAa,CAAC,EACnB,KAAK,cAAgB,KACrB,KAAK,aAAe,KACpB,KAAK,kBAAoB,CAAC,EAC1B,KAAK,KAAK,CACZ,CAEQ,MAAa,CACnB,KAAK,aAAa,EAClB,OAAO,iBAAiB,SAAU,KAAK,YAAY,EACnD,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EAChB,KAAK,gBACP,KAAK,cAAc,GAAG,SAAW,EAErC,CAOQ,gBAAiB,CACvB,KAAK,YAAYC,GAAY,CAC3B,KAAK,eAAeA,CAAQ,EAC5B,KAAK,YAAYA,CAAQ,CAG3B,CAAC,EAED,IAAMC,EAAU,IAAI,IACdC,EAAW,IAAI,qBACnBC,GAAW,CACT,QAAWC,KAASD,EAClBF,EAAQ,IAAIG,EAAM,OAAO,GAAIA,EAAM,gBAAkBA,EAAM,oBAAsB,CAAC,EAEpF,OAAW,CAACC,EAAIC,CAAc,IAAKL,EACjC,GAAIK,EAAgB,CAClB,IAAMC,EAAS,KAAK,UAAU,KAAKC,GAAE,CApEjD,IAAAC,EAqEe,OAAAA,EAAAD,EAAE,KAAF,YAAAC,EAA4B,KAAK,SAAS,IAAIJ,KACjD,EACA,GAAIE,EACF,QAAWG,KAAM,KAAK,kBACpBA,EAAGH,CAAM,EAGb,MAGN,EACA,CACE,UAAW,EACX,WAAY,mBACd,CACF,EAEA,QAAWI,KAAQ,KAAK,UAAU,IAAIH,GAAKA,EAAE,GAAG,aAAa,MAAM,CAAC,EAClE,GAAIG,EAAM,CACR,IAAMN,EAAKM,EAAK,QAAQ,OAAO,SAAS,OAAQ,EAAE,EAAE,QAAQ,IAAK,EAAE,EAAE,QAAQ,IAAK,EAAE,EAC9EC,EAAS,SAAS,eAAeP,CAAE,EACrCO,GACFV,EAAS,QAAQU,CAAM,EAI/B,CAEA,YAAYF,EAA2BG,EAAQ,IAAW,CACxD,KAAK,kBAAkB,KAAKC,EAASJ,EAAIG,CAAK,CAAC,CACjD,CAEA,mBAAmBE,EAA6B,CAC9C,IAAIC,EAAW,KACf,QAAS,EAAID,EAAY,MAAQ,EAAG,EAAI,KAAK,UAAU,OAAQ,IAAK,CAClE,IAAME,EAAK,KAAK,UAAU,CAAC,EAC3B,GAAIA,EAAG,UAAW,CAChBD,EAAWC,EACX,OAGAD,GACF,KAAK,eAAeA,CAAQ,CAEhC,CAEA,uBAAuBD,EAA6B,CAClD,IAAIG,EAAW,KACf,QAAS,EAAIH,EAAY,MAAQ,EAAG,EAAI,GAAI,IAAK,CAC/C,IAAME,EAAK,KAAK,UAAU,CAAC,EAC3B,GAAIA,EAAG,UAAW,CAChBC,EAAWD,EACX,OAGAC,GACF,KAAK,eAAeA,CAAQ,CAEhC,CAEA,qBAAqBH,EAA6B,CAC5CA,EAAY,eACd,KAAK,eAAeA,EAAY,aAAa,CAEjD,CAEA,qBAA4B,CAC1B,KAAK,eAAiB,KAAK,eAAe,KAAK,aAAa,CAC9D,CAEA,oBAA2B,CACzB,KAAK,cAAgB,KAAK,eAAe,KAAK,YAAY,CAC5D,CAEA,YAAYA,EAA6B,CA/I3C,IAAAN,EAgJI,QAAWU,KAAM,KAAK,GAAG,iBAAiB,wBAAwB,EAC5DA,IAAOJ,EAAY,MAClBN,EAAAU,EAAG,qBAAH,MAAAV,EAAuB,SAASM,EAAY,KAC/CI,EAAG,aAAa,gBAAiB,OAAO,GAG5C,QAAWA,KAAM,KAAK,GAAG,iBAAiB,iBAAiB,EACrDA,IAAOJ,EAAY,IACrBI,EAAG,aAAa,gBAAiB,OAAO,EAG5CJ,EAAY,GAAG,aAAa,gBAAiB,MAAM,EACnD,KAAK,uBAAuB,EAC5B,KAAK,eAAeA,EAAa,EAAK,CACxC,CAEA,eAAef,EAA0B,CACvC,IAAIe,EAA+Bf,EACnC,KAAOe,GACDA,EAAY,cACdA,EAAY,GAAG,aAAa,gBAAiB,MAAM,EAErDA,EAAcA,EAAY,cAE5B,KAAK,uBAAuB,CAC9B,CAEA,sBAAsBA,EAA6B,CACjD,QAAWE,KAAM,KAAK,UAChBA,EAAG,gBAAkBF,EAAY,eAAiBE,EAAG,cACvD,KAAK,eAAeA,CAAE,CAG5B,CAEA,iBAAiBF,EAA6B,CAC5C,IAAIK,EAAgB,KAEhBL,EAAY,WAAW,EACzBK,EAAgBL,EAEhBK,EAAgBL,EAAY,cAG1BK,IACFA,EAAc,GAAG,aAAa,gBAAiB,OAAO,EACtD,KAAK,uBAAuB,EAC5B,KAAK,eAAeA,CAAa,EAErC,CAEA,yBAAyBL,EAAuBM,EAAoB,CAClE,IAAIC,EAAeC,EACnBF,EAAOA,EAAK,YAAY,EAGxBC,EAAQP,EAAY,MAAQ,EACxBO,IAAU,KAAK,UAAU,SAC3BA,EAAQ,GAIVC,EAAQ,KAAK,mBAAmBD,EAAOD,CAAI,EAGvCE,IAAU,KACZA,EAAQ,KAAK,mBAAmB,EAAGF,CAAI,GAIrCE,EAAQ,IACV,KAAK,eAAe,KAAK,UAAUA,CAAK,CAAC,CAE7C,CAEQ,eAAgB,CACtB,IAAMC,EAAY,CAACzB,EAAiB0B,IAA2B,CAC7D,IAAIR,EAAKQ,EACLC,EAAO3B,EAAG,kBACd,KAAO2B,IACDA,EAAK,UAAY,KAAOA,EAAK,UAAY,UAC3CT,EAAK,IAAIU,EAASD,EAAM,KAAMD,CAAK,EACnC,KAAK,UAAU,KAAKR,CAAE,EACtB,KAAK,WAAW,KAAKA,EAAG,MAAM,UAAU,EAAG,CAAC,EAAE,YAAY,CAAC,GAEzDS,EAAK,mBACPF,EAAUE,EAAMT,CAAE,EAEpBS,EAAOA,EAAK,kBAEhB,EACAF,EAAU,KAAK,GAAmB,IAAI,EACtC,KAAK,UAAU,IAAI,CAACP,EAAIW,IAASX,EAAG,MAAQW,CAAI,CAClD,CAEQ,wBAA+B,CACrC,KAAK,cAAgB,KAAK,UAAU,CAAC,EAErC,QAAWX,KAAM,KAAK,UAAW,CAC/B,IAAIY,EAASZ,EAAG,cAEhB,IADAA,EAAG,UAAY,GACRY,GAAUA,EAAO,KAAO,KAAK,IAC7BA,EAAO,WAAW,IACrBZ,EAAG,UAAY,IAEjBY,EAASA,EAAO,cAEdZ,EAAG,YACL,KAAK,aAAeA,GAG1B,CAEQ,eAAejB,EAAoB8B,EAAU,GAAM,CACzD9B,EAAS,GAAG,SAAW,EACnB8B,GACF9B,EAAS,GAAG,MAAM,EAEpB,QAAWiB,KAAM,KAAK,UAChBA,IAAOjB,IACTiB,EAAG,GAAG,SAAW,GAGvB,CAEQ,mBAAmBc,EAAoBV,EAAsB,CACnE,QAAS,EAAIU,EAAY,EAAI,KAAK,WAAW,OAAQ,IACnD,GAAI,KAAK,UAAU,CAAC,EAAE,WAAaV,IAAS,KAAK,WAAW,CAAC,EAC3D,OAAO,EAGX,MAAO,EACT,CACF,EAEMM,EAAN,KAAe,CAYb,YAAY5B,EAAiBiC,EAA4BP,EAAwB,CAnSnF,IAAAhB,EAAAwB,EAAAC,EAAAC,EAAAC,EAoSIrC,EAAG,SAAW,GACd,KAAK,GAAKA,EACV,KAAK,cAAgB0B,EACrB,KAAK,OAAQQ,GAAAxB,EAAAV,EAAG,cAAH,YAAAU,EAAgB,SAAhB,KAAAwB,EAA0B,GACvC,KAAK,KAAOD,EACZ,KAAK,QAASP,GAAA,YAAAA,EAAO,QAAS,GAAK,EACnC,KAAK,MAAQ,EAEb,IAAMI,EAAS9B,EAAG,eACd8B,GAAA,YAAAA,EAAQ,QAAQ,iBAAkB,OACpCA,GAAA,MAAAA,EAAQ,aAAa,OAAQ,SAE/B9B,EAAG,aAAa,aAAc,KAAK,MAAQ,EAAE,EACzCA,EAAG,aAAa,YAAY,IAC9B,KAAK,OAAQoC,GAAAD,EAAAnC,GAAA,YAAAA,EAAI,aAAa,gBAAjB,YAAAmC,EAAgC,SAAhC,KAAAC,EAA0C,IAGzD,KAAK,aAAe,GACpB,KAAK,UAAY,GACjB,KAAK,UAAY,CAAC,CAACV,EAEnB,IAAIC,EAAO3B,EAAG,mBACd,KAAO2B,GAAM,CACX,GAAIA,EAAK,QAAQ,YAAY,GAAK,KAAM,CACtC,IAAMW,EAAU,IAAGD,EAAAX,GAAA,YAAAA,EAAO,QAAP,KAAAW,EAAgB,gBAAgB,KAAK,QAAQ,QAAQ,UAAW,GAAG,EACtFrC,EAAG,aAAa,YAAasC,CAAO,EACpCtC,EAAG,aAAa,gBAAiB,OAAO,EACxC2B,EAAK,aAAa,OAAQ,OAAO,EACjCA,EAAK,aAAa,KAAMW,CAAO,EAC/B,KAAK,aAAe,GACpB,MAGFX,EAAOA,EAAK,mBAEd,KAAK,KAAK,CACZ,CAEQ,MAAO,CACb,KAAK,GAAG,SAAW,GACd,KAAK,GAAG,aAAa,MAAM,GAC9B,KAAK,GAAG,aAAa,OAAQ,UAAU,EAEzC,KAAK,GAAG,iBAAiB,UAAW,KAAK,cAAc,KAAK,IAAI,CAAC,EACjE,KAAK,GAAG,iBAAiB,QAAS,KAAK,YAAY,KAAK,IAAI,CAAC,EAC7D,KAAK,GAAG,iBAAiB,QAAS,KAAK,YAAY,KAAK,IAAI,CAAC,EAC7D,KAAK,GAAG,iBAAiB,OAAQ,KAAK,WAAW,KAAK,IAAI,CAAC,CAC7D,CAEA,YAAa,CACX,OAAI,KAAK,aACA,KAAK,GAAG,aAAa,eAAe,IAAM,OAG5C,EACT,CAEA,YAAa,CACX,OAAO,KAAK,GAAG,aAAa,eAAe,IAAM,MACnD,CAEQ,YAAYY,EAAmB,CAEjCA,EAAM,SAAW,KAAK,IAAMA,EAAM,SAAW,KAAK,GAAG,oBAGrD,KAAK,eACH,KAAK,WAAW,GAAK,KAAK,WAAW,EACvC,KAAK,KAAK,iBAAiB,IAAI,EAE/B,KAAK,KAAK,eAAe,IAAI,EAE/BA,EAAM,gBAAgB,GAExB,KAAK,KAAK,YAAY,IAAI,EAC5B,CAEQ,aAAc,CAjXxB,IAAA7B,EAkXI,IAAIV,EAAK,KAAK,GACV,KAAK,eACPA,GAAMU,EAAAV,EAAG,oBAAH,KAAAU,EAAwCV,GAEhDA,EAAG,UAAU,IAAI,OAAO,CAC1B,CAEQ,YAAa,CAzXvB,IAAAU,EA0XI,IAAIV,EAAK,KAAK,GACV,KAAK,eACPA,GAAMU,EAAAV,EAAG,oBAAH,KAAAU,EAAwCV,GAEhDA,EAAG,UAAU,OAAO,OAAO,CAC7B,CAEQ,cAAcuC,EAAsB,CAC1C,GAAIA,EAAM,QAAUA,EAAM,SAAWA,EAAM,QACzC,OAGF,IAAIC,EAAW,GACf,OAAQD,EAAM,IAAK,CACjB,IAAK,IACL,IAAK,QACC,KAAK,cACH,KAAK,WAAW,GAAK,KAAK,WAAW,EACvC,KAAK,KAAK,iBAAiB,IAAI,EAE/B,KAAK,KAAK,eAAe,IAAI,EAE/BC,EAAW,IAEXD,EAAM,gBAAgB,EAExB,KAAK,KAAK,YAAY,IAAI,EAC1B,MAEF,IAAK,UACH,KAAK,KAAK,uBAAuB,IAAI,EACrCC,EAAW,GACX,MAEF,IAAK,YACH,KAAK,KAAK,mBAAmB,IAAI,EACjCA,EAAW,GACX,MAEF,IAAK,aACC,KAAK,eACH,KAAK,WAAW,EAClB,KAAK,KAAK,mBAAmB,IAAI,EAEjC,KAAK,KAAK,eAAe,IAAI,GAGjCA,EAAW,GACX,MAEF,IAAK,YACC,KAAK,cAAgB,KAAK,WAAW,GACvC,KAAK,KAAK,iBAAiB,IAAI,EAC/BA,EAAW,IAEP,KAAK,YACP,KAAK,KAAK,qBAAqB,IAAI,EACnCA,EAAW,IAGf,MAEF,IAAK,OACH,KAAK,KAAK,oBAAoB,EAC9BA,EAAW,GACX,MAEF,IAAK,MACH,KAAK,KAAK,mBAAmB,EAC7BA,EAAW,GACX,MAEF,QACMD,EAAM,IAAI,SAAW,GAAKA,EAAM,IAAI,MAAM,IAAI,IAC5CA,EAAM,KAAO,IACf,KAAK,KAAK,sBAAsB,IAAI,EAEpC,KAAK,KAAK,yBAAyB,KAAMA,EAAM,GAAG,EAEpDC,EAAW,IAEb,KACJ,CAEIA,IACFD,EAAM,gBAAgB,EACtBA,EAAM,eAAe,EAEzB,CACF,EAGA,SAASxB,EAA4C0B,EAASC,EAAc,CAC1E,IAAIC,EACJ,MAAO,IAAIC,IAAwB,CACjC,IAAMC,EAAQ,IAAM,CAClBF,EAAU,KACVF,EAAK,GAAGG,CAAI,CACd,EACID,GACF,aAAaA,CAAO,EAEtBA,EAAU,WAAWE,EAAOH,CAAI,CAClC,CACF,CC9cO,IAAMI,EAAN,KAAoC,CAQzC,YAAoBC,EAAiCC,EAAsC,CAAvE,WAAAD,EAAiC,eAAAC,EAmDrD,oBAAiB,IAAY,CAC3B,KAAK,QAAQ,IAAIC,GAAKA,EAAE,aAAa,gBAAiB,MAAM,CAAC,EAC7D,KAAK,OAAO,CACd,EAEA,KAAQ,iBAAmB,IAAM,CAC/B,KAAK,QAAQ,IAAIA,GAAKA,EAAE,aAAa,gBAAiB,OAAO,CAAC,EAC9D,KAAK,OAAO,CACd,EAEA,KAAQ,OAAS,IAAM,CACrB,KAAK,mBAAmB,EACxB,WAAW,IAAM,KAAK,mBAAmB,CAAC,CAC5C,EA/DE,KAAK,KAAO,MAAM,KAAKF,EAAM,iBAAsC,sBAAsB,CAAC,EAC1F,KAAK,QAAU,MAAM,KAAK,KAAK,MAAM,iBAAiB,iBAAiB,CAAC,EACxE,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,CACd,CAMQ,eAAgB,CACtB,QAAWG,IAAK,CAAC,qBAAsB,uBAAwB,SAAS,EACtE,KAAK,MAAM,iBAAiB,IAAIA,IAAI,EAAE,QAAQ,GAAK,CA1CzD,IAAAC,EA2CQ,EAAE,aAAaD,EAAE,QAAQ,QAAS,EAAE,GAAGC,EAAA,EAAE,aAAaD,CAAC,IAAhB,KAAAC,EAAqB,EAAE,EAC9D,EAAE,gBAAgBD,CAAC,CACrB,CAAC,CAEL,CAEQ,sBAAuB,CAjDjC,IAAAC,EAkDI,KAAK,KAAK,QAAQ,GAAK,CACrB,EAAE,iBAAiB,QAASC,GAAK,CAC/B,KAAK,kBAAkBA,CAAC,CAC1B,CAAC,CACH,CAAC,GACDD,EAAA,KAAK,YAAL,MAAAA,EAAgB,iBAAiB,QAAS,IAAM,CAC9C,KAAK,eAAe,CACtB,GAEA,SAAS,iBAAiB,UAAWC,GAAK,EACnCA,EAAE,SAAWA,EAAE,UAAYA,EAAE,MAAQ,KACxC,KAAK,eAAe,CAExB,CAAC,CACH,CAEQ,kBAAkB,EAAe,CACvC,IAAIC,EAAS,EAAE,cACVA,GAAA,MAAAA,EAAQ,aAAa,mBACxBA,EAAS,KAAK,MAAM,cAClB,yBAAyBA,GAAA,YAAAA,EAAQ,aAAa,oBAChD,GAEF,IAAMC,GAAaD,GAAA,YAAAA,EAAQ,aAAa,oBAAqB,OAC7DA,GAAA,MAAAA,EAAQ,aAAa,gBAAiBC,EAAa,QAAU,QAC7D,EAAE,gBAAgB,EAClB,KAAK,OAAO,CACd,CAiBQ,oBAAqB,CAC3B,KAAK,KAAK,IAAIL,GAAK,CA/FvB,IAAAE,EAgGM,IAAMG,GAAaL,GAAA,YAAAA,EAAG,aAAa,oBAAqB,OAClDM,GAASJ,EAAAF,GAAA,YAAAA,EAAG,aAAa,mBAAhB,YAAAE,EAAkC,UAAU,MAAM,KACjEI,GAAA,MAAAA,EAAQ,IAAIC,GAAM,CAChB,IAAMH,EAAS,SAAS,eAAe,GAAGG,GAAI,EAC1CF,GACFD,GAAA,MAAAA,EAAQ,UAAU,IAAI,WACtBA,GAAA,MAAAA,EAAQ,UAAU,OAAO,YAEzBA,GAAA,MAAAA,EAAQ,UAAU,IAAI,UACtBA,GAAA,MAAAA,EAAQ,UAAU,OAAO,WAE7B,EACF,CAAC,CACH,CAEQ,oBAAqB,CAC3B,GAAI,CAAC,KAAK,UAAW,OACjB,KAAK,KAAK,KAAK,GAAK,EAAE,aAAa,eAAe,CAAC,IACrD,KAAK,UAAU,MAAM,QAAU,SAEX,KAAK,QAAQ,KAAKI,GAAMA,EAAG,aAAa,eAAe,IAAM,OAAO,GAExF,KAAK,UAAU,UAAY,aAC3B,KAAK,UAAU,QAAU,KAAK,iBAE9B,KAAK,UAAU,UAAY,eAC3B,KAAK,UAAU,QAAU,KAAK,iBAElC,CACF,ECxHAC,EAAgB,EAEhB,IAAMC,EAAc,SAAS,cAAgC,qBAAqB,EAClF,GAAIA,EAAa,CACf,IAAMC,EAAQ,IAAIC,EAChBF,EACA,SAAS,cAAiC,0BAA0B,CACtE,EAEI,OAAO,SAAS,OAAO,SAAS,oBAAoB,GACtDC,EAAM,eAAe,EAIzB,IAAME,EAAS,SAAS,cAA2B,UAAU,EAC7D,GAAIA,EAAQ,CACV,IAAMC,EAAW,IAAIC,EAAkBF,CAAM,EACvCG,EAASC,EAAcH,CAAQ,EAC/BI,EAAY,SAAS,cAAc,mBAAmB,EACxDA,GAAaA,EAAU,oBACzBA,GAAA,MAAAA,EAAW,aAAaF,EAAQE,EAAU,oBAExCF,EAAO,mBACT,IAAIG,EAAoBH,EAAO,iBAAiB,EAOpD,IAAMI,EAAS,SAAS,cAAc,YAAY,EAC5CC,EAAgB,SAAS,cAAc,mBAAmB,EAC1DC,EAAgB,SAAS,cAAc,mBAAmB,EAC1DC,EAAe,SAAS,iBAAiB,kBAAkB,EAC3DC,EAAiB,SAAS,cAAc,oBAAoB,EAC5DC,EAAkB,SAAS,cAAiC,sBAAsB,EACpFL,GAAUC,GAAiBC,GAAiBC,EAAa,QAAUC,IACjEJ,EAAO,aAAe,MACxBA,GAAA,MAAAA,EAAQ,UAAU,OAAO,wBACzBA,GAAA,MAAAA,EAAQ,UAAU,IAAI,uBAEpB,OAAO,SAAS,KAAK,SAAS,QAAQ,GACxCM,EAAa,EAEfD,GAAA,MAAAA,EAAiB,iBAAiB,SAAUE,GAAK,CAC1CA,EAAE,OAA6B,MAAM,WAAW,SAAS,GAC5DD,EAAa,CAEjB,GACAH,EAAa,QAAQK,GACnBA,EAAG,iBAAiB,QAAS,GAAK,CAChC,EAAE,eAAe,EACjBF,EAAa,EACbN,EAAO,eAAe,CACxB,CAAC,CACH,EACAI,EAAe,iBAAiB,QAASG,GAAK,CAC5CA,EAAE,eAAe,EACjBP,EAAO,UAAU,OAAO,sBAAsB,EAC1CG,EAAa,CAAC,GAChBA,EAAa,CAAC,EAAE,eAAe,CAAE,MAAO,QAAS,CAAC,CAEtD,CAAC,EACDF,EAAc,iBAAiB,QAAS,IAAM,CAC5CK,EAAa,CACf,CAAC,EACDL,EAAc,iBAAiB,QAAS,IAAM,CAC5CK,EAAa,CACf,CAAC,EACDJ,EAAc,iBAAiB,QAAS,IAAM,CAC5CI,EAAa,CACf,CAAC,EACD,SAAS,iBAAiB,UAAWC,GAAK,EACnCA,EAAE,SAAWA,EAAE,UAAYA,EAAE,MAAQ,KACxCD,EAAa,CAEjB,CAAC,GAOH,SAASA,GAAe,CACtB,QAAQ,aAAa,KAAM,GAAI,GAAG,SAAS,yBAAyB,EACpEN,GAAA,MAAAA,EAAQ,UAAU,IAAI,uBACxB,CAOA,SAASS,GAAuB,CAlGhC,IAAAC,EAmGE,GAAI,CAAC,SAAS,KAAM,OACpB,IAAMC,EAAU,SAAS,eAAe,SAAS,KAAK,MAAM,CAAC,CAAC,EACxDC,GAAcF,EAAAC,GAAA,YAAAA,EAAS,gBAAT,YAAAD,EAAwB,eACxCE,GAAA,YAAAA,EAAa,YAAa,YAC5BA,EAAY,KAAO,GAEvB,CACAH,EAAqB,EACrB,OAAO,iBAAiB,aAAc,IAAMA,EAAqB,CAAC,EAKlE,SAAS,iBAAiB,wBAAwB,EAAE,QAAQD,GAAM,CAChEA,EAAG,iBAAiB,SAAU,GAAK,CACjC,OAAO,SAAS,OAAS,SAAU,EAAE,OAA6B,OACpE,CAAC,CACH,CAAC",
  "names": ["PlayExampleClassName", "PlaygroundExampleController", "exampleEl", "_a", "_b", "_c", "_d", "e", "el", "numLineBreaks", "output", "err", "codeWithModFile", "moduleVars", "PLAYGROUND_BASE_URL", "res", "shareId", "href", "body", "Body", "Error", "Events", "Errors", "resolve", "initPlaygrounds", "exampleHashRegex", "exampleHashEl", "exampleHrefs", "findExampleHash", "playContainer", "ex", "exampleHref", "SelectNavController", "el", "e", "target", "href", "makeSelectNav", "tree", "label", "select", "outline", "groupMap", "group", "t", "o", "_a", "hash", "value", "TreeNavController", "el", "treeitem", "targets", "observer", "entries", "entry", "id", "isIntersecting", "active", "t", "_a", "fn", "href", "target", "delay", "debounce", "currentItem", "nextItem", "ti", "prevItem", "l1", "groupTreeitem", "char", "start", "index", "findItems", "group", "curr", "TreeItem", "idx", "parent", "focusEl", "startIndex", "treeObj", "_b", "_c", "_d", "_e", "groupId", "event", "captured", "func", "wait", "timeout", "args", "later", "ExpandableRowsTableController", "table", "toggleAll", "t", "a", "_a", "e", "target", "isExpanded", "rowIds", "id", "el", "initPlaygrounds", "directories", "table", "ExpandableRowsTableController", "treeEl", "treeCtrl", "TreeNavController", "select", "makeSelectNav", "mobileNav", "SelectNavController", "readme", "readmeContent", "readmeOutline", "readmeExpand", "readmeCollapse", "mobileNavSelect", "expandReadme", "e", "el", "openDeprecatedSymbol", "_a", "heading", "grandParent"]
}
