{
  "version": 3,
  "sources": ["/cdn/shop/t/4/assets/header-menu.js?cb=1795031950887"],
  "sourcesContent": ["import { Component } from '@theme/component';\nimport { debounce, onDocumentLoaded, setHeaderMenuStyle } from '@theme/utilities';\nimport { MegaMenuHoverEvent } from '@theme/events';\n\n/** Skim filter: pointer must dwell this long before MegaMenuHoverEvent fires. */\nconst HOVER_COMMIT_DELAY_MS = 150;\n\n/**\n * A custom element that manages a header menu.\n *\n * @typedef {Object} State\n * @property {HTMLElement | null} activeItem - The currently active menu item.\n * @property {HTMLElement | null} activeOverflowItem - The overflow item shown when the More trigger is active.\n *\n * @typedef {object} Refs\n * @property {HTMLElement} overflowMenu - The overflow menu.\n * @property {HTMLElement[]} [submenu] - The submenu in each respective menu item.\n *\n * @typedef {Object} SubmenuMeasurement\n * @property {HTMLElement} item - The menu item that owns the active measurement.\n * @property {HTMLElement} target - The element whose height determines the open submenu height.\n * @property {boolean} isDefaultSlot - Whether the item is in the top-level menu.\n * @property {boolean} hasSubmenu - Whether the item has submenu content.\n *\n * @extends {Component<Refs>}\n */\nclass HeaderMenu extends Component {\n  requiredRefs = ['overflowMenu'];\n\n  /** @type {SubmenuMeasurement | null} */\n  #submenuMeasurement = null;\n\n  /** @type {number | null} */\n  #submenuResizeAnimationFrame = null;\n\n  #submenuResizeObserver = new ResizeObserver((entries) => {\n    const measurement = this.#submenuMeasurement;\n    if (!measurement || this.#state.activeItem !== measurement.item) return;\n    if (!entries.some((entry) => entry.target === measurement.target)) return;\n\n    this.#scheduleSubmenuMeasurement(measurement);\n  });\n\n  /** @type {ReturnType<typeof setTimeout> | undefined} */\n  #hoverDispatchTimer;\n\n  connectedCallback() {\n    super.connectedCallback();\n\n    onDocumentLoaded(this.#preloadImages);\n    window.addEventListener('resize', this.#resizeListener);\n    this.addEventListener('keydown', this.#onKeydown);\n    this.overflowMenu?.addEventListener('pointerleave', this.#overflowSubmenuListener);\n    if (this.#state.activeItem) {\n      this.#startPointerTracking(this.#state.activeItem, null);\n    }\n    this.#resumeSubmenuResizeObserver();\n  }\n\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    window.removeEventListener('resize', this.#resizeListener);\n    this.removeEventListener('keydown', this.#onKeydown);\n    document.body.removeEventListener('pointermove', this.#onPointerMove);\n    if (this.#state.activeItem) {\n      this.#stopPointerTracking(this.#state.activeItem);\n    }\n    this.overflowMenu?.removeEventListener('pointerleave', this.#overflowSubmenuListener);\n    this.#cleanupSubmenuResizeObserver();\n    clearTimeout(this.#hoverDispatchTimer);\n    this.#hoverDispatchTimer = undefined;\n  }\n\n  /**\n   * Debounced resize event listener to recalculate menu style\n   */\n  #resizeListener = debounce(() => {\n    setHeaderMenuStyle();\n  }, 100);\n\n  #overflowSubmenuListener = () => {\n    this.#deactivate();\n  };\n\n  /**\n   * Close the open submenu on Escape and restore focus to its disclosure control.\n   * @param {KeyboardEvent} event\n   */\n  #onKeydown = (event) => {\n    if (event.key !== 'Escape') return;\n    const item = this.#state.activeItem;\n    if (!item) return;\n\n    const control = this.#focusTargetAfterClose(item);\n    this.#deactivate(item, { force: true });\n    control.focus();\n  };\n\n  /**\n   * Toggle a submenu from its dedicated disclosure button (click / Enter / Space).\n   * @param {PointerEvent | MouseEvent} event\n   */\n  toggle = (event) => {\n    const button = event.target;\n    if (!(button instanceof HTMLElement)) return;\n\n    const item = findMenuItem(button);\n    if (!item) return;\n\n    const isExpanded = button.getAttribute('aria-expanded') === 'true';\n    if (isExpanded) {\n      // Close whatever is currently active. In the overflow panel the initially\n      // selected item is tracked as `activeOverflowItem` while the More trigger is\n      // the `activeItem`, so deactivating `item` directly would no-op; deactivate\n      // the active item instead.\n      this.#deactivate(this.#state.activeItem ?? item, { force: true });\n      // Closing the overflow panel hides the focused disclosure, so return focus\n      // to the visible More trigger; a top-level disclosure stays put.\n      const focusTarget = this.#focusTargetAfterClose(item);\n      if (focusTarget !== button) focusTarget.focus();\n    } else {\n      this.activate(event);\n    }\n  };\n\n  /**\n   * The control that should receive focus after a submenu closes. Overflow items\n   * live in a panel that is hidden on close, so focus returns to the always-visible\n   * More trigger instead of a now-inert control inside the panel.\n   * @param {HTMLElement} item\n   * @returns {HTMLElement}\n   */\n  #focusTargetAfterClose(item) {\n    const listItem = item.closest('.menu-list__list-item');\n    const slot = listItem instanceof HTMLElement ? listItem.slot : '';\n    if (slot === 'overflow' || slot === 'more') {\n      const moreButton = this.querySelector('[slot=\"more\"] [ref=\"menuitem\"]');\n      if (moreButton instanceof HTMLElement) return moreButton;\n    }\n    return this.#expandableFor(item);\n  }\n\n  /**\n   * Return the element that carries the `aria-expanded` state for a menu item.\n   * @param {HTMLElement} item\n   * @returns {HTMLElement}\n   */\n  #expandableFor(item) {\n    const listItem = item.closest('.menu-list__list-item');\n    const disclosure = listItem?.querySelector('[ref=\"disclosure[]\"]');\n    return disclosure instanceof HTMLElement ? disclosure : item;\n  }\n\n  /**\n   * @type {State}\n   */\n  #state = {\n    activeItem: null,\n    activeOverflowItem: null,\n  };\n\n  /**\n   * @type {ReturnType<typeof setTimeout> | undefined}\n   */\n  #pointerIdleTimer;\n\n  /**\n   * Last known pointer position for Safari hit-test reconciliation.\n   * @type {{ x: number, y: number }}\n   */\n  #lastPointer = { x: 0, y: 0 };\n\n  /**\n   * Update the safety box idle state on the active menu item.\n   * @param {PointerEvent} event\n   */\n  #onPointerMove = (event) => {\n    const activeLink = this.#state.activeItem;\n    if (!activeLink) return;\n\n    this.#lastPointer.x = event.clientX;\n    this.#lastPointer.y = event.clientY;\n\n    const moving = Math.abs(event.movementX) >= 1 || event.movementY >= 1;\n    activeLink.dataset.safetyBox = `${moving}`;\n\n    clearTimeout(this.#pointerIdleTimer);\n    if (moving) {\n      this.#pointerIdleTimer = setTimeout(() => {\n        if (this.#state.activeItem) {\n          this.#state.activeItem.dataset.safetyBox = 'false';\n          this.#reconcilePointerTarget();\n        }\n      }, 50);\n    } else {\n      this.#reconcilePointerTarget();\n    }\n  };\n\n  /**\n   * Check if the pointer is over a different menu item and trigger activation if so.\n   * Works around Safari not re-evaluating hit targets after pseudo-element changes.\n   */\n  #reconcilePointerTarget() {\n    const { x, y } = this.#lastPointer;\n    requestAnimationFrame(() => {\n      const target = document.elementFromPoint(x, y);\n      if (!target) return;\n      const listItem = target.closest('.menu-list__list-item');\n      if (listItem && !listItem.contains(this.#state.activeItem)) {\n        listItem.dispatchEvent(new PointerEvent('pointerenter', { bubbles: false }));\n      }\n    });\n  }\n\n  /**\n   * Begin pointer tracking for the safety box on the newly active item.\n   * @param {HTMLElement} item\n   * @param {HTMLElement | null} previousItem\n   */\n  #startPointerTracking(item, previousItem) {\n    if (previousItem) {\n      this.#stopPointerTracking(previousItem);\n    } else {\n      document.body.addEventListener('pointermove', this.#onPointerMove);\n    }\n\n    const isOverlap = this.headerComponent?.hasAttribute('data-submenu-overlap-bottom-row');\n    const boundary = isOverlap ? this.headerComponent?.querySelector('.header__row--top') : this.headerComponent;\n    item.style.setProperty(\n      '--box-height',\n      `${(boundary?.getBoundingClientRect().bottom ?? 0) - this.#safetyBoxTop(item)}px`\n    );\n  }\n\n  /**\n   * The viewport top of an item's safety box. The box sits at its `top` offset inside the item's\n   * containing block, which is above the item when the menu list is centered in a taller header\n   * row, so the box is sized from wherever it starts to keep reaching the submenu.\n   * @param {HTMLElement} item\n   * @returns {number}\n   */\n  #safetyBoxTop(item) {\n    const itemTop = item.getBoundingClientRect().top;\n    const container = item.offsetParent;\n    const offset = parseFloat(getComputedStyle(item, '::after').top);\n    if (!(container instanceof HTMLElement) || Number.isNaN(offset)) return itemTop;\n\n    return Math.min(itemTop, container.getBoundingClientRect().top + container.clientTop + offset);\n  }\n\n  /**\n   * Stop pointer tracking and remove all safety box properties from an item.\n   * @param {HTMLElement} item\n   */\n  #stopPointerTracking(item) {\n    window.clearTimeout(this.#pointerIdleTimer);\n    this.#pointerIdleTimer = undefined;\n    item.style.removeProperty('--box-height');\n    delete item.dataset.safetyBox;\n  }\n\n  /**\n   * Get the overflow menu\n   */\n  get overflowMenu() {\n    return /** @type {HTMLElement | null} */ (this.refs.overflowMenu?.shadowRoot?.querySelector('[part=\"overflow\"]'));\n  }\n\n  /**\n   * Whether the overflow list is hovered\n   * @returns {boolean}\n   */\n  get overflowListHovered() {\n    return this.refs.overflowMenu?.shadowRoot?.querySelector('[part=\"overflow-list\"]')?.matches(':hover') ?? false;\n  }\n\n  /**\n   * Find the first overflowing menu item shown by the More trigger.\n   * @returns {HTMLElement | null}\n   */\n  #getFirstOverflowMenuItem() {\n    const menuItem = this.refs.overflowMenu?.querySelector('[slot=\"overflow\"] [ref=\"menuitem\"]');\n    return menuItem instanceof HTMLElement ? menuItem : null;\n  }\n\n  get headerComponent() {\n    return /** @type {HTMLElement | null} */ (this.closest('header-component'));\n  }\n\n  /**\n   * Activate the selected menu item immediately\n   * @param {PointerEvent | FocusEvent} event\n   */\n  activate = (event) => {\n    if (!(event.target instanceof Element) || !this.headerComponent) return;\n\n    const item = findMenuItem(event.target);\n\n    if (!item || item == this.#state.activeItem) return;\n\n    // Derive the slot context from the list item rather than `event.target`.\n    const listItem = item.closest('.menu-list__list-item');\n    const slot = listItem instanceof HTMLElement ? listItem.slot : '';\n    const isMoreTrigger = slot === 'more';\n    const isDefaultSlot = slot === '';\n    const overflowItem = isMoreTrigger ? this.#getFirstOverflowMenuItem() : null;\n\n    this.dataset.overflowExpanded = (!isDefaultSlot).toString();\n\n    const previouslyActiveItem = this.#state.activeItem;\n    const previouslyActiveOverflowItem = this.#state.activeOverflowItem;\n\n    this.#cleanupSubmenuResizeObserver();\n\n    if (previouslyActiveItem) {\n      this.#expandableFor(previouslyActiveItem).ariaExpanded = 'false';\n      const previousSubmenu = findSubmenu(previouslyActiveItem);\n      if (previousSubmenu) previousSubmenu.inert = true;\n    }\n    if (previouslyActiveOverflowItem && previouslyActiveOverflowItem !== previouslyActiveItem) {\n      this.#expandableFor(previouslyActiveOverflowItem).ariaExpanded = 'false';\n      const previousOverflowSubmenu = findSubmenu(previouslyActiveOverflowItem);\n      if (previousOverflowSubmenu) previousOverflowSubmenu.inert = true;\n    }\n\n    this.#state.activeItem = item;\n    this.#state.activeOverflowItem = overflowItem;\n    this.ariaExpanded = 'true';\n    this.#expandableFor(item).ariaExpanded = 'true';\n    if (overflowItem && overflowItem !== item) {\n      this.#expandableFor(overflowItem).ariaExpanded = 'true';\n      // The More trigger auto-opens the first overflow item's submenu, so expose it.\n      const activeOverflowSubmenu = findSubmenu(overflowItem);\n      if (activeOverflowSubmenu) activeOverflowSubmenu.inert = false;\n    }\n\n    const overflowItemSubmenu = isMoreTrigger ? findSubmenu(overflowItem) : null;\n    let submenu = findSubmenu(item) || (overflowItemSubmenu ? this.overflowMenu : null);\n    const hasSubmenu = Boolean(submenu);\n\n    if (!hasSubmenu && !isDefaultSlot) {\n      submenu = this.overflowMenu;\n    }\n\n    if (submenu) {\n      clearTimeout(this.#hoverDispatchTimer);\n      this.#hoverDispatchTimer = undefined;\n      const committedItem = item;\n      if (event instanceof FocusEvent) {\n        this.dispatchEvent(new MegaMenuHoverEvent());\n      } else {\n        this.#hoverDispatchTimer = setTimeout(() => {\n          this.#hoverDispatchTimer = undefined;\n          if (this.#state.activeItem === committedItem) {\n            this.dispatchEvent(new MegaMenuHoverEvent());\n          }\n        }, HOVER_COMMIT_DELAY_MS);\n      }\n\n      // Mark submenu as active for content-visibility optimization\n      submenu.dataset.active = '';\n\n      // Expose the open submenu to focus and assistive tech. Collapsed submenus stay\n      // inert so their contents cannot be reached (visibility:hidden alone can be\n      // overridden by descendants that re-assert visibility).\n      submenu.inert = false;\n\n      const measurementTarget = isDefaultSlot ? submenu : this.overflowMenu;\n      if (measurementTarget) {\n        this.#startSubmenuResizeObserver(item, measurementTarget, isDefaultSlot, hasSubmenu);\n      }\n    } else {\n      this.#setSubmenuHeights(0, 0);\n    }\n\n    this.style.setProperty('--submenu-opacity', '1');\n    this.#startPointerTracking(item, previouslyActiveItem);\n  };\n\n  /**\n   * Deactivate the active item after a delay\n   * @param {PointerEvent | FocusEvent} event\n   */\n  deactivate(event) {\n    if (!(event.target instanceof Element)) return;\n\n    const menu = findSubmenu(this.#state.activeItem);\n    // Keep the submenu open while focus moves between the link, its disclosure\n    // button, and the submenu contents \u2014 i.e. anywhere inside the same list item.\n    const isMovingWithinItem =\n      event.relatedTarget instanceof Node &&\n      event.target instanceof Element &&\n      event.target.contains(event.relatedTarget);\n    const isMovingWithinMenu = event.relatedTarget instanceof Node && menu?.contains(document.activeElement);\n    const isMovingToSubmenu =\n      event.relatedTarget instanceof Node && event.type === 'blur' && menu?.contains(event.relatedTarget);\n    const isMovingToOverflowMenu =\n      event.relatedTarget instanceof Element && Boolean(event.relatedTarget.closest('[slot=\"overflow\"]'));\n\n    if (isMovingWithinItem || isMovingWithinMenu || isMovingToOverflowMenu || isMovingToSubmenu) {\n      if (this.#state.activeItem) {\n        this.#stopPointerTracking(this.#state.activeItem);\n      }\n      return;\n    }\n\n    this.#deactivate();\n  }\n\n  /**\n   * Deactivate the active item immediately\n   * @param {HTMLElement | null} [item]\n   */\n  #deactivate = (item = this.#state.activeItem, { force = false } = {}) => {\n    if (!item || item != this.#state.activeItem) return;\n\n    // Don't deactivate if the overflow menu or overflow list is still being hovered,\n    // unless the close was explicitly requested (Escape or the disclosure toggle),\n    // which must close regardless of pointer position.\n    if (!force && (this.overflowListHovered || this.overflowMenu?.matches(':hover'))) return;\n\n    clearTimeout(this.#hoverDispatchTimer);\n    this.#hoverDispatchTimer = undefined;\n\n    this.#cleanupSubmenuResizeObserver();\n    this.#setSubmenuHeights(0, 0);\n    this.style.setProperty('--submenu-opacity', '0');\n    this.dataset.overflowExpanded = 'false';\n\n    const submenu = findSubmenu(item) || (item.closest('[slot=\"more\"]') ? this.overflowMenu : null);\n    const activeOverflowItem = this.#state.activeOverflowItem;\n\n    document.body.removeEventListener('pointermove', this.#onPointerMove);\n    this.#stopPointerTracking(item);\n\n    this.#state.activeItem = null;\n    this.#state.activeOverflowItem = null;\n    this.ariaExpanded = 'false';\n    this.#expandableFor(item).ariaExpanded = 'false';\n    if (activeOverflowItem && activeOverflowItem !== item) {\n      this.#expandableFor(activeOverflowItem).ariaExpanded = 'false';\n      const activeOverflowSubmenu = findSubmenu(activeOverflowItem);\n      if (activeOverflowSubmenu) activeOverflowSubmenu.inert = true;\n    }\n\n    // Remove active state from submenu after animation completes\n    if (submenu) {\n      delete submenu.dataset.active;\n      submenu.inert = true;\n    }\n  };\n\n  #getOverflowListLinksHeight() {\n    const slottedMenuLinks = this.overflowMenu?.querySelector('slot')?.assignedElements();\n    if (!slottedMenuLinks) return this.overflowMenu?.offsetHeight || 0;\n\n    /**\n     * @param {(submenu: HTMLElement) => void} cb\n     */\n    const mapSubmenus = (cb) => {\n      slottedMenuLinks.forEach((link) => {\n        const submenu = /** @type {HTMLElement | null} */ (link.querySelector('[ref=\"submenu[]\"]'));\n        if (submenu) {\n          cb(submenu);\n        }\n      });\n    };\n\n    mapSubmenus((submenu) => {\n      submenu.style.setProperty('display', 'none');\n    });\n    const height = this.overflowMenu?.offsetHeight || 0;\n    mapSubmenus((submenu) => {\n      submenu.style.removeProperty('display');\n    });\n    return height;\n  }\n\n  /**\n   * Observe and measure the active submenu.\n   * @param {HTMLElement} item\n   * @param {HTMLElement} target\n   * @param {boolean} isDefaultSlot\n   * @param {boolean} hasSubmenu\n   * @param {boolean} [deferMeasurement=false]\n   */\n  #startSubmenuResizeObserver(item, target, isDefaultSlot, hasSubmenu, deferMeasurement = false) {\n    const measurement = { item, target, isDefaultSlot, hasSubmenu };\n    this.#submenuMeasurement = measurement;\n    this.#submenuResizeObserver.observe(target);\n    if (deferMeasurement) {\n      this.#scheduleSubmenuMeasurement(measurement);\n    } else {\n      this.#updateSubmenuHeight(measurement);\n    }\n  }\n\n  /**\n   * Restore resize tracking when an open menu is reconnected.\n   */\n  #resumeSubmenuResizeObserver() {\n    const item = this.#state.activeItem;\n    if (!item || !this.headerComponent) return;\n\n    this.#cleanupSubmenuResizeObserver();\n\n    const listItem = item.closest('.menu-list__list-item');\n    const slot = listItem instanceof HTMLElement ? listItem.slot : '';\n    const isDefaultSlot = slot === '';\n    const isMoreTrigger = slot === 'more';\n    const itemSubmenu = findSubmenu(item);\n    const overflowItemSubmenu = isMoreTrigger ? findSubmenu(this.#state.activeOverflowItem) : null;\n    const hasSubmenu = Boolean(itemSubmenu || overflowItemSubmenu);\n    const measurementTarget = isDefaultSlot ? itemSubmenu : this.overflowMenu;\n\n    if (measurementTarget) {\n      this.#startSubmenuResizeObserver(item, measurementTarget, isDefaultSlot, hasSubmenu, true);\n    } else {\n      this.#setSubmenuHeights(0, 0);\n    }\n  }\n\n  /**\n   * Schedule a height update for the active submenu.\n   * @param {SubmenuMeasurement} measurement\n   */\n  #scheduleSubmenuMeasurement(measurement) {\n    if (this.#submenuResizeAnimationFrame !== null) return;\n\n    this.#submenuResizeAnimationFrame = requestAnimationFrame(() => {\n      this.#submenuResizeAnimationFrame = null;\n      if (this.#submenuMeasurement !== measurement || this.#state.activeItem !== measurement.item) return;\n\n      this.#updateSubmenuHeight(measurement);\n    });\n  }\n\n  /**\n   * Measure and apply the active submenu height.\n   * @param {SubmenuMeasurement} measurement\n   */\n  #updateSubmenuHeight(measurement) {\n    if (this.#submenuMeasurement !== measurement || this.#state.activeItem !== measurement.item) return;\n\n    let submenuHeight = measurement.target.offsetHeight;\n\n    if (!measurement.isDefaultSlot) {\n      const overflowListHeight = this.#getOverflowListLinksHeight();\n      submenuHeight = measurement.hasSubmenu\n        ? Math.max(measurement.target.offsetHeight, overflowListHeight)\n        : overflowListHeight;\n    }\n\n    this.#setSubmenuHeights(submenuHeight, this.#getHeaderVisibleHeight());\n  }\n\n  /**\n   * Read the visible header height before submenu height writes invalidate layout.\n   * @returns {number}\n   */\n  #getHeaderVisibleHeight() {\n    if (!this.headerComponent) return 0;\n\n    const isOverlapSituation = this.headerComponent.hasAttribute('data-submenu-overlap-bottom-row');\n\n    return isOverlapSituation && this.headerComponent.offsetHeight > 0\n      ? /** @type {HTMLElement | null} */ (this.headerComponent.querySelector('.header__row--top'))?.offsetHeight ?? 0\n      : this.headerComponent.offsetHeight;\n  }\n\n  /**\n   * Calculate and set the full open header height. If the submenu is not open, the full open header height is 0.\n   * @param {number} submenuHeight\n   * @param {number} headerVisibleHeight\n   */\n  #setSubmenuHeights(submenuHeight, headerVisibleHeight) {\n    if (!this.headerComponent) return;\n\n    const nothingToOpen = submenuHeight === 0;\n    const fullOpenHeaderHeight = nothingToOpen ? 0 : submenuHeight + headerVisibleHeight;\n    const submenuHeightValue = `${submenuHeight}px`;\n    const fullOpenHeaderHeightValue = `${fullOpenHeaderHeight}px`;\n\n    if (this.headerComponent.style.getPropertyValue('--submenu-height') !== submenuHeightValue) {\n      this.headerComponent.style.setProperty('--submenu-height', submenuHeightValue);\n    }\n    if (this.headerComponent.style.getPropertyValue('--full-open-header-height') !== fullOpenHeaderHeightValue) {\n      this.headerComponent.style.setProperty('--full-open-header-height', fullOpenHeaderHeightValue);\n    }\n  }\n\n  /**\n   * Preload images that are set to load lazily.\n   */\n  #preloadImages = () => {\n    const images = this.querySelectorAll('img[loading=\"lazy\"]');\n    images?.forEach((image) => image.removeAttribute('loading'));\n  };\n\n  #cleanupSubmenuResizeObserver() {\n    this.#submenuResizeObserver.disconnect();\n    this.#submenuMeasurement = null;\n\n    if (this.#submenuResizeAnimationFrame !== null) {\n      cancelAnimationFrame(this.#submenuResizeAnimationFrame);\n      this.#submenuResizeAnimationFrame = null;\n    }\n  }\n}\n\nif (!customElements.get('header-menu')) {\n  customElements.define('header-menu', HeaderMenu);\n}\n\n/**\n * Find the closest menu item.\n * @param {Element | null | undefined} element\n * @returns {HTMLElement | null}\n */\nfunction findMenuItem(element) {\n  if (!(element instanceof Element)) return null;\n\n  // `element` may be the list item itself (hover/focus routed via the `<li>`) or a\n  // descendant such as the disclosure button (click routed via the button).\n  const listItem = element.closest('.menu-list__list-item') ?? element;\n  return listItem.querySelector('[ref=\"menuitem\"]');\n}\n\n/**\n * Find the closest submenu.\n * @param {Element | null | undefined} element\n * @returns {HTMLElement | null}\n */\nfunction findSubmenu(element) {\n  const listItem = element?.closest?.('.menu-list__list-item');\n  const submenu = listItem?.querySelector(':scope > [ref=\"submenu[]\"]');\n  return submenu instanceof HTMLElement ? submenu : null;\n}\n"],
  "mappings": "AAAA,OAAS,cAAiB,mBAC1B,OAAS,SAAU,iBAAkB,uBAA0B,mBAC/D,OAAS,uBAA0B,gBAGnC,MAAM,sBAAwB,IAqB9B,MAAM,mBAAmB,SAAU,CACjC,aAAe,CAAC,cAAc,EAG9B,oBAAsB,KAGtB,6BAA+B,KAE/B,uBAAyB,IAAI,eAAgB,SAAY,CACvD,MAAM,YAAc,KAAK,oBACrB,CAAC,aAAe,KAAK,OAAO,aAAe,YAAY,MACtD,QAAQ,KAAM,OAAU,MAAM,SAAW,YAAY,MAAM,GAEhE,KAAK,4BAA4B,WAAW,CAC9C,CAAC,EAGD,oBAEA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,iBAAiB,KAAK,cAAc,EACpC,OAAO,iBAAiB,SAAU,KAAK,eAAe,EACtD,KAAK,iBAAiB,UAAW,KAAK,UAAU,EAChD,KAAK,cAAc,iBAAiB,eAAgB,KAAK,wBAAwB,EAC7E,KAAK,OAAO,YACd,KAAK,sBAAsB,KAAK,OAAO,WAAY,IAAI,EAEzD,KAAK,6BAA6B,CACpC,CAEA,sBAAuB,CACrB,MAAM,qBAAqB,EAC3B,OAAO,oBAAoB,SAAU,KAAK,eAAe,EACzD,KAAK,oBAAoB,UAAW,KAAK,UAAU,EACnD,SAAS,KAAK,oBAAoB,cAAe,KAAK,cAAc,EAChE,KAAK,OAAO,YACd,KAAK,qBAAqB,KAAK,OAAO,UAAU,EAElD,KAAK,cAAc,oBAAoB,eAAgB,KAAK,wBAAwB,EACpF,KAAK,8BAA8B,EACnC,aAAa,KAAK,mBAAmB,EACrC,KAAK,oBAAsB,MAC7B,CAKA,gBAAkB,SAAS,IAAM,CAC/B,mBAAmB,CACrB,EAAG,GAAG,EAEN,yBAA2B,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