var D0 = Object.defineProperty
var B0 = (n, r, i) =>
  r in n
    ? D0(n, r, { enumerable: !0, configurable: !0, writable: !0, value: i })
    : (n[r] = i)
var Y = (n, r, i) => B0(n, typeof r != 'symbol' ? r + '' : r, i)
var ca = ''
function su(n) {
  ca = n
}
function U0(n = '') {
  if (!ca) {
    const r = [...document.getElementsByTagName('script')],
      i = r.find(a => a.hasAttribute('data-shoelace'))
    if (i) su(i.getAttribute('data-shoelace'))
    else {
      const a = r.find(
        d =>
          /shoelace(\.min)?\.js($|\?)/.test(d.src) ||
          /shoelace-autoloader(\.min)?\.js($|\?)/.test(d.src),
      )
      let l = ''
      a && (l = a.getAttribute('src')), su(l.split('/').slice(0, -1).join('/'))
    }
  }
  return ca.replace(/\/$/, '') + (n ? `/${n.replace(/^\//, '')}` : '')
}
var N0 = {
    name: 'default',
    resolver: n => U0(`assets/icons/${n}.svg`),
  },
  F0 = N0,
  au = {
    caret: `
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
      <polyline points="6 9 12 15 18 9"></polyline>
    </svg>
  `,
    check: `
    <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">
      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
        <g stroke="currentColor">
          <g transform="translate(3.428571, 3.428571)">
            <path d="M0,5.71428571 L3.42857143,9.14285714"></path>
            <path d="M9.14285714,0 L3.42857143,9.14285714"></path>
          </g>
        </g>
      </g>
    </svg>
  `,
    'chevron-down': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
      <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
    </svg>
  `,
    'chevron-left': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
      <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
    </svg>
  `,
    'chevron-right': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
      <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
    </svg>
  `,
    copy: `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">
      <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>
    </svg>
  `,
    eye: `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
      <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
      <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
    </svg>
  `,
    'eye-slash': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">
      <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
      <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
      <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
    </svg>
  `,
    eyedropper: `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">
      <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>
    </svg>
  `,
    'grip-vertical': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
      <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>
    </svg>
  `,
    indeterminate: `
    <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">
      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
        <g stroke="currentColor" stroke-width="2">
          <g transform="translate(2.285714, 6.857143)">
            <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
          </g>
        </g>
      </g>
    </svg>
  `,
    'person-fill': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
      <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
    </svg>
  `,
    'play-fill': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
      <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>
    </svg>
  `,
    'pause-fill': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">
      <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>
    </svg>
  `,
    radio: `
    <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">
      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g fill="currentColor">
          <circle cx="8" cy="8" r="3.42857143"></circle>
        </g>
      </g>
    </svg>
  `,
    'star-fill': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
      <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
    </svg>
  `,
    'x-lg': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
      <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
    </svg>
  `,
    'x-circle-fill': `
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
      <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
    </svg>
  `,
  },
  H0 = {
    name: 'system',
    resolver: n =>
      n in au ? `data:image/svg+xml,${encodeURIComponent(au[n])}` : '',
  },
  W0 = H0,
  ho = [F0, W0],
  fo = []
function q0(n) {
  fo.push(n)
}
function Y0(n) {
  fo = fo.filter(r => r !== n)
}
function lu(n) {
  return ho.find(r => r.name === n)
}
function vh(n, r) {
  G0(n),
    ho.push({
      name: n,
      resolver: r.resolver,
      mutator: r.mutator,
      spriteSheet: r.spriteSheet,
    }),
    fo.forEach(i => {
      i.library === n && i.setIcon()
    })
}
function G0(n) {
  ho = ho.filter(r => r.name !== n)
}
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const ao = globalThis,
  fa =
    ao.ShadowRoot &&
    (ao.ShadyCSS === void 0 || ao.ShadyCSS.nativeShadow) &&
    'adoptedStyleSheets' in Document.prototype &&
    'replace' in CSSStyleSheet.prototype,
  pa = Symbol(),
  cu = /* @__PURE__ */ new WeakMap()
let mh = class {
  constructor(r, i, a) {
    if (((this._$cssResult$ = !0), a !== pa))
      throw Error(
        'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.',
      )
    ;(this.cssText = r), (this.t = i)
  }
  get styleSheet() {
    let r = this.o
    const i = this.t
    if (fa && r === void 0) {
      const a = i !== void 0 && i.length === 1
      a && (r = cu.get(i)),
        r === void 0 &&
          ((this.o = r = new CSSStyleSheet()).replaceSync(this.cssText),
          a && cu.set(i, r))
    }
    return r
  }
  toString() {
    return this.cssText
  }
}
const dt = n => new mh(typeof n == 'string' ? n : n + '', void 0, pa),
  en = (n, ...r) => {
    const i =
      n.length === 1
        ? n[0]
        : r.reduce(
            (a, l, d) =>
              a +
              (f => {
                if (f._$cssResult$ === !0) return f.cssText
                if (typeof f == 'number') return f
                throw Error(
                  "Value passed to 'css' function must be a 'css' function result: " +
                    f +
                    ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.",
                )
              })(l) +
              n[d + 1],
            n[0],
          )
    return new mh(i, n, pa)
  },
  K0 = (n, r) => {
    if (fa)
      n.adoptedStyleSheets = r.map(i =>
        i instanceof CSSStyleSheet ? i : i.styleSheet,
      )
    else
      for (const i of r) {
        const a = document.createElement('style'),
          l = ao.litNonce
        l !== void 0 && a.setAttribute('nonce', l),
          (a.textContent = i.cssText),
          n.appendChild(a)
      }
  },
  uu = fa
    ? n => n
    : n =>
        n instanceof CSSStyleSheet
          ? (r => {
              let i = ''
              for (const a of r.cssRules) i += a.cssText
              return dt(i)
            })(n)
          : n
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const {
    is: V0,
    defineProperty: X0,
    getOwnPropertyDescriptor: Z0,
    getOwnPropertyNames: j0,
    getOwnPropertySymbols: J0,
    getPrototypeOf: Q0,
  } = Object,
  On = globalThis,
  hu = On.trustedTypes,
  ty = hu ? hu.emptyScript : '',
  Js = On.reactiveElementPolyfillSupport,
  Qr = (n, r) => n,
  po = {
    toAttribute(n, r) {
      switch (r) {
        case Boolean:
          n = n ? ty : null
          break
        case Object:
        case Array:
          n = n == null ? n : JSON.stringify(n)
      }
      return n
    },
    fromAttribute(n, r) {
      let i = n
      switch (r) {
        case Boolean:
          i = n !== null
          break
        case Number:
          i = n === null ? null : Number(n)
          break
        case Object:
        case Array:
          try {
            i = JSON.parse(n)
          } catch {
            i = null
          }
      }
      return i
    },
  },
  ga = (n, r) => !V0(n, r),
  du = {
    attribute: !0,
    type: String,
    converter: po,
    reflect: !1,
    hasChanged: ga,
  }
Symbol.metadata ?? (Symbol.metadata = Symbol('metadata')),
  On.litPropertyMetadata ??
    (On.litPropertyMetadata = /* @__PURE__ */ new WeakMap())
class vr extends HTMLElement {
  static addInitializer(r) {
    this._$Ei(), (this.l ?? (this.l = [])).push(r)
  }
  static get observedAttributes() {
    return this.finalize(), this._$Eh && [...this._$Eh.keys()]
  }
  static createProperty(r, i = du) {
    if (
      (i.state && (i.attribute = !1),
      this._$Ei(),
      this.elementProperties.set(r, i),
      !i.noAccessor)
    ) {
      const a = Symbol(),
        l = this.getPropertyDescriptor(r, a, i)
      l !== void 0 && X0(this.prototype, r, l)
    }
  }
  static getPropertyDescriptor(r, i, a) {
    const { get: l, set: d } = Z0(this.prototype, r) ?? {
      get() {
        return this[i]
      },
      set(f) {
        this[i] = f
      },
    }
    return {
      get() {
        return l == null ? void 0 : l.call(this)
      },
      set(f) {
        const v = l == null ? void 0 : l.call(this)
        d.call(this, f), this.requestUpdate(r, v, a)
      },
      configurable: !0,
      enumerable: !0,
    }
  }
  static getPropertyOptions(r) {
    return this.elementProperties.get(r) ?? du
  }
  static _$Ei() {
    if (this.hasOwnProperty(Qr('elementProperties'))) return
    const r = Q0(this)
    r.finalize(),
      r.l !== void 0 && (this.l = [...r.l]),
      (this.elementProperties = new Map(r.elementProperties))
  }
  static finalize() {
    if (this.hasOwnProperty(Qr('finalized'))) return
    if (
      ((this.finalized = !0),
      this._$Ei(),
      this.hasOwnProperty(Qr('properties')))
    ) {
      const i = this.properties,
        a = [...j0(i), ...J0(i)]
      for (const l of a) this.createProperty(l, i[l])
    }
    const r = this[Symbol.metadata]
    if (r !== null) {
      const i = litPropertyMetadata.get(r)
      if (i !== void 0) for (const [a, l] of i) this.elementProperties.set(a, l)
    }
    this._$Eh = /* @__PURE__ */ new Map()
    for (const [i, a] of this.elementProperties) {
      const l = this._$Eu(i, a)
      l !== void 0 && this._$Eh.set(l, i)
    }
    this.elementStyles = this.finalizeStyles(this.styles)
  }
  static finalizeStyles(r) {
    const i = []
    if (Array.isArray(r)) {
      const a = new Set(r.flat(1 / 0).reverse())
      for (const l of a) i.unshift(uu(l))
    } else r !== void 0 && i.push(uu(r))
    return i
  }
  static _$Eu(r, i) {
    const a = i.attribute
    return a === !1
      ? void 0
      : typeof a == 'string'
      ? a
      : typeof r == 'string'
      ? r.toLowerCase()
      : void 0
  }
  constructor() {
    super(),
      (this._$Ep = void 0),
      (this.isUpdatePending = !1),
      (this.hasUpdated = !1),
      (this._$Em = null),
      this._$Ev()
  }
  _$Ev() {
    var r
    ;(this._$ES = new Promise(i => (this.enableUpdating = i))),
      (this._$AL = /* @__PURE__ */ new Map()),
      this._$E_(),
      this.requestUpdate(),
      (r = this.constructor.l) == null || r.forEach(i => i(this))
  }
  addController(r) {
    var i
    ;(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(r),
      this.renderRoot !== void 0 &&
        this.isConnected &&
        ((i = r.hostConnected) == null || i.call(r))
  }
  removeController(r) {
    var i
    ;(i = this._$EO) == null || i.delete(r)
  }
  _$E_() {
    const r = /* @__PURE__ */ new Map(),
      i = this.constructor.elementProperties
    for (const a of i.keys())
      this.hasOwnProperty(a) && (r.set(a, this[a]), delete this[a])
    r.size > 0 && (this._$Ep = r)
  }
  createRenderRoot() {
    const r =
      this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions)
    return K0(r, this.constructor.elementStyles), r
  }
  connectedCallback() {
    var r
    this.renderRoot ?? (this.renderRoot = this.createRenderRoot()),
      this.enableUpdating(!0),
      (r = this._$EO) == null ||
        r.forEach(i => {
          var a
          return (a = i.hostConnected) == null ? void 0 : a.call(i)
        })
  }
  enableUpdating(r) {}
  disconnectedCallback() {
    var r
    ;(r = this._$EO) == null ||
      r.forEach(i => {
        var a
        return (a = i.hostDisconnected) == null ? void 0 : a.call(i)
      })
  }
  attributeChangedCallback(r, i, a) {
    this._$AK(r, a)
  }
  _$EC(r, i) {
    var d
    const a = this.constructor.elementProperties.get(r),
      l = this.constructor._$Eu(r, a)
    if (l !== void 0 && a.reflect === !0) {
      const f = (
        ((d = a.converter) == null ? void 0 : d.toAttribute) !== void 0
          ? a.converter
          : po
      ).toAttribute(i, a.type)
      ;(this._$Em = r),
        f == null ? this.removeAttribute(l) : this.setAttribute(l, f),
        (this._$Em = null)
    }
  }
  _$AK(r, i) {
    var d
    const a = this.constructor,
      l = a._$Eh.get(r)
    if (l !== void 0 && this._$Em !== l) {
      const f = a.getPropertyOptions(l),
        v =
          typeof f.converter == 'function'
            ? { fromAttribute: f.converter }
            : ((d = f.converter) == null ? void 0 : d.fromAttribute) !== void 0
            ? f.converter
            : po
      ;(this._$Em = l),
        (this[l] = v.fromAttribute(i, f.type)),
        (this._$Em = null)
    }
  }
  requestUpdate(r, i, a) {
    if (r !== void 0) {
      if (
        (a ?? (a = this.constructor.getPropertyOptions(r)),
        !(a.hasChanged ?? ga)(this[r], i))
      )
        return
      this.P(r, i, a)
    }
    this.isUpdatePending === !1 && (this._$ES = this._$ET())
  }
  P(r, i, a) {
    this._$AL.has(r) || this._$AL.set(r, i),
      a.reflect === !0 &&
        this._$Em !== r &&
        (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(r)
  }
  async _$ET() {
    this.isUpdatePending = !0
    try {
      await this._$ES
    } catch (i) {
      Promise.reject(i)
    }
    const r = this.scheduleUpdate()
    return r != null && (await r), !this.isUpdatePending
  }
  scheduleUpdate() {
    return this.performUpdate()
  }
  performUpdate() {
    var a
    if (!this.isUpdatePending) return
    if (!this.hasUpdated) {
      if (
        (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()),
        this._$Ep)
      ) {
        for (const [d, f] of this._$Ep) this[d] = f
        this._$Ep = void 0
      }
      const l = this.constructor.elementProperties
      if (l.size > 0)
        for (const [d, f] of l)
          f.wrapped !== !0 ||
            this._$AL.has(d) ||
            this[d] === void 0 ||
            this.P(d, this[d], f)
    }
    let r = !1
    const i = this._$AL
    try {
      ;(r = this.shouldUpdate(i)),
        r
          ? (this.willUpdate(i),
            (a = this._$EO) == null ||
              a.forEach(l => {
                var d
                return (d = l.hostUpdate) == null ? void 0 : d.call(l)
              }),
            this.update(i))
          : this._$EU()
    } catch (l) {
      throw ((r = !1), this._$EU(), l)
    }
    r && this._$AE(i)
  }
  willUpdate(r) {}
  _$AE(r) {
    var i
    ;(i = this._$EO) == null ||
      i.forEach(a => {
        var l
        return (l = a.hostUpdated) == null ? void 0 : l.call(a)
      }),
      this.hasUpdated || ((this.hasUpdated = !0), this.firstUpdated(r)),
      this.updated(r)
  }
  _$EU() {
    ;(this._$AL = /* @__PURE__ */ new Map()), (this.isUpdatePending = !1)
  }
  get updateComplete() {
    return this.getUpdateComplete()
  }
  getUpdateComplete() {
    return this._$ES
  }
  shouldUpdate(r) {
    return !0
  }
  update(r) {
    this._$Ej && (this._$Ej = this._$Ej.forEach(i => this._$EC(i, this[i]))),
      this._$EU()
  }
  updated(r) {}
  firstUpdated(r) {}
}
;(vr.elementStyles = []),
  (vr.shadowRootOptions = { mode: 'open' }),
  (vr[Qr('elementProperties')] = /* @__PURE__ */ new Map()),
  (vr[Qr('finalized')] = /* @__PURE__ */ new Map()),
  Js == null || Js({ ReactiveElement: vr }),
  (On.reactiveElementVersions ?? (On.reactiveElementVersions = [])).push(
    '2.0.4',
  )
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const ti = globalThis,
  go = ti.trustedTypes,
  fu = go ? go.createPolicy('lit-html', { createHTML: n => n }) : void 0,
  bh = '$lit$',
  Tn = `lit$${Math.random().toFixed(9).slice(2)}$`,
  yh = '?' + Tn,
  ey = `<${yh}>`,
  jn = document,
  ni = () => jn.createComment(''),
  ri = n => n === null || (typeof n != 'object' && typeof n != 'function'),
  va = Array.isArray,
  ny = n =>
    va(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == 'function',
  Qs = `[ 	
\f\r]`,
  Zr = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
  pu = /-->/g,
  gu = />/g,
  Gn = RegExp(
    `>|${Qs}(?:([^\\s"'>=/]+)(${Qs}*=${Qs}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,
    'g',
  ),
  vu = /'/g,
  mu = /"/g,
  _h = /^(?:script|style|textarea|title)$/i,
  ry =
    n =>
    (r, ...i) => ({ _$litType$: n, strings: r, values: i }),
  X = ry(1),
  Jn = Symbol.for('lit-noChange'),
  Ft = Symbol.for('lit-nothing'),
  bu = /* @__PURE__ */ new WeakMap(),
  Vn = jn.createTreeWalker(jn, 129)
function wh(n, r) {
  if (!va(n) || !n.hasOwnProperty('raw'))
    throw Error('invalid template strings array')
  return fu !== void 0 ? fu.createHTML(r) : r
}
const iy = (n, r) => {
  const i = n.length - 1,
    a = []
  let l,
    d = r === 2 ? '<svg>' : r === 3 ? '<math>' : '',
    f = Zr
  for (let v = 0; v < i; v++) {
    const m = n[v]
    let _,
      k,
      C = -1,
      F = 0
    for (; F < m.length && ((f.lastIndex = F), (k = f.exec(m)), k !== null); )
      (F = f.lastIndex),
        f === Zr
          ? k[1] === '!--'
            ? (f = pu)
            : k[1] !== void 0
            ? (f = gu)
            : k[2] !== void 0
            ? (_h.test(k[2]) && (l = RegExp('</' + k[2], 'g')), (f = Gn))
            : k[3] !== void 0 && (f = Gn)
          : f === Gn
          ? k[0] === '>'
            ? ((f = l ?? Zr), (C = -1))
            : k[1] === void 0
            ? (C = -2)
            : ((C = f.lastIndex - k[2].length),
              (_ = k[1]),
              (f = k[3] === void 0 ? Gn : k[3] === '"' ? mu : vu))
          : f === mu || f === vu
          ? (f = Gn)
          : f === pu || f === gu
          ? (f = Zr)
          : ((f = Gn), (l = void 0))
    const T = f === Gn && n[v + 1].startsWith('/>') ? ' ' : ''
    d +=
      f === Zr
        ? m + ey
        : C >= 0
        ? (a.push(_), m.slice(0, C) + bh + m.slice(C) + Tn + T)
        : m + Tn + (C === -2 ? v : T)
  }
  return [
    wh(
      n,
      d + (n[i] || '<?>') + (r === 2 ? '</svg>' : r === 3 ? '</math>' : ''),
    ),
    a,
  ]
}
class ii {
  constructor({ strings: r, _$litType$: i }, a) {
    let l
    this.parts = []
    let d = 0,
      f = 0
    const v = r.length - 1,
      m = this.parts,
      [_, k] = iy(r, i)
    if (
      ((this.el = ii.createElement(_, a)),
      (Vn.currentNode = this.el.content),
      i === 2 || i === 3)
    ) {
      const C = this.el.content.firstChild
      C.replaceWith(...C.childNodes)
    }
    for (; (l = Vn.nextNode()) !== null && m.length < v; ) {
      if (l.nodeType === 1) {
        if (l.hasAttributes())
          for (const C of l.getAttributeNames())
            if (C.endsWith(bh)) {
              const F = k[f++],
                T = l.getAttribute(C).split(Tn),
                z = /([.?@])?(.*)/.exec(F)
              m.push({
                type: 1,
                index: d,
                name: z[2],
                strings: T,
                ctor:
                  z[1] === '.'
                    ? sy
                    : z[1] === '?'
                    ? ay
                    : z[1] === '@'
                    ? ly
                    : wo,
              }),
                l.removeAttribute(C)
            } else
              C.startsWith(Tn) &&
                (m.push({ type: 6, index: d }), l.removeAttribute(C))
        if (_h.test(l.tagName)) {
          const C = l.textContent.split(Tn),
            F = C.length - 1
          if (F > 0) {
            l.textContent = go ? go.emptyScript : ''
            for (let T = 0; T < F; T++)
              l.append(C[T], ni()),
                Vn.nextNode(),
                m.push({ type: 2, index: ++d })
            l.append(C[F], ni())
          }
        }
      } else if (l.nodeType === 8)
        if (l.data === yh) m.push({ type: 2, index: d })
        else {
          let C = -1
          for (; (C = l.data.indexOf(Tn, C + 1)) !== -1; )
            m.push({ type: 7, index: d }), (C += Tn.length - 1)
        }
      d++
    }
  }
  static createElement(r, i) {
    const a = jn.createElement('template')
    return (a.innerHTML = r), a
  }
}
function _r(n, r, i = n, a) {
  var f, v
  if (r === Jn) return r
  let l = a !== void 0 ? ((f = i._$Co) == null ? void 0 : f[a]) : i._$Cl
  const d = ri(r) ? void 0 : r._$litDirective$
  return (
    (l == null ? void 0 : l.constructor) !== d &&
      ((v = l == null ? void 0 : l._$AO) == null || v.call(l, !1),
      d === void 0 ? (l = void 0) : ((l = new d(n)), l._$AT(n, i, a)),
      a !== void 0 ? ((i._$Co ?? (i._$Co = []))[a] = l) : (i._$Cl = l)),
    l !== void 0 && (r = _r(n, l._$AS(n, r.values), l, a)),
    r
  )
}
class oy {
  constructor(r, i) {
    ;(this._$AV = []), (this._$AN = void 0), (this._$AD = r), (this._$AM = i)
  }
  get parentNode() {
    return this._$AM.parentNode
  }
  get _$AU() {
    return this._$AM._$AU
  }
  u(r) {
    const {
        el: { content: i },
        parts: a,
      } = this._$AD,
      l = ((r == null ? void 0 : r.creationScope) ?? jn).importNode(i, !0)
    Vn.currentNode = l
    let d = Vn.nextNode(),
      f = 0,
      v = 0,
      m = a[0]
    for (; m !== void 0; ) {
      if (f === m.index) {
        let _
        m.type === 2
          ? (_ = new si(d, d.nextSibling, this, r))
          : m.type === 1
          ? (_ = new m.ctor(d, m.name, m.strings, this, r))
          : m.type === 6 && (_ = new cy(d, this, r)),
          this._$AV.push(_),
          (m = a[++v])
      }
      f !== (m == null ? void 0 : m.index) && ((d = Vn.nextNode()), f++)
    }
    return (Vn.currentNode = jn), l
  }
  p(r) {
    let i = 0
    for (const a of this._$AV)
      a !== void 0 &&
        (a.strings !== void 0
          ? (a._$AI(r, a, i), (i += a.strings.length - 2))
          : a._$AI(r[i])),
        i++
  }
}
class si {
  get _$AU() {
    var r
    return ((r = this._$AM) == null ? void 0 : r._$AU) ?? this._$Cv
  }
  constructor(r, i, a, l) {
    ;(this.type = 2),
      (this._$AH = Ft),
      (this._$AN = void 0),
      (this._$AA = r),
      (this._$AB = i),
      (this._$AM = a),
      (this.options = l),
      (this._$Cv = (l == null ? void 0 : l.isConnected) ?? !0)
  }
  get parentNode() {
    let r = this._$AA.parentNode
    const i = this._$AM
    return (
      i !== void 0 &&
        (r == null ? void 0 : r.nodeType) === 11 &&
        (r = i.parentNode),
      r
    )
  }
  get startNode() {
    return this._$AA
  }
  get endNode() {
    return this._$AB
  }
  _$AI(r, i = this) {
    ;(r = _r(this, r, i)),
      ri(r)
        ? r === Ft || r == null || r === ''
          ? (this._$AH !== Ft && this._$AR(), (this._$AH = Ft))
          : r !== this._$AH && r !== Jn && this._(r)
        : r._$litType$ !== void 0
        ? this.$(r)
        : r.nodeType !== void 0
        ? this.T(r)
        : ny(r)
        ? this.k(r)
        : this._(r)
  }
  O(r) {
    return this._$AA.parentNode.insertBefore(r, this._$AB)
  }
  T(r) {
    this._$AH !== r && (this._$AR(), (this._$AH = this.O(r)))
  }
  _(r) {
    this._$AH !== Ft && ri(this._$AH)
      ? (this._$AA.nextSibling.data = r)
      : this.T(jn.createTextNode(r)),
      (this._$AH = r)
  }
  $(r) {
    var d
    const { values: i, _$litType$: a } = r,
      l =
        typeof a == 'number'
          ? this._$AC(r)
          : (a.el === void 0 &&
              (a.el = ii.createElement(wh(a.h, a.h[0]), this.options)),
            a)
    if (((d = this._$AH) == null ? void 0 : d._$AD) === l) this._$AH.p(i)
    else {
      const f = new oy(l, this),
        v = f.u(this.options)
      f.p(i), this.T(v), (this._$AH = f)
    }
  }
  _$AC(r) {
    let i = bu.get(r.strings)
    return i === void 0 && bu.set(r.strings, (i = new ii(r))), i
  }
  k(r) {
    va(this._$AH) || ((this._$AH = []), this._$AR())
    const i = this._$AH
    let a,
      l = 0
    for (const d of r)
      l === i.length
        ? i.push((a = new si(this.O(ni()), this.O(ni()), this, this.options)))
        : (a = i[l]),
        a._$AI(d),
        l++
    l < i.length && (this._$AR(a && a._$AB.nextSibling, l), (i.length = l))
  }
  _$AR(r = this._$AA.nextSibling, i) {
    var a
    for (
      (a = this._$AP) == null ? void 0 : a.call(this, !1, !0, i);
      r && r !== this._$AB;

    ) {
      const l = r.nextSibling
      r.remove(), (r = l)
    }
  }
  setConnected(r) {
    var i
    this._$AM === void 0 &&
      ((this._$Cv = r), (i = this._$AP) == null || i.call(this, r))
  }
}
class wo {
  get tagName() {
    return this.element.tagName
  }
  get _$AU() {
    return this._$AM._$AU
  }
  constructor(r, i, a, l, d) {
    ;(this.type = 1),
      (this._$AH = Ft),
      (this._$AN = void 0),
      (this.element = r),
      (this.name = i),
      (this._$AM = l),
      (this.options = d),
      a.length > 2 || a[0] !== '' || a[1] !== ''
        ? ((this._$AH = Array(a.length - 1).fill(new String())),
          (this.strings = a))
        : (this._$AH = Ft)
  }
  _$AI(r, i = this, a, l) {
    const d = this.strings
    let f = !1
    if (d === void 0)
      (r = _r(this, r, i, 0)),
        (f = !ri(r) || (r !== this._$AH && r !== Jn)),
        f && (this._$AH = r)
    else {
      const v = r
      let m, _
      for (r = d[0], m = 0; m < d.length - 1; m++)
        (_ = _r(this, v[a + m], i, m)),
          _ === Jn && (_ = this._$AH[m]),
          f || (f = !ri(_) || _ !== this._$AH[m]),
          _ === Ft ? (r = Ft) : r !== Ft && (r += (_ ?? '') + d[m + 1]),
          (this._$AH[m] = _)
    }
    f && !l && this.j(r)
  }
  j(r) {
    r === Ft
      ? this.element.removeAttribute(this.name)
      : this.element.setAttribute(this.name, r ?? '')
  }
}
class sy extends wo {
  constructor() {
    super(...arguments), (this.type = 3)
  }
  j(r) {
    this.element[this.name] = r === Ft ? void 0 : r
  }
}
class ay extends wo {
  constructor() {
    super(...arguments), (this.type = 4)
  }
  j(r) {
    this.element.toggleAttribute(this.name, !!r && r !== Ft)
  }
}
class ly extends wo {
  constructor(r, i, a, l, d) {
    super(r, i, a, l, d), (this.type = 5)
  }
  _$AI(r, i = this) {
    if ((r = _r(this, r, i, 0) ?? Ft) === Jn) return
    const a = this._$AH,
      l =
        (r === Ft && a !== Ft) ||
        r.capture !== a.capture ||
        r.once !== a.once ||
        r.passive !== a.passive,
      d = r !== Ft && (a === Ft || l)
    l && this.element.removeEventListener(this.name, this, a),
      d && this.element.addEventListener(this.name, this, r),
      (this._$AH = r)
  }
  handleEvent(r) {
    var i
    typeof this._$AH == 'function'
      ? this._$AH.call(
          ((i = this.options) == null ? void 0 : i.host) ?? this.element,
          r,
        )
      : this._$AH.handleEvent(r)
  }
}
class cy {
  constructor(r, i, a) {
    ;(this.element = r),
      (this.type = 6),
      (this._$AN = void 0),
      (this._$AM = i),
      (this.options = a)
  }
  get _$AU() {
    return this._$AM._$AU
  }
  _$AI(r) {
    _r(this, r)
  }
}
const ta = ti.litHtmlPolyfillSupport
ta == null || ta(ii, si),
  (ti.litHtmlVersions ?? (ti.litHtmlVersions = [])).push('3.2.1')
const uy = (n, r, i) => {
  const a = (i == null ? void 0 : i.renderBefore) ?? r
  let l = a._$litPart$
  if (l === void 0) {
    const d = (i == null ? void 0 : i.renderBefore) ?? null
    a._$litPart$ = l = new si(r.insertBefore(ni(), d), d, void 0, i ?? {})
  }
  return l._$AI(n), l
}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
let Xn = class extends vr {
  constructor() {
    super(...arguments),
      (this.renderOptions = { host: this }),
      (this._$Do = void 0)
  }
  createRenderRoot() {
    var i
    const r = super.createRenderRoot()
    return (
      (i = this.renderOptions).renderBefore ?? (i.renderBefore = r.firstChild),
      r
    )
  }
  update(r) {
    const i = this.render()
    this.hasUpdated || (this.renderOptions.isConnected = this.isConnected),
      super.update(r),
      (this._$Do = uy(i, this.renderRoot, this.renderOptions))
  }
  connectedCallback() {
    var r
    super.connectedCallback(), (r = this._$Do) == null || r.setConnected(!0)
  }
  disconnectedCallback() {
    var r
    super.disconnectedCallback(), (r = this._$Do) == null || r.setConnected(!1)
  }
  render() {
    return Jn
  }
}
var gh
;(Xn._$litElement$ = !0),
  (Xn.finalized = !0),
  (gh = globalThis.litElementHydrateSupport) == null ||
    gh.call(globalThis, { LitElement: Xn })
const ea = globalThis.litElementPolyfillSupport
ea == null || ea({ LitElement: Xn })
;(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push(
  '4.1.1',
)
var hy = en`
  :host {
    display: inline-block;
    width: 1em;
    height: 1em;
    box-sizing: content-box !important;
  }

  svg {
    display: block;
    height: 100%;
    width: 100%;
  }
`,
  $h = Object.defineProperty,
  dy = Object.defineProperties,
  fy = Object.getOwnPropertyDescriptor,
  py = Object.getOwnPropertyDescriptors,
  yu = Object.getOwnPropertySymbols,
  gy = Object.prototype.hasOwnProperty,
  vy = Object.prototype.propertyIsEnumerable,
  _u = (n, r, i) =>
    r in n
      ? $h(n, r, { enumerable: !0, configurable: !0, writable: !0, value: i })
      : (n[r] = i),
  ai = (n, r) => {
    for (var i in r || (r = {})) gy.call(r, i) && _u(n, i, r[i])
    if (yu) for (var i of yu(r)) vy.call(r, i) && _u(n, i, r[i])
    return n
  },
  xh = (n, r) => dy(n, py(r)),
  R = (n, r, i, a) => {
    for (
      var l = a > 1 ? void 0 : a ? fy(r, i) : r, d = n.length - 1, f;
      d >= 0;
      d--
    )
      (f = n[d]) && (l = (a ? f(r, i, l) : f(l)) || l)
    return a && l && $h(r, i, l), l
  },
  Sh = (n, r, i) => {
    if (!r.has(n)) throw TypeError('Cannot ' + i)
  },
  my = (n, r, i) => (Sh(n, r, 'read from private field'), r.get(n)),
  by = (n, r, i) => {
    if (r.has(n))
      throw TypeError('Cannot add the same private member more than once')
    r instanceof WeakSet ? r.add(n) : r.set(n, i)
  },
  yy = (n, r, i, a) => (Sh(n, r, 'write to private field'), r.set(n, i), i)
function le(n, r) {
  const i = ai(
    {
      waitUntilFirstUpdate: !1,
    },
    r,
  )
  return (a, l) => {
    const { update: d } = a,
      f = Array.isArray(n) ? n : [n]
    a.update = function (v) {
      f.forEach(m => {
        const _ = m
        if (v.has(_)) {
          const k = v.get(_),
            C = this[_]
          k !== C &&
            (!i.waitUntilFirstUpdate || this.hasUpdated) &&
            this[l](k, C)
        }
      }),
        d.call(this, v)
    }
  }
}
var vn = en`
  :host {
    box-sizing: border-box;
  }

  :host *,
  :host *::before,
  :host *::after {
    box-sizing: inherit;
  }

  [hidden] {
    display: none !important;
  }
`
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const _y = {
    attribute: !0,
    type: String,
    converter: po,
    reflect: !1,
    hasChanged: ga,
  },
  wy = (n = _y, r, i) => {
    const { kind: a, metadata: l } = i
    let d = globalThis.litPropertyMetadata.get(l)
    if (
      (d === void 0 &&
        globalThis.litPropertyMetadata.set(l, (d = /* @__PURE__ */ new Map())),
      d.set(i.name, n),
      a === 'accessor')
    ) {
      const { name: f } = i
      return {
        set(v) {
          const m = r.get.call(this)
          r.set.call(this, v), this.requestUpdate(f, m, n)
        },
        init(v) {
          return v !== void 0 && this.P(f, void 0, n), v
        },
      }
    }
    if (a === 'setter') {
      const { name: f } = i
      return function (v) {
        const m = this[f]
        r.call(this, v), this.requestUpdate(f, m, n)
      }
    }
    throw Error('Unsupported decorator location: ' + a)
  }
function V(n) {
  return (r, i) =>
    typeof i == 'object'
      ? wy(n, r, i)
      : ((a, l, d) => {
          const f = l.hasOwnProperty(d)
          return (
            l.constructor.createProperty(d, f ? { ...a, wrapped: !0 } : a),
            f ? Object.getOwnPropertyDescriptor(l, d) : void 0
          )
        })(n, r, i)
}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
function li(n) {
  return V({ ...n, state: !0, attribute: !1 })
}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
function $y(n) {
  return (r, i) => {
    const a = typeof r == 'function' ? r : r[i]
    Object.assign(a, n)
  }
}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const xy = (n, r, i) => (
  (i.configurable = !0),
  (i.enumerable = !0),
  Reflect.decorate && typeof r != 'object' && Object.defineProperty(n, r, i),
  i
)
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
function Ie(n, r) {
  return (i, a, l) => {
    const d = f => {
      var v
      return ((v = f.renderRoot) == null ? void 0 : v.querySelector(n)) ?? null
    }
    return xy(i, a, {
      get() {
        return d(this)
      },
    })
  }
}
var lo,
  Se = class extends Xn {
    constructor() {
      super(),
        by(this, lo, !1),
        (this.initialReflectedProperties = /* @__PURE__ */ new Map()),
        Object.entries(this.constructor.dependencies).forEach(([n, r]) => {
          this.constructor.define(n, r)
        })
    }
    emit(n, r) {
      const i = new CustomEvent(
        n,
        ai(
          {
            bubbles: !0,
            cancelable: !1,
            composed: !0,
            detail: {},
          },
          r,
        ),
      )
      return this.dispatchEvent(i), i
    }
    /* eslint-enable */
    static define(n, r = this, i = {}) {
      const a = customElements.get(n)
      if (!a) {
        try {
          customElements.define(n, r, i)
        } catch {
          customElements.define(n, class extends r {}, i)
        }
        return
      }
      let l = ' (unknown version)',
        d = l
      'version' in r && r.version && (l = ' v' + r.version),
        'version' in a && a.version && (d = ' v' + a.version),
        !(l && d && l === d) &&
          console.warn(
            `Attempted to register <${n}>${l}, but <${n}>${d} has already been registered.`,
          )
    }
    attributeChangedCallback(n, r, i) {
      my(this, lo) ||
        (this.constructor.elementProperties.forEach((a, l) => {
          a.reflect &&
            this[l] != null &&
            this.initialReflectedProperties.set(l, this[l])
        }),
        yy(this, lo, !0)),
        super.attributeChangedCallback(n, r, i)
    }
    willUpdate(n) {
      super.willUpdate(n),
        this.initialReflectedProperties.forEach((r, i) => {
          n.has(i) && this[i] == null && (this[i] = r)
        })
    }
  }
lo = /* @__PURE__ */ new WeakMap()
Se.version = '2.18.0'
Se.dependencies = {}
R([V()], Se.prototype, 'dir', 2)
R([V()], Se.prototype, 'lang', 2)
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const Sy = (n, r) => (n == null ? void 0 : n._$litType$) !== void 0
var jr = Symbol(),
  ro = Symbol(),
  na,
  ra = /* @__PURE__ */ new Map(),
  Re = class extends Se {
    constructor() {
      super(...arguments),
        (this.initialRender = !1),
        (this.svg = null),
        (this.label = ''),
        (this.library = 'default')
    }
    /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */
    async resolveIcon(n, r) {
      var i
      let a
      if (r != null && r.spriteSheet)
        return (
          (this.svg = X`<svg part="svg">
        <use part="use" href="${n}"></use>
      </svg>`),
          this.svg
        )
      try {
        if (((a = await fetch(n, { mode: 'cors' })), !a.ok))
          return a.status === 410 ? jr : ro
      } catch {
        return ro
      }
      try {
        const l = document.createElement('div')
        l.innerHTML = await a.text()
        const d = l.firstElementChild
        if (
          ((i = d == null ? void 0 : d.tagName) == null
            ? void 0
            : i.toLowerCase()) !== 'svg'
        )
          return jr
        na || (na = new DOMParser())
        const v = na
          .parseFromString(d.outerHTML, 'text/html')
          .body.querySelector('svg')
        return v ? (v.part.add('svg'), document.adoptNode(v)) : jr
      } catch {
        return jr
      }
    }
    connectedCallback() {
      super.connectedCallback(), q0(this)
    }
    firstUpdated() {
      ;(this.initialRender = !0), this.setIcon()
    }
    disconnectedCallback() {
      super.disconnectedCallback(), Y0(this)
    }
    getIconSource() {
      const n = lu(this.library)
      return this.name && n
        ? {
            url: n.resolver(this.name),
            fromLibrary: !0,
          }
        : {
            url: this.src,
            fromLibrary: !1,
          }
    }
    handleLabelChange() {
      typeof this.label == 'string' && this.label.length > 0
        ? (this.setAttribute('role', 'img'),
          this.setAttribute('aria-label', this.label),
          this.removeAttribute('aria-hidden'))
        : (this.removeAttribute('role'),
          this.removeAttribute('aria-label'),
          this.setAttribute('aria-hidden', 'true'))
    }
    async setIcon() {
      var n
      const { url: r, fromLibrary: i } = this.getIconSource(),
        a = i ? lu(this.library) : void 0
      if (!r) {
        this.svg = null
        return
      }
      let l = ra.get(r)
      if (
        (l || ((l = this.resolveIcon(r, a)), ra.set(r, l)), !this.initialRender)
      )
        return
      const d = await l
      if ((d === ro && ra.delete(r), r === this.getIconSource().url)) {
        if (Sy(d)) {
          if (((this.svg = d), a)) {
            await this.updateComplete
            const f = this.shadowRoot.querySelector("[part='svg']")
            typeof a.mutator == 'function' && f && a.mutator(f)
          }
          return
        }
        switch (d) {
          case ro:
          case jr:
            ;(this.svg = null), this.emit('sl-error')
            break
          default:
            ;(this.svg = d.cloneNode(!0)),
              (n = a == null ? void 0 : a.mutator) == null ||
                n.call(a, this.svg),
              this.emit('sl-load')
        }
      }
    }
    render() {
      return this.svg
    }
  }
Re.styles = [vn, hy]
R([li()], Re.prototype, 'svg', 2)
R([V({ reflect: !0 })], Re.prototype, 'name', 2)
R([V()], Re.prototype, 'src', 2)
R([V()], Re.prototype, 'label', 2)
R([V({ reflect: !0 })], Re.prototype, 'library', 2)
R([le('label')], Re.prototype, 'handleLabelChange', 1)
R([le(['name', 'src', 'library'])], Re.prototype, 'setIcon', 1)
class vo extends Error {
  constructor(i = 'Invalid value', a) {
    super(i, a)
    Y(this, 'name', 'ValueError')
  }
}
var ae =
  typeof globalThis < 'u'
    ? globalThis
    : typeof window < 'u'
    ? window
    : typeof global < 'u'
    ? global
    : typeof self < 'u'
    ? self
    : {}
function $o(n) {
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, 'default')
    ? n.default
    : n
}
var Ch = { exports: {} }
;(function (n, r) {
  ;(function (i, a) {
    n.exports = a()
  })(ae, function () {
    var i = 1e3,
      a = 6e4,
      l = 36e5,
      d = 'millisecond',
      f = 'second',
      v = 'minute',
      m = 'hour',
      _ = 'day',
      k = 'week',
      C = 'month',
      F = 'quarter',
      T = 'year',
      z = 'date',
      w = 'Invalid Date',
      x =
        /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
      P =
        /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
      G = {
        name: 'en',
        weekdays:
          'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
        months:
          'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_',
          ),
        ordinal: function (W) {
          var D = ['th', 'st', 'nd', 'rd'],
            M = W % 100
          return '[' + W + (D[(M - 20) % 10] || D[M] || D[0]) + ']'
        },
      },
      U = function (W, D, M) {
        var H = String(W)
        return !H || H.length >= D
          ? W
          : '' + Array(D + 1 - H.length).join(M) + W
      },
      it = {
        s: U,
        z: function (W) {
          var D = -W.utcOffset(),
            M = Math.abs(D),
            H = Math.floor(M / 60),
            B = M % 60
          return (D <= 0 ? '+' : '-') + U(H, 2, '0') + ':' + U(B, 2, '0')
        },
        m: function W(D, M) {
          if (D.date() < M.date()) return -W(M, D)
          var H = 12 * (M.year() - D.year()) + (M.month() - D.month()),
            B = D.clone().add(H, C),
            at = M - B < 0,
            rt = D.clone().add(H + (at ? -1 : 1), C)
          return +(-(H + (M - B) / (at ? B - rt : rt - B)) || 0)
        },
        a: function (W) {
          return W < 0 ? Math.ceil(W) || 0 : Math.floor(W)
        },
        p: function (W) {
          return (
            { M: C, y: T, w: k, d: _, D: z, h: m, m: v, s: f, ms: d, Q: F }[
              W
            ] ||
            String(W || '')
              .toLowerCase()
              .replace(/s$/, '')
          )
        },
        u: function (W) {
          return W === void 0
        },
      },
      J = 'en',
      q = {}
    q[J] = G
    var I = '$isDayjsObject',
      L = function (W) {
        return W instanceof mt || !(!W || !W[I])
      },
      nt = function W(D, M, H) {
        var B
        if (!D) return J
        if (typeof D == 'string') {
          var at = D.toLowerCase()
          q[at] && (B = at), M && ((q[at] = M), (B = at))
          var rt = D.split('-')
          if (!B && rt.length > 1) return W(rt[0])
        } else {
          var ft = D.name
          ;(q[ft] = D), (B = ft)
        }
        return !H && B && (J = B), B || (!H && J)
      },
      ot = function (W, D) {
        if (L(W)) return W.clone()
        var M = typeof D == 'object' ? D : {}
        return (M.date = W), (M.args = arguments), new mt(M)
      },
      j = it
    ;(j.l = nt),
      (j.i = L),
      (j.w = function (W, D) {
        return ot(W, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset })
      })
    var mt = (function () {
        function W(M) {
          ;(this.$L = nt(M.locale, null, !0)),
            this.parse(M),
            (this.$x = this.$x || M.x || {}),
            (this[I] = !0)
        }
        var D = W.prototype
        return (
          (D.parse = function (M) {
            ;(this.$d = (function (H) {
              var B = H.date,
                at = H.utc
              if (B === null) return /* @__PURE__ */ new Date(NaN)
              if (j.u(B)) return /* @__PURE__ */ new Date()
              if (B instanceof Date) return new Date(B)
              if (typeof B == 'string' && !/Z$/i.test(B)) {
                var rt = B.match(x)
                if (rt) {
                  var ft = rt[2] - 1 || 0,
                    zt = (rt[7] || '0').substring(0, 3)
                  return at
                    ? new Date(
                        Date.UTC(
                          rt[1],
                          ft,
                          rt[3] || 1,
                          rt[4] || 0,
                          rt[5] || 0,
                          rt[6] || 0,
                          zt,
                        ),
                      )
                    : new Date(
                        rt[1],
                        ft,
                        rt[3] || 1,
                        rt[4] || 0,
                        rt[5] || 0,
                        rt[6] || 0,
                        zt,
                      )
                }
              }
              return new Date(B)
            })(M)),
              this.init()
          }),
          (D.init = function () {
            var M = this.$d
            ;(this.$y = M.getFullYear()),
              (this.$M = M.getMonth()),
              (this.$D = M.getDate()),
              (this.$W = M.getDay()),
              (this.$H = M.getHours()),
              (this.$m = M.getMinutes()),
              (this.$s = M.getSeconds()),
              (this.$ms = M.getMilliseconds())
          }),
          (D.$utils = function () {
            return j
          }),
          (D.isValid = function () {
            return this.$d.toString() !== w
          }),
          (D.isSame = function (M, H) {
            var B = ot(M)
            return this.startOf(H) <= B && B <= this.endOf(H)
          }),
          (D.isAfter = function (M, H) {
            return ot(M) < this.startOf(H)
          }),
          (D.isBefore = function (M, H) {
            return this.endOf(H) < ot(M)
          }),
          (D.$g = function (M, H, B) {
            return j.u(M) ? this[H] : this.set(B, M)
          }),
          (D.unix = function () {
            return Math.floor(this.valueOf() / 1e3)
          }),
          (D.valueOf = function () {
            return this.$d.getTime()
          }),
          (D.startOf = function (M, H) {
            var B = this,
              at = !!j.u(H) || H,
              rt = j.p(M),
              ft = function (fe, Zt) {
                var pe = j.w(
                  B.$u ? Date.UTC(B.$y, Zt, fe) : new Date(B.$y, Zt, fe),
                  B,
                )
                return at ? pe : pe.endOf(_)
              },
              zt = function (fe, Zt) {
                return j.w(
                  B.toDate()[fe].apply(
                    B.toDate('s'),
                    (at ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Zt),
                  ),
                  B,
                )
              },
              Dt = this.$W,
              Gt = this.$M,
              Bt = this.$D,
              De = 'set' + (this.$u ? 'UTC' : '')
            switch (rt) {
              case T:
                return at ? ft(1, 0) : ft(31, 11)
              case C:
                return at ? ft(1, Gt) : ft(0, Gt + 1)
              case k:
                var nn = this.$locale().weekStart || 0,
                  Be = (Dt < nn ? Dt + 7 : Dt) - nn
                return ft(at ? Bt - Be : Bt + (6 - Be), Gt)
              case _:
              case z:
                return zt(De + 'Hours', 0)
              case m:
                return zt(De + 'Minutes', 1)
              case v:
                return zt(De + 'Seconds', 2)
              case f:
                return zt(De + 'Milliseconds', 3)
              default:
                return this.clone()
            }
          }),
          (D.endOf = function (M) {
            return this.startOf(M, !1)
          }),
          (D.$set = function (M, H) {
            var B,
              at = j.p(M),
              rt = 'set' + (this.$u ? 'UTC' : ''),
              ft = ((B = {}),
              (B[_] = rt + 'Date'),
              (B[z] = rt + 'Date'),
              (B[C] = rt + 'Month'),
              (B[T] = rt + 'FullYear'),
              (B[m] = rt + 'Hours'),
              (B[v] = rt + 'Minutes'),
              (B[f] = rt + 'Seconds'),
              (B[d] = rt + 'Milliseconds'),
              B)[at],
              zt = at === _ ? this.$D + (H - this.$W) : H
            if (at === C || at === T) {
              var Dt = this.clone().set(z, 1)
              Dt.$d[ft](zt),
                Dt.init(),
                (this.$d = Dt.set(z, Math.min(this.$D, Dt.daysInMonth())).$d)
            } else ft && this.$d[ft](zt)
            return this.init(), this
          }),
          (D.set = function (M, H) {
            return this.clone().$set(M, H)
          }),
          (D.get = function (M) {
            return this[j.p(M)]()
          }),
          (D.add = function (M, H) {
            var B,
              at = this
            M = Number(M)
            var rt = j.p(H),
              ft = function (Gt) {
                var Bt = ot(at)
                return j.w(Bt.date(Bt.date() + Math.round(Gt * M)), at)
              }
            if (rt === C) return this.set(C, this.$M + M)
            if (rt === T) return this.set(T, this.$y + M)
            if (rt === _) return ft(1)
            if (rt === k) return ft(7)
            var zt = ((B = {}), (B[v] = a), (B[m] = l), (B[f] = i), B)[rt] || 1,
              Dt = this.$d.getTime() + M * zt
            return j.w(Dt, this)
          }),
          (D.subtract = function (M, H) {
            return this.add(-1 * M, H)
          }),
          (D.format = function (M) {
            var H = this,
              B = this.$locale()
            if (!this.isValid()) return B.invalidDate || w
            var at = M || 'YYYY-MM-DDTHH:mm:ssZ',
              rt = j.z(this),
              ft = this.$H,
              zt = this.$m,
              Dt = this.$M,
              Gt = B.weekdays,
              Bt = B.months,
              De = B.meridiem,
              nn = function (Zt, pe, Ve, In) {
                return (Zt && (Zt[pe] || Zt(H, at))) || Ve[pe].slice(0, In)
              },
              Be = function (Zt) {
                return j.s(ft % 12 || 12, Zt, '0')
              },
              fe =
                De ||
                function (Zt, pe, Ve) {
                  var In = Zt < 12 ? 'AM' : 'PM'
                  return Ve ? In.toLowerCase() : In
                }
            return at.replace(P, function (Zt, pe) {
              return (
                pe ||
                (function (Ve) {
                  switch (Ve) {
                    case 'YY':
                      return String(H.$y).slice(-2)
                    case 'YYYY':
                      return j.s(H.$y, 4, '0')
                    case 'M':
                      return Dt + 1
                    case 'MM':
                      return j.s(Dt + 1, 2, '0')
                    case 'MMM':
                      return nn(B.monthsShort, Dt, Bt, 3)
                    case 'MMMM':
                      return nn(Bt, Dt)
                    case 'D':
                      return H.$D
                    case 'DD':
                      return j.s(H.$D, 2, '0')
                    case 'd':
                      return String(H.$W)
                    case 'dd':
                      return nn(B.weekdaysMin, H.$W, Gt, 2)
                    case 'ddd':
                      return nn(B.weekdaysShort, H.$W, Gt, 3)
                    case 'dddd':
                      return Gt[H.$W]
                    case 'H':
                      return String(ft)
                    case 'HH':
                      return j.s(ft, 2, '0')
                    case 'h':
                      return Be(1)
                    case 'hh':
                      return Be(2)
                    case 'a':
                      return fe(ft, zt, !0)
                    case 'A':
                      return fe(ft, zt, !1)
                    case 'm':
                      return String(zt)
                    case 'mm':
                      return j.s(zt, 2, '0')
                    case 's':
                      return String(H.$s)
                    case 'ss':
                      return j.s(H.$s, 2, '0')
                    case 'SSS':
                      return j.s(H.$ms, 3, '0')
                    case 'Z':
                      return rt
                  }
                  return null
                })(Zt) ||
                rt.replace(':', '')
              )
            })
          }),
          (D.utcOffset = function () {
            return 15 * -Math.round(this.$d.getTimezoneOffset() / 15)
          }),
          (D.diff = function (M, H, B) {
            var at,
              rt = this,
              ft = j.p(H),
              zt = ot(M),
              Dt = (zt.utcOffset() - this.utcOffset()) * a,
              Gt = this - zt,
              Bt = function () {
                return j.m(rt, zt)
              }
            switch (ft) {
              case T:
                at = Bt() / 12
                break
              case C:
                at = Bt()
                break
              case F:
                at = Bt() / 3
                break
              case k:
                at = (Gt - Dt) / 6048e5
                break
              case _:
                at = (Gt - Dt) / 864e5
                break
              case m:
                at = Gt / l
                break
              case v:
                at = Gt / a
                break
              case f:
                at = Gt / i
                break
              default:
                at = Gt
            }
            return B ? at : j.a(at)
          }),
          (D.daysInMonth = function () {
            return this.endOf(C).$D
          }),
          (D.$locale = function () {
            return q[this.$L]
          }),
          (D.locale = function (M, H) {
            if (!M) return this.$L
            var B = this.clone(),
              at = nt(M, H, !0)
            return at && (B.$L = at), B
          }),
          (D.clone = function () {
            return j.w(this.$d, this)
          }),
          (D.toDate = function () {
            return new Date(this.valueOf())
          }),
          (D.toJSON = function () {
            return this.isValid() ? this.toISOString() : null
          }),
          (D.toISOString = function () {
            return this.$d.toISOString()
          }),
          (D.toString = function () {
            return this.$d.toUTCString()
          }),
          W
        )
      })(),
      Et = mt.prototype
    return (
      (ot.prototype = Et),
      [
        ['$ms', d],
        ['$s', f],
        ['$m', v],
        ['$H', m],
        ['$W', _],
        ['$M', C],
        ['$y', T],
        ['$D', z],
      ].forEach(function (W) {
        Et[W[1]] = function (D) {
          return this.$g(D, W[0], W[1])
        }
      }),
      (ot.extend = function (W, D) {
        return W.$i || (W(D, mt, ot), (W.$i = !0)), ot
      }),
      (ot.locale = nt),
      (ot.isDayjs = L),
      (ot.unix = function (W) {
        return ot(1e3 * W)
      }),
      (ot.en = q[J]),
      (ot.Ls = q),
      (ot.p = {}),
      ot
    )
  })
})(Ch)
var Cy = Ch.exports
const ci = /* @__PURE__ */ $o(Cy)
var Ah = { exports: {} }
;(function (n, r) {
  ;(function (i, a) {
    n.exports = a()
  })(ae, function () {
    var i = 'minute',
      a = /[+-]\d\d(?::?\d\d)?/g,
      l = /([+-]|\d\d)/g
    return function (d, f, v) {
      var m = f.prototype
      ;(v.utc = function (w) {
        var x = { date: w, utc: !0, args: arguments }
        return new f(x)
      }),
        (m.utc = function (w) {
          var x = v(this.toDate(), { locale: this.$L, utc: !0 })
          return w ? x.add(this.utcOffset(), i) : x
        }),
        (m.local = function () {
          return v(this.toDate(), { locale: this.$L, utc: !1 })
        })
      var _ = m.parse
      m.parse = function (w) {
        w.utc && (this.$u = !0),
          this.$utils().u(w.$offset) || (this.$offset = w.$offset),
          _.call(this, w)
      }
      var k = m.init
      m.init = function () {
        if (this.$u) {
          var w = this.$d
          ;(this.$y = w.getUTCFullYear()),
            (this.$M = w.getUTCMonth()),
            (this.$D = w.getUTCDate()),
            (this.$W = w.getUTCDay()),
            (this.$H = w.getUTCHours()),
            (this.$m = w.getUTCMinutes()),
            (this.$s = w.getUTCSeconds()),
            (this.$ms = w.getUTCMilliseconds())
        } else k.call(this)
      }
      var C = m.utcOffset
      m.utcOffset = function (w, x) {
        var P = this.$utils().u
        if (P(w))
          return this.$u ? 0 : P(this.$offset) ? C.call(this) : this.$offset
        if (
          typeof w == 'string' &&
          ((w = (function (J) {
            J === void 0 && (J = '')
            var q = J.match(a)
            if (!q) return null
            var I = ('' + q[0]).match(l) || ['-', 0, 0],
              L = I[0],
              nt = 60 * +I[1] + +I[2]
            return nt === 0 ? 0 : L === '+' ? nt : -nt
          })(w)),
          w === null)
        )
          return this
        var G = Math.abs(w) <= 16 ? 60 * w : w,
          U = this
        if (x) return (U.$offset = G), (U.$u = w === 0), U
        if (w !== 0) {
          var it = this.$u
            ? this.toDate().getTimezoneOffset()
            : -1 * this.utcOffset()
          ;((U = this.local().add(G + it, i)).$offset = G),
            (U.$x.$localOffset = it)
        } else U = this.utc()
        return U
      }
      var F = m.format
      ;(m.format = function (w) {
        var x = w || (this.$u ? 'YYYY-MM-DDTHH:mm:ss[Z]' : '')
        return F.call(this, x)
      }),
        (m.valueOf = function () {
          var w = this.$utils().u(this.$offset)
            ? 0
            : this.$offset +
              (this.$x.$localOffset || this.$d.getTimezoneOffset())
          return this.$d.valueOf() - 6e4 * w
        }),
        (m.isUTC = function () {
          return !!this.$u
        }),
        (m.toISOString = function () {
          return this.toDate().toISOString()
        }),
        (m.toString = function () {
          return this.toDate().toUTCString()
        })
      var T = m.toDate
      m.toDate = function (w) {
        return w === 's' && this.$offset
          ? v(this.format('YYYY-MM-DD HH:mm:ss:SSS')).toDate()
          : T.call(this)
      }
      var z = m.diff
      m.diff = function (w, x, P) {
        if (w && this.$u === w.$u) return z.call(this, w, x, P)
        var G = this.local(),
          U = v(w).local()
        return z.call(G, U, x, P)
      }
    }
  })
})(Ah)
var Ay = Ah.exports
const Ey = /* @__PURE__ */ $o(Ay)
var Eh = { exports: {} }
;(function (n, r) {
  ;(function (i, a) {
    n.exports = a()
  })(ae, function () {
    var i,
      a,
      l = 1e3,
      d = 6e4,
      f = 36e5,
      v = 864e5,
      m =
        /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
      _ = 31536e6,
      k = 2628e6,
      C =
        /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,
      F = {
        years: _,
        months: k,
        days: v,
        hours: f,
        minutes: d,
        seconds: l,
        milliseconds: 1,
        weeks: 6048e5,
      },
      T = function (q) {
        return q instanceof it
      },
      z = function (q, I, L) {
        return new it(q, L, I.$l)
      },
      w = function (q) {
        return a.p(q) + 's'
      },
      x = function (q) {
        return q < 0
      },
      P = function (q) {
        return x(q) ? Math.ceil(q) : Math.floor(q)
      },
      G = function (q) {
        return Math.abs(q)
      },
      U = function (q, I) {
        return q
          ? x(q)
            ? { negative: !0, format: '' + G(q) + I }
            : { negative: !1, format: '' + q + I }
          : { negative: !1, format: '' }
      },
      it = (function () {
        function q(L, nt, ot) {
          var j = this
          if (
            ((this.$d = {}),
            (this.$l = ot),
            L === void 0 && ((this.$ms = 0), this.parseFromMilliseconds()),
            nt)
          )
            return z(L * F[w(nt)], this)
          if (typeof L == 'number')
            return (this.$ms = L), this.parseFromMilliseconds(), this
          if (typeof L == 'object')
            return (
              Object.keys(L).forEach(function (W) {
                j.$d[w(W)] = L[W]
              }),
              this.calMilliseconds(),
              this
            )
          if (typeof L == 'string') {
            var mt = L.match(C)
            if (mt) {
              var Et = mt.slice(2).map(function (W) {
                return W != null ? Number(W) : 0
              })
              return (
                (this.$d.years = Et[0]),
                (this.$d.months = Et[1]),
                (this.$d.weeks = Et[2]),
                (this.$d.days = Et[3]),
                (this.$d.hours = Et[4]),
                (this.$d.minutes = Et[5]),
                (this.$d.seconds = Et[6]),
                this.calMilliseconds(),
                this
              )
            }
          }
          return this
        }
        var I = q.prototype
        return (
          (I.calMilliseconds = function () {
            var L = this
            this.$ms = Object.keys(this.$d).reduce(function (nt, ot) {
              return nt + (L.$d[ot] || 0) * F[ot]
            }, 0)
          }),
          (I.parseFromMilliseconds = function () {
            var L = this.$ms
            ;(this.$d.years = P(L / _)),
              (L %= _),
              (this.$d.months = P(L / k)),
              (L %= k),
              (this.$d.days = P(L / v)),
              (L %= v),
              (this.$d.hours = P(L / f)),
              (L %= f),
              (this.$d.minutes = P(L / d)),
              (L %= d),
              (this.$d.seconds = P(L / l)),
              (L %= l),
              (this.$d.milliseconds = L)
          }),
          (I.toISOString = function () {
            var L = U(this.$d.years, 'Y'),
              nt = U(this.$d.months, 'M'),
              ot = +this.$d.days || 0
            this.$d.weeks && (ot += 7 * this.$d.weeks)
            var j = U(ot, 'D'),
              mt = U(this.$d.hours, 'H'),
              Et = U(this.$d.minutes, 'M'),
              W = this.$d.seconds || 0
            this.$d.milliseconds &&
              ((W += this.$d.milliseconds / 1e3),
              (W = Math.round(1e3 * W) / 1e3))
            var D = U(W, 'S'),
              M =
                L.negative ||
                nt.negative ||
                j.negative ||
                mt.negative ||
                Et.negative ||
                D.negative,
              H = mt.format || Et.format || D.format ? 'T' : '',
              B =
                (M ? '-' : '') +
                'P' +
                L.format +
                nt.format +
                j.format +
                H +
                mt.format +
                Et.format +
                D.format
            return B === 'P' || B === '-P' ? 'P0D' : B
          }),
          (I.toJSON = function () {
            return this.toISOString()
          }),
          (I.format = function (L) {
            var nt = L || 'YYYY-MM-DDTHH:mm:ss',
              ot = {
                Y: this.$d.years,
                YY: a.s(this.$d.years, 2, '0'),
                YYYY: a.s(this.$d.years, 4, '0'),
                M: this.$d.months,
                MM: a.s(this.$d.months, 2, '0'),
                D: this.$d.days,
                DD: a.s(this.$d.days, 2, '0'),
                H: this.$d.hours,
                HH: a.s(this.$d.hours, 2, '0'),
                m: this.$d.minutes,
                mm: a.s(this.$d.minutes, 2, '0'),
                s: this.$d.seconds,
                ss: a.s(this.$d.seconds, 2, '0'),
                SSS: a.s(this.$d.milliseconds, 3, '0'),
              }
            return nt.replace(m, function (j, mt) {
              return mt || String(ot[j])
            })
          }),
          (I.as = function (L) {
            return this.$ms / F[w(L)]
          }),
          (I.get = function (L) {
            var nt = this.$ms,
              ot = w(L)
            return (
              ot === 'milliseconds'
                ? (nt %= 1e3)
                : (nt = ot === 'weeks' ? P(nt / F[ot]) : this.$d[ot]),
              nt || 0
            )
          }),
          (I.add = function (L, nt, ot) {
            var j
            return (
              (j = nt ? L * F[w(nt)] : T(L) ? L.$ms : z(L, this).$ms),
              z(this.$ms + j * (ot ? -1 : 1), this)
            )
          }),
          (I.subtract = function (L, nt) {
            return this.add(L, nt, !0)
          }),
          (I.locale = function (L) {
            var nt = this.clone()
            return (nt.$l = L), nt
          }),
          (I.clone = function () {
            return z(this.$ms, this)
          }),
          (I.humanize = function (L) {
            return i().add(this.$ms, 'ms').locale(this.$l).fromNow(!L)
          }),
          (I.valueOf = function () {
            return this.asMilliseconds()
          }),
          (I.milliseconds = function () {
            return this.get('milliseconds')
          }),
          (I.asMilliseconds = function () {
            return this.as('milliseconds')
          }),
          (I.seconds = function () {
            return this.get('seconds')
          }),
          (I.asSeconds = function () {
            return this.as('seconds')
          }),
          (I.minutes = function () {
            return this.get('minutes')
          }),
          (I.asMinutes = function () {
            return this.as('minutes')
          }),
          (I.hours = function () {
            return this.get('hours')
          }),
          (I.asHours = function () {
            return this.as('hours')
          }),
          (I.days = function () {
            return this.get('days')
          }),
          (I.asDays = function () {
            return this.as('days')
          }),
          (I.weeks = function () {
            return this.get('weeks')
          }),
          (I.asWeeks = function () {
            return this.as('weeks')
          }),
          (I.months = function () {
            return this.get('months')
          }),
          (I.asMonths = function () {
            return this.as('months')
          }),
          (I.years = function () {
            return this.get('years')
          }),
          (I.asYears = function () {
            return this.as('years')
          }),
          q
        )
      })(),
      J = function (q, I, L) {
        return q
          .add(I.years() * L, 'y')
          .add(I.months() * L, 'M')
          .add(I.days() * L, 'd')
          .add(I.hours() * L, 'h')
          .add(I.minutes() * L, 'm')
          .add(I.seconds() * L, 's')
          .add(I.milliseconds() * L, 'ms')
      }
    return function (q, I, L) {
      ;(i = L),
        (a = L().$utils()),
        (L.duration = function (j, mt) {
          var Et = L.locale()
          return z(j, { $l: Et }, mt)
        }),
        (L.isDuration = T)
      var nt = I.prototype.add,
        ot = I.prototype.subtract
      ;(I.prototype.add = function (j, mt) {
        return T(j) ? J(this, j, 1) : nt.bind(this)(j, mt)
      }),
        (I.prototype.subtract = function (j, mt) {
          return T(j) ? J(this, j, -1) : ot.bind(this)(j, mt)
        })
    }
  })
})(Eh)
var ky = Eh.exports
const Ty = /* @__PURE__ */ $o(ky)
var kh = { exports: {} }
;(function (n, r) {
  ;(function (i, a) {
    n.exports = a()
  })(ae, function () {
    return function (i, a, l) {
      i = i || {}
      var d = a.prototype,
        f = {
          future: 'in %s',
          past: '%s ago',
          s: 'a few seconds',
          m: 'a minute',
          mm: '%d minutes',
          h: 'an hour',
          hh: '%d hours',
          d: 'a day',
          dd: '%d days',
          M: 'a month',
          MM: '%d months',
          y: 'a year',
          yy: '%d years',
        }
      function v(_, k, C, F) {
        return d.fromToBase(_, k, C, F)
      }
      ;(l.en.relativeTime = f),
        (d.fromToBase = function (_, k, C, F, T) {
          for (
            var z,
              w,
              x,
              P = C.$locale().relativeTime || f,
              G = i.thresholds || [
                { l: 's', r: 44, d: 'second' },
                { l: 'm', r: 89 },
                { l: 'mm', r: 44, d: 'minute' },
                { l: 'h', r: 89 },
                { l: 'hh', r: 21, d: 'hour' },
                { l: 'd', r: 35 },
                { l: 'dd', r: 25, d: 'day' },
                { l: 'M', r: 45 },
                { l: 'MM', r: 10, d: 'month' },
                { l: 'y', r: 17 },
                { l: 'yy', d: 'year' },
              ],
              U = G.length,
              it = 0;
            it < U;
            it += 1
          ) {
            var J = G[it]
            J.d && (z = F ? l(_).diff(C, J.d, !0) : C.diff(_, J.d, !0))
            var q = (i.rounding || Math.round)(Math.abs(z))
            if (((x = z > 0), q <= J.r || !J.r)) {
              q <= 1 && it > 0 && (J = G[it - 1])
              var I = P[J.l]
              T && (q = T('' + q)),
                (w =
                  typeof I == 'string' ? I.replace('%d', q) : I(q, k, J.l, x))
              break
            }
          }
          if (k) return w
          var L = x ? P.future : P.past
          return typeof L == 'function' ? L(w) : L.replace('%s', w)
        }),
        (d.to = function (_, k) {
          return v(_, k, this, !0)
        }),
        (d.from = function (_, k) {
          return v(_, k, this)
        })
      var m = function (_) {
        return _.$u ? l.utc() : l()
      }
      ;(d.toNow = function (_) {
        return this.to(m(this), _)
      }),
        (d.fromNow = function (_) {
          return this.from(m(this), _)
        })
    }
  })
})(kh)
var zy = kh.exports
const Oy = /* @__PURE__ */ $o(zy)
function Py(n) {
  throw new Error(
    'Could not dynamically require "' +
      n +
      '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.',
  )
}
var Ry = { exports: {} }
;(function (n, r) {
  ;(function (i, a) {
    typeof Py == 'function' ? (n.exports = a()) : (i.pluralize = a())
  })(ae, function () {
    var i = [],
      a = [],
      l = {},
      d = {},
      f = {}
    function v(w) {
      return typeof w == 'string' ? new RegExp('^' + w + '$', 'i') : w
    }
    function m(w, x) {
      return w === x
        ? x
        : w === w.toLowerCase()
        ? x.toLowerCase()
        : w === w.toUpperCase()
        ? x.toUpperCase()
        : w[0] === w[0].toUpperCase()
        ? x.charAt(0).toUpperCase() + x.substr(1).toLowerCase()
        : x.toLowerCase()
    }
    function _(w, x) {
      return w.replace(/\$(\d{1,2})/g, function (P, G) {
        return x[G] || ''
      })
    }
    function k(w, x) {
      return w.replace(x[0], function (P, G) {
        var U = _(x[1], arguments)
        return m(P === '' ? w[G - 1] : P, U)
      })
    }
    function C(w, x, P) {
      if (!w.length || l.hasOwnProperty(w)) return x
      for (var G = P.length; G--; ) {
        var U = P[G]
        if (U[0].test(x)) return k(x, U)
      }
      return x
    }
    function F(w, x, P) {
      return function (G) {
        var U = G.toLowerCase()
        return x.hasOwnProperty(U)
          ? m(G, U)
          : w.hasOwnProperty(U)
          ? m(G, w[U])
          : C(U, G, P)
      }
    }
    function T(w, x, P, G) {
      return function (U) {
        var it = U.toLowerCase()
        return x.hasOwnProperty(it)
          ? !0
          : w.hasOwnProperty(it)
          ? !1
          : C(it, it, P) === it
      }
    }
    function z(w, x, P) {
      var G = x === 1 ? z.singular(w) : z.plural(w)
      return (P ? x + ' ' : '') + G
    }
    return (
      (z.plural = F(f, d, i)),
      (z.isPlural = T(f, d, i)),
      (z.singular = F(d, f, a)),
      (z.isSingular = T(d, f, a)),
      (z.addPluralRule = function (w, x) {
        i.push([v(w), x])
      }),
      (z.addSingularRule = function (w, x) {
        a.push([v(w), x])
      }),
      (z.addUncountableRule = function (w) {
        if (typeof w == 'string') {
          l[w.toLowerCase()] = !0
          return
        }
        z.addPluralRule(w, '$0'), z.addSingularRule(w, '$0')
      }),
      (z.addIrregularRule = function (w, x) {
        ;(x = x.toLowerCase()), (w = w.toLowerCase()), (f[w] = x), (d[x] = w)
      }),
      [
        // Pronouns.
        ['I', 'we'],
        ['me', 'us'],
        ['he', 'they'],
        ['she', 'they'],
        ['them', 'them'],
        ['myself', 'ourselves'],
        ['yourself', 'yourselves'],
        ['itself', 'themselves'],
        ['herself', 'themselves'],
        ['himself', 'themselves'],
        ['themself', 'themselves'],
        ['is', 'are'],
        ['was', 'were'],
        ['has', 'have'],
        ['this', 'these'],
        ['that', 'those'],
        // Words ending in with a consonant and `o`.
        ['echo', 'echoes'],
        ['dingo', 'dingoes'],
        ['volcano', 'volcanoes'],
        ['tornado', 'tornadoes'],
        ['torpedo', 'torpedoes'],
        // Ends with `us`.
        ['genus', 'genera'],
        ['viscus', 'viscera'],
        // Ends with `ma`.
        ['stigma', 'stigmata'],
        ['stoma', 'stomata'],
        ['dogma', 'dogmata'],
        ['lemma', 'lemmata'],
        ['schema', 'schemata'],
        ['anathema', 'anathemata'],
        // Other irregular rules.
        ['ox', 'oxen'],
        ['axe', 'axes'],
        ['die', 'dice'],
        ['yes', 'yeses'],
        ['foot', 'feet'],
        ['eave', 'eaves'],
        ['goose', 'geese'],
        ['tooth', 'teeth'],
        ['quiz', 'quizzes'],
        ['human', 'humans'],
        ['proof', 'proofs'],
        ['carve', 'carves'],
        ['valve', 'valves'],
        ['looey', 'looies'],
        ['thief', 'thieves'],
        ['groove', 'grooves'],
        ['pickaxe', 'pickaxes'],
        ['passerby', 'passersby'],
      ].forEach(function (w) {
        return z.addIrregularRule(w[0], w[1])
      }),
      [
        [/s?$/i, 's'],
        [/[^\u0000-\u007F]$/i, '$0'],
        [/([^aeiou]ese)$/i, '$1'],
        [/(ax|test)is$/i, '$1es'],
        [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],
        [/(e[mn]u)s?$/i, '$1s'],
        [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],
        [
          /(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,
          '$1i',
        ],
        [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],
        [/(seraph|cherub)(?:im)?$/i, '$1im'],
        [/(her|at|gr)o$/i, '$1oes'],
        [
          /(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,
          '$1a',
        ],
        [
          /(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,
          '$1a',
        ],
        [/sis$/i, 'ses'],
        [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],
        [/([^aeiouy]|qu)y$/i, '$1ies'],
        [/([^ch][ieo][ln])ey$/i, '$1ies'],
        [/(x|ch|ss|sh|zz)$/i, '$1es'],
        [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
        [/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],
        [/(pe)(?:rson|ople)$/i, '$1ople'],
        [/(child)(?:ren)?$/i, '$1ren'],
        [/eaux$/i, '$0'],
        [/m[ae]n$/i, 'men'],
        ['thou', 'you'],
      ].forEach(function (w) {
        return z.addPluralRule(w[0], w[1])
      }),
      [
        [/s$/i, ''],
        [/(ss)$/i, '$1'],
        [
          /(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,
          '$1fe',
        ],
        [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],
        [/ies$/i, 'y'],
        [
          /\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,
          '$1ie',
        ],
        [/\b(mon|smil)ies$/i, '$1ey'],
        [/\b((?:tit)?m|l)ice$/i, '$1ouse'],
        [/(seraph|cherub)im$/i, '$1'],
        [
          /(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,
          '$1',
        ],
        [
          /(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,
          '$1sis',
        ],
        [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],
        [/(test)(?:is|es)$/i, '$1is'],
        [
          /(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,
          '$1us',
        ],
        [
          /(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,
          '$1um',
        ],
        [
          /(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,
          '$1on',
        ],
        [/(alumn|alg|vertebr)ae$/i, '$1a'],
        [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],
        [/(matr|append)ices$/i, '$1ix'],
        [/(pe)(rson|ople)$/i, '$1rson'],
        [/(child)ren$/i, '$1'],
        [/(eau)x?$/i, '$1'],
        [/men$/i, 'man'],
      ].forEach(function (w) {
        return z.addSingularRule(w[0], w[1])
      }),
      [
        // Singular words with no plurals.
        'adulthood',
        'advice',
        'agenda',
        'aid',
        'aircraft',
        'alcohol',
        'ammo',
        'analytics',
        'anime',
        'athletics',
        'audio',
        'bison',
        'blood',
        'bream',
        'buffalo',
        'butter',
        'carp',
        'cash',
        'chassis',
        'chess',
        'clothing',
        'cod',
        'commerce',
        'cooperation',
        'corps',
        'debris',
        'diabetes',
        'digestion',
        'elk',
        'energy',
        'equipment',
        'excretion',
        'expertise',
        'firmware',
        'flounder',
        'fun',
        'gallows',
        'garbage',
        'graffiti',
        'hardware',
        'headquarters',
        'health',
        'herpes',
        'highjinks',
        'homework',
        'housework',
        'information',
        'jeans',
        'justice',
        'kudos',
        'labour',
        'literature',
        'machinery',
        'mackerel',
        'mail',
        'media',
        'mews',
        'moose',
        'music',
        'mud',
        'manga',
        'news',
        'only',
        'personnel',
        'pike',
        'plankton',
        'pliers',
        'police',
        'pollution',
        'premises',
        'rain',
        'research',
        'rice',
        'salmon',
        'scissors',
        'series',
        'sewage',
        'shambles',
        'shrimp',
        'software',
        'species',
        'staff',
        'swine',
        'tennis',
        'traffic',
        'transportation',
        'trout',
        'tuna',
        'wealth',
        'welfare',
        'whiting',
        'wildebeest',
        'wildlife',
        'you',
        /pok[eé]mon$/i,
        // Regexes.
        /[^aeiou]ese$/i,
        // "chinese", "japanese"
        /deer$/i,
        // "deer", "reindeer"
        /fish$/i,
        // "fish", "blowfish", "angelfish"
        /measles$/i,
        /o[iu]s$/i,
        // "carnivorous"
        /pox$/i,
        // "chickpox", "smallpox"
        /sheep$/i,
      ].forEach(z.addUncountableRule),
      z
    )
  })
})(Ry)
ci.extend(Ey)
ci.extend(Ty)
ci.extend(Oy)
function Le(n = Le('"message" is required')) {
  throw new vo(n)
}
function $t(n) {
  return n === !1
}
function qt(n) {
  return [null, void 0].includes(n)
}
function ei(n) {
  return ba(qt, $t)(n)
}
function Th(n) {
  return n instanceof Element
}
function ma(n) {
  return typeof n == 'string'
}
function zh(n) {
  return typeof n == 'function'
}
function Oh(n) {
  return Array.isArray(n)
}
function xo(n) {
  return Oh(n) && n.length > 0
}
function ba(...n) {
  return function (i) {
    return n.reduce((a, l) => l(a), i)
  }
}
function Ph(n) {
  return typeof n == 'number' && Number.isFinite(n)
}
function Ly(n) {
  return ba(Ph, $t)(n)
}
function My(n) {
  return ['string', 'number', 'boolean', 'symbol'].includes(typeof n)
}
function Rh(n) {
  return typeof n == 'object' && ei(n) && n.constructor === Object
}
function Iy(n) {
  return Rh(n) && xo(Object.keys(n))
}
function Dy(n = 9) {
  const r = new Uint8Array(n)
  return (
    window.crypto.getRandomValues(r),
    Array.from(r, i => i.toString(36))
      .join('')
      .slice(0, n)
  )
}
function wu(n = 0, r = 'YYYY-MM-DD HH:mm:ss') {
  return ci.utc(n).format(r)
}
function $u(n = 0, r = 'YYYY-MM-DD HH:mm:ss') {
  return ci(n).format(r)
}
function Tt(n, r = '') {
  return n ? r : ''
}
function By(n, r = Error) {
  return n instanceof r
}
function ne(n, r = 'Invalid value') {
  if (qt(n) || $t(n)) throw new vo(r, By(r) ? { cause: r } : void 0)
  return !0
}
function Uy(n) {
  return qt(n) ? [] : Oh(n) ? n : [n]
}
function Ny(n = Le('"element" is required'), r = Le('"parent" is required')) {
  return {
    top: Math.round(
      n.getBoundingClientRect().top - r.getBoundingClientRect().top,
    ),
    left: Math.round(
      n.getBoundingClientRect().left - r.getBoundingClientRect().left,
    ),
  }
}
function Fy(
  n = Le('"element" is required'),
  r = Le('"parent" is required'),
  i = 'vertical',
  a = 'smooth',
) {
  ne(i in ['horizontal', 'vertical', 'both'], 'Invalid direction'),
    ne(a in ['smooth', 'auto'], 'Invalid behavior')
  const l = Ny(n, r),
    d = l.top + r.scrollTop,
    f = l.left + r.scrollLeft,
    v = r.scrollLeft,
    m = r.scrollLeft + r.offsetWidth,
    _ = r.scrollTop,
    k = r.scrollTop + r.offsetHeight
  ;(i === 'horizontal' || i === 'both') &&
    (f < v
      ? r.scrollTo({ left: f, behavior: a })
      : f + n.clientWidth > m &&
        r.scrollTo({
          left: f - r.offsetWidth + n.clientWidth,
          behavior: a,
        })),
    (i === 'vertical' || i === 'both') &&
      (d < _
        ? r.scrollTo({ top: d, behavior: a })
        : d + n.clientHeight > k &&
          r.scrollTo({
            top: d - r.offsetHeight + n.clientHeight,
            behavior: a,
          }))
}
class Hy {
  constructor(r = Le('EnumValue "key" is required'), i, a) {
    ;(this.key = r), (this.value = i), (this.title = a ?? i ?? this.value)
  }
}
function Yt(n = Le('"obj" is required to create a new Enum')) {
  ne(Iy(n), 'Enum values cannot be empty')
  const r = Object.assign({}, n),
    i = {
      includes: l,
      throwOnMiss: d,
      title: f,
      forEach: k,
      value: v,
      keys: C,
      values: F,
      item: _,
      key: m,
      items: T,
      entries: z,
      getValue: w,
    }
  for (const [x, P] of Object.entries(r)) {
    ne(ma(x) && Ly(parseInt(x)), `Key "${x}" is invalid`)
    const G = Uy(P)
    ne(
      G.every(U => qt(U) || My(U)),
      `Value "${P}" is invalid`,
    ) && (r[x] = new Hy(x, ...G))
  }
  const a = new Proxy(Object.preventExtensions(r), {
    get(x, P) {
      return P in i ? i[P] : Reflect.get(x, P).value
    },
    set() {
      throw new vo('Cannot change enum property')
    },
    deleteProperty() {
      throw new vo('Cannot delete enum property')
    },
  })
  function l(x) {
    return !!C().find(P => v(P) === x)
  }
  function d(x) {
    ne(l(x), `Value "${x}" does not exist in enum`)
  }
  function f(x) {
    var P
    return (P = T().find(G => G.value === x)) == null ? void 0 : P.title
  }
  function v(x) {
    return a[x]
  }
  function m(x) {
    var P
    return (P = T().find(G => G.value === x || G.title === x)) == null
      ? void 0
      : P.key
  }
  function _(x) {
    return r[x]
  }
  function k(x) {
    C().forEach(P => x(r[P]))
  }
  function C() {
    return Object.keys(r)
  }
  function F() {
    return C().map(x => v(x))
  }
  function T() {
    return C().map(x => _(x))
  }
  function z() {
    return C().map((x, P) => [x, v(x), _(x), P])
  }
  function w(x) {
    return v(m(x))
  }
  return a
}
Yt({
  Complete: ['complete', 'Complete'],
  Failed: ['failed', 'Failed'],
  Behind: ['behind', 'Behind'],
  Progress: ['progress', 'Progress'],
  InProgress: ['in progress', 'In Progress'],
  Pending: ['pending', 'Pending'],
  Skipped: ['skipped', 'Skipped'],
  Undefined: ['undefined', 'Undefined'],
})
const gr = Yt({
    Open: 'open',
    Close: 'close',
    Click: 'click',
    Keydown: 'keydown',
    Keyup: 'keyup',
    Focus: 'focus',
    Blur: 'blur',
    Submit: 'submit',
    Change: 'change',
  }),
  Wy = Yt({
    Base: 'base',
    Content: 'content',
    Tagline: 'tagline',
    Before: 'before',
    After: 'after',
    Info: 'info',
    Nav: 'nav',
    Default: void 0,
  }),
  xu = Yt({
    Active: 'active',
    Disabled: 'disabled',
    Open: 'open',
    Closed: 'closed',
  })
Yt({
  Form: 'FORM',
})
const io = Yt({
    Tab: 'Tab',
    Enter: 'Enter',
    Shift: 'Shift',
    Escape: 'Escape',
    Space: 'Space',
    End: 'End',
    Home: 'Home',
    Left: 'ArrowLeft',
    Up: 'ArrowUp',
    Right: 'ArrowRight',
    Down: 'ArrowDown',
  }),
  qy = Yt({
    Horizontal: 'horizontal',
    Vertical: 'vertical',
  }),
  Pt = Yt({
    XXS: '2xs',
    XS: 'xs',
    S: 's',
    M: 'm',
    L: 'l',
    XL: 'xl',
    XXL: '2xl',
  }),
  Qe = Yt({
    Left: 'left',
    Right: 'right',
    Center: 'center',
  }),
  Yy = Yt({
    Left: 'left',
    Right: 'right',
    Top: 'top',
    Bottom: 'bottom',
  }),
  Ke = Yt({
    Round: 'round',
    Pill: 'pill',
    Square: 'square',
    Circle: 'circle',
    Rect: 'rect',
  }),
  bt = Yt({
    Neutral: 'neutral',
    Undefined: 'undefined',
    Primary: 'primary',
    Translucent: 'translucent',
    Success: 'success',
    Danger: 'danger',
    Warning: 'warning',
    Gradient: 'gradient',
    Transparent: 'transparent',
    /* ------------------------------ */
    Action: 'action',
    Secondary: 'secondary-action',
    Alternative: 'alternative',
    Cancel: 'cancel',
    /* ------------------------------ */
    Failed: 'failed',
    InProgress: 'in-progress',
    Progress: 'progress',
    Skipped: 'skipped',
    Preempted: 'preempted',
    Pending: 'pending',
    Complete: 'complete',
    Behind: 'behind',
    /* ------------------------------ */
    IDE: 'ide',
    Lineage: 'lineage',
    Editor: 'editor',
    Folder: 'folder',
    File: 'file',
    Error: 'error',
    Changes: 'changes',
    ChangeAdd: 'change-add',
    ChangeRemove: 'change-remove',
    ChangeDirectly: 'change-directly',
    ChangeIndirectly: 'change-indirectly',
    ChangeMetadata: 'change-metadata',
    Backfill: 'backfill',
    Restatement: 'restatement',
    Audit: 'audit',
    Test: 'test',
    Macro: 'macro',
    Model: 'model',
    ModelVersion: 'model-version',
    ModelSQL: 'model-sql',
    ModelPython: 'model-python',
    ModelExternal: 'model-external',
    ModelSeed: 'model-seed',
    ModelUnknown: 'model-unknown',
    Column: 'column',
    Upstream: 'upstream',
    Downstream: 'downstream',
    Plan: 'plan',
    Run: 'run',
    Environment: 'environment',
    Breaking: 'breaking',
    NonBreaking: 'non-breaking',
    ForwardOnly: 'forward-only',
    Measure: 'measure',
  }),
  Su = Yt({
    Auto: 'auto',
    Full: 'full',
    Wide: 'wide',
    Compact: 'compact',
  }),
  Gy = Yt({
    Auto: 'auto',
    Full: 'full',
    Tall: 'tall',
    Short: 'short',
  }),
  mr = Object.freeze({
    ...Object.entries(Wy).reduce(
      (n, [r, i]) => ((n[`Part${r}`] = Cu('part', i)), n),
      {},
    ),
    SlotDefault: Cu('slot:not([name])'),
  })
function Cu(n = Le('"name" is required to create a selector'), r) {
  return qt(r) ? n : `[${n}="${r}"]`
}
var Ky = typeof ae == 'object' && ae && ae.Object === Object && ae,
  Vy = Ky,
  Xy = Vy,
  Zy = typeof self == 'object' && self && self.Object === Object && self,
  jy = Xy || Zy || Function('return this')(),
  ya = jy,
  Jy = ya,
  Qy = Jy.Symbol,
  _a = Qy,
  Au = _a,
  Lh = Object.prototype,
  t1 = Lh.hasOwnProperty,
  e1 = Lh.toString,
  Jr = Au ? Au.toStringTag : void 0
function n1(n) {
  var r = t1.call(n, Jr),
    i = n[Jr]
  try {
    n[Jr] = void 0
    var a = !0
  } catch {}
  var l = e1.call(n)
  return a && (r ? (n[Jr] = i) : delete n[Jr]), l
}
var r1 = n1,
  i1 = Object.prototype,
  o1 = i1.toString
function s1(n) {
  return o1.call(n)
}
var a1 = s1,
  Eu = _a,
  l1 = r1,
  c1 = a1,
  u1 = '[object Null]',
  h1 = '[object Undefined]',
  ku = Eu ? Eu.toStringTag : void 0
function d1(n) {
  return n == null
    ? n === void 0
      ? h1
      : u1
    : ku && ku in Object(n)
    ? l1(n)
    : c1(n)
}
var f1 = d1
function p1(n) {
  var r = typeof n
  return n != null && (r == 'object' || r == 'function')
}
var Mh = p1,
  g1 = f1,
  v1 = Mh,
  m1 = '[object AsyncFunction]',
  b1 = '[object Function]',
  y1 = '[object GeneratorFunction]',
  _1 = '[object Proxy]'
function w1(n) {
  if (!v1(n)) return !1
  var r = g1(n)
  return r == b1 || r == y1 || r == m1 || r == _1
}
var $1 = w1,
  x1 = ya,
  S1 = x1['__core-js_shared__'],
  C1 = S1,
  ia = C1,
  Tu = (function () {
    var n = /[^.]+$/.exec((ia && ia.keys && ia.keys.IE_PROTO) || '')
    return n ? 'Symbol(src)_1.' + n : ''
  })()
function A1(n) {
  return !!Tu && Tu in n
}
var E1 = A1,
  k1 = Function.prototype,
  T1 = k1.toString
function z1(n) {
  if (n != null) {
    try {
      return T1.call(n)
    } catch {}
    try {
      return n + ''
    } catch {}
  }
  return ''
}
var O1 = z1,
  P1 = $1,
  R1 = E1,
  L1 = Mh,
  M1 = O1,
  I1 = /[\\^$.*+?()[\]{}|]/g,
  D1 = /^\[object .+?Constructor\]$/,
  B1 = Function.prototype,
  U1 = Object.prototype,
  N1 = B1.toString,
  F1 = U1.hasOwnProperty,
  H1 = RegExp(
    '^' +
      N1.call(F1)
        .replace(I1, '\\$&')
        .replace(
          /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
          '$1.*?',
        ) +
      '$',
  )
function W1(n) {
  if (!L1(n) || R1(n)) return !1
  var r = P1(n) ? H1 : D1
  return r.test(M1(n))
}
var q1 = W1
function Y1(n, r) {
  return n == null ? void 0 : n[r]
}
var G1 = Y1,
  K1 = q1,
  V1 = G1
function X1(n, r) {
  var i = V1(n, r)
  return K1(i) ? i : void 0
}
var wa = X1,
  Z1 = wa
;(function () {
  try {
    var n = Z1(Object, 'defineProperty')
    return n({}, '', {}), n
  } catch {}
})()
function j1(n, r) {
  return n === r || (n !== n && r !== r)
}
var J1 = j1,
  Q1 = wa,
  t_ = Q1(Object, 'create'),
  So = t_,
  zu = So
function e_() {
  ;(this.__data__ = zu ? zu(null) : {}), (this.size = 0)
}
var n_ = e_
function r_(n) {
  var r = this.has(n) && delete this.__data__[n]
  return (this.size -= r ? 1 : 0), r
}
var i_ = r_,
  o_ = So,
  s_ = '__lodash_hash_undefined__',
  a_ = Object.prototype,
  l_ = a_.hasOwnProperty
function c_(n) {
  var r = this.__data__
  if (o_) {
    var i = r[n]
    return i === s_ ? void 0 : i
  }
  return l_.call(r, n) ? r[n] : void 0
}
var u_ = c_,
  h_ = So,
  d_ = Object.prototype,
  f_ = d_.hasOwnProperty
function p_(n) {
  var r = this.__data__
  return h_ ? r[n] !== void 0 : f_.call(r, n)
}
var g_ = p_,
  v_ = So,
  m_ = '__lodash_hash_undefined__'
function b_(n, r) {
  var i = this.__data__
  return (
    (this.size += this.has(n) ? 0 : 1),
    (i[n] = v_ && r === void 0 ? m_ : r),
    this
  )
}
var y_ = b_,
  __ = n_,
  w_ = i_,
  $_ = u_,
  x_ = g_,
  S_ = y_
function xr(n) {
  var r = -1,
    i = n == null ? 0 : n.length
  for (this.clear(); ++r < i; ) {
    var a = n[r]
    this.set(a[0], a[1])
  }
}
xr.prototype.clear = __
xr.prototype.delete = w_
xr.prototype.get = $_
xr.prototype.has = x_
xr.prototype.set = S_
var C_ = xr
function A_() {
  ;(this.__data__ = []), (this.size = 0)
}
var E_ = A_,
  k_ = J1
function T_(n, r) {
  for (var i = n.length; i--; ) if (k_(n[i][0], r)) return i
  return -1
}
var Co = T_,
  z_ = Co,
  O_ = Array.prototype,
  P_ = O_.splice
function R_(n) {
  var r = this.__data__,
    i = z_(r, n)
  if (i < 0) return !1
  var a = r.length - 1
  return i == a ? r.pop() : P_.call(r, i, 1), --this.size, !0
}
var L_ = R_,
  M_ = Co
function I_(n) {
  var r = this.__data__,
    i = M_(r, n)
  return i < 0 ? void 0 : r[i][1]
}
var D_ = I_,
  B_ = Co
function U_(n) {
  return B_(this.__data__, n) > -1
}
var N_ = U_,
  F_ = Co
function H_(n, r) {
  var i = this.__data__,
    a = F_(i, n)
  return a < 0 ? (++this.size, i.push([n, r])) : (i[a][1] = r), this
}
var W_ = H_,
  q_ = E_,
  Y_ = L_,
  G_ = D_,
  K_ = N_,
  V_ = W_
function Sr(n) {
  var r = -1,
    i = n == null ? 0 : n.length
  for (this.clear(); ++r < i; ) {
    var a = n[r]
    this.set(a[0], a[1])
  }
}
Sr.prototype.clear = q_
Sr.prototype.delete = Y_
Sr.prototype.get = G_
Sr.prototype.has = K_
Sr.prototype.set = V_
var X_ = Sr,
  Z_ = wa,
  j_ = ya,
  J_ = Z_(j_, 'Map'),
  Q_ = J_,
  Ou = C_,
  tw = X_,
  ew = Q_
function nw() {
  ;(this.size = 0),
    (this.__data__ = {
      hash: new Ou(),
      map: new (ew || tw)(),
      string: new Ou(),
    })
}
var rw = nw
function iw(n) {
  var r = typeof n
  return r == 'string' || r == 'number' || r == 'symbol' || r == 'boolean'
    ? n !== '__proto__'
    : n === null
}
var ow = iw,
  sw = ow
function aw(n, r) {
  var i = n.__data__
  return sw(r) ? i[typeof r == 'string' ? 'string' : 'hash'] : i.map
}
var Ao = aw,
  lw = Ao
function cw(n) {
  var r = lw(this, n).delete(n)
  return (this.size -= r ? 1 : 0), r
}
var uw = cw,
  hw = Ao
function dw(n) {
  return hw(this, n).get(n)
}
var fw = dw,
  pw = Ao
function gw(n) {
  return pw(this, n).has(n)
}
var vw = gw,
  mw = Ao
function bw(n, r) {
  var i = mw(this, n),
    a = i.size
  return i.set(n, r), (this.size += i.size == a ? 0 : 1), this
}
var yw = bw,
  _w = rw,
  ww = uw,
  $w = fw,
  xw = vw,
  Sw = yw
function Cr(n) {
  var r = -1,
    i = n == null ? 0 : n.length
  for (this.clear(); ++r < i; ) {
    var a = n[r]
    this.set(a[0], a[1])
  }
}
Cr.prototype.clear = _w
Cr.prototype.delete = ww
Cr.prototype.get = $w
Cr.prototype.has = xw
Cr.prototype.set = Sw
var Cw = Cr,
  Ih = Cw,
  Aw = 'Expected a function'
function $a(n, r) {
  if (typeof n != 'function' || (r != null && typeof r != 'function'))
    throw new TypeError(Aw)
  var i = function () {
    var a = arguments,
      l = r ? r.apply(this, a) : a[0],
      d = i.cache
    if (d.has(l)) return d.get(l)
    var f = n.apply(this, a)
    return (i.cache = d.set(l, f) || d), f
  }
  return (i.cache = new ($a.Cache || Ih)()), i
}
$a.Cache = Ih
var Ew = $a,
  kw = Ew,
  Tw = 500
function zw(n) {
  var r = kw(n, function (a) {
      return i.size === Tw && i.clear(), a
    }),
    i = r.cache
  return r
}
var Ow = zw,
  Pw = Ow,
  Rw =
    /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
  Lw = /\\(\\)?/g
Pw(function (n) {
  var r = []
  return (
    n.charCodeAt(0) === 46 && r.push(''),
    n.replace(Rw, function (i, a, l, d) {
      r.push(l ? d.replace(Lw, '$1') : a || i)
    }),
    r
  )
})
var Pu = _a,
  Ru = Pu ? Pu.prototype : void 0
Ru && Ru.toString
const Ge = Yt({
  UTC: ['utc', 'UTC'],
  Local: ['local', 'LOCAL'],
})
function Eo(n) {
  var r
  return (
    (r = class extends n {}),
    Y(r, 'shadowRootOptions', { ...n.shadowRootOptions, delegatesFocus: !0 }),
    r
  )
}
function Mw(n) {
  var r
  return (
    (r = class extends n {
      connectedCallback() {
        super.connectedCallback(), this.setTimezone(this.timezone)
      }
      get isLocal() {
        return this.timezone === Ge.Local
      }
      get isUTC() {
        return this.timezone === Ge.UTC
      }
      constructor() {
        super(), (this.timezone = Ge.UTC)
      }
      setTimezone(a = Ge.UTC) {
        this.timezone = Ge.includes(a) ? Ge.getValue(a) : Ge.UTC
      }
    }),
    Y(r, 'properties', {
      timezone: { type: Ge, converter: Ge.getValue },
    }),
    r
  )
}
function mn(n = Lu(Xn), ...r) {
  return (
    qt(n._$litElement$) && (r.push(n), (n = Lu(Xn))), ba(...r.flat())(Iw(n))
  )
}
function Lu(n) {
  return class extends n {}
}
class zn {
  constructor(r, i, a = {}) {
    Y(this, '_event')
    ;(this.original = i), (this.value = r), (this.meta = a)
  }
  get event() {
    return this._event
  }
  setEvent(r = Le('"event" is required to set event')) {
    this._event = r
  }
  static assert(r) {
    ne(r instanceof zn, 'Event "detail" should be instance of "EventDetail"')
  }
  static assertHandler(r) {
    return (
      ne(zh(r), '"eventHandler" should be a function'),
      function (i = Le('"event" is required')) {
        return zn.assert(i.detail), r(i)
      }
    )
  }
}
function Iw(n) {
  var r
  return (
    (r = class extends n {
      constructor() {
        super(),
          (this.uid = Dy()),
          (this.disabled = !1),
          (this.emit.EventDetail = zn)
      }
      firstUpdated() {
        var a
        if (
          (super.firstUpdated(),
          (a = this.elsSlots) == null ||
            a.forEach(l =>
              l.addEventListener(
                'slotchange',
                this._handleSlotChange.bind(this),
              ),
            ),
          ei(window.htmx))
        ) {
          const l = Array.from(this.renderRoot.querySelectorAll('a'))
          ;(this.closest('[hx-boost="true"]') ||
            this.closest('[data-hx-boost="true"]')) &&
            l.forEach(f => {
              $t(f.hasAttribute('hx-boost')) &&
                f.setAttribute(
                  'hx-boost',
                  this.hasAttribute('[hx-boost="false"]') ? 'false' : 'true',
                )
            }),
            window.htmx.process(this),
            window.htmx.process(this.renderRoot)
        }
      }
      get elSlot() {
        var a
        return (a = this.renderRoot) == null
          ? void 0
          : a.querySelector(mr.SlotDefault)
      }
      get elsSlots() {
        var a
        return (a = this.renderRoot) == null
          ? void 0
          : a.querySelectorAll('slot')
      }
      get elBase() {
        var a
        return (a = this.renderRoot) == null
          ? void 0
          : a.querySelector(mr.PartBase)
      }
      get elsSlotted() {
        return []
          .concat(
            Array.from(this.elsSlots).map(a =>
              a.assignedElements({ flatten: !0 }),
            ),
          )
          .flat()
      }
      clear() {
        r.clear(this)
      }
      emit(a = 'event', l) {
        if (
          ((l = Object.assign(
            {
              detail: void 0,
              bubbles: !0,
              cancelable: !1,
              composed: !0,
            },
            l,
          )),
          ei(l.detail))
        ) {
          if ($t(l.detail instanceof zn) && Rh(l.detail))
            if ('value' in l.detail) {
              const { value: d, ...f } = l.detail
              l.detail = new zn(d, void 0, f)
            } else l.detail = new zn(l.detail)
          ne(
            l.detail instanceof zn,
            'event "detail" must be instance of "EventDetail"',
          ),
            l.detail.setEvent(a)
        }
        return this.dispatchEvent(new CustomEvent(a, l))
      }
      setHidden(a = !1, l = 0) {
        setTimeout(() => {
          this.hidden = a
        }, l)
      }
      setDisabled(a = !1, l = 0) {
        setTimeout(() => {
          this.disabled = a
        }, l)
      }
      notify(a, l, d) {
        var f
        ;(f = a == null ? void 0 : a.emit) == null || f.call(a, l, d)
      }
      // We may want to ensure event detail when sending custom events from children components
      assertEventHandler(a = Le('"eventHandler" is required')) {
        return (
          ne(zh(a), '"eventHandler" should be a function'),
          this.emit.EventDetail.assertHandler(a.bind(this))
        )
      }
      getShadowRoot() {
        return this.renderRoot
      }
      _handleSlotChange(a) {
        ei(a.target) && (a.target.style.position = 'initial')
      }
      static clear(a) {
        Th(a) && (a.innerHTML = '')
      }
      static defineAs(
        a = Le('"tagName" is required to define custom element'),
      ) {
        qt(customElements.get(a)) && customElements.define(a, this)
      }
    }),
    Y(r, 'properties', {
      uid: { type: String },
      disabled: { type: Boolean, reflect: !0 },
      tabindex: { type: Number, reflect: !0 },
    }),
    r
  )
}
function Dw() {
  return dt(`
        :host([disabled]) { cursor: not-allowed; }
        :host([disabled]) > *,
        :host([disabled])::slotted(*) {
            pointer-events: none;
            opacity: 0.75;
        }
        :host(:focus),
        :host([disabled]),
        :host([disabled]) * { outline: none; }
    `)
}
function Bw() {
  return dt(`
        :host { box-sizing: border-box; }
        :host *,
        :host *::before,
        :host *::after { box-sizing: inherit; }
        :host[hidden] { display: none !important; }
    `)
}
function It() {
  return dt(`
        ${Bw()}
        ${Dw()}
    `)
}
function xa(n) {
  return dt(
    `
            :host(:focus-visible:not([disabled])) {
                
        outline: var(--half) solid var(--color-outline);
        outline-offset: var(--half);
        z-index: 1;
    
            }
    `,
  )
}
function Uw(n = ':host') {
  return dt(`
    ${n} {
        scroll-behavior: smooth;
        scrollbar-width: var(--size-scrollbar);
        scrollbar-width: thin;
        scrollbar-color: var(--color-scrollbar) transparent;
        scrollbar-base-color: var(--color-scrollbar);
        scrollbar-face-color: var(--color-scrollbar);
        scrollbar-track-color: transparent;
    }
    
    ${n}::-webkit-scrollbar {
        height: var(--size-scrollbar);
        width: var(--size-scrollbar);
        border-radius: var(--step-4);
        overflow: hidden;
    }
    
    ${n}::-webkit-scrollbar-track {
        background-color: transparent;
    }
    
    ${n}::-webkit-scrollbar-thumb {
        background: var(--color-scrollbar);
        border-radius: var(--step-4);
    }
  `)
}
function Nw(n = 'from-input') {
  return dt(`
        :host {
            --from-input-padding: var(--${n}-padding-y) var(--${n}-padding-x);
            --from-input-placeholder-color: var(--color-gray-300);
            --from-input-color: var(--color-gray-700);
            --from-input-color-error: var(--color-scarlet);
            --from-input-background: var(--color-scarlet-5);
            --from-input-font-size: var(--font-size);
            --from-input-text-align: var(--text-align);
            --from-input-box-shadow: inset 0 0 0 1px var(--color-gray-200);
            --from-input-radius: var(--radius-xs);
            --from-input-font-family: var(--font-sans);
            --form-input-box-shadow-hover: inset 0 0 0 1px var(--color-gray-500);
            --form-input-box-shadow-focus: inset 0 0 0 1px var(--color-gray-500);

            --${n}-padding: var(--from-input-padding);
            --${n}-placeholder-color: var(--from-input-placeholder-color);
            --${n}-color: var(--from-input-color);
            --${n}-font-size: var(--from-input-font-size);
            --${n}-text-align: var(--from-input-text-align);
            --${n}-box-shadow: var(--from-input-box-shadow);
            --${n}-radius: var(--from-input-radius);
            --${n}-background: transparent;
            --${n}-font-family: var(--from-input-font-family);
            --${n}-box-shadow-hover: var(--form-input-box-shadow-hover);
            --${n}-box-shadow-focus: var(--form-input-box-shadow-focus);
        }
        :host([error]) {
            --${n}-box-shadow: inset 0 0 0 1px var(--color-scarlet);
        }
      `)
}
function Ar(n = 'color') {
  return dt(`
          :host([variant="${bt.Neutral}"]),
          :host([variant="${bt.Undefined}"]) {
            --${n}-variant-10: var(--color-gray-10);
            --${n}-variant-15: var(--color-gray-15);
            --${n}-variant-125: var(--color-gray-125);
            --${n}-variant-150: var(--color-gray-150);
            --${n}-variant-525: var(--color-gray-525);
            --${n}-variant-550: var(--color-gray-550);
            --${n}-variant-725: var(--color-gray-725);
            --${n}-variant-750: var(--color-gray-750);

            --${n}-variant-shadow: var(--color-gray-200);
            --${n}-variant: var(--color-gray-700);
            --${n}-variant-lucid: var(--color-gray-5);
            --${n}-variant-light: var(--color-gray-100);
            --${n}-variant-dark: var(--color-gray-800);
          }
            :host-context([mode='dark']):host([variant="${bt.Neutral}"]),
            :host-context([mode='dark']):host([variant="${bt.Undefined}"]) {
                --${n}-variant: var(--color-gray-200);
                --${n}-variant-lucid: var(--color-gray-10);
            }
          :host([variant="${bt.Undefined}"]) {
            --${n}-variant-shadow: var(--color-gray-100);
            --${n}-variant: var(--color-gray-200);
            --${n}-variant-lucid: var(--color-gray-5);
            --${n}-variant-light: var(--color-gray-100);
            --${n}-variant-dark: var(--color-gray-500);
          }
          :host([variant="${bt.Success}"]),
          :host([variant="${bt.Complete}"]) {
            --${n}-variant-5: var(--color-emerald-5);
            --${n}-variant-10: var(--color-emerald-10);
            --${n}-variant: var(--color-emerald-500);
            --${n}-variant-lucid: var(--color-emerald-5);
            --${n}-variant-light: var(--color-emerald-100);
            --${n}-variant-dark: var(--color-emerald-800);
          }
          :host([variant="${bt.Warning}"]),
          :host([variant="${bt.Skipped}"]),
          :host([variant="${bt.Pending}"]) {
            --${n}-variant: var(--color-mandarin-500);
            --${n}-variant-lucid: var(--color-mandarin-5);
            --${n}-variant-light: var(--color-mandarin-100);
            --${n}-variant-dark: var(--color-mandarin-800);
          }
          :host([variant="${bt.Danger}"]),
          :host([variant="${bt.Behind}"]),
          :host([variant="${bt.Failed}"]) {
            --${n}-variant-5: var(--color-scarlet-5);
            --${n}-variant-10: var(--color-scarlet-10);
            --${n}-variant: var(--color-scarlet-500);
            --${n}-variant-lucid: var(--color-scarlet-5);
            --${n}-variant-lucid: var(--color-scarlet-5);
            --${n}-variant-light: var(--color-scarlet-100);
            --${n}-variant-dark: var(--color-scarlet-800);
          }
          :host([variant="${bt.ChangeAdd}"]) {
            --${n}-variant: var(--color-change-add);
            --${n}-variant-lucid: var(--color-change-add-5);
            --${n}-variant-light: var(--color-change-add-100);
            --${n}-variant-dark: var(--color-change-add-800);
          }
          :host([variant="${bt.ChangeRemove}"]) {
            --${n}-variant: var(--color-change-remove);
            --${n}-variant-lucid: var(--color-change-remove-5);
            --${n}-variant-light: var(--color-change-remove-100);
            --${n}-variant-dark: var(--color-change-remove-800);
          }
          :host([variant="${bt.ChangeDirectly}"]) {
            --${n}-variant: var(--color-change-directly-modified);
            --${n}-variant-lucid: var(--color-change-directly-modified-5);
            --${n}-variant-light: var(--color-change-directly-modified-100);
            --${n}-variant-dark: var(--color-change-directly-modified-800);
          }
          :host([variant="${bt.ChangeIndirectly}"]) {
            --${n}-variant: var(--color-change-indirectly-modified);
            --${n}-variant-lucid: var(--color-change-indirectly-modified-5);
            --${n}-variant-light: var(--color-change-indirectly-modified-100);
            --${n}-variant-dark: var(--color-change-indirectly-modified-800);
          }
          :host([variant="${bt.ChangeMetadata}"]) {
            --${n}-variant: var(--color-change-metadata);
            --${n}-variant-lucid: var(--color-change-metadata-5);
            --${n}-variant-light: var(--color-change-metadata-100);
            --${n}-variant-dark: var(--color-change-metadata-800);
          }
          :host([variant="${bt.Backfill}"]) {
            --${n}-variant: var(--color-backfill);
            --${n}-variant-lucid: var(--color-backfill-5);
            --${n}-variant-light: var(--color-backfill-100);
            --${n}-variant-dark: var(--color-backfill-800);
          }
          :host([variant="${bt.Model}"]),
          :host([variant="${bt.Primary}"]) {
            --${n}-variant: var(--color-deep-blue);
            --${n}-variant-lucid: var(--color-deep-blue-5);
            --${n}-variant-light: var(--color-deep-blue-100);
            --${n}-variant-dark: var(--color-deep-blue-800);
          }
          :host([variant="${bt.Plan}"]) {
            --${n}-variant: var(--color-plan);
            --${n}-variant-lucid: var(--color-plan-5);
            --${n}-variant-light: var(--color-plan-100);
            --${n}-variant-dark: var(--color-plan-800);
          }
          :host([variant="${bt.Run}"]) {
            --${n}-variant: var(--color-run);
            --${n}-variant-lucid: var(--color-run-5);
            --${n}-variant-light: var(--color-run-100);
            --${n}-variant-dark: var(--color-run-800);
          }
          :host([variant="${bt.Environment}"]) {
            --${n}-variant: var(--color-environment);
            --${n}-variant-lucid: var(--color-environment-5);
            --${n}-variant-light: var(--color-environment-100);
            --${n}-variant-dark: var(--color-environment-800);
          }
        :host([variant="${bt.Progress}"]),
        :host([variant="${bt.InProgress}"]) {
            --${n}-variant: var(--color-status-progress);
            --${n}-variant-lucid: var(--color-status-progress-5);
            --${n}-variant-light: var(--color-status-progress-100);
            --${n}-variant-dark: var(--color-status-progress-800);
        }
      `)
}
function Fw(n = '') {
  return dt(`
        :host([inverse]) {
            --${n}-background: var(--color-variant);
            --${n}-color: var(--color-variant-light);
        }
    `)
}
function Hw(n = '') {
  return dt(`
        :host([ghost]:not([inverse])) {
            --${n}-background: transparent;
        }
        :host([disabled][ghost]:not([inverse])) {
            --${n}-background: var(--color-variant-light);
        }
    `)
}
function Ww(n = '') {
  return dt(`
        :host(:hover:not([disabled])) {
            --${n}-background: var(--color-variant-125);
        }
        :host(:active:not([disabled])) {
            --${n}-background: var(--color-variant-150);
        }
        :host([inverse]:hover:not([disabled])) {
            --${n}-background: var(--color-variant-525);
        }
        :host([inverse]:active:not([disabled])) {
            --${n}-background: var(--color-variant-550);
        }
    `)
}
function ui(n = '', r) {
  return dt(`
        :host([shape="${Ke.Rect}"]) {
            --${n}-radius: 0;
        }        
        :host([shape="${Ke.Round}"]) {
            --${n}-radius: var(--from-input-radius, var(--radius-xs));
        }
        :host([shape="${Ke.Pill}"]) {
            --${n}-radius: calc(var(--${n}-font-size) * 2);
        }
        :host([shape="${Ke.Circle}"]) {
            --${n}-width: calc(var(--${n}-font-size) * 2);
            --${n}-height: calc(var(--${n}-font-size) * 2);
            --${n}-padding-y: 0;
            --${n}-padding-x: 0;
            --${n}-radius: 100%;
        }
        :host([shape="${Ke.Square}"]) {
            --${n}-width: calc(var(--${n}-font-size) * 2);
            --${n}-height: calc(var(--${n}-font-size) * 2);
            --${n}-padding-y: 0;
            --${n}-padding-x: 0;
            --${n}-radius: 0;
        }
    `)
}
function qw() {
  return dt(`
        :host([side="${Qe.Left}"]) {
            --text-align: left;
        }
        :host([side="${Qe.Center}"]) {
            --text-align: center;
        }
        :host([side="${Qe.Right}"]) {
            --text-align: right;
        }
    `)
}
function Yw() {
  return dt(`
        :host([shadow]) {
            --shadow: 0 1px var(--half) 0 var(--color-variant-shadow);
        }
    `)
}
function Gw() {
  return dt(`
        :host([outline]) {
            --shadow-inset: inset 0 0 0 var(--half) var(--color-variant);
        }
    `)
}
function Kw(n = 'label', r = '') {
  return dt(`
        ${n} {
            font-weight: var(--text-semibold);
            color: var(${r ? `--${r}-color` : '--color-gray-700'});
        }
    `)
}
function bn(n = 'item', r = 1.25, i = 4) {
  return dt(`
        :host {
            --${n}-padding-x: round(up, calc(var(--${n}-font-size) / ${r} * var(--padding-x-factor, 1)), var(--half));
            --${n}-padding-y: round(up, calc(var(--${n}-font-size) / ${i} * var(--padding-y-factor, 1)), var(--half));
        }
    `)
}
function Vw(n = '') {
  return dt(`
        :host([horizontal="compact"]) {
            --padding-x-factor: 0.5;
        }
        :host([horizontal="wide"]) {
            --padding-x-factor: 1.5;
        }
        :host([horizontal="full"]) {
            --${n}-width: 100%;
            width: var(--${n}-width);
        }
        :host([vertical="tall"]) {
            --padding-y-factor: 1.25;
        }
        :host([vertical="short"]) {
            --padding-y-factor: 0.75;
        }
        :host([vertical="full"]) {
            --${n}-height: 100%;
            height: var(--${n}-height);
        }
    `)
}
function ce(n) {
  const r = n ? `--${n}-font-size` : '--font-size',
    i = n ? `--${n}-font-weight` : '--font-size'
  return dt(`
        :host {
            ${i}: var(--text-medium);
            ${r}: var(--text-s);
        }
        :host([size="${Pt.XXS}"]) {
            ${i}: var(--text-semibold);
            ${r}: var(--text-2xs);
        }
        :host([size="${Pt.XS}"]) {
            ${i}: var(--text-semibold);
            ${r}: var(--text-xs);
        }
        :host([size="${Pt.S}"]) {
            ${i}: var(--text-medium);
            ${r}: var(--text-s);
        }
        :host([size="${Pt.M}"]) {
            ${i}: var(--text-medium);
            ${r}: var(--text-m);
        }
        :host([size="${Pt.L}"]) {
            ${i}: var(--text-normal);
            ${r}: var(--text-l);
        }
        :host([size="${Pt.XL}"]) {
            ${i}: var(--text-normal);
            ${r}: var(--text-xl);
        }
        :host([size="${Pt.XXL}"]) {
            ${i}: var(--text-normal);
            ${r}: var(--text-2xl);
        }
    `)
}
vh('heroicons', {
  resolver: n =>
    `https://cdn.jsdelivr.net/npm/heroicons@2.1.5/24/outline/${n}.svg`,
})
vh('heroicons-micro', {
  resolver: n =>
    `https://cdn.jsdelivr.net/npm/heroicons@2.1.5/16/solid/${n}.svg`,
})
class Mu extends mn(Re, Eo) {}
Y(Mu, 'styles', [Re.styles, It()]),
  Y(Mu, 'properties', {
    ...Re.properties,
  })
const ue = mn(),
  Xw = `:host {
  --badge-font-size: var(--font-size);
  --badge-font-family: var(--font-mono);
  --badge-color: var(--badge-variant);
  --badge-background: var(--badge-variant-lucid);

  display: inline-flex;
  border-radius: var(--badge-radius);
  background: var(--badge-background);
  color: var(--badge-color);
  font-family: var(--badge-font-family);
}
[part='base'] {
  margin: 0;
  padding: var(--badge-padding-y) var(--badge-padding-x);
  display: flex;
  align-items: center;
  font-size: var(--badge-font-size);
  line-height: 1;
  border-radius: var(--badge-radius);
  text-align: center;
  white-space: nowrap;
}
`
class Iu extends ue {
  constructor() {
    super(),
      (this.size = Pt.M),
      (this.variant = bt.Neutral),
      (this.shape = Ke.Round)
  }
  render() {
    return X`
      <span part="base">
        <slot></slot>
      </span>
    `
  }
}
Y(Iu, 'styles', [
  It(),
  ce(),
  Ar('badge'),
  Kw('[part="base"]', 'badge'),
  Fw('badge'),
  Hw('badge'),
  ui('badge'),
  bn('badge', 1.75, 4),
  Yw(),
  Gw(),
  dt(Xw),
]),
  Y(Iu, 'properties', {
    size: { type: String, reflect: !0 },
    variant: { type: String, reflect: !0 },
    shape: { type: String, reflect: !0 },
  })
var Zw = en`
  :host {
    --max-width: 20rem;
    --hide-delay: 0ms;
    --show-delay: 150ms;

    display: contents;
  }

  .tooltip {
    --arrow-size: var(--sl-tooltip-arrow-size);
    --arrow-color: var(--sl-tooltip-background-color);
  }

  .tooltip::part(popup) {
    z-index: var(--sl-z-index-tooltip);
  }

  .tooltip[placement^='top']::part(popup) {
    transform-origin: bottom;
  }

  .tooltip[placement^='bottom']::part(popup) {
    transform-origin: top;
  }

  .tooltip[placement^='left']::part(popup) {
    transform-origin: right;
  }

  .tooltip[placement^='right']::part(popup) {
    transform-origin: left;
  }

  .tooltip__body {
    display: block;
    width: max-content;
    max-width: var(--max-width);
    border-radius: var(--sl-tooltip-border-radius);
    background-color: var(--sl-tooltip-background-color);
    font-family: var(--sl-tooltip-font-family);
    font-size: var(--sl-tooltip-font-size);
    font-weight: var(--sl-tooltip-font-weight);
    line-height: var(--sl-tooltip-line-height);
    text-align: start;
    white-space: normal;
    color: var(--sl-tooltip-color);
    padding: var(--sl-tooltip-padding);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
  }
`,
  jw = en`
  :host {
    --arrow-color: var(--sl-color-neutral-1000);
    --arrow-size: 6px;

    /*
     * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant
     * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.
     */
    --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
    --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));

    display: contents;
  }

  .popup {
    position: absolute;
    isolation: isolate;
    max-width: var(--auto-size-available-width, none);
    max-height: var(--auto-size-available-height, none);
  }

  .popup--fixed {
    position: fixed;
  }

  .popup:not(.popup--active) {
    display: none;
  }

  .popup__arrow {
    position: absolute;
    width: calc(var(--arrow-size-diagonal) * 2);
    height: calc(var(--arrow-size-diagonal) * 2);
    rotate: 45deg;
    background: var(--arrow-color);
    z-index: -1;
  }

  /* Hover bridge */
  .popup-hover-bridge:not(.popup-hover-bridge--visible) {
    display: none;
  }

  .popup-hover-bridge {
    position: fixed;
    z-index: calc(var(--sl-z-index-dropdown) - 1);
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    clip-path: polygon(
      var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
      var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),
      var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),
      var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
    );
  }
`
const ua = /* @__PURE__ */ new Set(),
  Jw = new MutationObserver(Nh),
  br = /* @__PURE__ */ new Map()
let Dh = document.documentElement.dir || 'ltr',
  Bh = document.documentElement.lang || navigator.language,
  Kn
Jw.observe(document.documentElement, {
  attributes: !0,
  attributeFilter: ['dir', 'lang'],
})
function Uh(...n) {
  n.map(r => {
    const i = r.$code.toLowerCase()
    br.has(i)
      ? br.set(i, Object.assign(Object.assign({}, br.get(i)), r))
      : br.set(i, r),
      Kn || (Kn = r)
  }),
    Nh()
}
function Nh() {
  ;(Dh = document.documentElement.dir || 'ltr'),
    (Bh = document.documentElement.lang || navigator.language),
    [...ua.keys()].map(n => {
      typeof n.requestUpdate == 'function' && n.requestUpdate()
    })
}
let Qw = class {
  constructor(r) {
    ;(this.host = r), this.host.addController(this)
  }
  hostConnected() {
    ua.add(this.host)
  }
  hostDisconnected() {
    ua.delete(this.host)
  }
  dir() {
    return `${this.host.dir || Dh}`.toLowerCase()
  }
  lang() {
    return `${this.host.lang || Bh}`.toLowerCase()
  }
  getTranslationData(r) {
    var i, a
    const l = new Intl.Locale(r.replace(/_/g, '-')),
      d = l == null ? void 0 : l.language.toLowerCase(),
      f =
        (a =
          (i = l == null ? void 0 : l.region) === null || i === void 0
            ? void 0
            : i.toLowerCase()) !== null && a !== void 0
          ? a
          : '',
      v = br.get(`${d}-${f}`),
      m = br.get(d)
    return { locale: l, language: d, region: f, primary: v, secondary: m }
  }
  exists(r, i) {
    var a
    const { primary: l, secondary: d } = this.getTranslationData(
      (a = i.lang) !== null && a !== void 0 ? a : this.lang(),
    )
    return (
      (i = Object.assign({ includeFallback: !1 }, i)),
      !!((l && l[r]) || (d && d[r]) || (i.includeFallback && Kn && Kn[r]))
    )
  }
  term(r, ...i) {
    const { primary: a, secondary: l } = this.getTranslationData(this.lang())
    let d
    if (a && a[r]) d = a[r]
    else if (l && l[r]) d = l[r]
    else if (Kn && Kn[r]) d = Kn[r]
    else
      return console.error(`No translation found for: ${String(r)}`), String(r)
    return typeof d == 'function' ? d(...i) : d
  }
  date(r, i) {
    return (r = new Date(r)), new Intl.DateTimeFormat(this.lang(), i).format(r)
  }
  number(r, i) {
    return (
      (r = Number(r)),
      isNaN(r) ? '' : new Intl.NumberFormat(this.lang(), i).format(r)
    )
  }
  relativeTime(r, i, a) {
    return new Intl.RelativeTimeFormat(this.lang(), a).format(r, i)
  }
}
var Fh = {
  $code: 'en',
  $name: 'English',
  $dir: 'ltr',
  carousel: 'Carousel',
  clearEntry: 'Clear entry',
  close: 'Close',
  copied: 'Copied',
  copy: 'Copy',
  currentValue: 'Current value',
  error: 'Error',
  goToSlide: (n, r) => `Go to slide ${n} of ${r}`,
  hidePassword: 'Hide password',
  loading: 'Loading',
  nextSlide: 'Next slide',
  numOptionsSelected: n =>
    n === 0
      ? 'No options selected'
      : n === 1
      ? '1 option selected'
      : `${n} options selected`,
  previousSlide: 'Previous slide',
  progress: 'Progress',
  remove: 'Remove',
  resize: 'Resize',
  scrollToEnd: 'Scroll to end',
  scrollToStart: 'Scroll to start',
  selectAColorFromTheScreen: 'Select a color from the screen',
  showPassword: 'Show password',
  slideNum: n => `Slide ${n}`,
  toggleColorFormat: 'Toggle color format',
}
Uh(Fh)
var t$ = Fh,
  hi = class extends Qw {}
Uh(t$)
const Pn = Math.min,
  we = Math.max,
  mo = Math.round,
  oo = Math.floor,
  Rn = n => ({
    x: n,
    y: n,
  }),
  e$ = {
    left: 'right',
    right: 'left',
    bottom: 'top',
    top: 'bottom',
  },
  n$ = {
    start: 'end',
    end: 'start',
  }
function ha(n, r, i) {
  return we(n, Pn(r, i))
}
function Er(n, r) {
  return typeof n == 'function' ? n(r) : n
}
function Ln(n) {
  return n.split('-')[0]
}
function kr(n) {
  return n.split('-')[1]
}
function Hh(n) {
  return n === 'x' ? 'y' : 'x'
}
function Sa(n) {
  return n === 'y' ? 'height' : 'width'
}
function di(n) {
  return ['top', 'bottom'].includes(Ln(n)) ? 'y' : 'x'
}
function Ca(n) {
  return Hh(di(n))
}
function r$(n, r, i) {
  i === void 0 && (i = !1)
  const a = kr(n),
    l = Ca(n),
    d = Sa(l)
  let f =
    l === 'x'
      ? a === (i ? 'end' : 'start')
        ? 'right'
        : 'left'
      : a === 'start'
      ? 'bottom'
      : 'top'
  return r.reference[d] > r.floating[d] && (f = bo(f)), [f, bo(f)]
}
function i$(n) {
  const r = bo(n)
  return [da(n), r, da(r)]
}
function da(n) {
  return n.replace(/start|end/g, r => n$[r])
}
function o$(n, r, i) {
  const a = ['left', 'right'],
    l = ['right', 'left'],
    d = ['top', 'bottom'],
    f = ['bottom', 'top']
  switch (n) {
    case 'top':
    case 'bottom':
      return i ? (r ? l : a) : r ? a : l
    case 'left':
    case 'right':
      return r ? d : f
    default:
      return []
  }
}
function s$(n, r, i, a) {
  const l = kr(n)
  let d = o$(Ln(n), i === 'start', a)
  return l && ((d = d.map(f => f + '-' + l)), r && (d = d.concat(d.map(da)))), d
}
function bo(n) {
  return n.replace(/left|right|bottom|top/g, r => e$[r])
}
function a$(n) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...n,
  }
}
function Wh(n) {
  return typeof n != 'number'
    ? a$(n)
    : {
        top: n,
        right: n,
        bottom: n,
        left: n,
      }
}
function yo(n) {
  return {
    ...n,
    top: n.y,
    left: n.x,
    right: n.x + n.width,
    bottom: n.y + n.height,
  }
}
function Du(n, r, i) {
  let { reference: a, floating: l } = n
  const d = di(r),
    f = Ca(r),
    v = Sa(f),
    m = Ln(r),
    _ = d === 'y',
    k = a.x + a.width / 2 - l.width / 2,
    C = a.y + a.height / 2 - l.height / 2,
    F = a[v] / 2 - l[v] / 2
  let T
  switch (m) {
    case 'top':
      T = {
        x: k,
        y: a.y - l.height,
      }
      break
    case 'bottom':
      T = {
        x: k,
        y: a.y + a.height,
      }
      break
    case 'right':
      T = {
        x: a.x + a.width,
        y: C,
      }
      break
    case 'left':
      T = {
        x: a.x - l.width,
        y: C,
      }
      break
    default:
      T = {
        x: a.x,
        y: a.y,
      }
  }
  switch (kr(r)) {
    case 'start':
      T[f] -= F * (i && _ ? -1 : 1)
      break
    case 'end':
      T[f] += F * (i && _ ? -1 : 1)
      break
  }
  return T
}
const l$ = async (n, r, i) => {
  const {
      placement: a = 'bottom',
      strategy: l = 'absolute',
      middleware: d = [],
      platform: f,
    } = i,
    v = d.filter(Boolean),
    m = await (f.isRTL == null ? void 0 : f.isRTL(r))
  let _ = await f.getElementRects({
      reference: n,
      floating: r,
      strategy: l,
    }),
    { x: k, y: C } = Du(_, a, m),
    F = a,
    T = {},
    z = 0
  for (let w = 0; w < v.length; w++) {
    const { name: x, fn: P } = v[w],
      {
        x: G,
        y: U,
        data: it,
        reset: J,
      } = await P({
        x: k,
        y: C,
        initialPlacement: a,
        placement: F,
        strategy: l,
        middlewareData: T,
        rects: _,
        platform: f,
        elements: {
          reference: n,
          floating: r,
        },
      })
    if (
      ((k = G ?? k),
      (C = U ?? C),
      (T = {
        ...T,
        [x]: {
          ...T[x],
          ...it,
        },
      }),
      J && z <= 50)
    ) {
      z++,
        typeof J == 'object' &&
          (J.placement && (F = J.placement),
          J.rects &&
            (_ =
              J.rects === !0
                ? await f.getElementRects({
                    reference: n,
                    floating: r,
                    strategy: l,
                  })
                : J.rects),
          ({ x: k, y: C } = Du(_, F, m))),
        (w = -1)
      continue
    }
  }
  return {
    x: k,
    y: C,
    placement: F,
    strategy: l,
    middlewareData: T,
  }
}
async function Aa(n, r) {
  var i
  r === void 0 && (r = {})
  const { x: a, y: l, platform: d, rects: f, elements: v, strategy: m } = n,
    {
      boundary: _ = 'clippingAncestors',
      rootBoundary: k = 'viewport',
      elementContext: C = 'floating',
      altBoundary: F = !1,
      padding: T = 0,
    } = Er(r, n),
    z = Wh(T),
    x = v[F ? (C === 'floating' ? 'reference' : 'floating') : C],
    P = yo(
      await d.getClippingRect({
        element:
          (i = await (d.isElement == null ? void 0 : d.isElement(x))) == null ||
          i
            ? x
            : x.contextElement ||
              (await (d.getDocumentElement == null
                ? void 0
                : d.getDocumentElement(v.floating))),
        boundary: _,
        rootBoundary: k,
        strategy: m,
      }),
    ),
    G =
      C === 'floating'
        ? {
            ...f.floating,
            x: a,
            y: l,
          }
        : f.reference,
    U = await (d.getOffsetParent == null
      ? void 0
      : d.getOffsetParent(v.floating)),
    it = (await (d.isElement == null ? void 0 : d.isElement(U)))
      ? (await (d.getScale == null ? void 0 : d.getScale(U))) || {
          x: 1,
          y: 1,
        }
      : {
          x: 1,
          y: 1,
        },
    J = yo(
      d.convertOffsetParentRelativeRectToViewportRelativeRect
        ? await d.convertOffsetParentRelativeRectToViewportRelativeRect({
            rect: G,
            offsetParent: U,
            strategy: m,
          })
        : G,
    )
  return {
    top: (P.top - J.top + z.top) / it.y,
    bottom: (J.bottom - P.bottom + z.bottom) / it.y,
    left: (P.left - J.left + z.left) / it.x,
    right: (J.right - P.right + z.right) / it.x,
  }
}
const c$ = n => ({
    name: 'arrow',
    options: n,
    async fn(r) {
      const {
          x: i,
          y: a,
          placement: l,
          rects: d,
          platform: f,
          elements: v,
          middlewareData: m,
        } = r,
        { element: _, padding: k = 0 } = Er(n, r) || {}
      if (_ == null) return {}
      const C = Wh(k),
        F = {
          x: i,
          y: a,
        },
        T = Ca(l),
        z = Sa(T),
        w = await f.getDimensions(_),
        x = T === 'y',
        P = x ? 'top' : 'left',
        G = x ? 'bottom' : 'right',
        U = x ? 'clientHeight' : 'clientWidth',
        it = d.reference[z] + d.reference[T] - F[T] - d.floating[z],
        J = F[T] - d.reference[T],
        q = await (f.getOffsetParent == null ? void 0 : f.getOffsetParent(_))
      let I = q ? q[U] : 0
      ;(!I || !(await (f.isElement == null ? void 0 : f.isElement(q)))) &&
        (I = v.floating[U] || d.floating[z])
      const L = it / 2 - J / 2,
        nt = I / 2 - w[z] / 2 - 1,
        ot = Pn(C[P], nt),
        j = Pn(C[G], nt),
        mt = ot,
        Et = I - w[z] - j,
        W = I / 2 - w[z] / 2 + L,
        D = ha(mt, W, Et),
        M =
          !m.arrow &&
          kr(l) != null &&
          W != D &&
          d.reference[z] / 2 - (W < mt ? ot : j) - w[z] / 2 < 0,
        H = M ? (W < mt ? W - mt : W - Et) : 0
      return {
        [T]: F[T] + H,
        data: {
          [T]: D,
          centerOffset: W - D - H,
          ...(M && {
            alignmentOffset: H,
          }),
        },
        reset: M,
      }
    },
  }),
  u$ = function (n) {
    return (
      n === void 0 && (n = {}),
      {
        name: 'flip',
        options: n,
        async fn(r) {
          var i, a
          const {
              placement: l,
              middlewareData: d,
              rects: f,
              initialPlacement: v,
              platform: m,
              elements: _,
            } = r,
            {
              mainAxis: k = !0,
              crossAxis: C = !0,
              fallbackPlacements: F,
              fallbackStrategy: T = 'bestFit',
              fallbackAxisSideDirection: z = 'none',
              flipAlignment: w = !0,
              ...x
            } = Er(n, r)
          if ((i = d.arrow) != null && i.alignmentOffset) return {}
          const P = Ln(l),
            G = Ln(v) === v,
            U = await (m.isRTL == null ? void 0 : m.isRTL(_.floating)),
            it = F || (G || !w ? [bo(v)] : i$(v))
          !F && z !== 'none' && it.push(...s$(v, w, z, U))
          const J = [v, ...it],
            q = await Aa(r, x),
            I = []
          let L = ((a = d.flip) == null ? void 0 : a.overflows) || []
          if ((k && I.push(q[P]), C)) {
            const mt = r$(l, f, U)
            I.push(q[mt[0]], q[mt[1]])
          }
          if (
            ((L = [
              ...L,
              {
                placement: l,
                overflows: I,
              },
            ]),
            !I.every(mt => mt <= 0))
          ) {
            var nt, ot
            const mt = (((nt = d.flip) == null ? void 0 : nt.index) || 0) + 1,
              Et = J[mt]
            if (Et)
              return {
                data: {
                  index: mt,
                  overflows: L,
                },
                reset: {
                  placement: Et,
                },
              }
            let W =
              (ot = L.filter(D => D.overflows[0] <= 0).sort(
                (D, M) => D.overflows[1] - M.overflows[1],
              )[0]) == null
                ? void 0
                : ot.placement
            if (!W)
              switch (T) {
                case 'bestFit': {
                  var j
                  const D =
                    (j = L.map(M => [
                      M.placement,
                      M.overflows.filter(H => H > 0).reduce((H, B) => H + B, 0),
                    ]).sort((M, H) => M[1] - H[1])[0]) == null
                      ? void 0
                      : j[0]
                  D && (W = D)
                  break
                }
                case 'initialPlacement':
                  W = v
                  break
              }
            if (l !== W)
              return {
                reset: {
                  placement: W,
                },
              }
          }
          return {}
        },
      }
    )
  }
async function h$(n, r) {
  const { placement: i, platform: a, elements: l } = n,
    d = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)),
    f = Ln(i),
    v = kr(i),
    m = di(i) === 'y',
    _ = ['left', 'top'].includes(f) ? -1 : 1,
    k = d && m ? -1 : 1,
    C = Er(r, n)
  let {
    mainAxis: F,
    crossAxis: T,
    alignmentAxis: z,
  } = typeof C == 'number'
    ? {
        mainAxis: C,
        crossAxis: 0,
        alignmentAxis: null,
      }
    : {
        mainAxis: 0,
        crossAxis: 0,
        alignmentAxis: null,
        ...C,
      }
  return (
    v && typeof z == 'number' && (T = v === 'end' ? z * -1 : z),
    m
      ? {
          x: T * k,
          y: F * _,
        }
      : {
          x: F * _,
          y: T * k,
        }
  )
}
const d$ = function (n) {
    return (
      n === void 0 && (n = 0),
      {
        name: 'offset',
        options: n,
        async fn(r) {
          const { x: i, y: a } = r,
            l = await h$(r, n)
          return {
            x: i + l.x,
            y: a + l.y,
            data: l,
          }
        },
      }
    )
  },
  f$ = function (n) {
    return (
      n === void 0 && (n = {}),
      {
        name: 'shift',
        options: n,
        async fn(r) {
          const { x: i, y: a, placement: l } = r,
            {
              mainAxis: d = !0,
              crossAxis: f = !1,
              limiter: v = {
                fn: x => {
                  let { x: P, y: G } = x
                  return {
                    x: P,
                    y: G,
                  }
                },
              },
              ...m
            } = Er(n, r),
            _ = {
              x: i,
              y: a,
            },
            k = await Aa(r, m),
            C = di(Ln(l)),
            F = Hh(C)
          let T = _[F],
            z = _[C]
          if (d) {
            const x = F === 'y' ? 'top' : 'left',
              P = F === 'y' ? 'bottom' : 'right',
              G = T + k[x],
              U = T - k[P]
            T = ha(G, T, U)
          }
          if (f) {
            const x = C === 'y' ? 'top' : 'left',
              P = C === 'y' ? 'bottom' : 'right',
              G = z + k[x],
              U = z - k[P]
            z = ha(G, z, U)
          }
          const w = v.fn({
            ...r,
            [F]: T,
            [C]: z,
          })
          return {
            ...w,
            data: {
              x: w.x - i,
              y: w.y - a,
            },
          }
        },
      }
    )
  },
  Bu = function (n) {
    return (
      n === void 0 && (n = {}),
      {
        name: 'size',
        options: n,
        async fn(r) {
          const { placement: i, rects: a, platform: l, elements: d } = r,
            { apply: f = () => {}, ...v } = Er(n, r),
            m = await Aa(r, v),
            _ = Ln(i),
            k = kr(i),
            C = di(i) === 'y',
            { width: F, height: T } = a.floating
          let z, w
          _ === 'top' || _ === 'bottom'
            ? ((z = _),
              (w =
                k ===
                ((await (l.isRTL == null ? void 0 : l.isRTL(d.floating)))
                  ? 'start'
                  : 'end')
                  ? 'left'
                  : 'right'))
            : ((w = _), (z = k === 'end' ? 'top' : 'bottom'))
          const x = T - m[z],
            P = F - m[w],
            G = !r.middlewareData.shift
          let U = x,
            it = P
          if (C) {
            const q = F - m.left - m.right
            it = k || G ? Pn(P, q) : q
          } else {
            const q = T - m.top - m.bottom
            U = k || G ? Pn(x, q) : q
          }
          if (G && !k) {
            const q = we(m.left, 0),
              I = we(m.right, 0),
              L = we(m.top, 0),
              nt = we(m.bottom, 0)
            C
              ? (it =
                  F - 2 * (q !== 0 || I !== 0 ? q + I : we(m.left, m.right)))
              : (U =
                  T - 2 * (L !== 0 || nt !== 0 ? L + nt : we(m.top, m.bottom)))
          }
          await f({
            ...r,
            availableWidth: it,
            availableHeight: U,
          })
          const J = await l.getDimensions(d.floating)
          return F !== J.width || T !== J.height
            ? {
                reset: {
                  rects: !0,
                },
              }
            : {}
        },
      }
    )
  }
function Mn(n) {
  return qh(n) ? (n.nodeName || '').toLowerCase() : '#document'
}
function $e(n) {
  var r
  return (
    (n == null || (r = n.ownerDocument) == null ? void 0 : r.defaultView) ||
    window
  )
}
function yn(n) {
  var r
  return (r = (qh(n) ? n.ownerDocument : n.document) || window.document) == null
    ? void 0
    : r.documentElement
}
function qh(n) {
  return n instanceof Node || n instanceof $e(n).Node
}
function gn(n) {
  return n instanceof Element || n instanceof $e(n).Element
}
function tn(n) {
  return n instanceof HTMLElement || n instanceof $e(n).HTMLElement
}
function Uu(n) {
  return typeof ShadowRoot > 'u'
    ? !1
    : n instanceof ShadowRoot || n instanceof $e(n).ShadowRoot
}
function fi(n) {
  const { overflow: r, overflowX: i, overflowY: a, display: l } = Me(n)
  return (
    /auto|scroll|overlay|hidden|clip/.test(r + a + i) &&
    !['inline', 'contents'].includes(l)
  )
}
function p$(n) {
  return ['table', 'td', 'th'].includes(Mn(n))
}
function Ea(n) {
  const r = ka(),
    i = Me(n)
  return (
    i.transform !== 'none' ||
    i.perspective !== 'none' ||
    (i.containerType ? i.containerType !== 'normal' : !1) ||
    (!r && (i.backdropFilter ? i.backdropFilter !== 'none' : !1)) ||
    (!r && (i.filter ? i.filter !== 'none' : !1)) ||
    ['transform', 'perspective', 'filter'].some(a =>
      (i.willChange || '').includes(a),
    ) ||
    ['paint', 'layout', 'strict', 'content'].some(a =>
      (i.contain || '').includes(a),
    )
  )
}
function g$(n) {
  let r = wr(n)
  for (; tn(r) && !ko(r); ) {
    if (Ea(r)) return r
    r = wr(r)
  }
  return null
}
function ka() {
  return typeof CSS > 'u' || !CSS.supports
    ? !1
    : CSS.supports('-webkit-backdrop-filter', 'none')
}
function ko(n) {
  return ['html', 'body', '#document'].includes(Mn(n))
}
function Me(n) {
  return $e(n).getComputedStyle(n)
}
function To(n) {
  return gn(n)
    ? {
        scrollLeft: n.scrollLeft,
        scrollTop: n.scrollTop,
      }
    : {
        scrollLeft: n.pageXOffset,
        scrollTop: n.pageYOffset,
      }
}
function wr(n) {
  if (Mn(n) === 'html') return n
  const r =
    // Step into the shadow DOM of the parent of a slotted node.
    n.assignedSlot || // DOM Element detected.
    n.parentNode || // ShadowRoot detected.
    (Uu(n) && n.host) || // Fallback.
    yn(n)
  return Uu(r) ? r.host : r
}
function Yh(n) {
  const r = wr(n)
  return ko(r)
    ? n.ownerDocument
      ? n.ownerDocument.body
      : n.body
    : tn(r) && fi(r)
    ? r
    : Yh(r)
}
function oi(n, r, i) {
  var a
  r === void 0 && (r = []), i === void 0 && (i = !0)
  const l = Yh(n),
    d = l === ((a = n.ownerDocument) == null ? void 0 : a.body),
    f = $e(l)
  return d
    ? r.concat(
        f,
        f.visualViewport || [],
        fi(l) ? l : [],
        f.frameElement && i ? oi(f.frameElement) : [],
      )
    : r.concat(l, oi(l, [], i))
}
function Gh(n) {
  const r = Me(n)
  let i = parseFloat(r.width) || 0,
    a = parseFloat(r.height) || 0
  const l = tn(n),
    d = l ? n.offsetWidth : i,
    f = l ? n.offsetHeight : a,
    v = mo(i) !== d || mo(a) !== f
  return (
    v && ((i = d), (a = f)),
    {
      width: i,
      height: a,
      $: v,
    }
  )
}
function Ta(n) {
  return gn(n) ? n : n.contextElement
}
function yr(n) {
  const r = Ta(n)
  if (!tn(r)) return Rn(1)
  const i = r.getBoundingClientRect(),
    { width: a, height: l, $: d } = Gh(r)
  let f = (d ? mo(i.width) : i.width) / a,
    v = (d ? mo(i.height) : i.height) / l
  return (
    (!f || !Number.isFinite(f)) && (f = 1),
    (!v || !Number.isFinite(v)) && (v = 1),
    {
      x: f,
      y: v,
    }
  )
}
const v$ = /* @__PURE__ */ Rn(0)
function Kh(n) {
  const r = $e(n)
  return !ka() || !r.visualViewport
    ? v$
    : {
        x: r.visualViewport.offsetLeft,
        y: r.visualViewport.offsetTop,
      }
}
function m$(n, r, i) {
  return r === void 0 && (r = !1), !i || (r && i !== $e(n)) ? !1 : r
}
function Qn(n, r, i, a) {
  r === void 0 && (r = !1), i === void 0 && (i = !1)
  const l = n.getBoundingClientRect(),
    d = Ta(n)
  let f = Rn(1)
  r && (a ? gn(a) && (f = yr(a)) : (f = yr(n)))
  const v = m$(d, i, a) ? Kh(d) : Rn(0)
  let m = (l.left + v.x) / f.x,
    _ = (l.top + v.y) / f.y,
    k = l.width / f.x,
    C = l.height / f.y
  if (d) {
    const F = $e(d),
      T = a && gn(a) ? $e(a) : a
    let z = F.frameElement
    for (; z && a && T !== F; ) {
      const w = yr(z),
        x = z.getBoundingClientRect(),
        P = Me(z),
        G = x.left + (z.clientLeft + parseFloat(P.paddingLeft)) * w.x,
        U = x.top + (z.clientTop + parseFloat(P.paddingTop)) * w.y
      ;(m *= w.x),
        (_ *= w.y),
        (k *= w.x),
        (C *= w.y),
        (m += G),
        (_ += U),
        (z = $e(z).frameElement)
    }
  }
  return yo({
    width: k,
    height: C,
    x: m,
    y: _,
  })
}
function b$(n) {
  let { rect: r, offsetParent: i, strategy: a } = n
  const l = tn(i),
    d = yn(i)
  if (i === d) return r
  let f = {
      scrollLeft: 0,
      scrollTop: 0,
    },
    v = Rn(1)
  const m = Rn(0)
  if (
    (l || (!l && a !== 'fixed')) &&
    ((Mn(i) !== 'body' || fi(d)) && (f = To(i)), tn(i))
  ) {
    const _ = Qn(i)
    ;(v = yr(i)), (m.x = _.x + i.clientLeft), (m.y = _.y + i.clientTop)
  }
  return {
    width: r.width * v.x,
    height: r.height * v.y,
    x: r.x * v.x - f.scrollLeft * v.x + m.x,
    y: r.y * v.y - f.scrollTop * v.y + m.y,
  }
}
function y$(n) {
  return Array.from(n.getClientRects())
}
function Vh(n) {
  return Qn(yn(n)).left + To(n).scrollLeft
}
function _$(n) {
  const r = yn(n),
    i = To(n),
    a = n.ownerDocument.body,
    l = we(r.scrollWidth, r.clientWidth, a.scrollWidth, a.clientWidth),
    d = we(r.scrollHeight, r.clientHeight, a.scrollHeight, a.clientHeight)
  let f = -i.scrollLeft + Vh(n)
  const v = -i.scrollTop
  return (
    Me(a).direction === 'rtl' && (f += we(r.clientWidth, a.clientWidth) - l),
    {
      width: l,
      height: d,
      x: f,
      y: v,
    }
  )
}
function w$(n, r) {
  const i = $e(n),
    a = yn(n),
    l = i.visualViewport
  let d = a.clientWidth,
    f = a.clientHeight,
    v = 0,
    m = 0
  if (l) {
    ;(d = l.width), (f = l.height)
    const _ = ka()
    ;(!_ || (_ && r === 'fixed')) && ((v = l.offsetLeft), (m = l.offsetTop))
  }
  return {
    width: d,
    height: f,
    x: v,
    y: m,
  }
}
function $$(n, r) {
  const i = Qn(n, !0, r === 'fixed'),
    a = i.top + n.clientTop,
    l = i.left + n.clientLeft,
    d = tn(n) ? yr(n) : Rn(1),
    f = n.clientWidth * d.x,
    v = n.clientHeight * d.y,
    m = l * d.x,
    _ = a * d.y
  return {
    width: f,
    height: v,
    x: m,
    y: _,
  }
}
function Nu(n, r, i) {
  let a
  if (r === 'viewport') a = w$(n, i)
  else if (r === 'document') a = _$(yn(n))
  else if (gn(r)) a = $$(r, i)
  else {
    const l = Kh(n)
    a = {
      ...r,
      x: r.x - l.x,
      y: r.y - l.y,
    }
  }
  return yo(a)
}
function Xh(n, r) {
  const i = wr(n)
  return i === r || !gn(i) || ko(i)
    ? !1
    : Me(i).position === 'fixed' || Xh(i, r)
}
function x$(n, r) {
  const i = r.get(n)
  if (i) return i
  let a = oi(n, [], !1).filter(v => gn(v) && Mn(v) !== 'body'),
    l = null
  const d = Me(n).position === 'fixed'
  let f = d ? wr(n) : n
  for (; gn(f) && !ko(f); ) {
    const v = Me(f),
      m = Ea(f)
    !m && v.position === 'fixed' && (l = null),
      (
        d
          ? !m && !l
          : (!m &&
              v.position === 'static' &&
              !!l &&
              ['absolute', 'fixed'].includes(l.position)) ||
            (fi(f) && !m && Xh(n, f))
      )
        ? (a = a.filter(k => k !== f))
        : (l = v),
      (f = wr(f))
  }
  return r.set(n, a), a
}
function S$(n) {
  let { element: r, boundary: i, rootBoundary: a, strategy: l } = n
  const f = [...(i === 'clippingAncestors' ? x$(r, this._c) : [].concat(i)), a],
    v = f[0],
    m = f.reduce(
      (_, k) => {
        const C = Nu(r, k, l)
        return (
          (_.top = we(C.top, _.top)),
          (_.right = Pn(C.right, _.right)),
          (_.bottom = Pn(C.bottom, _.bottom)),
          (_.left = we(C.left, _.left)),
          _
        )
      },
      Nu(r, v, l),
    )
  return {
    width: m.right - m.left,
    height: m.bottom - m.top,
    x: m.left,
    y: m.top,
  }
}
function C$(n) {
  return Gh(n)
}
function A$(n, r, i) {
  const a = tn(r),
    l = yn(r),
    d = i === 'fixed',
    f = Qn(n, !0, d, r)
  let v = {
    scrollLeft: 0,
    scrollTop: 0,
  }
  const m = Rn(0)
  if (a || (!a && !d))
    if (((Mn(r) !== 'body' || fi(l)) && (v = To(r)), a)) {
      const _ = Qn(r, !0, d, r)
      ;(m.x = _.x + r.clientLeft), (m.y = _.y + r.clientTop)
    } else l && (m.x = Vh(l))
  return {
    x: f.left + v.scrollLeft - m.x,
    y: f.top + v.scrollTop - m.y,
    width: f.width,
    height: f.height,
  }
}
function Fu(n, r) {
  return !tn(n) || Me(n).position === 'fixed' ? null : r ? r(n) : n.offsetParent
}
function Zh(n, r) {
  const i = $e(n)
  if (!tn(n)) return i
  let a = Fu(n, r)
  for (; a && p$(a) && Me(a).position === 'static'; ) a = Fu(a, r)
  return a &&
    (Mn(a) === 'html' ||
      (Mn(a) === 'body' && Me(a).position === 'static' && !Ea(a)))
    ? i
    : a || g$(n) || i
}
const E$ = async function (n) {
  let { reference: r, floating: i, strategy: a } = n
  const l = this.getOffsetParent || Zh,
    d = this.getDimensions
  return {
    reference: A$(r, await l(i), a),
    floating: {
      x: 0,
      y: 0,
      ...(await d(i)),
    },
  }
}
function k$(n) {
  return Me(n).direction === 'rtl'
}
const co = {
  convertOffsetParentRelativeRectToViewportRelativeRect: b$,
  getDocumentElement: yn,
  getClippingRect: S$,
  getOffsetParent: Zh,
  getElementRects: E$,
  getClientRects: y$,
  getDimensions: C$,
  getScale: yr,
  isElement: gn,
  isRTL: k$,
}
function T$(n, r) {
  let i = null,
    a
  const l = yn(n)
  function d() {
    clearTimeout(a), i && i.disconnect(), (i = null)
  }
  function f(v, m) {
    v === void 0 && (v = !1), m === void 0 && (m = 1), d()
    const { left: _, top: k, width: C, height: F } = n.getBoundingClientRect()
    if ((v || r(), !C || !F)) return
    const T = oo(k),
      z = oo(l.clientWidth - (_ + C)),
      w = oo(l.clientHeight - (k + F)),
      x = oo(_),
      G = {
        rootMargin: -T + 'px ' + -z + 'px ' + -w + 'px ' + -x + 'px',
        threshold: we(0, Pn(1, m)) || 1,
      }
    let U = !0
    function it(J) {
      const q = J[0].intersectionRatio
      if (q !== m) {
        if (!U) return f()
        q
          ? f(!1, q)
          : (a = setTimeout(() => {
              f(!1, 1e-7)
            }, 100))
      }
      U = !1
    }
    try {
      i = new IntersectionObserver(it, {
        ...G,
        // Handle <iframe>s
        root: l.ownerDocument,
      })
    } catch {
      i = new IntersectionObserver(it, G)
    }
    i.observe(n)
  }
  return f(!0), d
}
function z$(n, r, i, a) {
  a === void 0 && (a = {})
  const {
      ancestorScroll: l = !0,
      ancestorResize: d = !0,
      elementResize: f = typeof ResizeObserver == 'function',
      layoutShift: v = typeof IntersectionObserver == 'function',
      animationFrame: m = !1,
    } = a,
    _ = Ta(n),
    k = l || d ? [...(_ ? oi(_) : []), ...oi(r)] : []
  k.forEach(P => {
    l &&
      P.addEventListener('scroll', i, {
        passive: !0,
      }),
      d && P.addEventListener('resize', i)
  })
  const C = _ && v ? T$(_, i) : null
  let F = -1,
    T = null
  f &&
    ((T = new ResizeObserver(P => {
      let [G] = P
      G &&
        G.target === _ &&
        T &&
        (T.unobserve(r),
        cancelAnimationFrame(F),
        (F = requestAnimationFrame(() => {
          T && T.observe(r)
        }))),
        i()
    })),
    _ && !m && T.observe(_),
    T.observe(r))
  let z,
    w = m ? Qn(n) : null
  m && x()
  function x() {
    const P = Qn(n)
    w &&
      (P.x !== w.x ||
        P.y !== w.y ||
        P.width !== w.width ||
        P.height !== w.height) &&
      i(),
      (w = P),
      (z = requestAnimationFrame(x))
  }
  return (
    i(),
    () => {
      k.forEach(P => {
        l && P.removeEventListener('scroll', i),
          d && P.removeEventListener('resize', i)
      }),
        C && C(),
        T && T.disconnect(),
        (T = null),
        m && cancelAnimationFrame(z)
    }
  )
}
const O$ = (n, r, i) => {
  const a = /* @__PURE__ */ new Map(),
    l = {
      platform: co,
      ...i,
    },
    d = {
      ...l.platform,
      _c: a,
    }
  return l$(n, r, {
    ...l,
    platform: d,
  })
}
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const P$ = {
    ATTRIBUTE: 1,
    CHILD: 2,
    PROPERTY: 3,
    BOOLEAN_ATTRIBUTE: 4,
    EVENT: 5,
    ELEMENT: 6,
  },
  R$ =
    n =>
    (...r) => ({ _$litDirective$: n, values: r })
let L$ = class {
  constructor(r) {}
  get _$AU() {
    return this._$AM._$AU
  }
  _$AT(r, i, a) {
    ;(this._$Ct = r), (this._$AM = i), (this._$Ci = a)
  }
  _$AS(r, i) {
    return this.update(r, i)
  }
  update(r, i) {
    return this.render(...i)
  }
}
/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const pn = R$(
  class extends L$ {
    constructor(n) {
      var r
      if (
        (super(n),
        n.type !== P$.ATTRIBUTE ||
          n.name !== 'class' ||
          ((r = n.strings) == null ? void 0 : r.length) > 2)
      )
        throw Error(
          '`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.',
        )
    }
    render(n) {
      return (
        ' ' +
        Object.keys(n)
          .filter(r => n[r])
          .join(' ') +
        ' '
      )
    }
    update(n, [r]) {
      var a, l
      if (this.st === void 0) {
        ;(this.st = /* @__PURE__ */ new Set()),
          n.strings !== void 0 &&
            (this.nt = new Set(
              n.strings
                .join(' ')
                .split(/\s/)
                .filter(d => d !== ''),
            ))
        for (const d in r)
          r[d] && !((a = this.nt) != null && a.has(d)) && this.st.add(d)
        return this.render(r)
      }
      const i = n.element.classList
      for (const d of this.st) d in r || (i.remove(d), this.st.delete(d))
      for (const d in r) {
        const f = !!r[d]
        f === this.st.has(d) ||
          ((l = this.nt) != null && l.has(d)) ||
          (f ? (i.add(d), this.st.add(d)) : (i.remove(d), this.st.delete(d)))
      }
      return Jn
    }
  },
)
function M$(n) {
  return I$(n)
}
function oa(n) {
  return n.assignedSlot
    ? n.assignedSlot
    : n.parentNode instanceof ShadowRoot
    ? n.parentNode.host
    : n.parentNode
}
function I$(n) {
  for (let r = n; r; r = oa(r))
    if (r instanceof Element && getComputedStyle(r).display === 'none')
      return null
  for (let r = oa(n); r; r = oa(r)) {
    if (!(r instanceof Element)) continue
    const i = getComputedStyle(r)
    if (
      i.display !== 'contents' &&
      (i.position !== 'static' || i.filter !== 'none' || r.tagName === 'BODY')
    )
      return r
  }
  return null
}
function D$(n) {
  return (
    n !== null &&
    typeof n == 'object' &&
    'getBoundingClientRect' in n &&
    ('contextElement' in n ? n instanceof Element : !0)
  )
}
var Ct = class extends Se {
  constructor() {
    super(...arguments),
      (this.localize = new hi(this)),
      (this.active = !1),
      (this.placement = 'top'),
      (this.strategy = 'absolute'),
      (this.distance = 0),
      (this.skidding = 0),
      (this.arrow = !1),
      (this.arrowPlacement = 'anchor'),
      (this.arrowPadding = 10),
      (this.flip = !1),
      (this.flipFallbackPlacements = ''),
      (this.flipFallbackStrategy = 'best-fit'),
      (this.flipPadding = 0),
      (this.shift = !1),
      (this.shiftPadding = 0),
      (this.autoSizePadding = 0),
      (this.hoverBridge = !1),
      (this.updateHoverBridge = () => {
        if (this.hoverBridge && this.anchorEl) {
          const n = this.anchorEl.getBoundingClientRect(),
            r = this.popup.getBoundingClientRect(),
            i =
              this.placement.includes('top') ||
              this.placement.includes('bottom')
          let a = 0,
            l = 0,
            d = 0,
            f = 0,
            v = 0,
            m = 0,
            _ = 0,
            k = 0
          i
            ? n.top < r.top
              ? ((a = n.left),
                (l = n.bottom),
                (d = n.right),
                (f = n.bottom),
                (v = r.left),
                (m = r.top),
                (_ = r.right),
                (k = r.top))
              : ((a = r.left),
                (l = r.bottom),
                (d = r.right),
                (f = r.bottom),
                (v = n.left),
                (m = n.top),
                (_ = n.right),
                (k = n.top))
            : n.left < r.left
            ? ((a = n.right),
              (l = n.top),
              (d = r.left),
              (f = r.top),
              (v = n.right),
              (m = n.bottom),
              (_ = r.left),
              (k = r.bottom))
            : ((a = r.right),
              (l = r.top),
              (d = n.left),
              (f = n.top),
              (v = r.right),
              (m = r.bottom),
              (_ = n.left),
              (k = n.bottom)),
            this.style.setProperty('--hover-bridge-top-left-x', `${a}px`),
            this.style.setProperty('--hover-bridge-top-left-y', `${l}px`),
            this.style.setProperty('--hover-bridge-top-right-x', `${d}px`),
            this.style.setProperty('--hover-bridge-top-right-y', `${f}px`),
            this.style.setProperty('--hover-bridge-bottom-left-x', `${v}px`),
            this.style.setProperty('--hover-bridge-bottom-left-y', `${m}px`),
            this.style.setProperty('--hover-bridge-bottom-right-x', `${_}px`),
            this.style.setProperty('--hover-bridge-bottom-right-y', `${k}px`)
        }
      })
  }
  async connectedCallback() {
    super.connectedCallback(), await this.updateComplete, this.start()
  }
  disconnectedCallback() {
    super.disconnectedCallback(), this.stop()
  }
  async updated(n) {
    super.updated(n),
      n.has('active') && (this.active ? this.start() : this.stop()),
      n.has('anchor') && this.handleAnchorChange(),
      this.active && (await this.updateComplete, this.reposition())
  }
  async handleAnchorChange() {
    if ((await this.stop(), this.anchor && typeof this.anchor == 'string')) {
      const n = this.getRootNode()
      this.anchorEl = n.getElementById(this.anchor)
    } else
      this.anchor instanceof Element || D$(this.anchor)
        ? (this.anchorEl = this.anchor)
        : (this.anchorEl = this.querySelector('[slot="anchor"]'))
    this.anchorEl instanceof HTMLSlotElement &&
      (this.anchorEl = this.anchorEl.assignedElements({ flatten: !0 })[0]),
      this.anchorEl && this.active && this.start()
  }
  start() {
    this.anchorEl &&
      (this.cleanup = z$(this.anchorEl, this.popup, () => {
        this.reposition()
      }))
  }
  async stop() {
    return new Promise(n => {
      this.cleanup
        ? (this.cleanup(),
          (this.cleanup = void 0),
          this.removeAttribute('data-current-placement'),
          this.style.removeProperty('--auto-size-available-width'),
          this.style.removeProperty('--auto-size-available-height'),
          requestAnimationFrame(() => n()))
        : n()
    })
  }
  /** Forces the popup to recalculate and reposition itself. */
  reposition() {
    if (!this.active || !this.anchorEl) return
    const n = [
      // The offset middleware goes first
      d$({ mainAxis: this.distance, crossAxis: this.skidding }),
    ]
    this.sync
      ? n.push(
          Bu({
            apply: ({ rects: i }) => {
              const a = this.sync === 'width' || this.sync === 'both',
                l = this.sync === 'height' || this.sync === 'both'
              ;(this.popup.style.width = a ? `${i.reference.width}px` : ''),
                (this.popup.style.height = l ? `${i.reference.height}px` : '')
            },
          }),
        )
      : ((this.popup.style.width = ''), (this.popup.style.height = '')),
      this.flip &&
        n.push(
          u$({
            boundary: this.flipBoundary,
            // @ts-expect-error - We're converting a string attribute to an array here
            fallbackPlacements: this.flipFallbackPlacements,
            fallbackStrategy:
              this.flipFallbackStrategy === 'best-fit'
                ? 'bestFit'
                : 'initialPlacement',
            padding: this.flipPadding,
          }),
        ),
      this.shift &&
        n.push(
          f$({
            boundary: this.shiftBoundary,
            padding: this.shiftPadding,
          }),
        ),
      this.autoSize
        ? n.push(
            Bu({
              boundary: this.autoSizeBoundary,
              padding: this.autoSizePadding,
              apply: ({ availableWidth: i, availableHeight: a }) => {
                this.autoSize === 'vertical' || this.autoSize === 'both'
                  ? this.style.setProperty(
                      '--auto-size-available-height',
                      `${a}px`,
                    )
                  : this.style.removeProperty('--auto-size-available-height'),
                  this.autoSize === 'horizontal' || this.autoSize === 'both'
                    ? this.style.setProperty(
                        '--auto-size-available-width',
                        `${i}px`,
                      )
                    : this.style.removeProperty('--auto-size-available-width')
              },
            }),
          )
        : (this.style.removeProperty('--auto-size-available-width'),
          this.style.removeProperty('--auto-size-available-height')),
      this.arrow &&
        n.push(
          c$({
            element: this.arrowEl,
            padding: this.arrowPadding,
          }),
        )
    const r =
      this.strategy === 'absolute'
        ? i => co.getOffsetParent(i, M$)
        : co.getOffsetParent
    O$(this.anchorEl, this.popup, {
      placement: this.placement,
      middleware: n,
      strategy: this.strategy,
      platform: xh(ai({}, co), {
        getOffsetParent: r,
      }),
    }).then(({ x: i, y: a, middlewareData: l, placement: d }) => {
      const f = this.localize.dir() === 'rtl',
        v = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[
          d.split('-')[0]
        ]
      if (
        (this.setAttribute('data-current-placement', d),
        Object.assign(this.popup.style, {
          left: `${i}px`,
          top: `${a}px`,
        }),
        this.arrow)
      ) {
        const m = l.arrow.x,
          _ = l.arrow.y
        let k = '',
          C = '',
          F = '',
          T = ''
        if (this.arrowPlacement === 'start') {
          const z =
            typeof m == 'number'
              ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))`
              : ''
          ;(k =
            typeof _ == 'number'
              ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))`
              : ''),
            (C = f ? z : ''),
            (T = f ? '' : z)
        } else if (this.arrowPlacement === 'end') {
          const z =
            typeof m == 'number'
              ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))`
              : ''
          ;(C = f ? '' : z),
            (T = f ? z : ''),
            (F =
              typeof _ == 'number'
                ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))`
                : '')
        } else
          this.arrowPlacement === 'center'
            ? ((T =
                typeof m == 'number'
                  ? 'calc(50% - var(--arrow-size-diagonal))'
                  : ''),
              (k =
                typeof _ == 'number'
                  ? 'calc(50% - var(--arrow-size-diagonal))'
                  : ''))
            : ((T = typeof m == 'number' ? `${m}px` : ''),
              (k = typeof _ == 'number' ? `${_}px` : ''))
        Object.assign(this.arrowEl.style, {
          top: k,
          right: C,
          bottom: F,
          left: T,
          [v]: 'calc(var(--arrow-size-diagonal) * -1)',
        })
      }
    }),
      requestAnimationFrame(() => this.updateHoverBridge()),
      this.emit('sl-reposition')
  }
  render() {
    return X`
      <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>

      <span
        part="hover-bridge"
        class=${pn({
          'popup-hover-bridge': !0,
          'popup-hover-bridge--visible': this.hoverBridge && this.active,
        })}
      ></span>

      <div
        part="popup"
        class=${pn({
          popup: !0,
          'popup--active': this.active,
          'popup--fixed': this.strategy === 'fixed',
          'popup--has-arrow': this.arrow,
        })}
      >
        <slot></slot>
        ${
          this.arrow
            ? X`<div part="arrow" class="popup__arrow" role="presentation"></div>`
            : ''
        }
      </div>
    `
  }
}
Ct.styles = [vn, jw]
R([Ie('.popup')], Ct.prototype, 'popup', 2)
R([Ie('.popup__arrow')], Ct.prototype, 'arrowEl', 2)
R([V()], Ct.prototype, 'anchor', 2)
R([V({ type: Boolean, reflect: !0 })], Ct.prototype, 'active', 2)
R([V({ reflect: !0 })], Ct.prototype, 'placement', 2)
R([V({ reflect: !0 })], Ct.prototype, 'strategy', 2)
R([V({ type: Number })], Ct.prototype, 'distance', 2)
R([V({ type: Number })], Ct.prototype, 'skidding', 2)
R([V({ type: Boolean })], Ct.prototype, 'arrow', 2)
R([V({ attribute: 'arrow-placement' })], Ct.prototype, 'arrowPlacement', 2)
R(
  [V({ attribute: 'arrow-padding', type: Number })],
  Ct.prototype,
  'arrowPadding',
  2,
)
R([V({ type: Boolean })], Ct.prototype, 'flip', 2)
R(
  [
    V({
      attribute: 'flip-fallback-placements',
      converter: {
        fromAttribute: n =>
          n
            .split(' ')
            .map(r => r.trim())
            .filter(r => r !== ''),
        toAttribute: n => n.join(' '),
      },
    }),
  ],
  Ct.prototype,
  'flipFallbackPlacements',
  2,
)
R(
  [V({ attribute: 'flip-fallback-strategy' })],
  Ct.prototype,
  'flipFallbackStrategy',
  2,
)
R([V({ type: Object })], Ct.prototype, 'flipBoundary', 2)
R(
  [V({ attribute: 'flip-padding', type: Number })],
  Ct.prototype,
  'flipPadding',
  2,
)
R([V({ type: Boolean })], Ct.prototype, 'shift', 2)
R([V({ type: Object })], Ct.prototype, 'shiftBoundary', 2)
R(
  [V({ attribute: 'shift-padding', type: Number })],
  Ct.prototype,
  'shiftPadding',
  2,
)
R([V({ attribute: 'auto-size' })], Ct.prototype, 'autoSize', 2)
R([V()], Ct.prototype, 'sync', 2)
R([V({ type: Object })], Ct.prototype, 'autoSizeBoundary', 2)
R(
  [V({ attribute: 'auto-size-padding', type: Number })],
  Ct.prototype,
  'autoSizePadding',
  2,
)
R(
  [V({ attribute: 'hover-bridge', type: Boolean })],
  Ct.prototype,
  'hoverBridge',
  2,
)
var jh = /* @__PURE__ */ new Map(),
  B$ = /* @__PURE__ */ new WeakMap()
function U$(n) {
  return n ?? { keyframes: [], options: { duration: 0 } }
}
function Hu(n, r) {
  return r.toLowerCase() === 'rtl'
    ? {
        keyframes: n.rtlKeyframes || n.keyframes,
        options: n.options,
      }
    : n
}
function zo(n, r) {
  jh.set(n, U$(r))
}
function Wu(n, r, i) {
  const a = B$.get(n)
  if (a != null && a[r]) return Hu(a[r], i.dir)
  const l = jh.get(r)
  return l
    ? Hu(l, i.dir)
    : {
        keyframes: [],
        options: { duration: 0 },
      }
}
function qu(n, r) {
  return new Promise(i => {
    function a(l) {
      l.target === n && (n.removeEventListener(r, a), i())
    }
    n.addEventListener(r, a)
  })
}
function Yu(n, r, i) {
  return new Promise(a => {
    if ((i == null ? void 0 : i.duration) === 1 / 0)
      throw new Error('Promise-based animations must be finite.')
    const l = n.animate(
      r,
      xh(ai({}, i), {
        duration: N$() ? 0 : i.duration,
      }),
    )
    l.addEventListener('cancel', a, { once: !0 }),
      l.addEventListener('finish', a, { once: !0 })
  })
}
function Gu(n) {
  return (
    (n = n.toString().toLowerCase()),
    n.indexOf('ms') > -1
      ? parseFloat(n)
      : n.indexOf('s') > -1
      ? parseFloat(n) * 1e3
      : parseFloat(n)
  )
}
function N$() {
  return window.matchMedia('(prefers-reduced-motion: reduce)').matches
}
function Ku(n) {
  return Promise.all(
    n.getAnimations().map(
      r =>
        new Promise(i => {
          r.cancel(), requestAnimationFrame(i)
        }),
    ),
  )
}
var Ht = class extends Se {
  constructor() {
    super(),
      (this.localize = new hi(this)),
      (this.content = ''),
      (this.placement = 'top'),
      (this.disabled = !1),
      (this.distance = 8),
      (this.open = !1),
      (this.skidding = 0),
      (this.trigger = 'hover focus'),
      (this.hoist = !1),
      (this.handleBlur = () => {
        this.hasTrigger('focus') && this.hide()
      }),
      (this.handleClick = () => {
        this.hasTrigger('click') && (this.open ? this.hide() : this.show())
      }),
      (this.handleFocus = () => {
        this.hasTrigger('focus') && this.show()
      }),
      (this.handleDocumentKeyDown = n => {
        n.key === 'Escape' && (n.stopPropagation(), this.hide())
      }),
      (this.handleMouseOver = () => {
        if (this.hasTrigger('hover')) {
          const n = Gu(getComputedStyle(this).getPropertyValue('--show-delay'))
          clearTimeout(this.hoverTimeout),
            (this.hoverTimeout = window.setTimeout(() => this.show(), n))
        }
      }),
      (this.handleMouseOut = () => {
        if (this.hasTrigger('hover')) {
          const n = Gu(getComputedStyle(this).getPropertyValue('--hide-delay'))
          clearTimeout(this.hoverTimeout),
            (this.hoverTimeout = window.setTimeout(() => this.hide(), n))
        }
      }),
      this.addEventListener('blur', this.handleBlur, !0),
      this.addEventListener('focus', this.handleFocus, !0),
      this.addEventListener('click', this.handleClick),
      this.addEventListener('mouseover', this.handleMouseOver),
      this.addEventListener('mouseout', this.handleMouseOut)
  }
  disconnectedCallback() {
    var n
    super.disconnectedCallback(),
      (n = this.closeWatcher) == null || n.destroy(),
      document.removeEventListener('keydown', this.handleDocumentKeyDown)
  }
  firstUpdated() {
    ;(this.body.hidden = !this.open),
      this.open && ((this.popup.active = !0), this.popup.reposition())
  }
  hasTrigger(n) {
    return this.trigger.split(' ').includes(n)
  }
  async handleOpenChange() {
    var n, r
    if (this.open) {
      if (this.disabled) return
      this.emit('sl-show'),
        'CloseWatcher' in window
          ? ((n = this.closeWatcher) == null || n.destroy(),
            (this.closeWatcher = new CloseWatcher()),
            (this.closeWatcher.onclose = () => {
              this.hide()
            }))
          : document.addEventListener('keydown', this.handleDocumentKeyDown),
        await Ku(this.body),
        (this.body.hidden = !1),
        (this.popup.active = !0)
      const { keyframes: i, options: a } = Wu(this, 'tooltip.show', {
        dir: this.localize.dir(),
      })
      await Yu(this.popup.popup, i, a),
        this.popup.reposition(),
        this.emit('sl-after-show')
    } else {
      this.emit('sl-hide'),
        (r = this.closeWatcher) == null || r.destroy(),
        document.removeEventListener('keydown', this.handleDocumentKeyDown),
        await Ku(this.body)
      const { keyframes: i, options: a } = Wu(this, 'tooltip.hide', {
        dir: this.localize.dir(),
      })
      await Yu(this.popup.popup, i, a),
        (this.popup.active = !1),
        (this.body.hidden = !0),
        this.emit('sl-after-hide')
    }
  }
  async handleOptionsChange() {
    this.hasUpdated && (await this.updateComplete, this.popup.reposition())
  }
  handleDisabledChange() {
    this.disabled && this.open && this.hide()
  }
  /** Shows the tooltip. */
  async show() {
    if (!this.open) return (this.open = !0), qu(this, 'sl-after-show')
  }
  /** Hides the tooltip */
  async hide() {
    if (this.open) return (this.open = !1), qu(this, 'sl-after-hide')
  }
  //
  // NOTE: Tooltip is a bit unique in that we're using aria-live instead of aria-labelledby to trick screen readers into
  // announcing the content. It works really well, but it violates an accessibility rule. We're also adding the
  // aria-describedby attribute to a slot, which is required by <sl-popup> to correctly locate the first assigned
  // element, otherwise positioning is incorrect.
  //
  render() {
    return X`
      <sl-popup
        part="base"
        exportparts="
          popup:base__popup,
          arrow:base__arrow
        "
        class=${pn({
          tooltip: !0,
          'tooltip--open': this.open,
        })}
        placement=${this.placement}
        distance=${this.distance}
        skidding=${this.skidding}
        strategy=${this.hoist ? 'fixed' : 'absolute'}
        flip
        shift
        arrow
        hover-bridge
      >
        ${''}
        <slot slot="anchor" aria-describedby="tooltip"></slot>

        ${''}
        <div part="body" id="tooltip" class="tooltip__body" role="tooltip" aria-live=${
          this.open ? 'polite' : 'off'
        }>
          <slot name="content">${this.content}</slot>
        </div>
      </sl-popup>
    `
  }
}
Ht.styles = [vn, Zw]
Ht.dependencies = { 'sl-popup': Ct }
R([Ie('slot:not([name])')], Ht.prototype, 'defaultSlot', 2)
R([Ie('.tooltip__body')], Ht.prototype, 'body', 2)
R([Ie('sl-popup')], Ht.prototype, 'popup', 2)
R([V()], Ht.prototype, 'content', 2)
R([V()], Ht.prototype, 'placement', 2)
R([V({ type: Boolean, reflect: !0 })], Ht.prototype, 'disabled', 2)
R([V({ type: Number })], Ht.prototype, 'distance', 2)
R([V({ type: Boolean, reflect: !0 })], Ht.prototype, 'open', 2)
R([V({ type: Number })], Ht.prototype, 'skidding', 2)
R([V()], Ht.prototype, 'trigger', 2)
R([V({ type: Boolean })], Ht.prototype, 'hoist', 2)
R(
  [le('open', { waitUntilFirstUpdate: !0 })],
  Ht.prototype,
  'handleOpenChange',
  1,
)
R(
  [le(['content', 'distance', 'hoist', 'placement', 'skidding'])],
  Ht.prototype,
  'handleOptionsChange',
  1,
)
R([le('disabled')], Ht.prototype, 'handleDisabledChange', 1)
zo('tooltip.show', {
  keyframes: [
    { opacity: 0, scale: 0.8 },
    { opacity: 1, scale: 1 },
  ],
  options: { duration: 150, easing: 'ease' },
})
zo('tooltip.hide', {
  keyframes: [
    { opacity: 1, scale: 1 },
    { opacity: 0, scale: 0.8 },
  ],
  options: { duration: 150, easing: 'ease' },
})
const F$ = `:host {
  --max-width: 100%;
  --show-delay: 0;
  --hide-delay: 0;
}
sl-popup::part(popup) {
  pointer-events: none;
}
:host([enterable]) sl-popup::part(popup) {
  pointer-events: all;
}
`
zo('tooltip.show', {
  keyframes: [{ opacity: 0 }, { opacity: 1 }],
  options: { duration: 150, easing: 'ease-in-out' },
})
zo('tooltip.hide', {
  keyframes: [{ opacity: 1 }, { opacity: 0 }],
  options: { duration: 200, transorm: '', easing: 'ease-in-out' },
})
class Vu extends mn(Ht, Eo) {
  constructor() {
    super(), (this.enterable = !1)
  }
}
Y(Vu, 'styles', [It(), Ht.styles, dt(F$)]),
  Y(Vu, 'properties', {
    ...Ht.properties,
    enterable: { type: Boolean, reflect: !0 },
  })
const H$ = `:host {
  --information-font-size: var(--font-size);
  --information-color: var(--color-header);

  display: block;
}
:host-context([mode='dark']) {
  --information-color: var(--color-gray-200);
}
[part='base'] {
  color: var(--information-color);
  font-weight: var(--text-semibold);
  display: flex;
  gap: var(--step);
  align-items: center;
  white-space: nowrap;
  font-size: var(--information-font-size);
}
[part='info'] tbk-icon {
  cursor: pointer;
}
tbk-tooltip::part(base__popup) {
  color: var(--tooltip-text);
  font-size: var(--text-xs);
  font-weight: var(--font-weight);
  background: var(--tooltip-background);
  padding: var(--step-2) var(--step-3);
  white-space: wrap;
  border-radius: var(--tooltip-border-radius);
  box-shadow: var(--tooltip-shadow);
  z-index: var(--layer-high);
}
`
class Xu extends ue {
  constructor() {
    super(),
      (this.text = ''),
      (this.side = Qe.Right),
      (this.size = Pt.S),
      (this._hasTooltip = !1)
  }
  _renderInfo() {
    return this._hasTooltip || this.text
      ? X`
        <tbk-tooltip
          part="info"
          placement="right"
          hoist
        >
          <div slot="content">
            <slot
              @slotchange="${this.handleSlotchange}"
              name="content"
            ></slot>
            ${this.text}
          </div>

          <tbk-icon
            library="heroicons"
            name="information-circle"
          ></tbk-icon>
        </tbk-tooltip>
      `
      : X`<slot
        @slotchange="${this.handleSlotchange}"
        name="content"
      ></slot>`
  }
  handleSlotchange() {
    const r = this.shadowRoot
      .querySelector('slot[name="content"]')
      .assignedElements()
    r.length > 0
      ? (this._hasTooltip = r.some(
          i => i.tagName !== 'SLOT' || i.assignedElements().length > 0,
        ))
      : (this._hasTooltip = !1)
  }
  render() {
    return X`
      <span part="base">
        ${Tt(this.side === Qe.Left, this._renderInfo())}
        <slot></slot>
        ${Tt(this.side === Qe.Right, this._renderInfo())}
      </span>
    `
  }
}
Y(Xu, 'styles', [It(), ce(), dt(H$)]),
  Y(Xu, 'properties', {
    text: { type: String },
    side: { type: String, reflect: !0 },
    size: { type: String, reflect: !0 },
    _hasTooltip: { type: Boolean, state: !0 },
  })
const W$ = `:host {
  --text-block-font-size: var(--font-size);
  --text-block-color: var(--color-variant);
  --text-block-color-content: var(--color-gray-400);

  display: block;
}
:host-context([mode='dark']) {
  --text-block-color: var(--color-gray-200);
  --text-block-color-content: var(--color-gray-300);
}
:host([inherit]) {
  --text-block-color: inherit;
}
slot:empty {
  position: absolute;
}
[part='base'] {
  display: flex;
  align-items: center;
  gap: var(--step-2);
}
[part='headline'] {
  display: flex;
  align-items: center;
  gap: var(--step);
}
[part='headline'] > tbk-information::part(base) {
  display: inline-flex;
  color: var(--text-block-color);
  font-size: var(--text-block-font-size);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[part='content'] {
  display: flex;
  flex-direction: column;
  gap: var(--step);
  overflow: hidden;
}
[part='content'] > small {
  color: var(--text-block-color-content);
  font-size: var(--text-xs);
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
[part='text'] {
  display: block;
  color: var(--text-block-color);
}
`
class Zu extends ue {
  constructor() {
    super(),
      (this.size = Pt.M),
      (this.variant = bt.Neutral),
      (this.inherit = !1)
  }
  render() {
    return X`
      <div part="base">
        <slot name="before"></slot>
        <div part="content">
          ${Tt(
            this.headline,
            X`
              <span part="headline">
                <slot name="badge"></slot>
                <tbk-information
                  .text="${this.description}"
                  .size="${this.size}"
                  >${this.headline}</tbk-information
                >
              </span>
            `,
          )}
          ${Tt(this.tagline, X`<small>${this.tagline}</small>`)}
          <slot part="text"></slot>
        </div>
        <slot name="after"></slot>
      </div>
    `
  }
}
Y(Zu, 'styles', [It(), ce(), Ar(), dt(W$)]),
  Y(Zu, 'properties', {
    size: { type: String, reflect: !0 },
    variant: { type: String, reflect: !0 },
    headline: { type: String },
    tagline: { type: String },
    description: { type: String },
    inherit: { type: Boolean, reflect: !0 },
  })
const q$ = `:host {
  --model-name-font-size: var(--font-size);
  --model-name-font-weight: var(--font-weight);
  --model-name-font-family: var(--font-accent);
  --model-name-color-icon: var(--color-gray-500);
  --model-name-color-icon-main: var(--color-deep-blue-800);
  --model-name-background-highlighted: var(--color-gray-5);
  --model-name-background-highlighted-hover: var(--color-gray-10);
  --model-name-color-model: var(--color-deep-blue-500);
  --model-name-color-schema: var(--color-deep-blue-600);
  --model-name-color-catalog: var(--color-deep-blue-800);
  --model-name-color-reduced: var(--color-gray);

  display: inline-flex;
  align-items: center;
  gap: var(--step);
  min-height: var(--step-2);
  line-height: 1;
  white-space: nowrap;
  font-family: var(--model-name-font-family);
  font-weight: var(--model-name-font-weight);
}
:host-context([mode='dark']) {
  --model-name-color-icon-main: var(--color-deep-blue-100);
  --model-name-background-highlighted: var(--color-gray-10);
  --model-name-background-highlighted-hover: var(--color-gray-5);
  --model-name-color-model: var(--color-deep-blue-200);
  --model-name-color-schema: var(--color-deep-blue-300);
  --model-name-color-catalog: var(--color-deep-blue-400);
  --model-name-color-reduced: var(--color-gray);
}
[part='icon'] {
  display: flex;
  flex-shrink: 0;
  font-size: calc(var(--model-name-font-size) * 1.25);
  color: var(--model-name-color-icon-main);
}
[part='text'] {
  width: 100%;
  display: inline-flex;
  overflow: hidden;
  border-radius: var(--radius-2xs);
}
[part='catalog'] > span,
[part='schema'] > span,
[part='model'] > span {
  display: inline-flex;
  align-items: center;
  font-size: var(--model-name-font-size);
  background: transparent;
  padding: 0;
  border-radius: none;
}
:host([highlighted]) [part='catalog'] > span,
:host([highlighted]) [part='schema'] > span,
:host([highlighted]) [part='model'] > span {
  background: var(--model-name-background-highlighted);
  padding: var(--half) var(--step);
  border-radius: var(--radius-2xs);
}
[part='model'] > span {
  display: inline-block;
  text-overflow: ellipsis;
  overflow: hidden;
}
[part='catalog'],
[part='schema'] {
  display: flex;
  align-items: center;
}
[part='icon'],
[part='model'] {
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--model-name-color-model);
}
[part='schema'] {
  color: var(--model-name-color-schema);
}
[part='catalog'] {
  color: var(--model-name-color-catalog);
}
:host([reduce-color]) [part='schema'],
:host([reduce-color]) [part='catalog'] {
  color: var(--model-name-color-reduced);
}
[part='schema'] > small,
[part='catalog'] > small {
  line-height: 1;
}
[part='hidden'] {
  display: inline-flex;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  position: fixed;
  bottom: 0;
  top: 0;
  font-size: var(--model-name-font-size);
}
tbk-icon[part='ellipsis'] {
  background: var(--model-name-background-highlighted);
  flex-shrink: 0;
  padding: 0 var(--step);
  border-radius: var(--radius-2xs);
}
tbk-icon[part='ellipsis']:hover {
  background: var(--model-name-background-highlighted-hover);
}
tbk-tooltip::part(base__popup) {
  color: var(--tooltip-text);
  font-size: var(--text-xs);
  font-weight: var(--font-weight);
  background: var(--tooltip-background);
  padding: var(--step) var(--step-2);
  white-space: wrap;
  border-radius: var(--radius-2xs);
  box-shadow: var(--tooltip-shadow);
  z-index: var(--layer-high);
  overflow: hidden;
  max-width: 80%;
  overflow-wrap: break-word;
}
small[part='ellipsis'] {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 var(--step);
  background: var(--model-name-background-highlighted);
  border-radius: var(--radius-2xs);
}
`
var _o = { exports: {} }
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
_o.exports
;(function (n, r) {
  ;(function () {
    var i,
      a = '4.17.21',
      l = 200,
      d = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
      f = 'Expected a function',
      v = 'Invalid `variable` option passed into `_.template`',
      m = '__lodash_hash_undefined__',
      _ = 500,
      k = '__lodash_placeholder__',
      C = 1,
      F = 2,
      T = 4,
      z = 1,
      w = 2,
      x = 1,
      P = 2,
      G = 4,
      U = 8,
      it = 16,
      J = 32,
      q = 64,
      I = 128,
      L = 256,
      nt = 512,
      ot = 30,
      j = '...',
      mt = 800,
      Et = 16,
      W = 1,
      D = 2,
      M = 3,
      H = 1 / 0,
      B = 9007199254740991,
      at = 17976931348623157e292,
      rt = NaN,
      ft = 4294967295,
      zt = ft - 1,
      Dt = ft >>> 1,
      Gt = [
        ['ary', I],
        ['bind', x],
        ['bindKey', P],
        ['curry', U],
        ['curryRight', it],
        ['flip', nt],
        ['partial', J],
        ['partialRight', q],
        ['rearg', L],
      ],
      Bt = '[object Arguments]',
      De = '[object Array]',
      nn = '[object AsyncFunction]',
      Be = '[object Boolean]',
      fe = '[object Date]',
      Zt = '[object DOMException]',
      pe = '[object Error]',
      Ve = '[object Function]',
      In = '[object GeneratorFunction]',
      Ue = '[object Map]',
      zr = '[object Number]',
      Qh = '[object Null]',
      rn = '[object Object]',
      za = '[object Promise]',
      td = '[object Proxy]',
      Or = '[object RegExp]',
      Ne = '[object Set]',
      Pr = '[object String]',
      pi = '[object Symbol]',
      ed = '[object Undefined]',
      Rr = '[object WeakMap]',
      nd = '[object WeakSet]',
      Lr = '[object ArrayBuffer]',
      tr = '[object DataView]',
      Oo = '[object Float32Array]',
      Po = '[object Float64Array]',
      Ro = '[object Int8Array]',
      Lo = '[object Int16Array]',
      Mo = '[object Int32Array]',
      Io = '[object Uint8Array]',
      Do = '[object Uint8ClampedArray]',
      Bo = '[object Uint16Array]',
      Uo = '[object Uint32Array]',
      rd = /\b__p \+= '';/g,
      id = /\b(__p \+=) '' \+/g,
      od = /(__e\(.*?\)|\b__t\)) \+\n'';/g,
      Oa = /&(?:amp|lt|gt|quot|#39);/g,
      Pa = /[&<>"']/g,
      sd = RegExp(Oa.source),
      ad = RegExp(Pa.source),
      ld = /<%-([\s\S]+?)%>/g,
      cd = /<%([\s\S]+?)%>/g,
      Ra = /<%=([\s\S]+?)%>/g,
      ud = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
      hd = /^\w*$/,
      dd =
        /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
      No = /[\\^$.*+?()[\]{}|]/g,
      fd = RegExp(No.source),
      Fo = /^\s+/,
      pd = /\s/,
      gd = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
      vd = /\{\n\/\* \[wrapped with (.+)\] \*/,
      md = /,? & /,
      bd = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
      yd = /[()=,{}\[\]\/\s]/,
      _d = /\\(\\)?/g,
      wd = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
      La = /\w*$/,
      $d = /^[-+]0x[0-9a-f]+$/i,
      xd = /^0b[01]+$/i,
      Sd = /^\[object .+?Constructor\]$/,
      Cd = /^0o[0-7]+$/i,
      Ad = /^(?:0|[1-9]\d*)$/,
      Ed = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
      gi = /($^)/,
      kd = /['\n\r\u2028\u2029\\]/g,
      vi = '\\ud800-\\udfff',
      Td = '\\u0300-\\u036f',
      zd = '\\ufe20-\\ufe2f',
      Od = '\\u20d0-\\u20ff',
      Ma = Td + zd + Od,
      Ia = '\\u2700-\\u27bf',
      Da = 'a-z\\xdf-\\xf6\\xf8-\\xff',
      Pd = '\\xac\\xb1\\xd7\\xf7',
      Rd = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
      Ld = '\\u2000-\\u206f',
      Md =
        ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
      Ba = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
      Ua = '\\ufe0e\\ufe0f',
      Na = Pd + Rd + Ld + Md,
      Ho = "['’]",
      Id = '[' + vi + ']',
      Fa = '[' + Na + ']',
      mi = '[' + Ma + ']',
      Ha = '\\d+',
      Dd = '[' + Ia + ']',
      Wa = '[' + Da + ']',
      qa = '[^' + vi + Na + Ha + Ia + Da + Ba + ']',
      Wo = '\\ud83c[\\udffb-\\udfff]',
      Bd = '(?:' + mi + '|' + Wo + ')',
      Ya = '[^' + vi + ']',
      qo = '(?:\\ud83c[\\udde6-\\uddff]){2}',
      Yo = '[\\ud800-\\udbff][\\udc00-\\udfff]',
      er = '[' + Ba + ']',
      Ga = '\\u200d',
      Ka = '(?:' + Wa + '|' + qa + ')',
      Ud = '(?:' + er + '|' + qa + ')',
      Va = '(?:' + Ho + '(?:d|ll|m|re|s|t|ve))?',
      Xa = '(?:' + Ho + '(?:D|LL|M|RE|S|T|VE))?',
      Za = Bd + '?',
      ja = '[' + Ua + ']?',
      Nd = '(?:' + Ga + '(?:' + [Ya, qo, Yo].join('|') + ')' + ja + Za + ')*',
      Fd = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
      Hd = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
      Ja = ja + Za + Nd,
      Wd = '(?:' + [Dd, qo, Yo].join('|') + ')' + Ja,
      qd = '(?:' + [Ya + mi + '?', mi, qo, Yo, Id].join('|') + ')',
      Yd = RegExp(Ho, 'g'),
      Gd = RegExp(mi, 'g'),
      Go = RegExp(Wo + '(?=' + Wo + ')|' + qd + Ja, 'g'),
      Kd = RegExp(
        [
          er + '?' + Wa + '+' + Va + '(?=' + [Fa, er, '$'].join('|') + ')',
          Ud + '+' + Xa + '(?=' + [Fa, er + Ka, '$'].join('|') + ')',
          er + '?' + Ka + '+' + Va,
          er + '+' + Xa,
          Hd,
          Fd,
          Ha,
          Wd,
        ].join('|'),
        'g',
      ),
      Vd = RegExp('[' + Ga + vi + Ma + Ua + ']'),
      Xd = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
      Zd = [
        'Array',
        'Buffer',
        'DataView',
        'Date',
        'Error',
        'Float32Array',
        'Float64Array',
        'Function',
        'Int8Array',
        'Int16Array',
        'Int32Array',
        'Map',
        'Math',
        'Object',
        'Promise',
        'RegExp',
        'Set',
        'String',
        'Symbol',
        'TypeError',
        'Uint8Array',
        'Uint8ClampedArray',
        'Uint16Array',
        'Uint32Array',
        'WeakMap',
        '_',
        'clearTimeout',
        'isFinite',
        'parseInt',
        'setTimeout',
      ],
      jd = -1,
      At = {}
    ;(At[Oo] =
      At[Po] =
      At[Ro] =
      At[Lo] =
      At[Mo] =
      At[Io] =
      At[Do] =
      At[Bo] =
      At[Uo] =
        !0),
      (At[Bt] =
        At[De] =
        At[Lr] =
        At[Be] =
        At[tr] =
        At[fe] =
        At[pe] =
        At[Ve] =
        At[Ue] =
        At[zr] =
        At[rn] =
        At[Or] =
        At[Ne] =
        At[Pr] =
        At[Rr] =
          !1)
    var St = {}
    ;(St[Bt] =
      St[De] =
      St[Lr] =
      St[tr] =
      St[Be] =
      St[fe] =
      St[Oo] =
      St[Po] =
      St[Ro] =
      St[Lo] =
      St[Mo] =
      St[Ue] =
      St[zr] =
      St[rn] =
      St[Or] =
      St[Ne] =
      St[Pr] =
      St[pi] =
      St[Io] =
      St[Do] =
      St[Bo] =
      St[Uo] =
        !0),
      (St[pe] = St[Ve] = St[Rr] = !1)
    var Jd = {
        // Latin-1 Supplement block.
        À: 'A',
        Á: 'A',
        Â: 'A',
        Ã: 'A',
        Ä: 'A',
        Å: 'A',
        à: 'a',
        á: 'a',
        â: 'a',
        ã: 'a',
        ä: 'a',
        å: 'a',
        Ç: 'C',
        ç: 'c',
        Ð: 'D',
        ð: 'd',
        È: 'E',
        É: 'E',
        Ê: 'E',
        Ë: 'E',
        è: 'e',
        é: 'e',
        ê: 'e',
        ë: 'e',
        Ì: 'I',
        Í: 'I',
        Î: 'I',
        Ï: 'I',
        ì: 'i',
        í: 'i',
        î: 'i',
        ï: 'i',
        Ñ: 'N',
        ñ: 'n',
        Ò: 'O',
        Ó: 'O',
        Ô: 'O',
        Õ: 'O',
        Ö: 'O',
        Ø: 'O',
        ò: 'o',
        ó: 'o',
        ô: 'o',
        õ: 'o',
        ö: 'o',
        ø: 'o',
        Ù: 'U',
        Ú: 'U',
        Û: 'U',
        Ü: 'U',
        ù: 'u',
        ú: 'u',
        û: 'u',
        ü: 'u',
        Ý: 'Y',
        ý: 'y',
        ÿ: 'y',
        Æ: 'Ae',
        æ: 'ae',
        Þ: 'Th',
        þ: 'th',
        ß: 'ss',
        // Latin Extended-A block.
        Ā: 'A',
        Ă: 'A',
        Ą: 'A',
        ā: 'a',
        ă: 'a',
        ą: 'a',
        Ć: 'C',
        Ĉ: 'C',
        Ċ: 'C',
        Č: 'C',
        ć: 'c',
        ĉ: 'c',
        ċ: 'c',
        č: 'c',
        Ď: 'D',
        Đ: 'D',
        ď: 'd',
        đ: 'd',
        Ē: 'E',
        Ĕ: 'E',
        Ė: 'E',
        Ę: 'E',
        Ě: 'E',
        ē: 'e',
        ĕ: 'e',
        ė: 'e',
        ę: 'e',
        ě: 'e',
        Ĝ: 'G',
        Ğ: 'G',
        Ġ: 'G',
        Ģ: 'G',
        ĝ: 'g',
        ğ: 'g',
        ġ: 'g',
        ģ: 'g',
        Ĥ: 'H',
        Ħ: 'H',
        ĥ: 'h',
        ħ: 'h',
        Ĩ: 'I',
        Ī: 'I',
        Ĭ: 'I',
        Į: 'I',
        İ: 'I',
        ĩ: 'i',
        ī: 'i',
        ĭ: 'i',
        į: 'i',
        ı: 'i',
        Ĵ: 'J',
        ĵ: 'j',
        Ķ: 'K',
        ķ: 'k',
        ĸ: 'k',
        Ĺ: 'L',
        Ļ: 'L',
        Ľ: 'L',
        Ŀ: 'L',
        Ł: 'L',
        ĺ: 'l',
        ļ: 'l',
        ľ: 'l',
        ŀ: 'l',
        ł: 'l',
        Ń: 'N',
        Ņ: 'N',
        Ň: 'N',
        Ŋ: 'N',
        ń: 'n',
        ņ: 'n',
        ň: 'n',
        ŋ: 'n',
        Ō: 'O',
        Ŏ: 'O',
        Ő: 'O',
        ō: 'o',
        ŏ: 'o',
        ő: 'o',
        Ŕ: 'R',
        Ŗ: 'R',
        Ř: 'R',
        ŕ: 'r',
        ŗ: 'r',
        ř: 'r',
        Ś: 'S',
        Ŝ: 'S',
        Ş: 'S',
        Š: 'S',
        ś: 's',
        ŝ: 's',
        ş: 's',
        š: 's',
        Ţ: 'T',
        Ť: 'T',
        Ŧ: 'T',
        ţ: 't',
        ť: 't',
        ŧ: 't',
        Ũ: 'U',
        Ū: 'U',
        Ŭ: 'U',
        Ů: 'U',
        Ű: 'U',
        Ų: 'U',
        ũ: 'u',
        ū: 'u',
        ŭ: 'u',
        ů: 'u',
        ű: 'u',
        ų: 'u',
        Ŵ: 'W',
        ŵ: 'w',
        Ŷ: 'Y',
        ŷ: 'y',
        Ÿ: 'Y',
        Ź: 'Z',
        Ż: 'Z',
        Ž: 'Z',
        ź: 'z',
        ż: 'z',
        ž: 'z',
        Ĳ: 'IJ',
        ĳ: 'ij',
        Œ: 'Oe',
        œ: 'oe',
        ŉ: "'n",
        ſ: 's',
      },
      Qd = {
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        "'": '&#39;',
      },
      tf = {
        '&amp;': '&',
        '&lt;': '<',
        '&gt;': '>',
        '&quot;': '"',
        '&#39;': "'",
      },
      ef = {
        '\\': '\\',
        "'": "'",
        '\n': 'n',
        '\r': 'r',
        '\u2028': 'u2028',
        '\u2029': 'u2029',
      },
      nf = parseFloat,
      rf = parseInt,
      Qa = typeof ae == 'object' && ae && ae.Object === Object && ae,
      of = typeof self == 'object' && self && self.Object === Object && self,
      Vt = Qa || of || Function('return this')(),
      Ko = r && !r.nodeType && r,
      Dn = Ko && !0 && n && !n.nodeType && n,
      tl = Dn && Dn.exports === Ko,
      Vo = tl && Qa.process,
      Ce = (function () {
        try {
          var b = Dn && Dn.require && Dn.require('util').types
          return b || (Vo && Vo.binding && Vo.binding('util'))
        } catch {}
      })(),
      el = Ce && Ce.isArrayBuffer,
      nl = Ce && Ce.isDate,
      rl = Ce && Ce.isMap,
      il = Ce && Ce.isRegExp,
      ol = Ce && Ce.isSet,
      sl = Ce && Ce.isTypedArray
    function ge(b, S, $) {
      switch ($.length) {
        case 0:
          return b.call(S)
        case 1:
          return b.call(S, $[0])
        case 2:
          return b.call(S, $[0], $[1])
        case 3:
          return b.call(S, $[0], $[1], $[2])
      }
      return b.apply(S, $)
    }
    function sf(b, S, $, K) {
      for (var st = -1, yt = b == null ? 0 : b.length; ++st < yt; ) {
        var Ut = b[st]
        S(K, Ut, $(Ut), b)
      }
      return K
    }
    function Ae(b, S) {
      for (
        var $ = -1, K = b == null ? 0 : b.length;
        ++$ < K && S(b[$], $, b) !== !1;

      );
      return b
    }
    function af(b, S) {
      for (var $ = b == null ? 0 : b.length; $-- && S(b[$], $, b) !== !1; );
      return b
    }
    function al(b, S) {
      for (var $ = -1, K = b == null ? 0 : b.length; ++$ < K; )
        if (!S(b[$], $, b)) return !1
      return !0
    }
    function _n(b, S) {
      for (
        var $ = -1, K = b == null ? 0 : b.length, st = 0, yt = [];
        ++$ < K;

      ) {
        var Ut = b[$]
        S(Ut, $, b) && (yt[st++] = Ut)
      }
      return yt
    }
    function bi(b, S) {
      var $ = b == null ? 0 : b.length
      return !!$ && nr(b, S, 0) > -1
    }
    function Xo(b, S, $) {
      for (var K = -1, st = b == null ? 0 : b.length; ++K < st; )
        if ($(S, b[K])) return !0
      return !1
    }
    function kt(b, S) {
      for (var $ = -1, K = b == null ? 0 : b.length, st = Array(K); ++$ < K; )
        st[$] = S(b[$], $, b)
      return st
    }
    function wn(b, S) {
      for (var $ = -1, K = S.length, st = b.length; ++$ < K; ) b[st + $] = S[$]
      return b
    }
    function Zo(b, S, $, K) {
      var st = -1,
        yt = b == null ? 0 : b.length
      for (K && yt && ($ = b[++st]); ++st < yt; ) $ = S($, b[st], st, b)
      return $
    }
    function lf(b, S, $, K) {
      var st = b == null ? 0 : b.length
      for (K && st && ($ = b[--st]); st--; ) $ = S($, b[st], st, b)
      return $
    }
    function jo(b, S) {
      for (var $ = -1, K = b == null ? 0 : b.length; ++$ < K; )
        if (S(b[$], $, b)) return !0
      return !1
    }
    var cf = Jo('length')
    function uf(b) {
      return b.split('')
    }
    function hf(b) {
      return b.match(bd) || []
    }
    function ll(b, S, $) {
      var K
      return (
        $(b, function (st, yt, Ut) {
          if (S(st, yt, Ut)) return (K = yt), !1
        }),
        K
      )
    }
    function yi(b, S, $, K) {
      for (var st = b.length, yt = $ + (K ? 1 : -1); K ? yt-- : ++yt < st; )
        if (S(b[yt], yt, b)) return yt
      return -1
    }
    function nr(b, S, $) {
      return S === S ? xf(b, S, $) : yi(b, cl, $)
    }
    function df(b, S, $, K) {
      for (var st = $ - 1, yt = b.length; ++st < yt; )
        if (K(b[st], S)) return st
      return -1
    }
    function cl(b) {
      return b !== b
    }
    function ul(b, S) {
      var $ = b == null ? 0 : b.length
      return $ ? ts(b, S) / $ : rt
    }
    function Jo(b) {
      return function (S) {
        return S == null ? i : S[b]
      }
    }
    function Qo(b) {
      return function (S) {
        return b == null ? i : b[S]
      }
    }
    function hl(b, S, $, K, st) {
      return (
        st(b, function (yt, Ut, xt) {
          $ = K ? ((K = !1), yt) : S($, yt, Ut, xt)
        }),
        $
      )
    }
    function ff(b, S) {
      var $ = b.length
      for (b.sort(S); $--; ) b[$] = b[$].value
      return b
    }
    function ts(b, S) {
      for (var $, K = -1, st = b.length; ++K < st; ) {
        var yt = S(b[K])
        yt !== i && ($ = $ === i ? yt : $ + yt)
      }
      return $
    }
    function es(b, S) {
      for (var $ = -1, K = Array(b); ++$ < b; ) K[$] = S($)
      return K
    }
    function pf(b, S) {
      return kt(S, function ($) {
        return [$, b[$]]
      })
    }
    function dl(b) {
      return b && b.slice(0, vl(b) + 1).replace(Fo, '')
    }
    function ve(b) {
      return function (S) {
        return b(S)
      }
    }
    function ns(b, S) {
      return kt(S, function ($) {
        return b[$]
      })
    }
    function Mr(b, S) {
      return b.has(S)
    }
    function fl(b, S) {
      for (var $ = -1, K = b.length; ++$ < K && nr(S, b[$], 0) > -1; );
      return $
    }
    function pl(b, S) {
      for (var $ = b.length; $-- && nr(S, b[$], 0) > -1; );
      return $
    }
    function gf(b, S) {
      for (var $ = b.length, K = 0; $--; ) b[$] === S && ++K
      return K
    }
    var vf = Qo(Jd),
      mf = Qo(Qd)
    function bf(b) {
      return '\\' + ef[b]
    }
    function yf(b, S) {
      return b == null ? i : b[S]
    }
    function rr(b) {
      return Vd.test(b)
    }
    function _f(b) {
      return Xd.test(b)
    }
    function wf(b) {
      for (var S, $ = []; !(S = b.next()).done; ) $.push(S.value)
      return $
    }
    function rs(b) {
      var S = -1,
        $ = Array(b.size)
      return (
        b.forEach(function (K, st) {
          $[++S] = [st, K]
        }),
        $
      )
    }
    function gl(b, S) {
      return function ($) {
        return b(S($))
      }
    }
    function $n(b, S) {
      for (var $ = -1, K = b.length, st = 0, yt = []; ++$ < K; ) {
        var Ut = b[$]
        ;(Ut === S || Ut === k) && ((b[$] = k), (yt[st++] = $))
      }
      return yt
    }
    function _i(b) {
      var S = -1,
        $ = Array(b.size)
      return (
        b.forEach(function (K) {
          $[++S] = K
        }),
        $
      )
    }
    function $f(b) {
      var S = -1,
        $ = Array(b.size)
      return (
        b.forEach(function (K) {
          $[++S] = [K, K]
        }),
        $
      )
    }
    function xf(b, S, $) {
      for (var K = $ - 1, st = b.length; ++K < st; ) if (b[K] === S) return K
      return -1
    }
    function Sf(b, S, $) {
      for (var K = $ + 1; K--; ) if (b[K] === S) return K
      return K
    }
    function ir(b) {
      return rr(b) ? Af(b) : cf(b)
    }
    function Fe(b) {
      return rr(b) ? Ef(b) : uf(b)
    }
    function vl(b) {
      for (var S = b.length; S-- && pd.test(b.charAt(S)); );
      return S
    }
    var Cf = Qo(tf)
    function Af(b) {
      for (var S = (Go.lastIndex = 0); Go.test(b); ) ++S
      return S
    }
    function Ef(b) {
      return b.match(Go) || []
    }
    function kf(b) {
      return b.match(Kd) || []
    }
    var Tf = function b(S) {
        S = S == null ? Vt : or.defaults(Vt.Object(), S, or.pick(Vt, Zd))
        var $ = S.Array,
          K = S.Date,
          st = S.Error,
          yt = S.Function,
          Ut = S.Math,
          xt = S.Object,
          is = S.RegExp,
          zf = S.String,
          Ee = S.TypeError,
          wi = $.prototype,
          Of = yt.prototype,
          sr = xt.prototype,
          $i = S['__core-js_shared__'],
          xi = Of.toString,
          wt = sr.hasOwnProperty,
          Pf = 0,
          ml = (function () {
            var t = /[^.]+$/.exec(($i && $i.keys && $i.keys.IE_PROTO) || '')
            return t ? 'Symbol(src)_1.' + t : ''
          })(),
          Si = sr.toString,
          Rf = xi.call(xt),
          Lf = Vt._,
          Mf = is(
            '^' +
              xi
                .call(wt)
                .replace(No, '\\$&')
                .replace(
                  /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
                  '$1.*?',
                ) +
              '$',
          ),
          Ci = tl ? S.Buffer : i,
          xn = S.Symbol,
          Ai = S.Uint8Array,
          bl = Ci ? Ci.allocUnsafe : i,
          Ei = gl(xt.getPrototypeOf, xt),
          yl = xt.create,
          _l = sr.propertyIsEnumerable,
          ki = wi.splice,
          wl = xn ? xn.isConcatSpreadable : i,
          Ir = xn ? xn.iterator : i,
          Bn = xn ? xn.toStringTag : i,
          Ti = (function () {
            try {
              var t = Wn(xt, 'defineProperty')
              return t({}, '', {}), t
            } catch {}
          })(),
          If = S.clearTimeout !== Vt.clearTimeout && S.clearTimeout,
          Df = K && K.now !== Vt.Date.now && K.now,
          Bf = S.setTimeout !== Vt.setTimeout && S.setTimeout,
          zi = Ut.ceil,
          Oi = Ut.floor,
          os = xt.getOwnPropertySymbols,
          Uf = Ci ? Ci.isBuffer : i,
          $l = S.isFinite,
          Nf = wi.join,
          Ff = gl(xt.keys, xt),
          Nt = Ut.max,
          jt = Ut.min,
          Hf = K.now,
          Wf = S.parseInt,
          xl = Ut.random,
          qf = wi.reverse,
          ss = Wn(S, 'DataView'),
          Dr = Wn(S, 'Map'),
          as = Wn(S, 'Promise'),
          ar = Wn(S, 'Set'),
          Br = Wn(S, 'WeakMap'),
          Ur = Wn(xt, 'create'),
          Pi = Br && new Br(),
          lr = {},
          Yf = qn(ss),
          Gf = qn(Dr),
          Kf = qn(as),
          Vf = qn(ar),
          Xf = qn(Br),
          Ri = xn ? xn.prototype : i,
          Nr = Ri ? Ri.valueOf : i,
          Sl = Ri ? Ri.toString : i
        function u(t) {
          if (Rt(t) && !lt(t) && !(t instanceof gt)) {
            if (t instanceof ke) return t
            if (wt.call(t, '__wrapped__')) return Cc(t)
          }
          return new ke(t)
        }
        var cr = /* @__PURE__ */ (function () {
          function t() {}
          return function (e) {
            if (!Ot(e)) return {}
            if (yl) return yl(e)
            t.prototype = e
            var o = new t()
            return (t.prototype = i), o
          }
        })()
        function Li() {}
        function ke(t, e) {
          ;(this.__wrapped__ = t),
            (this.__actions__ = []),
            (this.__chain__ = !!e),
            (this.__index__ = 0),
            (this.__values__ = i)
        }
        ;(u.templateSettings = {
          /**
           * Used to detect `data` property values to be HTML-escaped.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          escape: ld,
          /**
           * Used to detect code to be evaluated.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          evaluate: cd,
          /**
           * Used to detect `data` property values to inject.
           *
           * @memberOf _.templateSettings
           * @type {RegExp}
           */
          interpolate: Ra,
          /**
           * Used to reference the data object in the template text.
           *
           * @memberOf _.templateSettings
           * @type {string}
           */
          variable: '',
          /**
           * Used to import variables into the compiled template.
           *
           * @memberOf _.templateSettings
           * @type {Object}
           */
          imports: {
            /**
             * A reference to the `lodash` function.
             *
             * @memberOf _.templateSettings.imports
             * @type {Function}
             */
            _: u,
          },
        }),
          (u.prototype = Li.prototype),
          (u.prototype.constructor = u),
          (ke.prototype = cr(Li.prototype)),
          (ke.prototype.constructor = ke)
        function gt(t) {
          ;(this.__wrapped__ = t),
            (this.__actions__ = []),
            (this.__dir__ = 1),
            (this.__filtered__ = !1),
            (this.__iteratees__ = []),
            (this.__takeCount__ = ft),
            (this.__views__ = [])
        }
        function Zf() {
          var t = new gt(this.__wrapped__)
          return (
            (t.__actions__ = re(this.__actions__)),
            (t.__dir__ = this.__dir__),
            (t.__filtered__ = this.__filtered__),
            (t.__iteratees__ = re(this.__iteratees__)),
            (t.__takeCount__ = this.__takeCount__),
            (t.__views__ = re(this.__views__)),
            t
          )
        }
        function jf() {
          if (this.__filtered__) {
            var t = new gt(this)
            ;(t.__dir__ = -1), (t.__filtered__ = !0)
          } else (t = this.clone()), (t.__dir__ *= -1)
          return t
        }
        function Jf() {
          var t = this.__wrapped__.value(),
            e = this.__dir__,
            o = lt(t),
            s = e < 0,
            c = o ? t.length : 0,
            h = ug(0, c, this.__views__),
            p = h.start,
            g = h.end,
            y = g - p,
            A = s ? g : p - 1,
            E = this.__iteratees__,
            O = E.length,
            N = 0,
            Z = jt(y, this.__takeCount__)
          if (!o || (!s && c == y && Z == y)) return Vl(t, this.__actions__)
          var tt = []
          t: for (; y-- && N < Z; ) {
            A += e
            for (var ut = -1, et = t[A]; ++ut < O; ) {
              var pt = E[ut],
                vt = pt.iteratee,
                ye = pt.type,
                ee = vt(et)
              if (ye == D) et = ee
              else if (!ee) {
                if (ye == W) continue t
                break t
              }
            }
            tt[N++] = et
          }
          return tt
        }
        ;(gt.prototype = cr(Li.prototype)), (gt.prototype.constructor = gt)
        function Un(t) {
          var e = -1,
            o = t == null ? 0 : t.length
          for (this.clear(); ++e < o; ) {
            var s = t[e]
            this.set(s[0], s[1])
          }
        }
        function Qf() {
          ;(this.__data__ = Ur ? Ur(null) : {}), (this.size = 0)
        }
        function tp(t) {
          var e = this.has(t) && delete this.__data__[t]
          return (this.size -= e ? 1 : 0), e
        }
        function ep(t) {
          var e = this.__data__
          if (Ur) {
            var o = e[t]
            return o === m ? i : o
          }
          return wt.call(e, t) ? e[t] : i
        }
        function np(t) {
          var e = this.__data__
          return Ur ? e[t] !== i : wt.call(e, t)
        }
        function rp(t, e) {
          var o = this.__data__
          return (
            (this.size += this.has(t) ? 0 : 1),
            (o[t] = Ur && e === i ? m : e),
            this
          )
        }
        ;(Un.prototype.clear = Qf),
          (Un.prototype.delete = tp),
          (Un.prototype.get = ep),
          (Un.prototype.has = np),
          (Un.prototype.set = rp)
        function on(t) {
          var e = -1,
            o = t == null ? 0 : t.length
          for (this.clear(); ++e < o; ) {
            var s = t[e]
            this.set(s[0], s[1])
          }
        }
        function ip() {
          ;(this.__data__ = []), (this.size = 0)
        }
        function op(t) {
          var e = this.__data__,
            o = Mi(e, t)
          if (o < 0) return !1
          var s = e.length - 1
          return o == s ? e.pop() : ki.call(e, o, 1), --this.size, !0
        }
        function sp(t) {
          var e = this.__data__,
            o = Mi(e, t)
          return o < 0 ? i : e[o][1]
        }
        function ap(t) {
          return Mi(this.__data__, t) > -1
        }
        function lp(t, e) {
          var o = this.__data__,
            s = Mi(o, t)
          return s < 0 ? (++this.size, o.push([t, e])) : (o[s][1] = e), this
        }
        ;(on.prototype.clear = ip),
          (on.prototype.delete = op),
          (on.prototype.get = sp),
          (on.prototype.has = ap),
          (on.prototype.set = lp)
        function sn(t) {
          var e = -1,
            o = t == null ? 0 : t.length
          for (this.clear(); ++e < o; ) {
            var s = t[e]
            this.set(s[0], s[1])
          }
        }
        function cp() {
          ;(this.size = 0),
            (this.__data__ = {
              hash: new Un(),
              map: new (Dr || on)(),
              string: new Un(),
            })
        }
        function up(t) {
          var e = Ki(this, t).delete(t)
          return (this.size -= e ? 1 : 0), e
        }
        function hp(t) {
          return Ki(this, t).get(t)
        }
        function dp(t) {
          return Ki(this, t).has(t)
        }
        function fp(t, e) {
          var o = Ki(this, t),
            s = o.size
          return o.set(t, e), (this.size += o.size == s ? 0 : 1), this
        }
        ;(sn.prototype.clear = cp),
          (sn.prototype.delete = up),
          (sn.prototype.get = hp),
          (sn.prototype.has = dp),
          (sn.prototype.set = fp)
        function Nn(t) {
          var e = -1,
            o = t == null ? 0 : t.length
          for (this.__data__ = new sn(); ++e < o; ) this.add(t[e])
        }
        function pp(t) {
          return this.__data__.set(t, m), this
        }
        function gp(t) {
          return this.__data__.has(t)
        }
        ;(Nn.prototype.add = Nn.prototype.push = pp), (Nn.prototype.has = gp)
        function He(t) {
          var e = (this.__data__ = new on(t))
          this.size = e.size
        }
        function vp() {
          ;(this.__data__ = new on()), (this.size = 0)
        }
        function mp(t) {
          var e = this.__data__,
            o = e.delete(t)
          return (this.size = e.size), o
        }
        function bp(t) {
          return this.__data__.get(t)
        }
        function yp(t) {
          return this.__data__.has(t)
        }
        function _p(t, e) {
          var o = this.__data__
          if (o instanceof on) {
            var s = o.__data__
            if (!Dr || s.length < l - 1)
              return s.push([t, e]), (this.size = ++o.size), this
            o = this.__data__ = new sn(s)
          }
          return o.set(t, e), (this.size = o.size), this
        }
        ;(He.prototype.clear = vp),
          (He.prototype.delete = mp),
          (He.prototype.get = bp),
          (He.prototype.has = yp),
          (He.prototype.set = _p)
        function Cl(t, e) {
          var o = lt(t),
            s = !o && Yn(t),
            c = !o && !s && kn(t),
            h = !o && !s && !c && fr(t),
            p = o || s || c || h,
            g = p ? es(t.length, zf) : [],
            y = g.length
          for (var A in t)
            (e || wt.call(t, A)) &&
              !(
                p && // Safari 9 has enumerable `arguments.length` in strict mode.
                (A == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
                  (c && (A == 'offset' || A == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays.
                  (h &&
                    (A == 'buffer' ||
                      A == 'byteLength' ||
                      A == 'byteOffset')) || // Skip index properties.
                  un(A, y))
              ) &&
              g.push(A)
          return g
        }
        function Al(t) {
          var e = t.length
          return e ? t[bs(0, e - 1)] : i
        }
        function wp(t, e) {
          return Vi(re(t), Fn(e, 0, t.length))
        }
        function $p(t) {
          return Vi(re(t))
        }
        function ls(t, e, o) {
          ;((o !== i && !We(t[e], o)) || (o === i && !(e in t))) && an(t, e, o)
        }
        function Fr(t, e, o) {
          var s = t[e]
          ;(!(wt.call(t, e) && We(s, o)) || (o === i && !(e in t))) &&
            an(t, e, o)
        }
        function Mi(t, e) {
          for (var o = t.length; o--; ) if (We(t[o][0], e)) return o
          return -1
        }
        function xp(t, e, o, s) {
          return (
            Sn(t, function (c, h, p) {
              e(s, c, o(c), p)
            }),
            s
          )
        }
        function El(t, e) {
          return t && Ze(e, Kt(e), t)
        }
        function Sp(t, e) {
          return t && Ze(e, oe(e), t)
        }
        function an(t, e, o) {
          e == '__proto__' && Ti
            ? Ti(t, e, {
                configurable: !0,
                enumerable: !0,
                value: o,
                writable: !0,
              })
            : (t[e] = o)
        }
        function cs(t, e) {
          for (var o = -1, s = e.length, c = $(s), h = t == null; ++o < s; )
            c[o] = h ? i : Ws(t, e[o])
          return c
        }
        function Fn(t, e, o) {
          return (
            t === t &&
              (o !== i && (t = t <= o ? t : o),
              e !== i && (t = t >= e ? t : e)),
            t
          )
        }
        function Te(t, e, o, s, c, h) {
          var p,
            g = e & C,
            y = e & F,
            A = e & T
          if ((o && (p = c ? o(t, s, c, h) : o(t)), p !== i)) return p
          if (!Ot(t)) return t
          var E = lt(t)
          if (E) {
            if (((p = dg(t)), !g)) return re(t, p)
          } else {
            var O = Jt(t),
              N = O == Ve || O == In
            if (kn(t)) return jl(t, g)
            if (O == rn || O == Bt || (N && !c)) {
              if (((p = y || N ? {} : vc(t)), !g))
                return y ? eg(t, Sp(p, t)) : tg(t, El(p, t))
            } else {
              if (!St[O]) return c ? t : {}
              p = fg(t, O, g)
            }
          }
          h || (h = new He())
          var Z = h.get(t)
          if (Z) return Z
          h.set(t, p),
            Yc(t)
              ? t.forEach(function (et) {
                  p.add(Te(et, e, o, et, t, h))
                })
              : Wc(t) &&
                t.forEach(function (et, pt) {
                  p.set(pt, Te(et, e, o, pt, t, h))
                })
          var tt = A ? (y ? Ts : ks) : y ? oe : Kt,
            ut = E ? i : tt(t)
          return (
            Ae(ut || t, function (et, pt) {
              ut && ((pt = et), (et = t[pt])), Fr(p, pt, Te(et, e, o, pt, t, h))
            }),
            p
          )
        }
        function Cp(t) {
          var e = Kt(t)
          return function (o) {
            return kl(o, t, e)
          }
        }
        function kl(t, e, o) {
          var s = o.length
          if (t == null) return !s
          for (t = xt(t); s--; ) {
            var c = o[s],
              h = e[c],
              p = t[c]
            if ((p === i && !(c in t)) || !h(p)) return !1
          }
          return !0
        }
        function Tl(t, e, o) {
          if (typeof t != 'function') throw new Ee(f)
          return Vr(function () {
            t.apply(i, o)
          }, e)
        }
        function Hr(t, e, o, s) {
          var c = -1,
            h = bi,
            p = !0,
            g = t.length,
            y = [],
            A = e.length
          if (!g) return y
          o && (e = kt(e, ve(o))),
            s
              ? ((h = Xo), (p = !1))
              : e.length >= l && ((h = Mr), (p = !1), (e = new Nn(e)))
          t: for (; ++c < g; ) {
            var E = t[c],
              O = o == null ? E : o(E)
            if (((E = s || E !== 0 ? E : 0), p && O === O)) {
              for (var N = A; N--; ) if (e[N] === O) continue t
              y.push(E)
            } else h(e, O, s) || y.push(E)
          }
          return y
        }
        var Sn = nc(Xe),
          zl = nc(hs, !0)
        function Ap(t, e) {
          var o = !0
          return (
            Sn(t, function (s, c, h) {
              return (o = !!e(s, c, h)), o
            }),
            o
          )
        }
        function Ii(t, e, o) {
          for (var s = -1, c = t.length; ++s < c; ) {
            var h = t[s],
              p = e(h)
            if (p != null && (g === i ? p === p && !be(p) : o(p, g)))
              var g = p,
                y = h
          }
          return y
        }
        function Ep(t, e, o, s) {
          var c = t.length
          for (
            o = ct(o),
              o < 0 && (o = -o > c ? 0 : c + o),
              s = s === i || s > c ? c : ct(s),
              s < 0 && (s += c),
              s = o > s ? 0 : Kc(s);
            o < s;

          )
            t[o++] = e
          return t
        }
        function Ol(t, e) {
          var o = []
          return (
            Sn(t, function (s, c, h) {
              e(s, c, h) && o.push(s)
            }),
            o
          )
        }
        function Xt(t, e, o, s, c) {
          var h = -1,
            p = t.length
          for (o || (o = gg), c || (c = []); ++h < p; ) {
            var g = t[h]
            e > 0 && o(g)
              ? e > 1
                ? Xt(g, e - 1, o, s, c)
                : wn(c, g)
              : s || (c[c.length] = g)
          }
          return c
        }
        var us = rc(),
          Pl = rc(!0)
        function Xe(t, e) {
          return t && us(t, e, Kt)
        }
        function hs(t, e) {
          return t && Pl(t, e, Kt)
        }
        function Di(t, e) {
          return _n(e, function (o) {
            return hn(t[o])
          })
        }
        function Hn(t, e) {
          e = An(e, t)
          for (var o = 0, s = e.length; t != null && o < s; ) t = t[je(e[o++])]
          return o && o == s ? t : i
        }
        function Rl(t, e, o) {
          var s = e(t)
          return lt(t) ? s : wn(s, o(t))
        }
        function Qt(t) {
          return t == null
            ? t === i
              ? ed
              : Qh
            : Bn && Bn in xt(t)
            ? cg(t)
            : $g(t)
        }
        function ds(t, e) {
          return t > e
        }
        function kp(t, e) {
          return t != null && wt.call(t, e)
        }
        function Tp(t, e) {
          return t != null && e in xt(t)
        }
        function zp(t, e, o) {
          return t >= jt(e, o) && t < Nt(e, o)
        }
        function fs(t, e, o) {
          for (
            var s = o ? Xo : bi,
              c = t[0].length,
              h = t.length,
              p = h,
              g = $(h),
              y = 1 / 0,
              A = [];
            p--;

          ) {
            var E = t[p]
            p && e && (E = kt(E, ve(e))),
              (y = jt(E.length, y)),
              (g[p] =
                !o && (e || (c >= 120 && E.length >= 120)) ? new Nn(p && E) : i)
          }
          E = t[0]
          var O = -1,
            N = g[0]
          t: for (; ++O < c && A.length < y; ) {
            var Z = E[O],
              tt = e ? e(Z) : Z
            if (((Z = o || Z !== 0 ? Z : 0), !(N ? Mr(N, tt) : s(A, tt, o)))) {
              for (p = h; --p; ) {
                var ut = g[p]
                if (!(ut ? Mr(ut, tt) : s(t[p], tt, o))) continue t
              }
              N && N.push(tt), A.push(Z)
            }
          }
          return A
        }
        function Op(t, e, o, s) {
          return (
            Xe(t, function (c, h, p) {
              e(s, o(c), h, p)
            }),
            s
          )
        }
        function Wr(t, e, o) {
          ;(e = An(e, t)), (t = _c(t, e))
          var s = t == null ? t : t[je(Oe(e))]
          return s == null ? i : ge(s, t, o)
        }
        function Ll(t) {
          return Rt(t) && Qt(t) == Bt
        }
        function Pp(t) {
          return Rt(t) && Qt(t) == Lr
        }
        function Rp(t) {
          return Rt(t) && Qt(t) == fe
        }
        function qr(t, e, o, s, c) {
          return t === e
            ? !0
            : t == null || e == null || (!Rt(t) && !Rt(e))
            ? t !== t && e !== e
            : Lp(t, e, o, s, qr, c)
        }
        function Lp(t, e, o, s, c, h) {
          var p = lt(t),
            g = lt(e),
            y = p ? De : Jt(t),
            A = g ? De : Jt(e)
          ;(y = y == Bt ? rn : y), (A = A == Bt ? rn : A)
          var E = y == rn,
            O = A == rn,
            N = y == A
          if (N && kn(t)) {
            if (!kn(e)) return !1
            ;(p = !0), (E = !1)
          }
          if (N && !E)
            return (
              h || (h = new He()),
              p || fr(t) ? fc(t, e, o, s, c, h) : ag(t, e, y, o, s, c, h)
            )
          if (!(o & z)) {
            var Z = E && wt.call(t, '__wrapped__'),
              tt = O && wt.call(e, '__wrapped__')
            if (Z || tt) {
              var ut = Z ? t.value() : t,
                et = tt ? e.value() : e
              return h || (h = new He()), c(ut, et, o, s, h)
            }
          }
          return N ? (h || (h = new He()), lg(t, e, o, s, c, h)) : !1
        }
        function Mp(t) {
          return Rt(t) && Jt(t) == Ue
        }
        function ps(t, e, o, s) {
          var c = o.length,
            h = c,
            p = !s
          if (t == null) return !h
          for (t = xt(t); c--; ) {
            var g = o[c]
            if (p && g[2] ? g[1] !== t[g[0]] : !(g[0] in t)) return !1
          }
          for (; ++c < h; ) {
            g = o[c]
            var y = g[0],
              A = t[y],
              E = g[1]
            if (p && g[2]) {
              if (A === i && !(y in t)) return !1
            } else {
              var O = new He()
              if (s) var N = s(A, E, y, t, e, O)
              if (!(N === i ? qr(E, A, z | w, s, O) : N)) return !1
            }
          }
          return !0
        }
        function Ml(t) {
          if (!Ot(t) || mg(t)) return !1
          var e = hn(t) ? Mf : Sd
          return e.test(qn(t))
        }
        function Ip(t) {
          return Rt(t) && Qt(t) == Or
        }
        function Dp(t) {
          return Rt(t) && Jt(t) == Ne
        }
        function Bp(t) {
          return Rt(t) && to(t.length) && !!At[Qt(t)]
        }
        function Il(t) {
          return typeof t == 'function'
            ? t
            : t == null
            ? se
            : typeof t == 'object'
            ? lt(t)
              ? Ul(t[0], t[1])
              : Bl(t)
            : iu(t)
        }
        function gs(t) {
          if (!Kr(t)) return Ff(t)
          var e = []
          for (var o in xt(t)) wt.call(t, o) && o != 'constructor' && e.push(o)
          return e
        }
        function Up(t) {
          if (!Ot(t)) return wg(t)
          var e = Kr(t),
            o = []
          for (var s in t)
            (s == 'constructor' && (e || !wt.call(t, s))) || o.push(s)
          return o
        }
        function vs(t, e) {
          return t < e
        }
        function Dl(t, e) {
          var o = -1,
            s = ie(t) ? $(t.length) : []
          return (
            Sn(t, function (c, h, p) {
              s[++o] = e(c, h, p)
            }),
            s
          )
        }
        function Bl(t) {
          var e = Os(t)
          return e.length == 1 && e[0][2]
            ? bc(e[0][0], e[0][1])
            : function (o) {
                return o === t || ps(o, t, e)
              }
        }
        function Ul(t, e) {
          return Rs(t) && mc(e)
            ? bc(je(t), e)
            : function (o) {
                var s = Ws(o, t)
                return s === i && s === e ? qs(o, t) : qr(e, s, z | w)
              }
        }
        function Bi(t, e, o, s, c) {
          t !== e &&
            us(
              e,
              function (h, p) {
                if ((c || (c = new He()), Ot(h))) Np(t, e, p, o, Bi, s, c)
                else {
                  var g = s ? s(Ms(t, p), h, p + '', t, e, c) : i
                  g === i && (g = h), ls(t, p, g)
                }
              },
              oe,
            )
        }
        function Np(t, e, o, s, c, h, p) {
          var g = Ms(t, o),
            y = Ms(e, o),
            A = p.get(y)
          if (A) {
            ls(t, o, A)
            return
          }
          var E = h ? h(g, y, o + '', t, e, p) : i,
            O = E === i
          if (O) {
            var N = lt(y),
              Z = !N && kn(y),
              tt = !N && !Z && fr(y)
            ;(E = y),
              N || Z || tt
                ? lt(g)
                  ? (E = g)
                  : Lt(g)
                  ? (E = re(g))
                  : Z
                  ? ((O = !1), (E = jl(y, !0)))
                  : tt
                  ? ((O = !1), (E = Jl(y, !0)))
                  : (E = [])
                : Xr(y) || Yn(y)
                ? ((E = g),
                  Yn(g) ? (E = Vc(g)) : (!Ot(g) || hn(g)) && (E = vc(y)))
                : (O = !1)
          }
          O && (p.set(y, E), c(E, y, s, h, p), p.delete(y)), ls(t, o, E)
        }
        function Nl(t, e) {
          var o = t.length
          if (o) return (e += e < 0 ? o : 0), un(e, o) ? t[e] : i
        }
        function Fl(t, e, o) {
          e.length
            ? (e = kt(e, function (h) {
                return lt(h)
                  ? function (p) {
                      return Hn(p, h.length === 1 ? h[0] : h)
                    }
                  : h
              }))
            : (e = [se])
          var s = -1
          e = kt(e, ve(Q()))
          var c = Dl(t, function (h, p, g) {
            var y = kt(e, function (A) {
              return A(h)
            })
            return { criteria: y, index: ++s, value: h }
          })
          return ff(c, function (h, p) {
            return Qp(h, p, o)
          })
        }
        function Fp(t, e) {
          return Hl(t, e, function (o, s) {
            return qs(t, s)
          })
        }
        function Hl(t, e, o) {
          for (var s = -1, c = e.length, h = {}; ++s < c; ) {
            var p = e[s],
              g = Hn(t, p)
            o(g, p) && Yr(h, An(p, t), g)
          }
          return h
        }
        function Hp(t) {
          return function (e) {
            return Hn(e, t)
          }
        }
        function ms(t, e, o, s) {
          var c = s ? df : nr,
            h = -1,
            p = e.length,
            g = t
          for (t === e && (e = re(e)), o && (g = kt(t, ve(o))); ++h < p; )
            for (
              var y = 0, A = e[h], E = o ? o(A) : A;
              (y = c(g, E, y, s)) > -1;

            )
              g !== t && ki.call(g, y, 1), ki.call(t, y, 1)
          return t
        }
        function Wl(t, e) {
          for (var o = t ? e.length : 0, s = o - 1; o--; ) {
            var c = e[o]
            if (o == s || c !== h) {
              var h = c
              un(c) ? ki.call(t, c, 1) : ws(t, c)
            }
          }
          return t
        }
        function bs(t, e) {
          return t + Oi(xl() * (e - t + 1))
        }
        function Wp(t, e, o, s) {
          for (var c = -1, h = Nt(zi((e - t) / (o || 1)), 0), p = $(h); h--; )
            (p[s ? h : ++c] = t), (t += o)
          return p
        }
        function ys(t, e) {
          var o = ''
          if (!t || e < 1 || e > B) return o
          do e % 2 && (o += t), (e = Oi(e / 2)), e && (t += t)
          while (e)
          return o
        }
        function ht(t, e) {
          return Is(yc(t, e, se), t + '')
        }
        function qp(t) {
          return Al(pr(t))
        }
        function Yp(t, e) {
          var o = pr(t)
          return Vi(o, Fn(e, 0, o.length))
        }
        function Yr(t, e, o, s) {
          if (!Ot(t)) return t
          e = An(e, t)
          for (
            var c = -1, h = e.length, p = h - 1, g = t;
            g != null && ++c < h;

          ) {
            var y = je(e[c]),
              A = o
            if (y === '__proto__' || y === 'constructor' || y === 'prototype')
              return t
            if (c != p) {
              var E = g[y]
              ;(A = s ? s(E, y, g) : i),
                A === i && (A = Ot(E) ? E : un(e[c + 1]) ? [] : {})
            }
            Fr(g, y, A), (g = g[y])
          }
          return t
        }
        var ql = Pi
            ? function (t, e) {
                return Pi.set(t, e), t
              }
            : se,
          Gp = Ti
            ? function (t, e) {
                return Ti(t, 'toString', {
                  configurable: !0,
                  enumerable: !1,
                  value: Gs(e),
                  writable: !0,
                })
              }
            : se
        function Kp(t) {
          return Vi(pr(t))
        }
        function ze(t, e, o) {
          var s = -1,
            c = t.length
          e < 0 && (e = -e > c ? 0 : c + e),
            (o = o > c ? c : o),
            o < 0 && (o += c),
            (c = e > o ? 0 : (o - e) >>> 0),
            (e >>>= 0)
          for (var h = $(c); ++s < c; ) h[s] = t[s + e]
          return h
        }
        function Vp(t, e) {
          var o
          return (
            Sn(t, function (s, c, h) {
              return (o = e(s, c, h)), !o
            }),
            !!o
          )
        }
        function Ui(t, e, o) {
          var s = 0,
            c = t == null ? s : t.length
          if (typeof e == 'number' && e === e && c <= Dt) {
            for (; s < c; ) {
              var h = (s + c) >>> 1,
                p = t[h]
              p !== null && !be(p) && (o ? p <= e : p < e)
                ? (s = h + 1)
                : (c = h)
            }
            return c
          }
          return _s(t, e, se, o)
        }
        function _s(t, e, o, s) {
          var c = 0,
            h = t == null ? 0 : t.length
          if (h === 0) return 0
          e = o(e)
          for (
            var p = e !== e, g = e === null, y = be(e), A = e === i;
            c < h;

          ) {
            var E = Oi((c + h) / 2),
              O = o(t[E]),
              N = O !== i,
              Z = O === null,
              tt = O === O,
              ut = be(O)
            if (p) var et = s || tt
            else
              A
                ? (et = tt && (s || N))
                : g
                ? (et = tt && N && (s || !Z))
                : y
                ? (et = tt && N && !Z && (s || !ut))
                : Z || ut
                ? (et = !1)
                : (et = s ? O <= e : O < e)
            et ? (c = E + 1) : (h = E)
          }
          return jt(h, zt)
        }
        function Yl(t, e) {
          for (var o = -1, s = t.length, c = 0, h = []; ++o < s; ) {
            var p = t[o],
              g = e ? e(p) : p
            if (!o || !We(g, y)) {
              var y = g
              h[c++] = p === 0 ? 0 : p
            }
          }
          return h
        }
        function Gl(t) {
          return typeof t == 'number' ? t : be(t) ? rt : +t
        }
        function me(t) {
          if (typeof t == 'string') return t
          if (lt(t)) return kt(t, me) + ''
          if (be(t)) return Sl ? Sl.call(t) : ''
          var e = t + ''
          return e == '0' && 1 / t == -H ? '-0' : e
        }
        function Cn(t, e, o) {
          var s = -1,
            c = bi,
            h = t.length,
            p = !0,
            g = [],
            y = g
          if (o) (p = !1), (c = Xo)
          else if (h >= l) {
            var A = e ? null : og(t)
            if (A) return _i(A)
            ;(p = !1), (c = Mr), (y = new Nn())
          } else y = e ? [] : g
          t: for (; ++s < h; ) {
            var E = t[s],
              O = e ? e(E) : E
            if (((E = o || E !== 0 ? E : 0), p && O === O)) {
              for (var N = y.length; N--; ) if (y[N] === O) continue t
              e && y.push(O), g.push(E)
            } else c(y, O, o) || (y !== g && y.push(O), g.push(E))
          }
          return g
        }
        function ws(t, e) {
          return (
            (e = An(e, t)), (t = _c(t, e)), t == null || delete t[je(Oe(e))]
          )
        }
        function Kl(t, e, o, s) {
          return Yr(t, e, o(Hn(t, e)), s)
        }
        function Ni(t, e, o, s) {
          for (
            var c = t.length, h = s ? c : -1;
            (s ? h-- : ++h < c) && e(t[h], h, t);

          );
          return o
            ? ze(t, s ? 0 : h, s ? h + 1 : c)
            : ze(t, s ? h + 1 : 0, s ? c : h)
        }
        function Vl(t, e) {
          var o = t
          return (
            o instanceof gt && (o = o.value()),
            Zo(
              e,
              function (s, c) {
                return c.func.apply(c.thisArg, wn([s], c.args))
              },
              o,
            )
          )
        }
        function $s(t, e, o) {
          var s = t.length
          if (s < 2) return s ? Cn(t[0]) : []
          for (var c = -1, h = $(s); ++c < s; )
            for (var p = t[c], g = -1; ++g < s; )
              g != c && (h[c] = Hr(h[c] || p, t[g], e, o))
          return Cn(Xt(h, 1), e, o)
        }
        function Xl(t, e, o) {
          for (var s = -1, c = t.length, h = e.length, p = {}; ++s < c; ) {
            var g = s < h ? e[s] : i
            o(p, t[s], g)
          }
          return p
        }
        function xs(t) {
          return Lt(t) ? t : []
        }
        function Ss(t) {
          return typeof t == 'function' ? t : se
        }
        function An(t, e) {
          return lt(t) ? t : Rs(t, e) ? [t] : Sc(_t(t))
        }
        var Xp = ht
        function En(t, e, o) {
          var s = t.length
          return (o = o === i ? s : o), !e && o >= s ? t : ze(t, e, o)
        }
        var Zl =
          If ||
          function (t) {
            return Vt.clearTimeout(t)
          }
        function jl(t, e) {
          if (e) return t.slice()
          var o = t.length,
            s = bl ? bl(o) : new t.constructor(o)
          return t.copy(s), s
        }
        function Cs(t) {
          var e = new t.constructor(t.byteLength)
          return new Ai(e).set(new Ai(t)), e
        }
        function Zp(t, e) {
          var o = e ? Cs(t.buffer) : t.buffer
          return new t.constructor(o, t.byteOffset, t.byteLength)
        }
        function jp(t) {
          var e = new t.constructor(t.source, La.exec(t))
          return (e.lastIndex = t.lastIndex), e
        }
        function Jp(t) {
          return Nr ? xt(Nr.call(t)) : {}
        }
        function Jl(t, e) {
          var o = e ? Cs(t.buffer) : t.buffer
          return new t.constructor(o, t.byteOffset, t.length)
        }
        function Ql(t, e) {
          if (t !== e) {
            var o = t !== i,
              s = t === null,
              c = t === t,
              h = be(t),
              p = e !== i,
              g = e === null,
              y = e === e,
              A = be(e)
            if (
              (!g && !A && !h && t > e) ||
              (h && p && y && !g && !A) ||
              (s && p && y) ||
              (!o && y) ||
              !c
            )
              return 1
            if (
              (!s && !h && !A && t < e) ||
              (A && o && c && !s && !h) ||
              (g && o && c) ||
              (!p && c) ||
              !y
            )
              return -1
          }
          return 0
        }
        function Qp(t, e, o) {
          for (
            var s = -1,
              c = t.criteria,
              h = e.criteria,
              p = c.length,
              g = o.length;
            ++s < p;

          ) {
            var y = Ql(c[s], h[s])
            if (y) {
              if (s >= g) return y
              var A = o[s]
              return y * (A == 'desc' ? -1 : 1)
            }
          }
          return t.index - e.index
        }
        function tc(t, e, o, s) {
          for (
            var c = -1,
              h = t.length,
              p = o.length,
              g = -1,
              y = e.length,
              A = Nt(h - p, 0),
              E = $(y + A),
              O = !s;
            ++g < y;

          )
            E[g] = e[g]
          for (; ++c < p; ) (O || c < h) && (E[o[c]] = t[c])
          for (; A--; ) E[g++] = t[c++]
          return E
        }
        function ec(t, e, o, s) {
          for (
            var c = -1,
              h = t.length,
              p = -1,
              g = o.length,
              y = -1,
              A = e.length,
              E = Nt(h - g, 0),
              O = $(E + A),
              N = !s;
            ++c < E;

          )
            O[c] = t[c]
          for (var Z = c; ++y < A; ) O[Z + y] = e[y]
          for (; ++p < g; ) (N || c < h) && (O[Z + o[p]] = t[c++])
          return O
        }
        function re(t, e) {
          var o = -1,
            s = t.length
          for (e || (e = $(s)); ++o < s; ) e[o] = t[o]
          return e
        }
        function Ze(t, e, o, s) {
          var c = !o
          o || (o = {})
          for (var h = -1, p = e.length; ++h < p; ) {
            var g = e[h],
              y = s ? s(o[g], t[g], g, o, t) : i
            y === i && (y = t[g]), c ? an(o, g, y) : Fr(o, g, y)
          }
          return o
        }
        function tg(t, e) {
          return Ze(t, Ps(t), e)
        }
        function eg(t, e) {
          return Ze(t, pc(t), e)
        }
        function Fi(t, e) {
          return function (o, s) {
            var c = lt(o) ? sf : xp,
              h = e ? e() : {}
            return c(o, t, Q(s, 2), h)
          }
        }
        function ur(t) {
          return ht(function (e, o) {
            var s = -1,
              c = o.length,
              h = c > 1 ? o[c - 1] : i,
              p = c > 2 ? o[2] : i
            for (
              h = t.length > 3 && typeof h == 'function' ? (c--, h) : i,
                p && te(o[0], o[1], p) && ((h = c < 3 ? i : h), (c = 1)),
                e = xt(e);
              ++s < c;

            ) {
              var g = o[s]
              g && t(e, g, s, h)
            }
            return e
          })
        }
        function nc(t, e) {
          return function (o, s) {
            if (o == null) return o
            if (!ie(o)) return t(o, s)
            for (
              var c = o.length, h = e ? c : -1, p = xt(o);
              (e ? h-- : ++h < c) && s(p[h], h, p) !== !1;

            );
            return o
          }
        }
        function rc(t) {
          return function (e, o, s) {
            for (var c = -1, h = xt(e), p = s(e), g = p.length; g--; ) {
              var y = p[t ? g : ++c]
              if (o(h[y], y, h) === !1) break
            }
            return e
          }
        }
        function ng(t, e, o) {
          var s = e & x,
            c = Gr(t)
          function h() {
            var p = this && this !== Vt && this instanceof h ? c : t
            return p.apply(s ? o : this, arguments)
          }
          return h
        }
        function ic(t) {
          return function (e) {
            e = _t(e)
            var o = rr(e) ? Fe(e) : i,
              s = o ? o[0] : e.charAt(0),
              c = o ? En(o, 1).join('') : e.slice(1)
            return s[t]() + c
          }
        }
        function hr(t) {
          return function (e) {
            return Zo(nu(eu(e).replace(Yd, '')), t, '')
          }
        }
        function Gr(t) {
          return function () {
            var e = arguments
            switch (e.length) {
              case 0:
                return new t()
              case 1:
                return new t(e[0])
              case 2:
                return new t(e[0], e[1])
              case 3:
                return new t(e[0], e[1], e[2])
              case 4:
                return new t(e[0], e[1], e[2], e[3])
              case 5:
                return new t(e[0], e[1], e[2], e[3], e[4])
              case 6:
                return new t(e[0], e[1], e[2], e[3], e[4], e[5])
              case 7:
                return new t(e[0], e[1], e[2], e[3], e[4], e[5], e[6])
            }
            var o = cr(t.prototype),
              s = t.apply(o, e)
            return Ot(s) ? s : o
          }
        }
        function rg(t, e, o) {
          var s = Gr(t)
          function c() {
            for (var h = arguments.length, p = $(h), g = h, y = dr(c); g--; )
              p[g] = arguments[g]
            var A = h < 3 && p[0] !== y && p[h - 1] !== y ? [] : $n(p, y)
            if (((h -= A.length), h < o))
              return cc(t, e, Hi, c.placeholder, i, p, A, i, i, o - h)
            var E = this && this !== Vt && this instanceof c ? s : t
            return ge(E, this, p)
          }
          return c
        }
        function oc(t) {
          return function (e, o, s) {
            var c = xt(e)
            if (!ie(e)) {
              var h = Q(o, 3)
              ;(e = Kt(e)),
                (o = function (g) {
                  return h(c[g], g, c)
                })
            }
            var p = t(e, o, s)
            return p > -1 ? c[h ? e[p] : p] : i
          }
        }
        function sc(t) {
          return cn(function (e) {
            var o = e.length,
              s = o,
              c = ke.prototype.thru
            for (t && e.reverse(); s--; ) {
              var h = e[s]
              if (typeof h != 'function') throw new Ee(f)
              if (c && !p && Gi(h) == 'wrapper') var p = new ke([], !0)
            }
            for (s = p ? s : o; ++s < o; ) {
              h = e[s]
              var g = Gi(h),
                y = g == 'wrapper' ? zs(h) : i
              y &&
              Ls(y[0]) &&
              y[1] == (I | U | J | L) &&
              !y[4].length &&
              y[9] == 1
                ? (p = p[Gi(y[0])].apply(p, y[3]))
                : (p = h.length == 1 && Ls(h) ? p[g]() : p.thru(h))
            }
            return function () {
              var A = arguments,
                E = A[0]
              if (p && A.length == 1 && lt(E)) return p.plant(E).value()
              for (var O = 0, N = o ? e[O].apply(this, A) : E; ++O < o; )
                N = e[O].call(this, N)
              return N
            }
          })
        }
        function Hi(t, e, o, s, c, h, p, g, y, A) {
          var E = e & I,
            O = e & x,
            N = e & P,
            Z = e & (U | it),
            tt = e & nt,
            ut = N ? i : Gr(t)
          function et() {
            for (var pt = arguments.length, vt = $(pt), ye = pt; ye--; )
              vt[ye] = arguments[ye]
            if (Z)
              var ee = dr(et),
                _e = gf(vt, ee)
            if (
              (s && (vt = tc(vt, s, c, Z)),
              h && (vt = ec(vt, h, p, Z)),
              (pt -= _e),
              Z && pt < A)
            ) {
              var Mt = $n(vt, ee)
              return cc(t, e, Hi, et.placeholder, o, vt, Mt, g, y, A - pt)
            }
            var qe = O ? o : this,
              fn = N ? qe[t] : t
            return (
              (pt = vt.length),
              g ? (vt = xg(vt, g)) : tt && pt > 1 && vt.reverse(),
              E && y < pt && (vt.length = y),
              this && this !== Vt && this instanceof et && (fn = ut || Gr(fn)),
              fn.apply(qe, vt)
            )
          }
          return et
        }
        function ac(t, e) {
          return function (o, s) {
            return Op(o, t, e(s), {})
          }
        }
        function Wi(t, e) {
          return function (o, s) {
            var c
            if (o === i && s === i) return e
            if ((o !== i && (c = o), s !== i)) {
              if (c === i) return s
              typeof o == 'string' || typeof s == 'string'
                ? ((o = me(o)), (s = me(s)))
                : ((o = Gl(o)), (s = Gl(s))),
                (c = t(o, s))
            }
            return c
          }
        }
        function As(t) {
          return cn(function (e) {
            return (
              (e = kt(e, ve(Q()))),
              ht(function (o) {
                var s = this
                return t(e, function (c) {
                  return ge(c, s, o)
                })
              })
            )
          })
        }
        function qi(t, e) {
          e = e === i ? ' ' : me(e)
          var o = e.length
          if (o < 2) return o ? ys(e, t) : e
          var s = ys(e, zi(t / ir(e)))
          return rr(e) ? En(Fe(s), 0, t).join('') : s.slice(0, t)
        }
        function ig(t, e, o, s) {
          var c = e & x,
            h = Gr(t)
          function p() {
            for (
              var g = -1,
                y = arguments.length,
                A = -1,
                E = s.length,
                O = $(E + y),
                N = this && this !== Vt && this instanceof p ? h : t;
              ++A < E;

            )
              O[A] = s[A]
            for (; y--; ) O[A++] = arguments[++g]
            return ge(N, c ? o : this, O)
          }
          return p
        }
        function lc(t) {
          return function (e, o, s) {
            return (
              s && typeof s != 'number' && te(e, o, s) && (o = s = i),
              (e = dn(e)),
              o === i ? ((o = e), (e = 0)) : (o = dn(o)),
              (s = s === i ? (e < o ? 1 : -1) : dn(s)),
              Wp(e, o, s, t)
            )
          }
        }
        function Yi(t) {
          return function (e, o) {
            return (
              (typeof e == 'string' && typeof o == 'string') ||
                ((e = Pe(e)), (o = Pe(o))),
              t(e, o)
            )
          }
        }
        function cc(t, e, o, s, c, h, p, g, y, A) {
          var E = e & U,
            O = E ? p : i,
            N = E ? i : p,
            Z = E ? h : i,
            tt = E ? i : h
          ;(e |= E ? J : q), (e &= ~(E ? q : J)), e & G || (e &= ~(x | P))
          var ut = [t, e, c, Z, O, tt, N, g, y, A],
            et = o.apply(i, ut)
          return Ls(t) && wc(et, ut), (et.placeholder = s), $c(et, t, e)
        }
        function Es(t) {
          var e = Ut[t]
          return function (o, s) {
            if (
              ((o = Pe(o)), (s = s == null ? 0 : jt(ct(s), 292)), s && $l(o))
            ) {
              var c = (_t(o) + 'e').split('e'),
                h = e(c[0] + 'e' + (+c[1] + s))
              return (c = (_t(h) + 'e').split('e')), +(c[0] + 'e' + (+c[1] - s))
            }
            return e(o)
          }
        }
        var og =
          ar && 1 / _i(new ar([, -0]))[1] == H
            ? function (t) {
                return new ar(t)
              }
            : Xs
        function uc(t) {
          return function (e) {
            var o = Jt(e)
            return o == Ue ? rs(e) : o == Ne ? $f(e) : pf(e, t(e))
          }
        }
        function ln(t, e, o, s, c, h, p, g) {
          var y = e & P
          if (!y && typeof t != 'function') throw new Ee(f)
          var A = s ? s.length : 0
          if (
            (A || ((e &= ~(J | q)), (s = c = i)),
            (p = p === i ? p : Nt(ct(p), 0)),
            (g = g === i ? g : ct(g)),
            (A -= c ? c.length : 0),
            e & q)
          ) {
            var E = s,
              O = c
            s = c = i
          }
          var N = y ? i : zs(t),
            Z = [t, e, o, s, c, E, O, h, p, g]
          if (
            (N && _g(Z, N),
            (t = Z[0]),
            (e = Z[1]),
            (o = Z[2]),
            (s = Z[3]),
            (c = Z[4]),
            (g = Z[9] = Z[9] === i ? (y ? 0 : t.length) : Nt(Z[9] - A, 0)),
            !g && e & (U | it) && (e &= ~(U | it)),
            !e || e == x)
          )
            var tt = ng(t, e, o)
          else
            e == U || e == it
              ? (tt = rg(t, e, g))
              : (e == J || e == (x | J)) && !c.length
              ? (tt = ig(t, e, o, s))
              : (tt = Hi.apply(i, Z))
          var ut = N ? ql : wc
          return $c(ut(tt, Z), t, e)
        }
        function hc(t, e, o, s) {
          return t === i || (We(t, sr[o]) && !wt.call(s, o)) ? e : t
        }
        function dc(t, e, o, s, c, h) {
          return (
            Ot(t) && Ot(e) && (h.set(e, t), Bi(t, e, i, dc, h), h.delete(e)), t
          )
        }
        function sg(t) {
          return Xr(t) ? i : t
        }
        function fc(t, e, o, s, c, h) {
          var p = o & z,
            g = t.length,
            y = e.length
          if (g != y && !(p && y > g)) return !1
          var A = h.get(t),
            E = h.get(e)
          if (A && E) return A == e && E == t
          var O = -1,
            N = !0,
            Z = o & w ? new Nn() : i
          for (h.set(t, e), h.set(e, t); ++O < g; ) {
            var tt = t[O],
              ut = e[O]
            if (s) var et = p ? s(ut, tt, O, e, t, h) : s(tt, ut, O, t, e, h)
            if (et !== i) {
              if (et) continue
              N = !1
              break
            }
            if (Z) {
              if (
                !jo(e, function (pt, vt) {
                  if (!Mr(Z, vt) && (tt === pt || c(tt, pt, o, s, h)))
                    return Z.push(vt)
                })
              ) {
                N = !1
                break
              }
            } else if (!(tt === ut || c(tt, ut, o, s, h))) {
              N = !1
              break
            }
          }
          return h.delete(t), h.delete(e), N
        }
        function ag(t, e, o, s, c, h, p) {
          switch (o) {
            case tr:
              if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
                return !1
              ;(t = t.buffer), (e = e.buffer)
            case Lr:
              return !(t.byteLength != e.byteLength || !h(new Ai(t), new Ai(e)))
            case Be:
            case fe:
            case zr:
              return We(+t, +e)
            case pe:
              return t.name == e.name && t.message == e.message
            case Or:
            case Pr:
              return t == e + ''
            case Ue:
              var g = rs
            case Ne:
              var y = s & z
              if ((g || (g = _i), t.size != e.size && !y)) return !1
              var A = p.get(t)
              if (A) return A == e
              ;(s |= w), p.set(t, e)
              var E = fc(g(t), g(e), s, c, h, p)
              return p.delete(t), E
            case pi:
              if (Nr) return Nr.call(t) == Nr.call(e)
          }
          return !1
        }
        function lg(t, e, o, s, c, h) {
          var p = o & z,
            g = ks(t),
            y = g.length,
            A = ks(e),
            E = A.length
          if (y != E && !p) return !1
          for (var O = y; O--; ) {
            var N = g[O]
            if (!(p ? N in e : wt.call(e, N))) return !1
          }
          var Z = h.get(t),
            tt = h.get(e)
          if (Z && tt) return Z == e && tt == t
          var ut = !0
          h.set(t, e), h.set(e, t)
          for (var et = p; ++O < y; ) {
            N = g[O]
            var pt = t[N],
              vt = e[N]
            if (s) var ye = p ? s(vt, pt, N, e, t, h) : s(pt, vt, N, t, e, h)
            if (!(ye === i ? pt === vt || c(pt, vt, o, s, h) : ye)) {
              ut = !1
              break
            }
            et || (et = N == 'constructor')
          }
          if (ut && !et) {
            var ee = t.constructor,
              _e = e.constructor
            ee != _e &&
              'constructor' in t &&
              'constructor' in e &&
              !(
                typeof ee == 'function' &&
                ee instanceof ee &&
                typeof _e == 'function' &&
                _e instanceof _e
              ) &&
              (ut = !1)
          }
          return h.delete(t), h.delete(e), ut
        }
        function cn(t) {
          return Is(yc(t, i, kc), t + '')
        }
        function ks(t) {
          return Rl(t, Kt, Ps)
        }
        function Ts(t) {
          return Rl(t, oe, pc)
        }
        var zs = Pi
          ? function (t) {
              return Pi.get(t)
            }
          : Xs
        function Gi(t) {
          for (
            var e = t.name + '', o = lr[e], s = wt.call(lr, e) ? o.length : 0;
            s--;

          ) {
            var c = o[s],
              h = c.func
            if (h == null || h == t) return c.name
          }
          return e
        }
        function dr(t) {
          var e = wt.call(u, 'placeholder') ? u : t
          return e.placeholder
        }
        function Q() {
          var t = u.iteratee || Ks
          return (
            (t = t === Ks ? Il : t),
            arguments.length ? t(arguments[0], arguments[1]) : t
          )
        }
        function Ki(t, e) {
          var o = t.__data__
          return vg(e) ? o[typeof e == 'string' ? 'string' : 'hash'] : o.map
        }
        function Os(t) {
          for (var e = Kt(t), o = e.length; o--; ) {
            var s = e[o],
              c = t[s]
            e[o] = [s, c, mc(c)]
          }
          return e
        }
        function Wn(t, e) {
          var o = yf(t, e)
          return Ml(o) ? o : i
        }
        function cg(t) {
          var e = wt.call(t, Bn),
            o = t[Bn]
          try {
            t[Bn] = i
            var s = !0
          } catch {}
          var c = Si.call(t)
          return s && (e ? (t[Bn] = o) : delete t[Bn]), c
        }
        var Ps = os
            ? function (t) {
                return t == null
                  ? []
                  : ((t = xt(t)),
                    _n(os(t), function (e) {
                      return _l.call(t, e)
                    }))
              }
            : Zs,
          pc = os
            ? function (t) {
                for (var e = []; t; ) wn(e, Ps(t)), (t = Ei(t))
                return e
              }
            : Zs,
          Jt = Qt
        ;((ss && Jt(new ss(new ArrayBuffer(1))) != tr) ||
          (Dr && Jt(new Dr()) != Ue) ||
          (as && Jt(as.resolve()) != za) ||
          (ar && Jt(new ar()) != Ne) ||
          (Br && Jt(new Br()) != Rr)) &&
          (Jt = function (t) {
            var e = Qt(t),
              o = e == rn ? t.constructor : i,
              s = o ? qn(o) : ''
            if (s)
              switch (s) {
                case Yf:
                  return tr
                case Gf:
                  return Ue
                case Kf:
                  return za
                case Vf:
                  return Ne
                case Xf:
                  return Rr
              }
            return e
          })
        function ug(t, e, o) {
          for (var s = -1, c = o.length; ++s < c; ) {
            var h = o[s],
              p = h.size
            switch (h.type) {
              case 'drop':
                t += p
                break
              case 'dropRight':
                e -= p
                break
              case 'take':
                e = jt(e, t + p)
                break
              case 'takeRight':
                t = Nt(t, e - p)
                break
            }
          }
          return { start: t, end: e }
        }
        function hg(t) {
          var e = t.match(vd)
          return e ? e[1].split(md) : []
        }
        function gc(t, e, o) {
          e = An(e, t)
          for (var s = -1, c = e.length, h = !1; ++s < c; ) {
            var p = je(e[s])
            if (!(h = t != null && o(t, p))) break
            t = t[p]
          }
          return h || ++s != c
            ? h
            : ((c = t == null ? 0 : t.length),
              !!c && to(c) && un(p, c) && (lt(t) || Yn(t)))
        }
        function dg(t) {
          var e = t.length,
            o = new t.constructor(e)
          return (
            e &&
              typeof t[0] == 'string' &&
              wt.call(t, 'index') &&
              ((o.index = t.index), (o.input = t.input)),
            o
          )
        }
        function vc(t) {
          return typeof t.constructor == 'function' && !Kr(t) ? cr(Ei(t)) : {}
        }
        function fg(t, e, o) {
          var s = t.constructor
          switch (e) {
            case Lr:
              return Cs(t)
            case Be:
            case fe:
              return new s(+t)
            case tr:
              return Zp(t, o)
            case Oo:
            case Po:
            case Ro:
            case Lo:
            case Mo:
            case Io:
            case Do:
            case Bo:
            case Uo:
              return Jl(t, o)
            case Ue:
              return new s()
            case zr:
            case Pr:
              return new s(t)
            case Or:
              return jp(t)
            case Ne:
              return new s()
            case pi:
              return Jp(t)
          }
        }
        function pg(t, e) {
          var o = e.length
          if (!o) return t
          var s = o - 1
          return (
            (e[s] = (o > 1 ? '& ' : '') + e[s]),
            (e = e.join(o > 2 ? ', ' : ' ')),
            t.replace(
              gd,
              `{
/* [wrapped with ` +
                e +
                `] */
`,
            )
          )
        }
        function gg(t) {
          return lt(t) || Yn(t) || !!(wl && t && t[wl])
        }
        function un(t, e) {
          var o = typeof t
          return (
            (e = e ?? B),
            !!e &&
              (o == 'number' || (o != 'symbol' && Ad.test(t))) &&
              t > -1 &&
              t % 1 == 0 &&
              t < e
          )
        }
        function te(t, e, o) {
          if (!Ot(o)) return !1
          var s = typeof e
          return (
            s == 'number' ? ie(o) && un(e, o.length) : s == 'string' && e in o
          )
            ? We(o[e], t)
            : !1
        }
        function Rs(t, e) {
          if (lt(t)) return !1
          var o = typeof t
          return o == 'number' ||
            o == 'symbol' ||
            o == 'boolean' ||
            t == null ||
            be(t)
            ? !0
            : hd.test(t) || !ud.test(t) || (e != null && t in xt(e))
        }
        function vg(t) {
          var e = typeof t
          return e == 'string' ||
            e == 'number' ||
            e == 'symbol' ||
            e == 'boolean'
            ? t !== '__proto__'
            : t === null
        }
        function Ls(t) {
          var e = Gi(t),
            o = u[e]
          if (typeof o != 'function' || !(e in gt.prototype)) return !1
          if (t === o) return !0
          var s = zs(o)
          return !!s && t === s[0]
        }
        function mg(t) {
          return !!ml && ml in t
        }
        var bg = $i ? hn : js
        function Kr(t) {
          var e = t && t.constructor,
            o = (typeof e == 'function' && e.prototype) || sr
          return t === o
        }
        function mc(t) {
          return t === t && !Ot(t)
        }
        function bc(t, e) {
          return function (o) {
            return o == null ? !1 : o[t] === e && (e !== i || t in xt(o))
          }
        }
        function yg(t) {
          var e = Ji(t, function (s) {
              return o.size === _ && o.clear(), s
            }),
            o = e.cache
          return e
        }
        function _g(t, e) {
          var o = t[1],
            s = e[1],
            c = o | s,
            h = c < (x | P | I),
            p =
              (s == I && o == U) ||
              (s == I && o == L && t[7].length <= e[8]) ||
              (s == (I | L) && e[7].length <= e[8] && o == U)
          if (!(h || p)) return t
          s & x && ((t[2] = e[2]), (c |= o & x ? 0 : G))
          var g = e[3]
          if (g) {
            var y = t[3]
            ;(t[3] = y ? tc(y, g, e[4]) : g), (t[4] = y ? $n(t[3], k) : e[4])
          }
          return (
            (g = e[5]),
            g &&
              ((y = t[5]),
              (t[5] = y ? ec(y, g, e[6]) : g),
              (t[6] = y ? $n(t[5], k) : e[6])),
            (g = e[7]),
            g && (t[7] = g),
            s & I && (t[8] = t[8] == null ? e[8] : jt(t[8], e[8])),
            t[9] == null && (t[9] = e[9]),
            (t[0] = e[0]),
            (t[1] = c),
            t
          )
        }
        function wg(t) {
          var e = []
          if (t != null) for (var o in xt(t)) e.push(o)
          return e
        }
        function $g(t) {
          return Si.call(t)
        }
        function yc(t, e, o) {
          return (
            (e = Nt(e === i ? t.length - 1 : e, 0)),
            function () {
              for (
                var s = arguments, c = -1, h = Nt(s.length - e, 0), p = $(h);
                ++c < h;

              )
                p[c] = s[e + c]
              c = -1
              for (var g = $(e + 1); ++c < e; ) g[c] = s[c]
              return (g[e] = o(p)), ge(t, this, g)
            }
          )
        }
        function _c(t, e) {
          return e.length < 2 ? t : Hn(t, ze(e, 0, -1))
        }
        function xg(t, e) {
          for (var o = t.length, s = jt(e.length, o), c = re(t); s--; ) {
            var h = e[s]
            t[s] = un(h, o) ? c[h] : i
          }
          return t
        }
        function Ms(t, e) {
          if (
            !(e === 'constructor' && typeof t[e] == 'function') &&
            e != '__proto__'
          )
            return t[e]
        }
        var wc = xc(ql),
          Vr =
            Bf ||
            function (t, e) {
              return Vt.setTimeout(t, e)
            },
          Is = xc(Gp)
        function $c(t, e, o) {
          var s = e + ''
          return Is(t, pg(s, Sg(hg(s), o)))
        }
        function xc(t) {
          var e = 0,
            o = 0
          return function () {
            var s = Hf(),
              c = Et - (s - o)
            if (((o = s), c > 0)) {
              if (++e >= mt) return arguments[0]
            } else e = 0
            return t.apply(i, arguments)
          }
        }
        function Vi(t, e) {
          var o = -1,
            s = t.length,
            c = s - 1
          for (e = e === i ? s : e; ++o < e; ) {
            var h = bs(o, c),
              p = t[h]
            ;(t[h] = t[o]), (t[o] = p)
          }
          return (t.length = e), t
        }
        var Sc = yg(function (t) {
          var e = []
          return (
            t.charCodeAt(0) === 46 && e.push(''),
            t.replace(dd, function (o, s, c, h) {
              e.push(c ? h.replace(_d, '$1') : s || o)
            }),
            e
          )
        })
        function je(t) {
          if (typeof t == 'string' || be(t)) return t
          var e = t + ''
          return e == '0' && 1 / t == -H ? '-0' : e
        }
        function qn(t) {
          if (t != null) {
            try {
              return xi.call(t)
            } catch {}
            try {
              return t + ''
            } catch {}
          }
          return ''
        }
        function Sg(t, e) {
          return (
            Ae(Gt, function (o) {
              var s = '_.' + o[0]
              e & o[1] && !bi(t, s) && t.push(s)
            }),
            t.sort()
          )
        }
        function Cc(t) {
          if (t instanceof gt) return t.clone()
          var e = new ke(t.__wrapped__, t.__chain__)
          return (
            (e.__actions__ = re(t.__actions__)),
            (e.__index__ = t.__index__),
            (e.__values__ = t.__values__),
            e
          )
        }
        function Cg(t, e, o) {
          ;(o ? te(t, e, o) : e === i) ? (e = 1) : (e = Nt(ct(e), 0))
          var s = t == null ? 0 : t.length
          if (!s || e < 1) return []
          for (var c = 0, h = 0, p = $(zi(s / e)); c < s; )
            p[h++] = ze(t, c, (c += e))
          return p
        }
        function Ag(t) {
          for (
            var e = -1, o = t == null ? 0 : t.length, s = 0, c = [];
            ++e < o;

          ) {
            var h = t[e]
            h && (c[s++] = h)
          }
          return c
        }
        function Eg() {
          var t = arguments.length
          if (!t) return []
          for (var e = $(t - 1), o = arguments[0], s = t; s--; )
            e[s - 1] = arguments[s]
          return wn(lt(o) ? re(o) : [o], Xt(e, 1))
        }
        var kg = ht(function (t, e) {
            return Lt(t) ? Hr(t, Xt(e, 1, Lt, !0)) : []
          }),
          Tg = ht(function (t, e) {
            var o = Oe(e)
            return (
              Lt(o) && (o = i), Lt(t) ? Hr(t, Xt(e, 1, Lt, !0), Q(o, 2)) : []
            )
          }),
          zg = ht(function (t, e) {
            var o = Oe(e)
            return Lt(o) && (o = i), Lt(t) ? Hr(t, Xt(e, 1, Lt, !0), i, o) : []
          })
        function Og(t, e, o) {
          var s = t == null ? 0 : t.length
          return s
            ? ((e = o || e === i ? 1 : ct(e)), ze(t, e < 0 ? 0 : e, s))
            : []
        }
        function Pg(t, e, o) {
          var s = t == null ? 0 : t.length
          return s
            ? ((e = o || e === i ? 1 : ct(e)),
              (e = s - e),
              ze(t, 0, e < 0 ? 0 : e))
            : []
        }
        function Rg(t, e) {
          return t && t.length ? Ni(t, Q(e, 3), !0, !0) : []
        }
        function Lg(t, e) {
          return t && t.length ? Ni(t, Q(e, 3), !0) : []
        }
        function Mg(t, e, o, s) {
          var c = t == null ? 0 : t.length
          return c
            ? (o && typeof o != 'number' && te(t, e, o) && ((o = 0), (s = c)),
              Ep(t, e, o, s))
            : []
        }
        function Ac(t, e, o) {
          var s = t == null ? 0 : t.length
          if (!s) return -1
          var c = o == null ? 0 : ct(o)
          return c < 0 && (c = Nt(s + c, 0)), yi(t, Q(e, 3), c)
        }
        function Ec(t, e, o) {
          var s = t == null ? 0 : t.length
          if (!s) return -1
          var c = s - 1
          return (
            o !== i && ((c = ct(o)), (c = o < 0 ? Nt(s + c, 0) : jt(c, s - 1))),
            yi(t, Q(e, 3), c, !0)
          )
        }
        function kc(t) {
          var e = t == null ? 0 : t.length
          return e ? Xt(t, 1) : []
        }
        function Ig(t) {
          var e = t == null ? 0 : t.length
          return e ? Xt(t, H) : []
        }
        function Dg(t, e) {
          var o = t == null ? 0 : t.length
          return o ? ((e = e === i ? 1 : ct(e)), Xt(t, e)) : []
        }
        function Bg(t) {
          for (var e = -1, o = t == null ? 0 : t.length, s = {}; ++e < o; ) {
            var c = t[e]
            s[c[0]] = c[1]
          }
          return s
        }
        function Tc(t) {
          return t && t.length ? t[0] : i
        }
        function Ug(t, e, o) {
          var s = t == null ? 0 : t.length
          if (!s) return -1
          var c = o == null ? 0 : ct(o)
          return c < 0 && (c = Nt(s + c, 0)), nr(t, e, c)
        }
        function Ng(t) {
          var e = t == null ? 0 : t.length
          return e ? ze(t, 0, -1) : []
        }
        var Fg = ht(function (t) {
            var e = kt(t, xs)
            return e.length && e[0] === t[0] ? fs(e) : []
          }),
          Hg = ht(function (t) {
            var e = Oe(t),
              o = kt(t, xs)
            return (
              e === Oe(o) ? (e = i) : o.pop(),
              o.length && o[0] === t[0] ? fs(o, Q(e, 2)) : []
            )
          }),
          Wg = ht(function (t) {
            var e = Oe(t),
              o = kt(t, xs)
            return (
              (e = typeof e == 'function' ? e : i),
              e && o.pop(),
              o.length && o[0] === t[0] ? fs(o, i, e) : []
            )
          })
        function qg(t, e) {
          return t == null ? '' : Nf.call(t, e)
        }
        function Oe(t) {
          var e = t == null ? 0 : t.length
          return e ? t[e - 1] : i
        }
        function Yg(t, e, o) {
          var s = t == null ? 0 : t.length
          if (!s) return -1
          var c = s
          return (
            o !== i && ((c = ct(o)), (c = c < 0 ? Nt(s + c, 0) : jt(c, s - 1))),
            e === e ? Sf(t, e, c) : yi(t, cl, c, !0)
          )
        }
        function Gg(t, e) {
          return t && t.length ? Nl(t, ct(e)) : i
        }
        var Kg = ht(zc)
        function zc(t, e) {
          return t && t.length && e && e.length ? ms(t, e) : t
        }
        function Vg(t, e, o) {
          return t && t.length && e && e.length ? ms(t, e, Q(o, 2)) : t
        }
        function Xg(t, e, o) {
          return t && t.length && e && e.length ? ms(t, e, i, o) : t
        }
        var Zg = cn(function (t, e) {
          var o = t == null ? 0 : t.length,
            s = cs(t, e)
          return (
            Wl(
              t,
              kt(e, function (c) {
                return un(c, o) ? +c : c
              }).sort(Ql),
            ),
            s
          )
        })
        function jg(t, e) {
          var o = []
          if (!(t && t.length)) return o
          var s = -1,
            c = [],
            h = t.length
          for (e = Q(e, 3); ++s < h; ) {
            var p = t[s]
            e(p, s, t) && (o.push(p), c.push(s))
          }
          return Wl(t, c), o
        }
        function Ds(t) {
          return t == null ? t : qf.call(t)
        }
        function Jg(t, e, o) {
          var s = t == null ? 0 : t.length
          return s
            ? (o && typeof o != 'number' && te(t, e, o)
                ? ((e = 0), (o = s))
                : ((e = e == null ? 0 : ct(e)), (o = o === i ? s : ct(o))),
              ze(t, e, o))
            : []
        }
        function Qg(t, e) {
          return Ui(t, e)
        }
        function tv(t, e, o) {
          return _s(t, e, Q(o, 2))
        }
        function ev(t, e) {
          var o = t == null ? 0 : t.length
          if (o) {
            var s = Ui(t, e)
            if (s < o && We(t[s], e)) return s
          }
          return -1
        }
        function nv(t, e) {
          return Ui(t, e, !0)
        }
        function rv(t, e, o) {
          return _s(t, e, Q(o, 2), !0)
        }
        function iv(t, e) {
          var o = t == null ? 0 : t.length
          if (o) {
            var s = Ui(t, e, !0) - 1
            if (We(t[s], e)) return s
          }
          return -1
        }
        function ov(t) {
          return t && t.length ? Yl(t) : []
        }
        function sv(t, e) {
          return t && t.length ? Yl(t, Q(e, 2)) : []
        }
        function av(t) {
          var e = t == null ? 0 : t.length
          return e ? ze(t, 1, e) : []
        }
        function lv(t, e, o) {
          return t && t.length
            ? ((e = o || e === i ? 1 : ct(e)), ze(t, 0, e < 0 ? 0 : e))
            : []
        }
        function cv(t, e, o) {
          var s = t == null ? 0 : t.length
          return s
            ? ((e = o || e === i ? 1 : ct(e)),
              (e = s - e),
              ze(t, e < 0 ? 0 : e, s))
            : []
        }
        function uv(t, e) {
          return t && t.length ? Ni(t, Q(e, 3), !1, !0) : []
        }
        function hv(t, e) {
          return t && t.length ? Ni(t, Q(e, 3)) : []
        }
        var dv = ht(function (t) {
            return Cn(Xt(t, 1, Lt, !0))
          }),
          fv = ht(function (t) {
            var e = Oe(t)
            return Lt(e) && (e = i), Cn(Xt(t, 1, Lt, !0), Q(e, 2))
          }),
          pv = ht(function (t) {
            var e = Oe(t)
            return (
              (e = typeof e == 'function' ? e : i), Cn(Xt(t, 1, Lt, !0), i, e)
            )
          })
        function gv(t) {
          return t && t.length ? Cn(t) : []
        }
        function vv(t, e) {
          return t && t.length ? Cn(t, Q(e, 2)) : []
        }
        function mv(t, e) {
          return (
            (e = typeof e == 'function' ? e : i),
            t && t.length ? Cn(t, i, e) : []
          )
        }
        function Bs(t) {
          if (!(t && t.length)) return []
          var e = 0
          return (
            (t = _n(t, function (o) {
              if (Lt(o)) return (e = Nt(o.length, e)), !0
            })),
            es(e, function (o) {
              return kt(t, Jo(o))
            })
          )
        }
        function Oc(t, e) {
          if (!(t && t.length)) return []
          var o = Bs(t)
          return e == null
            ? o
            : kt(o, function (s) {
                return ge(e, i, s)
              })
        }
        var bv = ht(function (t, e) {
            return Lt(t) ? Hr(t, e) : []
          }),
          yv = ht(function (t) {
            return $s(_n(t, Lt))
          }),
          _v = ht(function (t) {
            var e = Oe(t)
            return Lt(e) && (e = i), $s(_n(t, Lt), Q(e, 2))
          }),
          wv = ht(function (t) {
            var e = Oe(t)
            return (e = typeof e == 'function' ? e : i), $s(_n(t, Lt), i, e)
          }),
          $v = ht(Bs)
        function xv(t, e) {
          return Xl(t || [], e || [], Fr)
        }
        function Sv(t, e) {
          return Xl(t || [], e || [], Yr)
        }
        var Cv = ht(function (t) {
          var e = t.length,
            o = e > 1 ? t[e - 1] : i
          return (o = typeof o == 'function' ? (t.pop(), o) : i), Oc(t, o)
        })
        function Pc(t) {
          var e = u(t)
          return (e.__chain__ = !0), e
        }
        function Av(t, e) {
          return e(t), t
        }
        function Xi(t, e) {
          return e(t)
        }
        var Ev = cn(function (t) {
          var e = t.length,
            o = e ? t[0] : 0,
            s = this.__wrapped__,
            c = function (h) {
              return cs(h, t)
            }
          return e > 1 ||
            this.__actions__.length ||
            !(s instanceof gt) ||
            !un(o)
            ? this.thru(c)
            : ((s = s.slice(o, +o + (e ? 1 : 0))),
              s.__actions__.push({
                func: Xi,
                args: [c],
                thisArg: i,
              }),
              new ke(s, this.__chain__).thru(function (h) {
                return e && !h.length && h.push(i), h
              }))
        })
        function kv() {
          return Pc(this)
        }
        function Tv() {
          return new ke(this.value(), this.__chain__)
        }
        function zv() {
          this.__values__ === i && (this.__values__ = Gc(this.value()))
          var t = this.__index__ >= this.__values__.length,
            e = t ? i : this.__values__[this.__index__++]
          return { done: t, value: e }
        }
        function Ov() {
          return this
        }
        function Pv(t) {
          for (var e, o = this; o instanceof Li; ) {
            var s = Cc(o)
            ;(s.__index__ = 0),
              (s.__values__ = i),
              e ? (c.__wrapped__ = s) : (e = s)
            var c = s
            o = o.__wrapped__
          }
          return (c.__wrapped__ = t), e
        }
        function Rv() {
          var t = this.__wrapped__
          if (t instanceof gt) {
            var e = t
            return (
              this.__actions__.length && (e = new gt(this)),
              (e = e.reverse()),
              e.__actions__.push({
                func: Xi,
                args: [Ds],
                thisArg: i,
              }),
              new ke(e, this.__chain__)
            )
          }
          return this.thru(Ds)
        }
        function Lv() {
          return Vl(this.__wrapped__, this.__actions__)
        }
        var Mv = Fi(function (t, e, o) {
          wt.call(t, o) ? ++t[o] : an(t, o, 1)
        })
        function Iv(t, e, o) {
          var s = lt(t) ? al : Ap
          return o && te(t, e, o) && (e = i), s(t, Q(e, 3))
        }
        function Dv(t, e) {
          var o = lt(t) ? _n : Ol
          return o(t, Q(e, 3))
        }
        var Bv = oc(Ac),
          Uv = oc(Ec)
        function Nv(t, e) {
          return Xt(Zi(t, e), 1)
        }
        function Fv(t, e) {
          return Xt(Zi(t, e), H)
        }
        function Hv(t, e, o) {
          return (o = o === i ? 1 : ct(o)), Xt(Zi(t, e), o)
        }
        function Rc(t, e) {
          var o = lt(t) ? Ae : Sn
          return o(t, Q(e, 3))
        }
        function Lc(t, e) {
          var o = lt(t) ? af : zl
          return o(t, Q(e, 3))
        }
        var Wv = Fi(function (t, e, o) {
          wt.call(t, o) ? t[o].push(e) : an(t, o, [e])
        })
        function qv(t, e, o, s) {
          ;(t = ie(t) ? t : pr(t)), (o = o && !s ? ct(o) : 0)
          var c = t.length
          return (
            o < 0 && (o = Nt(c + o, 0)),
            eo(t) ? o <= c && t.indexOf(e, o) > -1 : !!c && nr(t, e, o) > -1
          )
        }
        var Yv = ht(function (t, e, o) {
            var s = -1,
              c = typeof e == 'function',
              h = ie(t) ? $(t.length) : []
            return (
              Sn(t, function (p) {
                h[++s] = c ? ge(e, p, o) : Wr(p, e, o)
              }),
              h
            )
          }),
          Gv = Fi(function (t, e, o) {
            an(t, o, e)
          })
        function Zi(t, e) {
          var o = lt(t) ? kt : Dl
          return o(t, Q(e, 3))
        }
        function Kv(t, e, o, s) {
          return t == null
            ? []
            : (lt(e) || (e = e == null ? [] : [e]),
              (o = s ? i : o),
              lt(o) || (o = o == null ? [] : [o]),
              Fl(t, e, o))
        }
        var Vv = Fi(
          function (t, e, o) {
            t[o ? 0 : 1].push(e)
          },
          function () {
            return [[], []]
          },
        )
        function Xv(t, e, o) {
          var s = lt(t) ? Zo : hl,
            c = arguments.length < 3
          return s(t, Q(e, 4), o, c, Sn)
        }
        function Zv(t, e, o) {
          var s = lt(t) ? lf : hl,
            c = arguments.length < 3
          return s(t, Q(e, 4), o, c, zl)
        }
        function jv(t, e) {
          var o = lt(t) ? _n : Ol
          return o(t, Qi(Q(e, 3)))
        }
        function Jv(t) {
          var e = lt(t) ? Al : qp
          return e(t)
        }
        function Qv(t, e, o) {
          ;(o ? te(t, e, o) : e === i) ? (e = 1) : (e = ct(e))
          var s = lt(t) ? wp : Yp
          return s(t, e)
        }
        function tm(t) {
          var e = lt(t) ? $p : Kp
          return e(t)
        }
        function em(t) {
          if (t == null) return 0
          if (ie(t)) return eo(t) ? ir(t) : t.length
          var e = Jt(t)
          return e == Ue || e == Ne ? t.size : gs(t).length
        }
        function nm(t, e, o) {
          var s = lt(t) ? jo : Vp
          return o && te(t, e, o) && (e = i), s(t, Q(e, 3))
        }
        var rm = ht(function (t, e) {
            if (t == null) return []
            var o = e.length
            return (
              o > 1 && te(t, e[0], e[1])
                ? (e = [])
                : o > 2 && te(e[0], e[1], e[2]) && (e = [e[0]]),
              Fl(t, Xt(e, 1), [])
            )
          }),
          ji =
            Df ||
            function () {
              return Vt.Date.now()
            }
        function im(t, e) {
          if (typeof e != 'function') throw new Ee(f)
          return (
            (t = ct(t)),
            function () {
              if (--t < 1) return e.apply(this, arguments)
            }
          )
        }
        function Mc(t, e, o) {
          return (
            (e = o ? i : e),
            (e = t && e == null ? t.length : e),
            ln(t, I, i, i, i, i, e)
          )
        }
        function Ic(t, e) {
          var o
          if (typeof e != 'function') throw new Ee(f)
          return (
            (t = ct(t)),
            function () {
              return (
                --t > 0 && (o = e.apply(this, arguments)), t <= 1 && (e = i), o
              )
            }
          )
        }
        var Us = ht(function (t, e, o) {
            var s = x
            if (o.length) {
              var c = $n(o, dr(Us))
              s |= J
            }
            return ln(t, s, e, o, c)
          }),
          Dc = ht(function (t, e, o) {
            var s = x | P
            if (o.length) {
              var c = $n(o, dr(Dc))
              s |= J
            }
            return ln(e, s, t, o, c)
          })
        function Bc(t, e, o) {
          e = o ? i : e
          var s = ln(t, U, i, i, i, i, i, e)
          return (s.placeholder = Bc.placeholder), s
        }
        function Uc(t, e, o) {
          e = o ? i : e
          var s = ln(t, it, i, i, i, i, i, e)
          return (s.placeholder = Uc.placeholder), s
        }
        function Nc(t, e, o) {
          var s,
            c,
            h,
            p,
            g,
            y,
            A = 0,
            E = !1,
            O = !1,
            N = !0
          if (typeof t != 'function') throw new Ee(f)
          ;(e = Pe(e) || 0),
            Ot(o) &&
              ((E = !!o.leading),
              (O = 'maxWait' in o),
              (h = O ? Nt(Pe(o.maxWait) || 0, e) : h),
              (N = 'trailing' in o ? !!o.trailing : N))
          function Z(Mt) {
            var qe = s,
              fn = c
            return (s = c = i), (A = Mt), (p = t.apply(fn, qe)), p
          }
          function tt(Mt) {
            return (A = Mt), (g = Vr(pt, e)), E ? Z(Mt) : p
          }
          function ut(Mt) {
            var qe = Mt - y,
              fn = Mt - A,
              ou = e - qe
            return O ? jt(ou, h - fn) : ou
          }
          function et(Mt) {
            var qe = Mt - y,
              fn = Mt - A
            return y === i || qe >= e || qe < 0 || (O && fn >= h)
          }
          function pt() {
            var Mt = ji()
            if (et(Mt)) return vt(Mt)
            g = Vr(pt, ut(Mt))
          }
          function vt(Mt) {
            return (g = i), N && s ? Z(Mt) : ((s = c = i), p)
          }
          function ye() {
            g !== i && Zl(g), (A = 0), (s = y = c = g = i)
          }
          function ee() {
            return g === i ? p : vt(ji())
          }
          function _e() {
            var Mt = ji(),
              qe = et(Mt)
            if (((s = arguments), (c = this), (y = Mt), qe)) {
              if (g === i) return tt(y)
              if (O) return Zl(g), (g = Vr(pt, e)), Z(y)
            }
            return g === i && (g = Vr(pt, e)), p
          }
          return (_e.cancel = ye), (_e.flush = ee), _e
        }
        var om = ht(function (t, e) {
            return Tl(t, 1, e)
          }),
          sm = ht(function (t, e, o) {
            return Tl(t, Pe(e) || 0, o)
          })
        function am(t) {
          return ln(t, nt)
        }
        function Ji(t, e) {
          if (typeof t != 'function' || (e != null && typeof e != 'function'))
            throw new Ee(f)
          var o = function () {
            var s = arguments,
              c = e ? e.apply(this, s) : s[0],
              h = o.cache
            if (h.has(c)) return h.get(c)
            var p = t.apply(this, s)
            return (o.cache = h.set(c, p) || h), p
          }
          return (o.cache = new (Ji.Cache || sn)()), o
        }
        Ji.Cache = sn
        function Qi(t) {
          if (typeof t != 'function') throw new Ee(f)
          return function () {
            var e = arguments
            switch (e.length) {
              case 0:
                return !t.call(this)
              case 1:
                return !t.call(this, e[0])
              case 2:
                return !t.call(this, e[0], e[1])
              case 3:
                return !t.call(this, e[0], e[1], e[2])
            }
            return !t.apply(this, e)
          }
        }
        function lm(t) {
          return Ic(2, t)
        }
        var cm = Xp(function (t, e) {
            e =
              e.length == 1 && lt(e[0])
                ? kt(e[0], ve(Q()))
                : kt(Xt(e, 1), ve(Q()))
            var o = e.length
            return ht(function (s) {
              for (var c = -1, h = jt(s.length, o); ++c < h; )
                s[c] = e[c].call(this, s[c])
              return ge(t, this, s)
            })
          }),
          Ns = ht(function (t, e) {
            var o = $n(e, dr(Ns))
            return ln(t, J, i, e, o)
          }),
          Fc = ht(function (t, e) {
            var o = $n(e, dr(Fc))
            return ln(t, q, i, e, o)
          }),
          um = cn(function (t, e) {
            return ln(t, L, i, i, i, e)
          })
        function hm(t, e) {
          if (typeof t != 'function') throw new Ee(f)
          return (e = e === i ? e : ct(e)), ht(t, e)
        }
        function dm(t, e) {
          if (typeof t != 'function') throw new Ee(f)
          return (
            (e = e == null ? 0 : Nt(ct(e), 0)),
            ht(function (o) {
              var s = o[e],
                c = En(o, 0, e)
              return s && wn(c, s), ge(t, this, c)
            })
          )
        }
        function fm(t, e, o) {
          var s = !0,
            c = !0
          if (typeof t != 'function') throw new Ee(f)
          return (
            Ot(o) &&
              ((s = 'leading' in o ? !!o.leading : s),
              (c = 'trailing' in o ? !!o.trailing : c)),
            Nc(t, e, {
              leading: s,
              maxWait: e,
              trailing: c,
            })
          )
        }
        function pm(t) {
          return Mc(t, 1)
        }
        function gm(t, e) {
          return Ns(Ss(e), t)
        }
        function vm() {
          if (!arguments.length) return []
          var t = arguments[0]
          return lt(t) ? t : [t]
        }
        function mm(t) {
          return Te(t, T)
        }
        function bm(t, e) {
          return (e = typeof e == 'function' ? e : i), Te(t, T, e)
        }
        function ym(t) {
          return Te(t, C | T)
        }
        function _m(t, e) {
          return (e = typeof e == 'function' ? e : i), Te(t, C | T, e)
        }
        function wm(t, e) {
          return e == null || kl(t, e, Kt(e))
        }
        function We(t, e) {
          return t === e || (t !== t && e !== e)
        }
        var $m = Yi(ds),
          xm = Yi(function (t, e) {
            return t >= e
          }),
          Yn = Ll(
            /* @__PURE__ */ (function () {
              return arguments
            })(),
          )
            ? Ll
            : function (t) {
                return Rt(t) && wt.call(t, 'callee') && !_l.call(t, 'callee')
              },
          lt = $.isArray,
          Sm = el ? ve(el) : Pp
        function ie(t) {
          return t != null && to(t.length) && !hn(t)
        }
        function Lt(t) {
          return Rt(t) && ie(t)
        }
        function Cm(t) {
          return t === !0 || t === !1 || (Rt(t) && Qt(t) == Be)
        }
        var kn = Uf || js,
          Am = nl ? ve(nl) : Rp
        function Em(t) {
          return Rt(t) && t.nodeType === 1 && !Xr(t)
        }
        function km(t) {
          if (t == null) return !0
          if (
            ie(t) &&
            (lt(t) ||
              typeof t == 'string' ||
              typeof t.splice == 'function' ||
              kn(t) ||
              fr(t) ||
              Yn(t))
          )
            return !t.length
          var e = Jt(t)
          if (e == Ue || e == Ne) return !t.size
          if (Kr(t)) return !gs(t).length
          for (var o in t) if (wt.call(t, o)) return !1
          return !0
        }
        function Tm(t, e) {
          return qr(t, e)
        }
        function zm(t, e, o) {
          o = typeof o == 'function' ? o : i
          var s = o ? o(t, e) : i
          return s === i ? qr(t, e, i, o) : !!s
        }
        function Fs(t) {
          if (!Rt(t)) return !1
          var e = Qt(t)
          return (
            e == pe ||
            e == Zt ||
            (typeof t.message == 'string' &&
              typeof t.name == 'string' &&
              !Xr(t))
          )
        }
        function Om(t) {
          return typeof t == 'number' && $l(t)
        }
        function hn(t) {
          if (!Ot(t)) return !1
          var e = Qt(t)
          return e == Ve || e == In || e == nn || e == td
        }
        function Hc(t) {
          return typeof t == 'number' && t == ct(t)
        }
        function to(t) {
          return typeof t == 'number' && t > -1 && t % 1 == 0 && t <= B
        }
        function Ot(t) {
          var e = typeof t
          return t != null && (e == 'object' || e == 'function')
        }
        function Rt(t) {
          return t != null && typeof t == 'object'
        }
        var Wc = rl ? ve(rl) : Mp
        function Pm(t, e) {
          return t === e || ps(t, e, Os(e))
        }
        function Rm(t, e, o) {
          return (o = typeof o == 'function' ? o : i), ps(t, e, Os(e), o)
        }
        function Lm(t) {
          return qc(t) && t != +t
        }
        function Mm(t) {
          if (bg(t)) throw new st(d)
          return Ml(t)
        }
        function Im(t) {
          return t === null
        }
        function Dm(t) {
          return t == null
        }
        function qc(t) {
          return typeof t == 'number' || (Rt(t) && Qt(t) == zr)
        }
        function Xr(t) {
          if (!Rt(t) || Qt(t) != rn) return !1
          var e = Ei(t)
          if (e === null) return !0
          var o = wt.call(e, 'constructor') && e.constructor
          return typeof o == 'function' && o instanceof o && xi.call(o) == Rf
        }
        var Hs = il ? ve(il) : Ip
        function Bm(t) {
          return Hc(t) && t >= -B && t <= B
        }
        var Yc = ol ? ve(ol) : Dp
        function eo(t) {
          return typeof t == 'string' || (!lt(t) && Rt(t) && Qt(t) == Pr)
        }
        function be(t) {
          return typeof t == 'symbol' || (Rt(t) && Qt(t) == pi)
        }
        var fr = sl ? ve(sl) : Bp
        function Um(t) {
          return t === i
        }
        function Nm(t) {
          return Rt(t) && Jt(t) == Rr
        }
        function Fm(t) {
          return Rt(t) && Qt(t) == nd
        }
        var Hm = Yi(vs),
          Wm = Yi(function (t, e) {
            return t <= e
          })
        function Gc(t) {
          if (!t) return []
          if (ie(t)) return eo(t) ? Fe(t) : re(t)
          if (Ir && t[Ir]) return wf(t[Ir]())
          var e = Jt(t),
            o = e == Ue ? rs : e == Ne ? _i : pr
          return o(t)
        }
        function dn(t) {
          if (!t) return t === 0 ? t : 0
          if (((t = Pe(t)), t === H || t === -H)) {
            var e = t < 0 ? -1 : 1
            return e * at
          }
          return t === t ? t : 0
        }
        function ct(t) {
          var e = dn(t),
            o = e % 1
          return e === e ? (o ? e - o : e) : 0
        }
        function Kc(t) {
          return t ? Fn(ct(t), 0, ft) : 0
        }
        function Pe(t) {
          if (typeof t == 'number') return t
          if (be(t)) return rt
          if (Ot(t)) {
            var e = typeof t.valueOf == 'function' ? t.valueOf() : t
            t = Ot(e) ? e + '' : e
          }
          if (typeof t != 'string') return t === 0 ? t : +t
          t = dl(t)
          var o = xd.test(t)
          return o || Cd.test(t)
            ? rf(t.slice(2), o ? 2 : 8)
            : $d.test(t)
            ? rt
            : +t
        }
        function Vc(t) {
          return Ze(t, oe(t))
        }
        function qm(t) {
          return t ? Fn(ct(t), -B, B) : t === 0 ? t : 0
        }
        function _t(t) {
          return t == null ? '' : me(t)
        }
        var Ym = ur(function (t, e) {
            if (Kr(e) || ie(e)) {
              Ze(e, Kt(e), t)
              return
            }
            for (var o in e) wt.call(e, o) && Fr(t, o, e[o])
          }),
          Xc = ur(function (t, e) {
            Ze(e, oe(e), t)
          }),
          no = ur(function (t, e, o, s) {
            Ze(e, oe(e), t, s)
          }),
          Gm = ur(function (t, e, o, s) {
            Ze(e, Kt(e), t, s)
          }),
          Km = cn(cs)
        function Vm(t, e) {
          var o = cr(t)
          return e == null ? o : El(o, e)
        }
        var Xm = ht(function (t, e) {
            t = xt(t)
            var o = -1,
              s = e.length,
              c = s > 2 ? e[2] : i
            for (c && te(e[0], e[1], c) && (s = 1); ++o < s; )
              for (var h = e[o], p = oe(h), g = -1, y = p.length; ++g < y; ) {
                var A = p[g],
                  E = t[A]
                ;(E === i || (We(E, sr[A]) && !wt.call(t, A))) && (t[A] = h[A])
              }
            return t
          }),
          Zm = ht(function (t) {
            return t.push(i, dc), ge(Zc, i, t)
          })
        function jm(t, e) {
          return ll(t, Q(e, 3), Xe)
        }
        function Jm(t, e) {
          return ll(t, Q(e, 3), hs)
        }
        function Qm(t, e) {
          return t == null ? t : us(t, Q(e, 3), oe)
        }
        function tb(t, e) {
          return t == null ? t : Pl(t, Q(e, 3), oe)
        }
        function eb(t, e) {
          return t && Xe(t, Q(e, 3))
        }
        function nb(t, e) {
          return t && hs(t, Q(e, 3))
        }
        function rb(t) {
          return t == null ? [] : Di(t, Kt(t))
        }
        function ib(t) {
          return t == null ? [] : Di(t, oe(t))
        }
        function Ws(t, e, o) {
          var s = t == null ? i : Hn(t, e)
          return s === i ? o : s
        }
        function ob(t, e) {
          return t != null && gc(t, e, kp)
        }
        function qs(t, e) {
          return t != null && gc(t, e, Tp)
        }
        var sb = ac(function (t, e, o) {
            e != null && typeof e.toString != 'function' && (e = Si.call(e)),
              (t[e] = o)
          }, Gs(se)),
          ab = ac(function (t, e, o) {
            e != null && typeof e.toString != 'function' && (e = Si.call(e)),
              wt.call(t, e) ? t[e].push(o) : (t[e] = [o])
          }, Q),
          lb = ht(Wr)
        function Kt(t) {
          return ie(t) ? Cl(t) : gs(t)
        }
        function oe(t) {
          return ie(t) ? Cl(t, !0) : Up(t)
        }
        function cb(t, e) {
          var o = {}
          return (
            (e = Q(e, 3)),
            Xe(t, function (s, c, h) {
              an(o, e(s, c, h), s)
            }),
            o
          )
        }
        function ub(t, e) {
          var o = {}
          return (
            (e = Q(e, 3)),
            Xe(t, function (s, c, h) {
              an(o, c, e(s, c, h))
            }),
            o
          )
        }
        var hb = ur(function (t, e, o) {
            Bi(t, e, o)
          }),
          Zc = ur(function (t, e, o, s) {
            Bi(t, e, o, s)
          }),
          db = cn(function (t, e) {
            var o = {}
            if (t == null) return o
            var s = !1
            ;(e = kt(e, function (h) {
              return (h = An(h, t)), s || (s = h.length > 1), h
            })),
              Ze(t, Ts(t), o),
              s && (o = Te(o, C | F | T, sg))
            for (var c = e.length; c--; ) ws(o, e[c])
            return o
          })
        function fb(t, e) {
          return jc(t, Qi(Q(e)))
        }
        var pb = cn(function (t, e) {
          return t == null ? {} : Fp(t, e)
        })
        function jc(t, e) {
          if (t == null) return {}
          var o = kt(Ts(t), function (s) {
            return [s]
          })
          return (
            (e = Q(e)),
            Hl(t, o, function (s, c) {
              return e(s, c[0])
            })
          )
        }
        function gb(t, e, o) {
          e = An(e, t)
          var s = -1,
            c = e.length
          for (c || ((c = 1), (t = i)); ++s < c; ) {
            var h = t == null ? i : t[je(e[s])]
            h === i && ((s = c), (h = o)), (t = hn(h) ? h.call(t) : h)
          }
          return t
        }
        function vb(t, e, o) {
          return t == null ? t : Yr(t, e, o)
        }
        function mb(t, e, o, s) {
          return (
            (s = typeof s == 'function' ? s : i), t == null ? t : Yr(t, e, o, s)
          )
        }
        var Jc = uc(Kt),
          Qc = uc(oe)
        function bb(t, e, o) {
          var s = lt(t),
            c = s || kn(t) || fr(t)
          if (((e = Q(e, 4)), o == null)) {
            var h = t && t.constructor
            c
              ? (o = s ? new h() : [])
              : Ot(t)
              ? (o = hn(h) ? cr(Ei(t)) : {})
              : (o = {})
          }
          return (
            (c ? Ae : Xe)(t, function (p, g, y) {
              return e(o, p, g, y)
            }),
            o
          )
        }
        function yb(t, e) {
          return t == null ? !0 : ws(t, e)
        }
        function _b(t, e, o) {
          return t == null ? t : Kl(t, e, Ss(o))
        }
        function wb(t, e, o, s) {
          return (
            (s = typeof s == 'function' ? s : i),
            t == null ? t : Kl(t, e, Ss(o), s)
          )
        }
        function pr(t) {
          return t == null ? [] : ns(t, Kt(t))
        }
        function $b(t) {
          return t == null ? [] : ns(t, oe(t))
        }
        function xb(t, e, o) {
          return (
            o === i && ((o = e), (e = i)),
            o !== i && ((o = Pe(o)), (o = o === o ? o : 0)),
            e !== i && ((e = Pe(e)), (e = e === e ? e : 0)),
            Fn(Pe(t), e, o)
          )
        }
        function Sb(t, e, o) {
          return (
            (e = dn(e)),
            o === i ? ((o = e), (e = 0)) : (o = dn(o)),
            (t = Pe(t)),
            zp(t, e, o)
          )
        }
        function Cb(t, e, o) {
          if (
            (o && typeof o != 'boolean' && te(t, e, o) && (e = o = i),
            o === i &&
              (typeof e == 'boolean'
                ? ((o = e), (e = i))
                : typeof t == 'boolean' && ((o = t), (t = i))),
            t === i && e === i
              ? ((t = 0), (e = 1))
              : ((t = dn(t)), e === i ? ((e = t), (t = 0)) : (e = dn(e))),
            t > e)
          ) {
            var s = t
            ;(t = e), (e = s)
          }
          if (o || t % 1 || e % 1) {
            var c = xl()
            return jt(t + c * (e - t + nf('1e-' + ((c + '').length - 1))), e)
          }
          return bs(t, e)
        }
        var Ab = hr(function (t, e, o) {
          return (e = e.toLowerCase()), t + (o ? tu(e) : e)
        })
        function tu(t) {
          return Ys(_t(t).toLowerCase())
        }
        function eu(t) {
          return (t = _t(t)), t && t.replace(Ed, vf).replace(Gd, '')
        }
        function Eb(t, e, o) {
          ;(t = _t(t)), (e = me(e))
          var s = t.length
          o = o === i ? s : Fn(ct(o), 0, s)
          var c = o
          return (o -= e.length), o >= 0 && t.slice(o, c) == e
        }
        function kb(t) {
          return (t = _t(t)), t && ad.test(t) ? t.replace(Pa, mf) : t
        }
        function Tb(t) {
          return (t = _t(t)), t && fd.test(t) ? t.replace(No, '\\$&') : t
        }
        var zb = hr(function (t, e, o) {
            return t + (o ? '-' : '') + e.toLowerCase()
          }),
          Ob = hr(function (t, e, o) {
            return t + (o ? ' ' : '') + e.toLowerCase()
          }),
          Pb = ic('toLowerCase')
        function Rb(t, e, o) {
          ;(t = _t(t)), (e = ct(e))
          var s = e ? ir(t) : 0
          if (!e || s >= e) return t
          var c = (e - s) / 2
          return qi(Oi(c), o) + t + qi(zi(c), o)
        }
        function Lb(t, e, o) {
          ;(t = _t(t)), (e = ct(e))
          var s = e ? ir(t) : 0
          return e && s < e ? t + qi(e - s, o) : t
        }
        function Mb(t, e, o) {
          ;(t = _t(t)), (e = ct(e))
          var s = e ? ir(t) : 0
          return e && s < e ? qi(e - s, o) + t : t
        }
        function Ib(t, e, o) {
          return (
            o || e == null ? (e = 0) : e && (e = +e),
            Wf(_t(t).replace(Fo, ''), e || 0)
          )
        }
        function Db(t, e, o) {
          return (
            (o ? te(t, e, o) : e === i) ? (e = 1) : (e = ct(e)), ys(_t(t), e)
          )
        }
        function Bb() {
          var t = arguments,
            e = _t(t[0])
          return t.length < 3 ? e : e.replace(t[1], t[2])
        }
        var Ub = hr(function (t, e, o) {
          return t + (o ? '_' : '') + e.toLowerCase()
        })
        function Nb(t, e, o) {
          return (
            o && typeof o != 'number' && te(t, e, o) && (e = o = i),
            (o = o === i ? ft : o >>> 0),
            o
              ? ((t = _t(t)),
                t &&
                (typeof e == 'string' || (e != null && !Hs(e))) &&
                ((e = me(e)), !e && rr(t))
                  ? En(Fe(t), 0, o)
                  : t.split(e, o))
              : []
          )
        }
        var Fb = hr(function (t, e, o) {
          return t + (o ? ' ' : '') + Ys(e)
        })
        function Hb(t, e, o) {
          return (
            (t = _t(t)),
            (o = o == null ? 0 : Fn(ct(o), 0, t.length)),
            (e = me(e)),
            t.slice(o, o + e.length) == e
          )
        }
        function Wb(t, e, o) {
          var s = u.templateSettings
          o && te(t, e, o) && (e = i), (t = _t(t)), (e = no({}, e, s, hc))
          var c = no({}, e.imports, s.imports, hc),
            h = Kt(c),
            p = ns(c, h),
            g,
            y,
            A = 0,
            E = e.interpolate || gi,
            O = "__p += '",
            N = is(
              (e.escape || gi).source +
                '|' +
                E.source +
                '|' +
                (E === Ra ? wd : gi).source +
                '|' +
                (e.evaluate || gi).source +
                '|$',
              'g',
            ),
            Z =
              '//# sourceURL=' +
              (wt.call(e, 'sourceURL')
                ? (e.sourceURL + '').replace(/\s/g, ' ')
                : 'lodash.templateSources[' + ++jd + ']') +
              `
`
          t.replace(N, function (et, pt, vt, ye, ee, _e) {
            return (
              vt || (vt = ye),
              (O += t.slice(A, _e).replace(kd, bf)),
              pt &&
                ((g = !0),
                (O +=
                  `' +
__e(` +
                  pt +
                  `) +
'`)),
              ee &&
                ((y = !0),
                (O +=
                  `';
` +
                  ee +
                  `;
__p += '`)),
              vt &&
                (O +=
                  `' +
((__t = (` +
                  vt +
                  `)) == null ? '' : __t) +
'`),
              (A = _e + et.length),
              et
            )
          }),
            (O += `';
`)
          var tt = wt.call(e, 'variable') && e.variable
          if (!tt)
            O =
              `with (obj) {
` +
              O +
              `
}
`
          else if (yd.test(tt)) throw new st(v)
          ;(O = (y ? O.replace(rd, '') : O)
            .replace(id, '$1')
            .replace(od, '$1;')),
            (O =
              'function(' +
              (tt || 'obj') +
              `) {
` +
              (tt
                ? ''
                : `obj || (obj = {});
`) +
              "var __t, __p = ''" +
              (g ? ', __e = _.escape' : '') +
              (y
                ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`
                : `;
`) +
              O +
              `return __p
}`)
          var ut = ru(function () {
            return yt(h, Z + 'return ' + O).apply(i, p)
          })
          if (((ut.source = O), Fs(ut))) throw ut
          return ut
        }
        function qb(t) {
          return _t(t).toLowerCase()
        }
        function Yb(t) {
          return _t(t).toUpperCase()
        }
        function Gb(t, e, o) {
          if (((t = _t(t)), t && (o || e === i))) return dl(t)
          if (!t || !(e = me(e))) return t
          var s = Fe(t),
            c = Fe(e),
            h = fl(s, c),
            p = pl(s, c) + 1
          return En(s, h, p).join('')
        }
        function Kb(t, e, o) {
          if (((t = _t(t)), t && (o || e === i))) return t.slice(0, vl(t) + 1)
          if (!t || !(e = me(e))) return t
          var s = Fe(t),
            c = pl(s, Fe(e)) + 1
          return En(s, 0, c).join('')
        }
        function Vb(t, e, o) {
          if (((t = _t(t)), t && (o || e === i))) return t.replace(Fo, '')
          if (!t || !(e = me(e))) return t
          var s = Fe(t),
            c = fl(s, Fe(e))
          return En(s, c).join('')
        }
        function Xb(t, e) {
          var o = ot,
            s = j
          if (Ot(e)) {
            var c = 'separator' in e ? e.separator : c
            ;(o = 'length' in e ? ct(e.length) : o),
              (s = 'omission' in e ? me(e.omission) : s)
          }
          t = _t(t)
          var h = t.length
          if (rr(t)) {
            var p = Fe(t)
            h = p.length
          }
          if (o >= h) return t
          var g = o - ir(s)
          if (g < 1) return s
          var y = p ? En(p, 0, g).join('') : t.slice(0, g)
          if (c === i) return y + s
          if ((p && (g += y.length - g), Hs(c))) {
            if (t.slice(g).search(c)) {
              var A,
                E = y
              for (
                c.global || (c = is(c.source, _t(La.exec(c)) + 'g')),
                  c.lastIndex = 0;
                (A = c.exec(E));

              )
                var O = A.index
              y = y.slice(0, O === i ? g : O)
            }
          } else if (t.indexOf(me(c), g) != g) {
            var N = y.lastIndexOf(c)
            N > -1 && (y = y.slice(0, N))
          }
          return y + s
        }
        function Zb(t) {
          return (t = _t(t)), t && sd.test(t) ? t.replace(Oa, Cf) : t
        }
        var jb = hr(function (t, e, o) {
            return t + (o ? ' ' : '') + e.toUpperCase()
          }),
          Ys = ic('toUpperCase')
        function nu(t, e, o) {
          return (
            (t = _t(t)),
            (e = o ? i : e),
            e === i ? (_f(t) ? kf(t) : hf(t)) : t.match(e) || []
          )
        }
        var ru = ht(function (t, e) {
            try {
              return ge(t, i, e)
            } catch (o) {
              return Fs(o) ? o : new st(o)
            }
          }),
          Jb = cn(function (t, e) {
            return (
              Ae(e, function (o) {
                ;(o = je(o)), an(t, o, Us(t[o], t))
              }),
              t
            )
          })
        function Qb(t) {
          var e = t == null ? 0 : t.length,
            o = Q()
          return (
            (t = e
              ? kt(t, function (s) {
                  if (typeof s[1] != 'function') throw new Ee(f)
                  return [o(s[0]), s[1]]
                })
              : []),
            ht(function (s) {
              for (var c = -1; ++c < e; ) {
                var h = t[c]
                if (ge(h[0], this, s)) return ge(h[1], this, s)
              }
            })
          )
        }
        function t0(t) {
          return Cp(Te(t, C))
        }
        function Gs(t) {
          return function () {
            return t
          }
        }
        function e0(t, e) {
          return t == null || t !== t ? e : t
        }
        var n0 = sc(),
          r0 = sc(!0)
        function se(t) {
          return t
        }
        function Ks(t) {
          return Il(typeof t == 'function' ? t : Te(t, C))
        }
        function i0(t) {
          return Bl(Te(t, C))
        }
        function o0(t, e) {
          return Ul(t, Te(e, C))
        }
        var s0 = ht(function (t, e) {
            return function (o) {
              return Wr(o, t, e)
            }
          }),
          a0 = ht(function (t, e) {
            return function (o) {
              return Wr(t, o, e)
            }
          })
        function Vs(t, e, o) {
          var s = Kt(e),
            c = Di(e, s)
          o == null &&
            !(Ot(e) && (c.length || !s.length)) &&
            ((o = e), (e = t), (t = this), (c = Di(e, Kt(e))))
          var h = !(Ot(o) && 'chain' in o) || !!o.chain,
            p = hn(t)
          return (
            Ae(c, function (g) {
              var y = e[g]
              ;(t[g] = y),
                p &&
                  (t.prototype[g] = function () {
                    var A = this.__chain__
                    if (h || A) {
                      var E = t(this.__wrapped__),
                        O = (E.__actions__ = re(this.__actions__))
                      return (
                        O.push({ func: y, args: arguments, thisArg: t }),
                        (E.__chain__ = A),
                        E
                      )
                    }
                    return y.apply(t, wn([this.value()], arguments))
                  })
            }),
            t
          )
        }
        function l0() {
          return Vt._ === this && (Vt._ = Lf), this
        }
        function Xs() {}
        function c0(t) {
          return (
            (t = ct(t)),
            ht(function (e) {
              return Nl(e, t)
            })
          )
        }
        var u0 = As(kt),
          h0 = As(al),
          d0 = As(jo)
        function iu(t) {
          return Rs(t) ? Jo(je(t)) : Hp(t)
        }
        function f0(t) {
          return function (e) {
            return t == null ? i : Hn(t, e)
          }
        }
        var p0 = lc(),
          g0 = lc(!0)
        function Zs() {
          return []
        }
        function js() {
          return !1
        }
        function v0() {
          return {}
        }
        function m0() {
          return ''
        }
        function b0() {
          return !0
        }
        function y0(t, e) {
          if (((t = ct(t)), t < 1 || t > B)) return []
          var o = ft,
            s = jt(t, ft)
          ;(e = Q(e)), (t -= ft)
          for (var c = es(s, e); ++o < t; ) e(o)
          return c
        }
        function _0(t) {
          return lt(t) ? kt(t, je) : be(t) ? [t] : re(Sc(_t(t)))
        }
        function w0(t) {
          var e = ++Pf
          return _t(t) + e
        }
        var $0 = Wi(function (t, e) {
            return t + e
          }, 0),
          x0 = Es('ceil'),
          S0 = Wi(function (t, e) {
            return t / e
          }, 1),
          C0 = Es('floor')
        function A0(t) {
          return t && t.length ? Ii(t, se, ds) : i
        }
        function E0(t, e) {
          return t && t.length ? Ii(t, Q(e, 2), ds) : i
        }
        function k0(t) {
          return ul(t, se)
        }
        function T0(t, e) {
          return ul(t, Q(e, 2))
        }
        function z0(t) {
          return t && t.length ? Ii(t, se, vs) : i
        }
        function O0(t, e) {
          return t && t.length ? Ii(t, Q(e, 2), vs) : i
        }
        var P0 = Wi(function (t, e) {
            return t * e
          }, 1),
          R0 = Es('round'),
          L0 = Wi(function (t, e) {
            return t - e
          }, 0)
        function M0(t) {
          return t && t.length ? ts(t, se) : 0
        }
        function I0(t, e) {
          return t && t.length ? ts(t, Q(e, 2)) : 0
        }
        return (
          (u.after = im),
          (u.ary = Mc),
          (u.assign = Ym),
          (u.assignIn = Xc),
          (u.assignInWith = no),
          (u.assignWith = Gm),
          (u.at = Km),
          (u.before = Ic),
          (u.bind = Us),
          (u.bindAll = Jb),
          (u.bindKey = Dc),
          (u.castArray = vm),
          (u.chain = Pc),
          (u.chunk = Cg),
          (u.compact = Ag),
          (u.concat = Eg),
          (u.cond = Qb),
          (u.conforms = t0),
          (u.constant = Gs),
          (u.countBy = Mv),
          (u.create = Vm),
          (u.curry = Bc),
          (u.curryRight = Uc),
          (u.debounce = Nc),
          (u.defaults = Xm),
          (u.defaultsDeep = Zm),
          (u.defer = om),
          (u.delay = sm),
          (u.difference = kg),
          (u.differenceBy = Tg),
          (u.differenceWith = zg),
          (u.drop = Og),
          (u.dropRight = Pg),
          (u.dropRightWhile = Rg),
          (u.dropWhile = Lg),
          (u.fill = Mg),
          (u.filter = Dv),
          (u.flatMap = Nv),
          (u.flatMapDeep = Fv),
          (u.flatMapDepth = Hv),
          (u.flatten = kc),
          (u.flattenDeep = Ig),
          (u.flattenDepth = Dg),
          (u.flip = am),
          (u.flow = n0),
          (u.flowRight = r0),
          (u.fromPairs = Bg),
          (u.functions = rb),
          (u.functionsIn = ib),
          (u.groupBy = Wv),
          (u.initial = Ng),
          (u.intersection = Fg),
          (u.intersectionBy = Hg),
          (u.intersectionWith = Wg),
          (u.invert = sb),
          (u.invertBy = ab),
          (u.invokeMap = Yv),
          (u.iteratee = Ks),
          (u.keyBy = Gv),
          (u.keys = Kt),
          (u.keysIn = oe),
          (u.map = Zi),
          (u.mapKeys = cb),
          (u.mapValues = ub),
          (u.matches = i0),
          (u.matchesProperty = o0),
          (u.memoize = Ji),
          (u.merge = hb),
          (u.mergeWith = Zc),
          (u.method = s0),
          (u.methodOf = a0),
          (u.mixin = Vs),
          (u.negate = Qi),
          (u.nthArg = c0),
          (u.omit = db),
          (u.omitBy = fb),
          (u.once = lm),
          (u.orderBy = Kv),
          (u.over = u0),
          (u.overArgs = cm),
          (u.overEvery = h0),
          (u.overSome = d0),
          (u.partial = Ns),
          (u.partialRight = Fc),
          (u.partition = Vv),
          (u.pick = pb),
          (u.pickBy = jc),
          (u.property = iu),
          (u.propertyOf = f0),
          (u.pull = Kg),
          (u.pullAll = zc),
          (u.pullAllBy = Vg),
          (u.pullAllWith = Xg),
          (u.pullAt = Zg),
          (u.range = p0),
          (u.rangeRight = g0),
          (u.rearg = um),
          (u.reject = jv),
          (u.remove = jg),
          (u.rest = hm),
          (u.reverse = Ds),
          (u.sampleSize = Qv),
          (u.set = vb),
          (u.setWith = mb),
          (u.shuffle = tm),
          (u.slice = Jg),
          (u.sortBy = rm),
          (u.sortedUniq = ov),
          (u.sortedUniqBy = sv),
          (u.split = Nb),
          (u.spread = dm),
          (u.tail = av),
          (u.take = lv),
          (u.takeRight = cv),
          (u.takeRightWhile = uv),
          (u.takeWhile = hv),
          (u.tap = Av),
          (u.throttle = fm),
          (u.thru = Xi),
          (u.toArray = Gc),
          (u.toPairs = Jc),
          (u.toPairsIn = Qc),
          (u.toPath = _0),
          (u.toPlainObject = Vc),
          (u.transform = bb),
          (u.unary = pm),
          (u.union = dv),
          (u.unionBy = fv),
          (u.unionWith = pv),
          (u.uniq = gv),
          (u.uniqBy = vv),
          (u.uniqWith = mv),
          (u.unset = yb),
          (u.unzip = Bs),
          (u.unzipWith = Oc),
          (u.update = _b),
          (u.updateWith = wb),
          (u.values = pr),
          (u.valuesIn = $b),
          (u.without = bv),
          (u.words = nu),
          (u.wrap = gm),
          (u.xor = yv),
          (u.xorBy = _v),
          (u.xorWith = wv),
          (u.zip = $v),
          (u.zipObject = xv),
          (u.zipObjectDeep = Sv),
          (u.zipWith = Cv),
          (u.entries = Jc),
          (u.entriesIn = Qc),
          (u.extend = Xc),
          (u.extendWith = no),
          Vs(u, u),
          (u.add = $0),
          (u.attempt = ru),
          (u.camelCase = Ab),
          (u.capitalize = tu),
          (u.ceil = x0),
          (u.clamp = xb),
          (u.clone = mm),
          (u.cloneDeep = ym),
          (u.cloneDeepWith = _m),
          (u.cloneWith = bm),
          (u.conformsTo = wm),
          (u.deburr = eu),
          (u.defaultTo = e0),
          (u.divide = S0),
          (u.endsWith = Eb),
          (u.eq = We),
          (u.escape = kb),
          (u.escapeRegExp = Tb),
          (u.every = Iv),
          (u.find = Bv),
          (u.findIndex = Ac),
          (u.findKey = jm),
          (u.findLast = Uv),
          (u.findLastIndex = Ec),
          (u.findLastKey = Jm),
          (u.floor = C0),
          (u.forEach = Rc),
          (u.forEachRight = Lc),
          (u.forIn = Qm),
          (u.forInRight = tb),
          (u.forOwn = eb),
          (u.forOwnRight = nb),
          (u.get = Ws),
          (u.gt = $m),
          (u.gte = xm),
          (u.has = ob),
          (u.hasIn = qs),
          (u.head = Tc),
          (u.identity = se),
          (u.includes = qv),
          (u.indexOf = Ug),
          (u.inRange = Sb),
          (u.invoke = lb),
          (u.isArguments = Yn),
          (u.isArray = lt),
          (u.isArrayBuffer = Sm),
          (u.isArrayLike = ie),
          (u.isArrayLikeObject = Lt),
          (u.isBoolean = Cm),
          (u.isBuffer = kn),
          (u.isDate = Am),
          (u.isElement = Em),
          (u.isEmpty = km),
          (u.isEqual = Tm),
          (u.isEqualWith = zm),
          (u.isError = Fs),
          (u.isFinite = Om),
          (u.isFunction = hn),
          (u.isInteger = Hc),
          (u.isLength = to),
          (u.isMap = Wc),
          (u.isMatch = Pm),
          (u.isMatchWith = Rm),
          (u.isNaN = Lm),
          (u.isNative = Mm),
          (u.isNil = Dm),
          (u.isNull = Im),
          (u.isNumber = qc),
          (u.isObject = Ot),
          (u.isObjectLike = Rt),
          (u.isPlainObject = Xr),
          (u.isRegExp = Hs),
          (u.isSafeInteger = Bm),
          (u.isSet = Yc),
          (u.isString = eo),
          (u.isSymbol = be),
          (u.isTypedArray = fr),
          (u.isUndefined = Um),
          (u.isWeakMap = Nm),
          (u.isWeakSet = Fm),
          (u.join = qg),
          (u.kebabCase = zb),
          (u.last = Oe),
          (u.lastIndexOf = Yg),
          (u.lowerCase = Ob),
          (u.lowerFirst = Pb),
          (u.lt = Hm),
          (u.lte = Wm),
          (u.max = A0),
          (u.maxBy = E0),
          (u.mean = k0),
          (u.meanBy = T0),
          (u.min = z0),
          (u.minBy = O0),
          (u.stubArray = Zs),
          (u.stubFalse = js),
          (u.stubObject = v0),
          (u.stubString = m0),
          (u.stubTrue = b0),
          (u.multiply = P0),
          (u.nth = Gg),
          (u.noConflict = l0),
          (u.noop = Xs),
          (u.now = ji),
          (u.pad = Rb),
          (u.padEnd = Lb),
          (u.padStart = Mb),
          (u.parseInt = Ib),
          (u.random = Cb),
          (u.reduce = Xv),
          (u.reduceRight = Zv),
          (u.repeat = Db),
          (u.replace = Bb),
          (u.result = gb),
          (u.round = R0),
          (u.runInContext = b),
          (u.sample = Jv),
          (u.size = em),
          (u.snakeCase = Ub),
          (u.some = nm),
          (u.sortedIndex = Qg),
          (u.sortedIndexBy = tv),
          (u.sortedIndexOf = ev),
          (u.sortedLastIndex = nv),
          (u.sortedLastIndexBy = rv),
          (u.sortedLastIndexOf = iv),
          (u.startCase = Fb),
          (u.startsWith = Hb),
          (u.subtract = L0),
          (u.sum = M0),
          (u.sumBy = I0),
          (u.template = Wb),
          (u.times = y0),
          (u.toFinite = dn),
          (u.toInteger = ct),
          (u.toLength = Kc),
          (u.toLower = qb),
          (u.toNumber = Pe),
          (u.toSafeInteger = qm),
          (u.toString = _t),
          (u.toUpper = Yb),
          (u.trim = Gb),
          (u.trimEnd = Kb),
          (u.trimStart = Vb),
          (u.truncate = Xb),
          (u.unescape = Zb),
          (u.uniqueId = w0),
          (u.upperCase = jb),
          (u.upperFirst = Ys),
          (u.each = Rc),
          (u.eachRight = Lc),
          (u.first = Tc),
          Vs(
            u,
            (function () {
              var t = {}
              return (
                Xe(u, function (e, o) {
                  wt.call(u.prototype, o) || (t[o] = e)
                }),
                t
              )
            })(),
            { chain: !1 },
          ),
          (u.VERSION = a),
          Ae(
            [
              'bind',
              'bindKey',
              'curry',
              'curryRight',
              'partial',
              'partialRight',
            ],
            function (t) {
              u[t].placeholder = u
            },
          ),
          Ae(['drop', 'take'], function (t, e) {
            ;(gt.prototype[t] = function (o) {
              o = o === i ? 1 : Nt(ct(o), 0)
              var s = this.__filtered__ && !e ? new gt(this) : this.clone()
              return (
                s.__filtered__
                  ? (s.__takeCount__ = jt(o, s.__takeCount__))
                  : s.__views__.push({
                      size: jt(o, ft),
                      type: t + (s.__dir__ < 0 ? 'Right' : ''),
                    }),
                s
              )
            }),
              (gt.prototype[t + 'Right'] = function (o) {
                return this.reverse()[t](o).reverse()
              })
          }),
          Ae(['filter', 'map', 'takeWhile'], function (t, e) {
            var o = e + 1,
              s = o == W || o == M
            gt.prototype[t] = function (c) {
              var h = this.clone()
              return (
                h.__iteratees__.push({
                  iteratee: Q(c, 3),
                  type: o,
                }),
                (h.__filtered__ = h.__filtered__ || s),
                h
              )
            }
          }),
          Ae(['head', 'last'], function (t, e) {
            var o = 'take' + (e ? 'Right' : '')
            gt.prototype[t] = function () {
              return this[o](1).value()[0]
            }
          }),
          Ae(['initial', 'tail'], function (t, e) {
            var o = 'drop' + (e ? '' : 'Right')
            gt.prototype[t] = function () {
              return this.__filtered__ ? new gt(this) : this[o](1)
            }
          }),
          (gt.prototype.compact = function () {
            return this.filter(se)
          }),
          (gt.prototype.find = function (t) {
            return this.filter(t).head()
          }),
          (gt.prototype.findLast = function (t) {
            return this.reverse().find(t)
          }),
          (gt.prototype.invokeMap = ht(function (t, e) {
            return typeof t == 'function'
              ? new gt(this)
              : this.map(function (o) {
                  return Wr(o, t, e)
                })
          })),
          (gt.prototype.reject = function (t) {
            return this.filter(Qi(Q(t)))
          }),
          (gt.prototype.slice = function (t, e) {
            t = ct(t)
            var o = this
            return o.__filtered__ && (t > 0 || e < 0)
              ? new gt(o)
              : (t < 0 ? (o = o.takeRight(-t)) : t && (o = o.drop(t)),
                e !== i &&
                  ((e = ct(e)), (o = e < 0 ? o.dropRight(-e) : o.take(e - t))),
                o)
          }),
          (gt.prototype.takeRightWhile = function (t) {
            return this.reverse().takeWhile(t).reverse()
          }),
          (gt.prototype.toArray = function () {
            return this.take(ft)
          }),
          Xe(gt.prototype, function (t, e) {
            var o = /^(?:filter|find|map|reject)|While$/.test(e),
              s = /^(?:head|last)$/.test(e),
              c = u[s ? 'take' + (e == 'last' ? 'Right' : '') : e],
              h = s || /^find/.test(e)
            c &&
              (u.prototype[e] = function () {
                var p = this.__wrapped__,
                  g = s ? [1] : arguments,
                  y = p instanceof gt,
                  A = g[0],
                  E = y || lt(p),
                  O = function (pt) {
                    var vt = c.apply(u, wn([pt], g))
                    return s && N ? vt[0] : vt
                  }
                E &&
                  o &&
                  typeof A == 'function' &&
                  A.length != 1 &&
                  (y = E = !1)
                var N = this.__chain__,
                  Z = !!this.__actions__.length,
                  tt = h && !N,
                  ut = y && !Z
                if (!h && E) {
                  p = ut ? p : new gt(this)
                  var et = t.apply(p, g)
                  return (
                    et.__actions__.push({ func: Xi, args: [O], thisArg: i }),
                    new ke(et, N)
                  )
                }
                return tt && ut
                  ? t.apply(this, g)
                  : ((et = this.thru(O)),
                    tt ? (s ? et.value()[0] : et.value()) : et)
              })
          }),
          Ae(
            ['pop', 'push', 'shift', 'sort', 'splice', 'unshift'],
            function (t) {
              var e = wi[t],
                o = /^(?:push|sort|unshift)$/.test(t) ? 'tap' : 'thru',
                s = /^(?:pop|shift)$/.test(t)
              u.prototype[t] = function () {
                var c = arguments
                if (s && !this.__chain__) {
                  var h = this.value()
                  return e.apply(lt(h) ? h : [], c)
                }
                return this[o](function (p) {
                  return e.apply(lt(p) ? p : [], c)
                })
              }
            },
          ),
          Xe(gt.prototype, function (t, e) {
            var o = u[e]
            if (o) {
              var s = o.name + ''
              wt.call(lr, s) || (lr[s] = []), lr[s].push({ name: e, func: o })
            }
          }),
          (lr[Hi(i, P).name] = [
            {
              name: 'wrapper',
              func: i,
            },
          ]),
          (gt.prototype.clone = Zf),
          (gt.prototype.reverse = jf),
          (gt.prototype.value = Jf),
          (u.prototype.at = Ev),
          (u.prototype.chain = kv),
          (u.prototype.commit = Tv),
          (u.prototype.next = zv),
          (u.prototype.plant = Pv),
          (u.prototype.reverse = Rv),
          (u.prototype.toJSON = u.prototype.valueOf = u.prototype.value = Lv),
          (u.prototype.first = u.prototype.head),
          Ir && (u.prototype[Ir] = Ov),
          u
        )
      },
      or = Tf()
    Dn ? (((Dn.exports = or)._ = or), (Ko._ = or)) : (Vt._ = or)
  }).call(ae)
})(_o, _o.exports)
var Tr = _o.exports
const Je = Yt({
  Ellipsis: 'ellipsis',
  Short: 'short',
  None: 'none',
})
class ju extends ue {
  constructor() {
    super()
    Y(this, '_catalog')
    Y(this, '_schema', '')
    Y(this, '_model', '')
    Y(this, '_widthCatalog', 0)
    Y(this, '_widthSchema', 0)
    Y(this, '_widthModel', 0)
    Y(this, '_widthOriginal', 0)
    Y(this, '_widthAdditional', 0)
    Y(this, '_widthIconEllipsis', 26)
    Y(this, '_widthIcon', 0)
    Y(
      this,
      '_toggleNamePartsDebounced',
      Tr.debounce(i => {
        const l =
          (this._hideCatalog
            ? 0
            : this._collapseCatalog
            ? this._widthIconEllipsis
            : this._widthCatalog) +
          this._widthSchema +
          this._widthModel +
          this._widthAdditional
        ;(this._hasCollapsedParts = i < this._widthOriginal),
          this._hasCollapsedParts
            ? (this.mode === Je.None
                ? (this._hideCatalog = !0)
                : (this._collapseCatalog = !0),
              i < l
                ? this.mode === Je.None
                  ? (this._hideSchema = !0)
                  : (this._collapseSchema = !0)
                : this.mode === Je.None
                ? (this._hideSchema = !1)
                : (this._collapseSchema = this.collapseSchema))
            : this.mode === Je.None
            ? ((this._hideCatalog = !1), (this._hideSchema = !1))
            : ((this._collapseCatalog = this.collapseCatalog),
              (this._collapseSchema = this.collapseSchema))
      }, 300),
    )
    ;(this._hasCollapsedParts = !1),
      (this._collapseCatalog = !1),
      (this._collapseSchema = !1),
      (this._hideCatalog = !1),
      (this._hideSchema = !1),
      (this.size = Pt.S),
      (this.hideCatalog = !1),
      (this.hideSchema = !1),
      (this.hideIcon = !1),
      (this.collapseCatalog = !1),
      (this.collapseSchema = !1),
      (this.hideTooltip = !1),
      (this.highlightModel = !1),
      (this.reduceColor = !1),
      (this.highlighted = !1),
      (this.shortCatalog = 'cat'),
      (this.shortSchema = 'sch'),
      (this.mode = Je.None)
  }
  async firstUpdated() {
    await super.firstUpdated()
    const i = 28
    ;(this._widthIcon = $t(this.hideIcon) ? 24 : 0),
      (this._widthAdditional = this._widthIcon + i)
    const a = this.shadowRoot.querySelector('[part="hidden"]')
    if (this.mode === Je.None) return a.parentElement.removeChild(a)
    setTimeout(() => {
      const l = this.shadowRoot.querySelector('[part="hidden"]'),
        [d, f, v] = Array.from(l.children)
      ;(this._widthCatalog = d.clientWidth),
        (this._widthSchema = f.clientWidth),
        (this._widthModel = v.clientWidth),
        (this._widthOriginal =
          this._widthCatalog +
          this._widthSchema +
          this._widthModel +
          this._widthAdditional),
        setTimeout(() => {
          l.parentElement.removeChild(l)
        }),
        this.resize()
    })
  }
  willUpdate(i) {
    i.has('text')
      ? this._setNameParts()
      : i.has('collapse-catalog')
      ? (this._collapseCatalog = this.collapseCatalog)
      : i.has('collapse-schema')
      ? (this._collapseSchema = this.collapseSchema)
      : i.has('mode')
      ? this.mode === Je.None &&
        ((this._hideCatalog = !0), (this._hideSchema = !0))
      : i.has('hide-catalog')
      ? (this._hideCatalog = this.mode === Je.None ? !0 : this.hideCatalog)
      : i.has('hide-schema') &&
        (this._hideSchema = this.mode === Je.None ? !0 : this.hideSchema)
  }
  async resize() {
    this.hideCatalog && this.hideSchema
      ? ((this._hideCatalog = !0),
        (this._hideSchema = !0),
        (this._collapseCatalog = !0),
        (this._collapseSchema = !0),
        (this._hasCollapsedParts = !0))
      : this._toggleNamePartsDebounced(this.parentElement.clientWidth)
  }
  _setNameParts() {
    this.text = decodeURI(this.text)
    const i = this.text.split('.')
    ;(this._model = i.pop()),
      (this._schema = i.pop()),
      (this._catalog = i.pop()),
      qt(this._catalog) && (this.hideCatalog = !0),
      ne(
        this._model,
        `Model Name ${this.text} does not satisfy the pattern: catalog.schema.model or schema.model`,
      ),
      ne(
        this._schema,
        `Model Name ${this.text} does not satisfy the pattern: catalog.schema.model or schema.model`,
      )
  }
  _renderCatalog() {
    return Tt(
      $t(this._hideCatalog) && $t(this.hideCatalog),
      X`
        <span part="catalog">
          ${
            this._collapseCatalog
              ? this._renderIconEllipsis(this.shortCatalog)
              : X`<span>${this._catalog}</span>`
          }
          .
        </span>
      `,
    )
  }
  _renderSchema() {
    return Tt(
      $t(this._hideSchema) && $t(this.hideSchema),
      X`
        <span part="schema">
          ${
            this._collapseSchema
              ? this._renderIconEllipsis(this.shortSchema)
              : X`<span>${this._schema}</span>`
          }
          .
        </span>
      `,
    )
  }
  _renderModel() {
    return X`
      <span
        title="${this._model}"
        part="model"
      >
        <span>${this._model}</span>
      </span>
    `
  }
  _renderIconEllipsis(i = '') {
    return this.mode === Je.Ellipsis
      ? X`
          <tbk-icon
            part="ellipsis"
            library="heroicons-micro"
            name="ellipsis-horizontal"
          ></tbk-icon>
        `
      : X`<small part="ellipsis">${i}</small>`
  }
  _renderIconModel() {
    if (this.hideIcon) return ''
    const i = X`
      <tbk-icon
        part="icon"
        library="heroicons"
        name="cube"
      ></tbk-icon>
    `
    return this.hideTooltip
      ? X`<span title="${this.text}">${i}</span>`
      : this._hasCollapsedParts
      ? X`
          <tbk-tooltip
            content="${this.text}"
            placement="right"
            distance="0"
          >
            ${i}
          </tbk-tooltip>
        `
      : i
  }
  render() {
    return X`
      <slot name="before"></slot>
      ${this._renderIconModel()}
      <div part="text">
        <span part="hidden">
          <span>${this._catalog}</span>
          <span>${this._schema}</span>
          <span>${this._model}</span>
        </span>
        ${this._renderCatalog()} ${this._renderSchema()} ${this._renderModel()}
      </div>
      <slot name="after"></slot>
    `
  }
  static categorize(i = []) {
    return i.reduce((a, l) => {
      ne(ma(l.name), 'Model name must be present')
      const d = l.name.split('.')
      d.pop(),
        ne(
          xo(d),
          `Model Name ${l.name} does not satisfy the pattern: catalog.schema.model or schema.model`,
        )
      const f = decodeURI(d.join('.'))
      return qt(a[f]) && (a[f] = []), a[f].push(l), a
    }, {})
  }
}
Y(ju, 'styles', [It(), ce(), dt(q$)]),
  Y(ju, 'properties', {
    size: { type: String, reflect: !0 },
    text: { type: String },
    hideCatalog: { type: Boolean, reflect: !0, attribute: 'hide-catalog' },
    hideSchema: { type: Boolean, reflect: !0, attribute: 'hide-schema' },
    hideIcon: { type: Boolean, reflect: !0, attribute: 'hide-icon' },
    hideTooltip: { type: Boolean, reflect: !0, attribute: 'hide-tooltip' },
    collapseCatalog: {
      type: Boolean,
      reflect: !0,
      attribute: 'collapse-catalog',
    },
    collapseSchema: {
      type: Boolean,
      reflect: !0,
      attribute: 'collapse-schema',
    },
    highlighted: { type: Boolean, reflect: !0 },
    highlightedModel: {
      type: Boolean,
      reflect: !0,
      attribute: 'highlighted-model',
    },
    reduceColor: { type: Boolean, reflect: !0, attribute: 'reduce-color' },
    mode: { type: String, reflect: !0 },
    shortCatalog: { type: String, attribute: 'short-catalog' },
    shortSchema: { type: String, attribute: 'short-schema' },
    _hasCollapsedParts: { type: Boolean, state: !0 },
    _collapseCatalog: { type: Boolean, state: !0 },
    _collapseSchema: { type: Boolean, state: !0 },
    _hideCatalog: { type: Boolean, state: !0 },
    _hideSchema: { type: Boolean, state: !0 },
  })
var Y$ = en`
  :host {
    display: contents;
  }
`,
  $r = class extends Se {
    constructor() {
      super(...arguments), (this.observedElements = []), (this.disabled = !1)
    }
    connectedCallback() {
      super.connectedCallback(),
        (this.resizeObserver = new ResizeObserver(n => {
          this.emit('sl-resize', { detail: { entries: n } })
        })),
        this.disabled || this.startObserver()
    }
    disconnectedCallback() {
      super.disconnectedCallback(), this.stopObserver()
    }
    handleSlotChange() {
      this.disabled || this.startObserver()
    }
    startObserver() {
      const n = this.shadowRoot.querySelector('slot')
      if (n !== null) {
        const r = n.assignedElements({ flatten: !0 })
        this.observedElements.forEach(i => this.resizeObserver.unobserve(i)),
          (this.observedElements = []),
          r.forEach(i => {
            this.resizeObserver.observe(i), this.observedElements.push(i)
          })
      }
    }
    stopObserver() {
      this.resizeObserver.disconnect()
    }
    handleDisabledChange() {
      this.disabled ? this.stopObserver() : this.startObserver()
    }
    render() {
      return X` <slot @slotchange=${this.handleSlotChange}></slot> `
    }
  }
$r.styles = [vn, Y$]
R([V({ type: Boolean, reflect: !0 })], $r.prototype, 'disabled', 2)
R(
  [le('disabled', { waitUntilFirstUpdate: !0 })],
  $r.prototype,
  'handleDisabledChange',
  1,
)
var so
let zx =
  ((so = class extends mn($r) {
    constructor() {
      super(...arguments)
      Y(this, '_items', [])
      Y(
        this,
        '_handleResize',
        Tr.debounce(i => {
          if (
            (i.stopPropagation(), qt(this.updateSelector) || qt(i.detail.value))
          )
            return
          const a = i.detail.value.entries[0]
          ;(this._items = Array.from(
            this.querySelectorAll(this.updateSelector),
          )),
            this._items.forEach(l => {
              var d
              return (d = l.resize) == null ? void 0 : d.call(l, a)
            }),
            this.emit('resize', {
              detail: new this.emit.EventDetail(void 0, i),
            })
        }, 300),
      )
    }
    firstUpdated() {
      super.firstUpdated(),
        this.addEventListener('sl-resize', this._handleResize.bind(this))
    }
  }),
  Y(so, 'styles', [It()]),
  Y(so, 'properties', {
    ...$r.properties,
    updateSelector: { type: String, reflect: !0, attribute: 'update-selector' },
  }),
  so)
const G$ = `:host {
  display: inline-flex;
  flex-direction: column;
  gap: var(--step-2);
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-accent);
}
[part='content'] {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--step-2);
}
`,
  K$ = `:host {
  min-height: inherit;
  height: inherit;
  max-height: inherit;
  min-width: inherit;
  width: inherit;
  max-width: inherit;
  display: block;
  overflow: auto;
}
`
class V$ extends ue {
  render() {
    return X`<slot></slot>`
  }
}
Y(V$, 'styles', [It(), Uw(), dt(K$)])
const X$ = `:host {
  --source-list-item-gap: var(--step-2);
  --source-list-item-border-radius: var(--source-list-item-radius);
  --source-list-item-background: transparent;
  --source-list-item-background-active: var(--source-list-item-variant-5, var(--color-pacific-10));
  --source-list-item-background-hover: var(--source-list-item-variant-5, var(--color-pacific-5));
  --source-list-item-color: var(--color-gray-700);
  --source-list-item-color-hover: var(--source-list-item-variant, var(--color-pacific-600));
  --source-list-item-color-active: var(--source-list-item-variant, var(--color-pacific-600));
  --source-list-item-color-toggle: var(--color-gray-200);
  --source-list-item-background-toggle: var(--color-gray-200);

  display: inline-flex;
  flex-direction: column;
  border-radius: var(--source-list-item-border-radius);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  color: var(--source-list-item-color);
  font-weight: var(--text-medium);
}
:host-context([mode='dark']) {
  --source-list-item-color: var(--color-gray-200);
}
::slotted(a:focus-visible:not([disabled])) {
  display: inline-flex;
  outline: var(--half) solid var(--color-outline);
  outline-offset: var(--half);
  z-index: 1;
  border-radius: var(--radius-2xs);
}
::slotted(*) {
  color: var(--source-list-item-color);
  text-decoration: none;
}
:host(:focus-visible:not([disabled])) {
  outline: var(--half) solid var(--color-outline);
  outline-offset: var(--half);
  z-index: 1;
}
:host([compact]) {
  --source-list-item-gap: var(--half);
  --source-list-item-padding-y: var(--half);
  --source-list-item-padding-x: var(--step-2);
}
:host([compact]) [part='label'] tbk-icon {
  margin-left: var(--step);
}
:host([active]) {
  --source-list-item-color: var(--source-list-item-color-active);
  --source-list-background: var(--source-list-item-background-active);
}
:host(:hover) {
  --source-list-item-color: var(--source-list-item-color-hover);
  --source-list-item-background: var(--source-list-item-background-hover);
}
:host([open]),
:host([open]):hover {
  --source-list-item-color: var(--source-list-item-color-active);
}
:host([active]),
:host([active]:hover) {
  --source-list-item-background: var(--source-list-item-background-active);
  --source-list-item-color: var(--source-list-item-color-active);
}
[part='base'] {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--source-list-item-border-radius);
  gap: var(--source-list-item-gap);
  font-size: var(--source-list-item-font-size);
  line-height: 1;
  padding: var(--source-list-item-padding-y) calc(var(--source-list-item-padding-x) * 0.7);
  position: relative;
  background: var(--source-list-item-background);
  text-decoration: none;
}
[part='header'] {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--step-2);
}
[part='label'] {
  min-width: var(--step-4);
  width: 100%;
  display: flex;
  gap: var(--step-3);
  font-weight: inherit;
  align-items: center;
}
[part='text'] {
  width: 100%;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  padding: var(--step) 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
:host([short]) [part='text'] {
  display: block;
  font-size: 0.7em;
  text-align: center;
  margin-bottom: var(--step-2);
  padding: 0;
}
[part='items'] {
  display: none;
  flex-direction: column;
  gap: var(--step);
}
[part='badge'] {
  display: flex;
  align-items: center;
  gap: var(--step);
  flex-shrink: 0;
}
[part='toggle'] {
  display: flex;
  align-items: center;
  gap: var(--half);
  cursor: pointer;
  padding-right: var(--step);
}
[part='toggle']:hover {
  background: var(--color-gray-5);
  border-radius: var(--radius-s);
}
:host([short]) [name='icon-active'],
:host([short]) [part='badge'],
:host([short]) [part='toggle'] {
  display: none;
}
:host([open]:not([short])) [part='items'] {
  display: flex;
  padding: var(--step) var(--step-4);
}
[part='content'] {
  display: flex;
  flex-direction: column;
  gap: var(--step);
}
tbk-icon {
  flex-shrink: 0;
  padding: var(--step) 0;
  font-size: var(--source-list-item-font-size);
}
:host([short]:not([open])) [part='base'] {
  display: inline-flex;
  min-width: var(--source-list-item-font-size);
  min-height: var(--source-list-item-font-size);
  justify-content: center;
  align-items: center;
  border-radius: var(--source-list-item-border-radius);
}
:host([short]:not([open])) [part='itmes'],
:host([short]:not([open])) [part='header'] > *:not([part='label']) {
  display: none;
}
:host([short]:not([open])) tbk-icon {
  margin: 0;
}
[part='icon-active'] {
  color: var(--source-list-item-color);
  font-size: calc(var(--font-size) * 0.9);
  display: inline-block;
  margin-left: var(--step);
  opacity: 0;
}
:host([active]) [part='icon-active'] {
  opacity: 1;
}
::slotted([slot='items']) {
  --source-list-item-font-size: calc(var(--font-size) * 0.9);
}
`,
  uo = Yt({
    Select: 'select-source-list-item',
    Open: 'open-source-list-item',
  })
class Ju extends ue {
  constructor() {
    super()
    Y(this, '_items', [])
    ;(this.size = Pt.S),
      (this.shape = Ke.Round),
      (this.icon = 'rocket-launch'),
      (this.short = !1),
      (this.open = !1),
      (this.active = !1),
      (this.hideIcon = !1),
      (this.hasActiveIcon = !1),
      (this.hideItemsCounter = !1),
      (this.hideActiveIcon = !1),
      (this.compact = !1),
      (this.tabindex = 0),
      (this._hasItems = !1)
  }
  connectedCallback() {
    super.connectedCallback(),
      (this.role = 'listitem'),
      this.addEventListener('mousedown', this._handleMouseDown.bind(this)),
      this.addEventListener('keydown', this._handleKeyDown.bind(this)),
      this.addEventListener(uo.Select, this._handleSelect.bind(this))
  }
  toggle(i) {
    this.open = qt(i) ? $t(this.open) : i
  }
  setActive(i) {
    this.active = qt(i) ? $t(this.active) : i
  }
  _handleMouseDown(i) {
    i.preventDefault(),
      i.stopPropagation(),
      this._hasItems
        ? (this.toggle(),
          this.emit(uo.Open, {
            detail: new this.emit.EventDetail(this.value, i, {
              id: this.id,
              open: this.open,
              active: this.active,
              name: this.name,
              value: this.value,
            }),
          }))
        : this.selectable &&
          this.emit(uo.Select, {
            detail: new this.emit.EventDetail(this.value, i, {
              id: this.id,
              open: this.open,
              active: this.active,
              name: this.name,
              value: this.value,
            }),
          })
  }
  _handleKeyDown(i) {
    ;(i.key === 'Enter' || i.key === ' ') && this._handleMouseDown(i)
  }
  _handleSelect(i) {
    i.target !== this &&
      requestAnimationFrame(() => {
        this.active = this._items.some(a => a.active) || this.active
      })
  }
  _handleSlotChange(i) {
    i.stopPropagation(),
      (this._items = []
        .concat(
          Array.from(
            this.renderRoot.querySelectorAll('slot[name="items"]'),
          ).map(a => a.assignedElements({ flatten: !0 })),
        )
        .flat()),
      (this._hasItems = xo(this._items))
  }
  render() {
    return X`
      <div part="base">
        <span part="header">
          ${Tt(
            this.hasActiveIcon && $t(this.hideActiveIcon),
            X`
              <slot name="icon-active">
                <tbk-icon
                  part="icon-active"
                  library="heroicons-micro"
                  name="check-circle"
                ></tbk-icon>
              </slot>
            `,
          )}
          <span part="label">
            ${Tt(
              $t(this.hideIcon),
              X`
                <slot name="icon">
                  <tbk-icon
                    library="heroicons"
                    name="${this.icon}"
                  ></tbk-icon>
                </slot>
              `,
            )}
            ${Tt(
              $t(this.short),
              X`
                <span part="text">
                  <slot></slot>
                </span>
              `,
            )}
          </span>
          <span part="badge">
            <slot name="badge"></slot>
          </span>
          ${Tt(
            this._hasItems,
            X`
              <span part="toggle">
                ${Tt(
                  $t(this.hideItemsCounter),
                  X`<tbk-badge .size="${Pt.XS}">${this._items.length}</tbk-badge> `,
                )}
                <tbk-icon
                  library="heroicons-micro"
                  name="chevron-${this.open ? 'up' : 'down'}"
                ></tbk-icon>
              </span>
            `,
          )}
        </span>
        <slot name="extra"></slot>
      </div>
      <div part="items">
        <slot
          name="items"
          @slotchange="${Tr.debounce(this._handleSlotChange, 200)}"
        ></slot>
      </div>
    `
  }
}
Y(Ju, 'styles', [
  It(),
  ui('source-list-item'),
  Ar('source-list-item'),
  ce('source-list-item'),
  bn('source-list-item'),
  dt(X$),
]),
  Y(Ju, 'properties', {
    size: { type: String, reflect: !0 },
    shape: { type: String, reflect: !0 },
    variant: { type: String, reflect: !0 },
    open: { type: Boolean, reflect: !0 },
    active: { type: Boolean, reflect: !0 },
    short: { type: Boolean, reflect: !0 },
    compact: { type: Boolean, reflect: !0 },
    selectable: { type: Boolean, reflect: !0 },
    name: { type: String },
    value: { type: String },
    icon: { type: String },
    hideIcon: { type: Boolean, reflect: !0, attribute: 'hide-icon' },
    hasActiveIcon: { type: Boolean, reflect: !0, attribute: 'has-active-icon' },
    hideItemsCounter: {
      type: Boolean,
      reflect: !0,
      attribute: 'hide-items-counter',
    },
    hideActiveIcon: {
      type: Boolean,
      reflect: !0,
      attribute: 'hide-items-counter',
    },
    _hasItems: { type: Boolean, state: !0 },
  })
class Qu extends ue {
  constructor() {
    super()
    Y(this, '_sections', [])
    Y(this, '_items', [])
    ;(this.short = !1),
      (this.selectable = !1),
      (this.allowUnselect = !1),
      (this.hasActiveIcon = !1)
  }
  connectedCallback() {
    super.connectedCallback(),
      (this.role = 'list'),
      this.addEventListener(uo.Select, i => {
        i.stopPropagation(),
          this._items.forEach(a => {
            a !== i.target
              ? a.setActive(!1)
              : this.allowUnselect
              ? a.setActive()
              : a.setActive(!0)
          }),
          this.emit('change', { detail: i.detail })
      })
  }
  willUpdate(i) {
    super.willUpdate(i),
      (i.has('short') || i.has('size')) && this._toggleChildren()
  }
  toggle(i) {
    this.short = qt(i) ? $t(this.short) : i
  }
  _toggleChildren() {
    this._sections.forEach(i => {
      i.short = this.short
    }),
      this._items.forEach(i => {
        ;(i.short = this.short),
          (i.size = this.size ?? i.size),
          this.selectable &&
            ((i.hasActiveIcon = this.hasActiveIcon ? $t(i.hideActiveIcon) : !1),
            (i.selectable = qt(i.selectable) ? this.selectable : i.selectable))
      })
  }
  _handleSlotChange(i) {
    i.stopPropagation(),
      (this._sections = Array.from(this.querySelectorAll('[role="group"]'))),
      (this._items = Array.from(this.querySelectorAll('[role="listitem"]'))),
      this._toggleChildren(),
      xo(this._sections) && (this._sections[0].open = !0)
  }
  render() {
    return X`
      <tbk-scroll part="content">
        <slot @slotchange="${Tr.debounce(
          this._handleSlotChange.bind(this),
          200,
        )}"></slot>
      </tbk-scroll>
    `
  }
}
Y(Qu, 'styles', [It(), xa(), ce('source-list'), bn('source-list'), dt(G$)]),
  Y(Qu, 'properties', {
    short: { type: Boolean, reflect: !0 },
    size: { type: String, reflect: !0 },
    selectable: { type: Boolean, reflect: !0 },
    allowUnselect: { type: Boolean, reflect: !0, attribute: 'allow-unselect' },
    hasActiveIcon: { type: Boolean, reflect: !0, attribute: 'has-active-icon' },
  })
const Z$ = `:host {
  --source-list-section-color: var(--color-gray-500);
  --source-list-section-background-icon: var(--color-gray-5);

  display: block;
}
:host-context([mode='dark']) {
  --source-list-section-color: var(--color-gray-200);
  --source-list-section-color-icon: var(--color-gray-200);
  --source-list-section-background-icon: var(--color-gray-700);
}
[part='base'] {
  width: 100%;
  margin-top: var(--step);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--step);
}
[part='headline'] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--step);
}
[part='headline'] > small {
  font-size: var(--text-xs);
  color: var(--source-list-section-color);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
[part='icon'] {
  cursor: pointer;
  font-size: var(--text-xs);
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-xs);
  padding-right: var(--half);
}
[part='icon'] > tbk-icon {
  opacity: 0;
  position: absolute;
}
[part='base']:hover [part='icon'] {
  color: var(--source-list-section-color-icon);
  background: var(--source-list-section-background-icon);
}
[part='base']:hover [part='icon'] > tbk-icon {
  opacity: 1;
  position: initial;
}
[part='items'] {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: var(--step);
}
:host([open]) [part='items'] {
  display: flex;
}
[part='actions'] {
  display: flex;
  gap: var(--step-2);
  justify-content: center;
  padding: var(--step-2) var(--step);
}
`,
  j$ = `:host {
  --button-height: auto;
  --button-width: 100%;
  --button-font-size: var(--font-size);
  --button-text-align: var(--text-align);
  --button-box-shadow: none;
  --button-opacity: 1;

  display: inline-flex;
  border-radius: var(--button-radius);
  opacity: var(--button-opacity);
}
:host([disabled]),
:host([disabled]:hover) {
  --button-background: var(--color-gray-125) !important;
  --button-color: var(--color-gray-600) !important;
  --button-box-shadow: none !important;
  --button-opacity: 1 !important;
}
:host([disabled]) {
  ::slotted(*) {
    color: inherit;
    text-decoration: none !important;
  }
}
:host([variant='primary']) {
  --button-background: var(--color-accent);
  --button-color: var(--color-light);
}
:host([link][variant='primary']) {
  --button-background: transparent;
  --button-color: var(--color-accent);
}
:host([link][variant='primary']:hover) {
  --button-background: var(--color-gray-100);
}
:host([link][variant='primary']:active),
:host([link][variant='primary'].active) {
  --button-background: var(--color-gray-125);
}
:host([variant='primary']:hover) {
  --button-background: var(--color-accent);
  --button-opacity: 0.85;
}
:host([variant='primary']:active),
:host([variant='primary'].active) {
  --button-background: var(--color-accent);
  --button-opacity: 0.95;
}
:host([variant='secondary']) {
  --button-background: var(--color-gray-150);
  --button-color: var(--color-gray-700);
}
:host([variant='secondary']:hover) {
  --button-background: var(--color-gray-125);
}
:host([variant='secondary']:active),
:host([variant='secondary'][active]) {
  --button-background: var(--color-gray-200);
}
:host([variant='alternative']) {
  --button-color: var(--color-gray-700);
  --button-box-shadow: inset 0 0 0 var(--one) var(--color-gray-200);
}
:host([variant='alternative']:hover) {
  --button-background: var(--color-gray-125);
}
:host([variant='alternative']:active) {
  --button-background: var(--color-gray-200);
}
:host([variant='destructive']) {
  --button-background: var(--color-gray-150);
  --button-color: var(--color-scarlet-600);
}
:host([variant='destructive']:hover) {
  --button-background: var(--color-gray-125);
}
:host([variant='destructive']:active) {
  --button-background: var(--color-gray-200);
}
:host([variant='danger']) {
  --button-background: var(--color-scarlet);
  --button-color: var(--color-scarlet-100);
}
:host([variant='danger']:hover) {
  --button-background: var(--color-scarlet-550);
}
:host([variant='danger']:active) {
  --button-background: var(--color-scarlet-600);
}
:host([variant='transparent']) {
  --button-background: transparent;
  --button-color: var(--color-gray-700);
}
:host([variant='transparent']:hover) {
  --button-background: var(--color-gray-125);
}
:host([overlay]) [part='base'] {
  display: none;
}
[part='overlay'],
[part='base'] {
  display: flex;
  align-items: center;
  justify-items: center;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  border: 0;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  font-weight: var(--text-bold);
  text-align: var(--button-text-align, inherit);
  width: var(--button-width);
  height: var(--button-height);
  font-size: var(--button-font-size);
  border-radius: var(--button-radius);
  background: var(--button-background);
  color: var(--button-color);
  padding: var(--button-padding-y) var(--button-padding-x);
  box-shadow: var(--button-box-shadow);
  line-height: 1;
}
[part='content'] {
  text-align: var(--button-text-align, inherit);
  width: inherit;
  height: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
:host([icon]) [part='content'] {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: var(--button-font-size);
  min-width: var(--button-font-size);
}
[part='base']::-moz-focus-inner {
  border: 0;
  padding: 0;
}
:host([icon]) {
  ::slotted(*) {
    display: flex;
    font-size: calc(var(--button-font-size) * 2);
    position: absolute;
  }
}
:host([link]),
:host([link]:hover) {
  ::slotted(*) {
    margin-right: var(--step);
    color: inherit;
    text-decoration: none !important;
    box-shadow: none !important;
  }
}
:host([link]) [name='after'] {
  color: inherit;
}
slot[name='tagline'] {
  display: block;
  width: 100%;
  font-size: var(--text-xs);
  opacity: 0.85;
}
::slotted([slot='tagline']) {
  margin-top: var(--step);
}
::slotted([slot='before']),
::slotted([slot='after']) {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: calc(var(--button-font-size));
  line-height: 1;
}
::slotted([slot='before']) {
  margin-right: var(--step-2);
}
::slotted([slot='after']) {
  margin-left: var(--step-2);
}
`,
  sa = Yt({
    Button: 'button',
    Submit: 'submit',
    Reset: 'reset',
  }),
  J$ = Yt({
    Primary: 'primary',
    Secondary: 'secondary',
    Alternative: 'alternative',
    Destructive: 'destructive',
    Danger: 'danger',
    Transparent: 'transparent',
  })
class aa extends ue {
  constructor() {
    super(),
      (this.type = sa.Button),
      (this.size = Pt.M),
      (this.side = Qe.Left),
      (this.variant = bt.Primary),
      (this.shape = Ke.Round),
      (this.horizontal = Su.Auto),
      (this.vertical = Gy.Auto),
      (this.disabled = !1),
      (this.readonly = !1),
      (this.overlay = !1),
      (this.link = !1),
      (this.icon = !1),
      (this.autofocus = !1),
      (this.popovertarget = ''),
      (this.internals = this.attachInternals()),
      (this.tabindex = 0)
  }
  get elContent() {
    var r
    return (r = this.renderRoot) == null
      ? void 0
      : r.querySelector(mr.PartContent)
  }
  get elTagline() {
    var r
    return (r = this.renderRoot) == null
      ? void 0
      : r.querySelector(mr.PartTagline)
  }
  get elBefore() {
    var r
    return (r = this.renderRoot) == null
      ? void 0
      : r.querySelector(mr.PartBefore)
  }
  get elAfter() {
    var r
    return (r = this.renderRoot) == null
      ? void 0
      : r.querySelector(mr.PartAfter)
  }
  connectedCallback() {
    super.connectedCallback(),
      this.addEventListener(gr.Click, this._onClick.bind(this)),
      this.addEventListener(gr.Keydown, this._onKeyDown.bind(this)),
      this.addEventListener(gr.Keyup, this._onKeyUp.bind(this))
  }
  disconnectedCallback() {
    super.disconnectedCallback(),
      this.removeEventListener(gr.Click, this._onClick),
      this.removeEventListener(gr.Keydown, this._onKeyDown),
      this.removeEventListener(gr.Keyup, this._onKeyUp)
  }
  firstUpdated() {
    super.firstUpdated(), this.autofocus && this.setFocus()
  }
  willUpdate(r) {
    return (
      r.has('link') &&
        (this.horizontal = this.link ? Su.Compact : this.horizontal),
      super.willUpdate(r)
    )
  }
  click() {
    const r = this.getForm()
    Th(r) &&
      [sa.Submit, sa.Reset].includes(this.type) &&
      r.reportValidity() &&
      this.handleFormSubmit(r)
  }
  getForm() {
    return this.internals.form
  }
  _onClick(r) {
    var i
    if (this.readonly) {
      r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation()
      return
    }
    if (this.link)
      return (
        r.stopPropagation(),
        r.stopImmediatePropagation(),
        (i = this.querySelector('a')) == null ? void 0 : i.click()
      )
    if ((r.preventDefault(), this.disabled)) {
      r.stopPropagation(), r.stopImmediatePropagation()
      return
    }
    this.click()
  }
  _onKeyDown(r) {
    ;[io.Enter, io.Space].includes(r.code) &&
      (r.preventDefault(), r.stopPropagation(), this.classList.add(xu.Active))
  }
  _onKeyUp(r) {
    var i
    ;[io.Enter, io.Space].includes(r.code) &&
      (r.preventDefault(),
      r.stopPropagation(),
      this.classList.remove(xu.Active),
      (i = this.elBase) == null || i.click())
  }
  handleFormSubmit(r) {
    if (qt(r)) return
    const i = document.createElement('input')
    ;(i.type = this.type),
      (i.style.position = 'absolute'),
      (i.style.width = '0'),
      (i.style.height = '0'),
      (i.style.clipPath = 'inset(50%)'),
      (i.style.overflow = 'hidden'),
      (i.style.whiteSpace = 'nowrap'),
      [
        'name',
        'value',
        'formaction',
        'formenctype',
        'formmethod',
        'formnovalidate',
        'formtarget',
      ].forEach(a => {
        ei(this[a]) && i.setAttribute(a, this[a])
      }),
      r.append(i),
      i.click(),
      i.remove()
  }
  setOverlayText(r = '') {
    this._overlayText = r
  }
  showOverlay(r = 0) {
    setTimeout(() => {
      this.overlay = !0
    }, r)
  }
  hideOverlay(r = 0) {
    setTimeout(() => {
      ;(this.overlay = !1), (this._overlayText = '')
    }, r)
  }
  setFocus(r = 200) {
    setTimeout(() => {
      this.focus()
    }, r)
  }
  setBlur(r = 200) {
    setTimeout(() => {
      this.blur()
    }, r)
  }
  render() {
    return X`
      ${Tt(
        this.overlay && this._overlayText,
        X`<span part="overlay">${this._overlayText}</span>`,
      )}
      <div part="base">
        <slot name="before"></slot>
        <div part="content">
          <slot tabindex="-1"></slot>
          <slot name="tagline">${this.tagline}</slot>
        </div>
        <slot name="after">
          ${Tt(
            this.link,
            X`<tbk-icon
              library="heroicons"
              name="arrow-up-right"
            ></tbk-icon>`,
          )}
        </slot>
      </div>
    `
  }
}
Y(aa, 'formAssociated', !0),
  Y(aa, 'styles', [
    It(),
    xa(),
    ce(),
    Nw('button'),
    Ww('button'),
    ui('button'),
    Vw('button'),
    bn('button', 1.25, 2),
    qw(),
    dt(j$),
  ]),
  Y(aa, 'properties', {
    size: { type: String, reflect: !0 },
    variant: { type: String, reflect: !0 },
    shape: { type: String, reflect: !0 },
    side: { type: String, reflect: !0 },
    horizontal: { type: String, reflect: !0 },
    vertical: { type: String, reflect: !0 },
    disabled: { type: Boolean, reflect: !0 },
    link: { type: Boolean, reflect: !0 },
    icon: { type: Boolean, reflect: !0 },
    readonly: { type: Boolean, reflect: !0 },
    name: { type: String },
    value: { type: String },
    type: { type: String },
    form: { type: String },
    formaction: { type: String },
    formenctype: { type: String },
    formmethod: { type: String },
    formnovalidate: { type: Boolean },
    formtarget: { type: String },
    autofocus: { type: Boolean },
    popovertarget: { type: String },
    popovertargetaction: { type: String },
    tagline: { type: String },
    overlay: { type: Boolean, reflect: !0 },
    _overlayText: { type: String, state: !0 },
  })
class th extends ue {
  constructor() {
    super()
    Y(this, '_open', !1)
    Y(this, '_cache', /* @__PURE__ */ new WeakMap())
    ;(this._childrenCount = 0),
      (this._showMore = !1),
      (this.open = !1),
      (this.inert = !1),
      (this.short = !1),
      (this.limit = 1 / 0)
  }
  connectedCallback() {
    super.connectedCallback(), (this.role = 'group')
  }
  willUpdate(i) {
    super.willUpdate(i),
      i.has('short') &&
        (this.short
          ? ((this._open = this.open), (this.open = !0))
          : (this.open = this._open))
  }
  toggle(i) {
    this.open = qt(i) ? $t(this.open) : i
  }
  _handleClick(i) {
    i.preventDefault(), i.stopPropagation(), this.toggle()
  }
  _toggleChildren() {
    this.elsSlotted.forEach((i, a) => {
      $t(this._cache.has(i)) && this._cache.set(i, i.style.display),
        this._showMore || a < this.limit
          ? (i.style.display = this._cache.get(i, i.style.display))
          : (i.style.display = 'none')
    })
  }
  _renderShowMore() {
    return this.short
      ? X`
          <div part="actions">
            <tbk-icon
              library="heroicons-micro"
              name="ellipsis-horizontal"
            ></tbk-icon>
          </div>
        `
      : X`
          <div part="actions">
            <tbk-button
              shape="pill"
              size="2xs"
              variant="secondary"
              @click="${() => {
                ;(this._showMore = $t(this._showMore)), this._toggleChildren()
              }}"
            >
              ${
                this._showMore
                  ? 'Show Less'
                  : `Show ${this._childrenCount - this.limit} More`
              }
            </tbk-button>
          </div>
        `
  }
  _handleSlotChange(i) {
    i.stopPropagation(),
      (this._childrenCount = this.elsSlotted.length),
      this._toggleChildren()
  }
  render() {
    return X`
      <div part="base">
        ${Tt(
          this.headline && $t(this.short),
          X`
            <span part="headline">
              <small>${this.headline}</small>
              <span
                part="icon"
                @click=${this._handleClick.bind(this)}
              >
                <tbk-badge size="${Pt.XXS}">${this._childrenCount}</tbk-badge>
                <tbk-icon
                  library="heroicons-micro"
                  name="chevron-${this.open ? 'down' : 'right'}"
                ></tbk-icon>
              </span>
            </span>
          `,
        )}
        <div part="items">
          <slot @slotchange="${Tr.debounce(
            this._handleSlotChange,
            200,
          )}"></slot>
          ${Tt(this._childrenCount > this.limit, this._renderShowMore())}
        </div>
      </div>
    `
  }
}
Y(th, 'styles', [
  It(),
  ce('source-list-section'),
  bn('source-list-section'),
  dt(Z$),
]),
  Y(th, 'properties', {
    headline: { type: String },
    open: { type: Boolean, reflect: !0 },
    inert: { type: Boolean, reflect: !0 },
    short: { type: Boolean, reflect: !0 },
    limit: { type: Number },
    _showMore: { type: String, state: !0 },
    _childrenCount: { type: Number, state: !0 },
  })
const Q$ = `:host {
  --metadata-font-size: var(--font-size);

  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
[part='base'] {
  display: flex;
  flex-direction: column;
  gap: var(--step-2);
  font-size: var(--metadata-font-size);
}
`
class eh extends ue {
  constructor() {
    super(), (this.size = Pt.S)
  }
  render() {
    return X`
      <tbk-scroll>
        <div part="base">
          <slot></slot>
        </div>
      </tbk-scroll>
    `
  }
}
Y(eh, 'styles', [It(), ce(), dt(Q$)]),
  Y(eh, 'properties', {
    size: { type: String, reflect: !0 },
  })
const tx = `:host {
  --metadata-item-background: var(--color-gray-3);
  --metadata-item-color-key: var(--color-gray-500);
  --metadata-item-color-description: var(--color-gray-500);
  --metadata-item-color-value: var(--color-gray-700);

  display: flex;
  flex-direction: column;
  gap: var(--step);
  width: 100%;
  padding: var(--step) var(--step-2);
  white-space: nowrap;
  overflow: hidden;
}
:host-context([mode='dark']) {
  --metadata-item-background: var(--color-gray-10);
  --metadata-item-color-key: var(--color-gray-300);
  --metadata-item-color-description: var(--color-gray-300);
  --metadata-item-color-value: var(--color-gray-200);
}
:host(:hover) {
  background-color: var(--metadata-item-background);
}

[part='base'] {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: inherit;
  overflow: hidden;
  gap: var(--step-4);
}
slot[name='key'],
::slotted([slot='key']) {
  display: inline-flex;
  color: var(--metadata-item-color-key);
  font-family: var(--font-mono);
  font-size: inherit;
  overflow: hidden;
  flex-shrink: 0;
}
slot[name='value'],
[part='value'],
::slotted([slot='value']) {
  display: inline-flex;
  color: var(--metadata-item-color-value);
  font-family: var(--font-sans);
  font-weight: var(--text-bold);
  font-size: inherit;
  overflow: hidden;
}
[part='value'] {
  color: var(--color-link);
  text-decoration: none;
}
[part='value']:hover {
  text-decoration: underline;
}
[part='description'] {
  width: 100%;
  display: block;
  color: var(--metadata-item-color-description);
  font-family: var(--font-sans);
  font-size: inherit;
}
::slotted(*) {
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}
`
class nh extends ue {
  constructor() {
    super(), (this.size = Pt.M)
  }
  _renderValue() {
    return this.href
      ? X`<a
          href="${this.href}"
          part="value"
          >${this.value}</a
        >`
      : X`<slot name="value">${this.value}</slot>`
  }
  render() {
    return X`
      ${Tt(
        this.label || this.value,
        X`
          <div part="base">
            ${Tt(this.label, X`<slot name="key">${this.label}</slot>`)}
            ${this._renderValue()}
          </div>
        `,
      )}
      ${Tt(
        this.description,
        X`<span part="description">${this.description}</span>`,
      )}
      <slot></slot>
    `
  }
}
Y(nh, 'styles', [It(), ce(), dt(tx)]),
  Y(nh, 'properties', {
    size: { type: String, reflect: !0 },
    label: { type: String },
    value: { type: String },
    href: { type: String },
    description: { type: String },
  })
const ex = `:host {
  font-family: var(--font-sans);

  display: flex;
  width: 100%;
  flex-direction: column;
}
[part='base'] {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--step-2);
  padding: var(--step-2);
  border-radius: var(--radius-s);
}
:host([orientation='horizontal']) [part='base'] {
  flex-direction: row;
}
:host([orientation='vertical']) [part='base'] {
  flex-direction: column;
}
[part='label'] {
  margin: 0;
  padding: var(--step) 0;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--text-xs);
  font-weight: var(--text-bold);
}
:host-context([mode='dark']) [part='label'] {
  color: var(--color-gray-500);
}
:host([orientation='horizontal']) [part='content'] {
  padding: 0 var(--step-4);
}
:host([orientation='vertical']) [part='content'] {
  padding: var(--step) 0;
}
[part='content'] {
  width: 100%;
}
[part='actions'] {
  display: flex;
  gap: var(--step-2);
  justify-content: center;
  padding: var(--step-2) var(--step);
}
::slotted(*) {
  margin: 0;
  display: flex;
  box-shadow: inset 0 -1px 0 0 var(--color-gray-200);
  margin-bottom: var(--step);
  align-items: baseline;
  justify-content: space-between;
}
::slotted(:last-child) {
  box-shadow: none;
}
:host-context([mode='dark']) {
  ::slotted(*) {
    box-shadow: inset 0 -1px 0 0 var(--color-gray-700);
  }
}
`
class rh extends ue {
  constructor() {
    super()
    Y(this, '_cache', /* @__PURE__ */ new WeakMap())
    ;(this._children = []),
      (this._showMore = !1),
      (this.orientation = qy.Vertical),
      (this.limit = 1 / 0),
      (this.hideActions = !1)
  }
  _handleSlotChange(i) {
    i.stopPropagation(),
      (this._children = this.elsSlotted),
      this._toggleChildren()
  }
  _toggleChildren() {
    this._children.forEach((i, a) => {
      $t(this._cache.has(i)) && this._cache.set(i, i.style.display),
        this._showMore || a < this.limit
          ? (i.style.display = this._cache.get(i, i.style.display))
          : (i.style.display = 'none')
    })
  }
  _renderShowMore() {
    return X`
      <div part="actions">
        <tbk-button
          shape="${Ke.Pill}"
          size="${Pt.XXS}"
          variant="${J$.Secondary}"
          @click="${() => {
            ;(this._showMore = $t(this._showMore)), this._toggleChildren()
          }}"
        >
          ${`${
            this._showMore
              ? 'Show Less'
              : `Show ${this._children.length - this.limit} More`
          }`}
        </tbk-button>
      </div>
    `
  }
  render() {
    return X`
      <div part="base">
        ${Tt(this.label, X`<p part="label">${this.label}</p>`)}
        <div part="content">
          <slot @slotchange="${Tr.debounce(
            this._handleSlotChange,
            200,
          )}"></slot>
          ${Tt(
            this._children.length > this.limit && $t(this.hideActions),
            this._renderShowMore(),
          )}
        </div>
      </div>
    `
  }
}
Y(rh, 'styles', [It(), dt(ex)]),
  Y(rh, 'properties', {
    orientation: { type: String, reflect: !0 },
    label: { type: String },
    limit: { type: Number },
    hideActions: { type: Boolean, reflect: !0, attribute: 'hide-actions' },
    _showMore: { type: String, state: !0 },
    _children: { type: Array, state: !0 },
  })
var nx = en`
  :host {
    --divider-width: 4px;
    --divider-hit-area: 12px;
    --min: 0%;
    --max: 100%;

    display: grid;
  }

  .start,
  .end {
    overflow: hidden;
  }

  .divider {
    flex: 0 0 var(--divider-width);
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    background-color: var(--sl-color-neutral-200);
    color: var(--sl-color-neutral-900);
    z-index: 1;
  }

  .divider:focus {
    outline: none;
  }

  :host(:not([disabled])) .divider:focus-visible {
    background-color: var(--sl-color-primary-600);
    color: var(--sl-color-neutral-0);
  }

  :host([disabled]) .divider {
    cursor: not-allowed;
  }

  /* Horizontal */
  :host(:not([vertical], [disabled])) .divider {
    cursor: col-resize;
  }

  :host(:not([vertical])) .divider::after {
    display: flex;
    content: '';
    position: absolute;
    height: 100%;
    left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
    width: var(--divider-hit-area);
  }

  /* Vertical */
  :host([vertical]) {
    flex-direction: column;
  }

  :host([vertical]:not([disabled])) .divider {
    cursor: row-resize;
  }

  :host([vertical]) .divider::after {
    content: '';
    position: absolute;
    width: 100%;
    top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
    height: var(--divider-hit-area);
  }

  @media (forced-colors: active) {
    .divider {
      outline: solid 1px transparent;
    }
  }
`
function rx(n, r) {
  function i(l) {
    const d = n.getBoundingClientRect(),
      f = n.ownerDocument.defaultView,
      v = d.left + f.scrollX,
      m = d.top + f.scrollY,
      _ = l.pageX - v,
      k = l.pageY - m
    r != null && r.onMove && r.onMove(_, k)
  }
  function a() {
    document.removeEventListener('pointermove', i),
      document.removeEventListener('pointerup', a),
      r != null && r.onStop && r.onStop()
  }
  document.addEventListener('pointermove', i, { passive: !0 }),
    document.addEventListener('pointerup', a),
    (r == null ? void 0 : r.initialEvent) instanceof PointerEvent &&
      i(r.initialEvent)
}
function ih(n, r, i) {
  const a = l => (Object.is(l, -0) ? 0 : l)
  return n < r ? a(r) : n > i ? a(i) : a(n)
}
/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const Ye = n => n ?? Ft
var he = class extends Se {
  constructor() {
    super(...arguments),
      (this.localize = new hi(this)),
      (this.position = 50),
      (this.vertical = !1),
      (this.disabled = !1),
      (this.snapThreshold = 12)
  }
  connectedCallback() {
    super.connectedCallback(),
      (this.resizeObserver = new ResizeObserver(n => this.handleResize(n))),
      this.updateComplete.then(() => this.resizeObserver.observe(this)),
      this.detectSize(),
      (this.cachedPositionInPixels = this.percentageToPixels(this.position))
  }
  disconnectedCallback() {
    var n
    super.disconnectedCallback(),
      (n = this.resizeObserver) == null || n.unobserve(this)
  }
  detectSize() {
    const { width: n, height: r } = this.getBoundingClientRect()
    this.size = this.vertical ? r : n
  }
  percentageToPixels(n) {
    return this.size * (n / 100)
  }
  pixelsToPercentage(n) {
    return (n / this.size) * 100
  }
  handleDrag(n) {
    const r = this.localize.dir() === 'rtl'
    this.disabled ||
      (n.cancelable && n.preventDefault(),
      rx(this, {
        onMove: (i, a) => {
          let l = this.vertical ? a : i
          this.primary === 'end' && (l = this.size - l),
            this.snap &&
              this.snap.split(' ').forEach(f => {
                let v
                f.endsWith('%')
                  ? (v = this.size * (parseFloat(f) / 100))
                  : (v = parseFloat(f)),
                  r && !this.vertical && (v = this.size - v),
                  l >= v - this.snapThreshold &&
                    l <= v + this.snapThreshold &&
                    (l = v)
              }),
            (this.position = ih(this.pixelsToPercentage(l), 0, 100))
        },
        initialEvent: n,
      }))
  }
  handleKeyDown(n) {
    if (
      !this.disabled &&
      [
        'ArrowLeft',
        'ArrowRight',
        'ArrowUp',
        'ArrowDown',
        'Home',
        'End',
      ].includes(n.key)
    ) {
      let r = this.position
      const i = (n.shiftKey ? 10 : 1) * (this.primary === 'end' ? -1 : 1)
      n.preventDefault(),
        ((n.key === 'ArrowLeft' && !this.vertical) ||
          (n.key === 'ArrowUp' && this.vertical)) &&
          (r -= i),
        ((n.key === 'ArrowRight' && !this.vertical) ||
          (n.key === 'ArrowDown' && this.vertical)) &&
          (r += i),
        n.key === 'Home' && (r = this.primary === 'end' ? 100 : 0),
        n.key === 'End' && (r = this.primary === 'end' ? 0 : 100),
        (this.position = ih(r, 0, 100))
    }
  }
  handleResize(n) {
    const { width: r, height: i } = n[0].contentRect
    ;(this.size = this.vertical ? i : r),
      (isNaN(this.cachedPositionInPixels) || this.position === 1 / 0) &&
        ((this.cachedPositionInPixels = Number(
          this.getAttribute('position-in-pixels'),
        )),
        (this.positionInPixels = Number(
          this.getAttribute('position-in-pixels'),
        )),
        (this.position = this.pixelsToPercentage(this.positionInPixels))),
      this.primary &&
        (this.position = this.pixelsToPercentage(this.cachedPositionInPixels))
  }
  handlePositionChange() {
    ;(this.cachedPositionInPixels = this.percentageToPixels(this.position)),
      (this.positionInPixels = this.percentageToPixels(this.position)),
      this.emit('sl-reposition')
  }
  handlePositionInPixelsChange() {
    this.position = this.pixelsToPercentage(this.positionInPixels)
  }
  handleVerticalChange() {
    this.detectSize()
  }
  render() {
    const n = this.vertical ? 'gridTemplateRows' : 'gridTemplateColumns',
      r = this.vertical ? 'gridTemplateColumns' : 'gridTemplateRows',
      i = this.localize.dir() === 'rtl',
      a = `
      clamp(
        0%,
        clamp(
          var(--min),
          ${this.position}% - var(--divider-width) / 2,
          var(--max)
        ),
        calc(100% - var(--divider-width))
      )
    `,
      l = 'auto'
    return (
      this.primary === 'end'
        ? i && !this.vertical
          ? (this.style[n] = `${a} var(--divider-width) ${l}`)
          : (this.style[n] = `${l} var(--divider-width) ${a}`)
        : i && !this.vertical
        ? (this.style[n] = `${l} var(--divider-width) ${a}`)
        : (this.style[n] = `${a} var(--divider-width) ${l}`),
      (this.style[r] = ''),
      X`
      <slot name="start" part="panel start" class="start"></slot>

      <div
        part="divider"
        class="divider"
        tabindex=${Ye(this.disabled ? void 0 : '0')}
        role="separator"
        aria-valuenow=${this.position}
        aria-valuemin="0"
        aria-valuemax="100"
        aria-label=${this.localize.term('resize')}
        @keydown=${this.handleKeyDown}
        @mousedown=${this.handleDrag}
        @touchstart=${this.handleDrag}
      >
        <slot name="divider"></slot>
      </div>

      <slot name="end" part="panel end" class="end"></slot>
    `
    )
  }
}
he.styles = [vn, nx]
R([Ie('.divider')], he.prototype, 'divider', 2)
R([V({ type: Number, reflect: !0 })], he.prototype, 'position', 2)
R(
  [V({ attribute: 'position-in-pixels', type: Number })],
  he.prototype,
  'positionInPixels',
  2,
)
R([V({ type: Boolean, reflect: !0 })], he.prototype, 'vertical', 2)
R([V({ type: Boolean, reflect: !0 })], he.prototype, 'disabled', 2)
R([V()], he.prototype, 'primary', 2)
R([V()], he.prototype, 'snap', 2)
R(
  [V({ type: Number, attribute: 'snap-threshold' })],
  he.prototype,
  'snapThreshold',
  2,
)
R([le('position')], he.prototype, 'handlePositionChange', 1)
R([le('positionInPixels')], he.prototype, 'handlePositionInPixelsChange', 1)
R([le('vertical')], he.prototype, 'handleVerticalChange', 1)
var la = he
he.define('sl-split-panel')
const ix = `:host {
  --divider-width: var(--step-6);
  --divider-hit-area: var(--step-8);

  --split-pane-knob-width: calc(var(--step) + 1px);
  --split-pane-knob-height: var(--step-12);
  --split-pane-width: 1px;
  --split-pane-height: 100%;
  --split-pane-padding: var(--step-8) 1px;
  --split-pane-margin: 0 var(--step-3);

  width: 100%;
  height: 100%;
}
:host([vertical]) {
  --split-pane-knob-width: var(--step-12);
  --split-pane-knob-height: calc(var(--step) + 1px);
  --split-pane-width: 100%;
  --split-pane-height: 1px;
  --split-pane-padding: 1px var(--step-8);
  --split-pane-margin: var(--step-3) 0;
}
[part='divider'] {
  margin: var(--split-pane-margin);
  padding: var(--split-pane-padding);
  width: var(--split-pane-width);
  height: var(--split-pane-height);
  background: var(--color-gray-100);
}
::slotted([slot='divider']) {
  position: absolute;
  border-radius: var(--radius-s);
  background: var(--color-gray-200);
  width: var(--split-pane-knob-width);
  height: var(--split-pane-knob-height);
}
`
class oh extends mn(la) {}
Y(oh, 'styles', [It(), la.styles, dt(ix)]),
  Y(oh, 'properties', {
    ...la.properties,
  })
const ox = `:host {
  --details-background: var(--color-variant-lucid);
  --details-color: var(--color-variant);
  --details-summary-color: var(--color-variant);
  --details-summary-background: var(--color-variant-lucid);
  --details-summary-background-hover: var(--color-variant-10);
  --details-border: none;
  --details-summary-shadow: none;
}
:host([outline]) {
  --details-border: 1px solid var(--color-gray-200);
}
:host([ghost]) {
  --details-summary-background: transparent;
  --details-background: transparent;
  --details-summary-background-hover: var(--color-variant-lucid);
}
:host([shadow]) {
  --details-summary-shadow: var(--shadow-s);
}
:host(:hover) {
  --details-summary-background: var(--details-summary-background-hover);
}
details {
  border-radius: var(--details-radius);
  background: var(--details-background);
}
summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--details-padding-y) var(--details-padding-x);
  background: var(--details-summary-background);
  color: var(--details-summary-color);
  font-size: var(--details-font-size);
  border: var(--details-border);
  border-radius: var(--details-radius);
  overflow: hidden;
  box-shadow: var(--details-summary-shadow);
}
summary::marker {
  content: none;
}
summary > [name='plus'],
[open] summary > [name='minus'] {
  display: block;
}
summary > [name='minus'],
[open] summary > [name='plus'] {
  display: none;
}
[part='content'] {
  padding: calc(var(--details-padding-y) * 2) var(--details-padding-x);
  color: var(--details-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
`
class sh extends ue {
  constructor() {
    super(),
      (this.variant = bt.Neutral),
      (this.shape = Ke.Round),
      (this.size = Pt.M),
      (this.summary = 'Details'),
      (this.outline = !1),
      (this.ghost = !1),
      (this.open = !1),
      (this.shadow = !1)
  }
  connectedCallback() {
    super.connectedCallback(),
      ne(ma(this.summary), '"summary" must be a string')
  }
  render() {
    return X`
      <details
        part="base"
        .open="${this.open}"
      >
        <summary>
          <span>${this.summary}</span>
          <tbk-icon
            library="heroicons-micro"
            name="plus"
          ></tbk-icon>
          <tbk-icon
            library="heroicons-micro"
            name="minus"
          ></tbk-icon>
        </summary>
        <div part="content">
          <slot></slot>
        </div>
      </details>
    `
  }
}
Y(sh, 'styles', [
  It(),
  xa(),
  Ar(),
  ce('details'),
  ui('details'),
  bn('details', 1.25, 2),
  dt(ox),
]),
  Y(sh, 'properties', {
    summary: { type: String },
    outline: { type: Boolean, reflect: !0 },
    ghost: { type: Boolean, reflect: !0 },
    open: { type: Boolean, reflect: !0 },
    shape: { type: String, reflect: !0 },
    size: { type: String, reflect: !0 },
    shadow: { type: Boolean, reflect: !0 },
    variant: { type: String, reflect: !0 },
  })
var sx = en`
  :host {
    display: inline-block;
  }

  .tab {
    display: inline-flex;
    align-items: center;
    font-family: var(--sl-font-sans);
    font-size: var(--sl-font-size-small);
    font-weight: var(--sl-font-weight-semibold);
    border-radius: var(--sl-border-radius-medium);
    color: var(--sl-color-neutral-600);
    padding: var(--sl-spacing-medium) var(--sl-spacing-large);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    transition:
      var(--transition-speed) box-shadow,
      var(--transition-speed) color;
  }

  .tab:hover:not(.tab--disabled) {
    color: var(--sl-color-primary-600);
  }

  :host(:focus) {
    outline: transparent;
  }

  :host(:focus-visible):not([disabled]) {
    color: var(--sl-color-primary-600);
  }

  :host(:focus-visible) {
    outline: var(--sl-focus-ring);
    outline-offset: calc(-1 * var(--sl-focus-ring-width) - var(--sl-focus-ring-offset));
  }

  .tab.tab--active:not(.tab--disabled) {
    color: var(--sl-color-primary-600);
  }

  .tab.tab--closable {
    padding-inline-end: var(--sl-spacing-small);
  }

  .tab.tab--disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .tab__close-button {
    font-size: var(--sl-font-size-small);
    margin-inline-start: var(--sl-spacing-small);
  }

  .tab__close-button::part(base) {
    padding: var(--sl-spacing-3x-small);
  }

  @media (forced-colors: active) {
    .tab.tab--active:not(.tab--disabled) {
      outline: solid 1px transparent;
      outline-offset: -3px;
    }
  }
`,
  ax = en`
  :host {
    display: inline-block;
    color: var(--sl-color-neutral-600);
  }

  .icon-button {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    border-radius: var(--sl-border-radius-medium);
    font-size: inherit;
    color: inherit;
    padding: var(--sl-spacing-x-small);
    cursor: pointer;
    transition: var(--sl-transition-x-fast) color;
    -webkit-appearance: none;
  }

  .icon-button:hover:not(.icon-button--disabled),
  .icon-button:focus-visible:not(.icon-button--disabled) {
    color: var(--sl-color-primary-600);
  }

  .icon-button:active:not(.icon-button--disabled) {
    color: var(--sl-color-primary-700);
  }

  .icon-button:focus {
    outline: none;
  }

  .icon-button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .icon-button:focus-visible {
    outline: var(--sl-focus-ring);
    outline-offset: var(--sl-focus-ring-offset);
  }

  .icon-button__icon {
    pointer-events: none;
  }
`
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */
const Jh = Symbol.for(''),
  lx = n => {
    if ((n == null ? void 0 : n.r) === Jh)
      return n == null ? void 0 : n._$litStatic$
  },
  ah = (n, ...r) => ({
    _$litStatic$: r.reduce(
      (i, a, l) =>
        i +
        (d => {
          if (d._$litStatic$ !== void 0) return d._$litStatic$
          throw Error(`Value passed to 'literal' function must be a 'literal' result: ${d}. Use 'unsafeStatic' to pass non-literal values, but
            take care to ensure page security.`)
        })(a) +
        n[l + 1],
      n[0],
    ),
    r: Jh,
  }),
  lh = /* @__PURE__ */ new Map(),
  cx =
    n =>
    (r, ...i) => {
      const a = i.length
      let l, d
      const f = [],
        v = []
      let m,
        _ = 0,
        k = !1
      for (; _ < a; ) {
        for (m = r[_]; _ < a && ((d = i[_]), (l = lx(d)) !== void 0); )
          (m += l + r[++_]), (k = !0)
        _ !== a && v.push(d), f.push(m), _++
      }
      if ((_ === a && f.push(r[a]), k)) {
        const C = f.join('$$lit$$')
        ;(r = lh.get(C)) === void 0 && ((f.raw = f), lh.set(C, (r = f))),
          (i = v)
      }
      return n(r, ...i)
    },
  ux = cx(X)
var de = class extends Se {
  constructor() {
    super(...arguments),
      (this.hasFocus = !1),
      (this.label = ''),
      (this.disabled = !1)
  }
  handleBlur() {
    ;(this.hasFocus = !1), this.emit('sl-blur')
  }
  handleFocus() {
    ;(this.hasFocus = !0), this.emit('sl-focus')
  }
  handleClick(n) {
    this.disabled && (n.preventDefault(), n.stopPropagation())
  }
  /** Simulates a click on the icon button. */
  click() {
    this.button.click()
  }
  /** Sets focus on the icon button. */
  focus(n) {
    this.button.focus(n)
  }
  /** Removes focus from the icon button. */
  blur() {
    this.button.blur()
  }
  render() {
    const n = !!this.href,
      r = n ? ah`a` : ah`button`
    return ux`
      <${r}
        part="base"
        class=${pn({
          'icon-button': !0,
          'icon-button--disabled': !n && this.disabled,
          'icon-button--focused': this.hasFocus,
        })}
        ?disabled=${Ye(n ? void 0 : this.disabled)}
        type=${Ye(n ? void 0 : 'button')}
        href=${Ye(n ? this.href : void 0)}
        target=${Ye(n ? this.target : void 0)}
        download=${Ye(n ? this.download : void 0)}
        rel=${Ye(n && this.target ? 'noreferrer noopener' : void 0)}
        role=${Ye(n ? void 0 : 'button')}
        aria-disabled=${this.disabled ? 'true' : 'false'}
        aria-label="${this.label}"
        tabindex=${this.disabled ? '-1' : '0'}
        @blur=${this.handleBlur}
        @focus=${this.handleFocus}
        @click=${this.handleClick}
      >
        <sl-icon
          class="icon-button__icon"
          name=${Ye(this.name)}
          library=${Ye(this.library)}
          src=${Ye(this.src)}
          aria-hidden="true"
        ></sl-icon>
      </${r}>
    `
  }
}
de.styles = [vn, ax]
de.dependencies = { 'sl-icon': Re }
R([Ie('.icon-button')], de.prototype, 'button', 2)
R([li()], de.prototype, 'hasFocus', 2)
R([V()], de.prototype, 'name', 2)
R([V()], de.prototype, 'library', 2)
R([V()], de.prototype, 'src', 2)
R([V()], de.prototype, 'href', 2)
R([V()], de.prototype, 'target', 2)
R([V()], de.prototype, 'download', 2)
R([V()], de.prototype, 'label', 2)
R([V({ type: Boolean, reflect: !0 })], de.prototype, 'disabled', 2)
var hx = 0,
  xe = class extends Se {
    constructor() {
      super(...arguments),
        (this.localize = new hi(this)),
        (this.attrId = ++hx),
        (this.componentId = `sl-tab-${this.attrId}`),
        (this.panel = ''),
        (this.active = !1),
        (this.closable = !1),
        (this.disabled = !1),
        (this.tabIndex = 0)
    }
    connectedCallback() {
      super.connectedCallback(), this.setAttribute('role', 'tab')
    }
    handleCloseClick(n) {
      n.stopPropagation(), this.emit('sl-close')
    }
    handleActiveChange() {
      this.setAttribute('aria-selected', this.active ? 'true' : 'false')
    }
    handleDisabledChange() {
      this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false'),
        this.disabled && !this.active
          ? (this.tabIndex = -1)
          : (this.tabIndex = 0)
    }
    render() {
      return (
        (this.id = this.id.length > 0 ? this.id : this.componentId),
        X`
      <div
        part="base"
        class=${pn({
          tab: !0,
          'tab--active': this.active,
          'tab--closable': this.closable,
          'tab--disabled': this.disabled,
        })}
      >
        <slot></slot>
        ${
          this.closable
            ? X`
              <sl-icon-button
                part="close-button"
                exportparts="base:close-button__base"
                name="x-lg"
                library="system"
                label=${this.localize.term('close')}
                class="tab__close-button"
                @click=${this.handleCloseClick}
                tabindex="-1"
              ></sl-icon-button>
            `
            : ''
        }
      </div>
    `
      )
    }
  }
xe.styles = [vn, sx]
xe.dependencies = { 'sl-icon-button': de }
R([Ie('.tab')], xe.prototype, 'tab', 2)
R([V({ reflect: !0 })], xe.prototype, 'panel', 2)
R([V({ type: Boolean, reflect: !0 })], xe.prototype, 'active', 2)
R([V({ type: Boolean, reflect: !0 })], xe.prototype, 'closable', 2)
R([V({ type: Boolean, reflect: !0 })], xe.prototype, 'disabled', 2)
R([V({ type: Number, reflect: !0 })], xe.prototype, 'tabIndex', 2)
R([le('active')], xe.prototype, 'handleActiveChange', 1)
R([le('disabled')], xe.prototype, 'handleDisabledChange', 1)
const dx = `:host {
  --tab-font-size: var(--font-size);
  --tab-background: var(--color-variant-lucid);
  --tab-color: var(--color-variant);

  display: block;
  font-family: var(--font-mono);
  font-weight: var(--text-bold);
  margin: 0;
  border-style: solid;
  border-width: 0;
  border-color: transparent;
}
:host([active]) [part='base'],
:host([active]:hover) [part='base'] {
  background: var(--tab-background);
  color: var(--tab-color);
  cursor: default;
}
:host([active]) {
  border-color: var(--color-variant);
}
[part='base'] {
  width: 100%;
  padding: var(--tab-padding-y) var(--tab-padding-x);
  border-radius: var(--radius-2xs);
  outline: none;
  color: var(--color-gray-400);
}
:host(:hover) [part='base'] {
  background: var(--color-gray-5);
  color: var(--color-gray-400);
}
:host([active][inverse]) [part='base'] {
  --tab-background: var(--color-variant);
  --tab-color: var(--color-variant-light);
}
`
class ch extends mn(xe, Eo) {
  constructor() {
    super()
    Y(this, 'componentId', `tbk-tab-${this.attrId}`)
    ;(this.size = Pt.M), (this.shape = Ke.Round), (this.inverse = !1)
  }
}
Y(ch, 'styles', [
  xe.styles,
  It(),
  ce(),
  Ar(),
  ui('tab'),
  bn('tab', 1.75, 4),
  dt(dx),
]),
  Y(ch, 'properties', {
    ...xe.properties,
    size: { type: String, reflect: !0 },
    shape: { type: String, reflect: !0 },
    inverse: { type: Boolean, reflect: !0 },
    variant: { type: String },
  })
const fx = `:host {
  --indicator-color: transparent;
  --track-color: var(--color-gray-5);
  --track-width: var(--half);
  --tabs-font-size: var(--font-size);
  --tabs-color: var(--color-variant);

  width: 100%;
  height: 100%;
}
:host-context([mode='dark']) {
  --tabs-color: var(--color-variant-light);
}
[part='nav'].tab-group__nav-container {
  padding-bottom: 0;
  padding-top: 0;
  margin-bottom: var(--step-2);
  padding: 0;
}
:host([placement='bottom']) [part='nav'].tab-group__nav-container {
  margin-top: var(--step);
  margin-bottom: 0;
}
:host([placement='start']) [part='nav'].tab-group__nav-container,
:host([placement='end']) [part='nav'].tab-group__nav-container {
  margin-bottom: 0;
}
[part='base'] {
  width: 100%;
  height: 100%;
  font-size: var(--tabs-font-size);
  font-weight: var(--text-bold);
  padding: 0 var(--step);
}
:host([fullwidth]) ::slotted(tbk-tab) {
  flex: 1;
}
::slotted(tbk-tab) {
  padding: var(--step-3) 0;
  border-bottom-width: var(--half);
}
:host([placement='start']) ::slotted(tbk-tab) {
  padding: 0 var(--step-3);
  border-width: 0;
  border-right-width: var(--half);
}
:host([placement='end']) ::slotted(tbk-tab) {
  padding: 0 var(--step-3);
  border-width: 0;
  border-left-width: var(--half);
}
:host([placement='bottom']) ::slotted(tbk-tab) {
  padding: var(--step-3) 0;
  border-width: 0;
  border-top-width: var(--half);
}
[part='tabs'] {
  gap: var(--step);
}
.tab-group--start .tab-group__tabs {
  border: 0;
  box-shadow: inset calc(var(--track-width) * -1) 0 0 0 var(--track-color);
}
.tab-group--end .tab-group__tabs {
  border: 0;
  box-shadow: inset calc(var(--track-width)) 0 0 0 var(--track-color);
}
.tab-group--bottom .tab-group__tabs {
  border: 0;
  box-shadow: inset 0 calc(var(--track-width)) 0 0 var(--track-color);
}
.tab-group--top .tab-group__tabs {
  border: 0;
  box-shadow: inset 0 calc(var(--track-width) * -1) 0 0 var(--track-color);
}
[part='nav'].tab-group__nav-container tbk-tab {
  padding: 0;
}
`
var px = en`
  :host {
    --indicator-color: var(--sl-color-primary-600);
    --track-color: var(--sl-color-neutral-200);
    --track-width: 2px;

    display: block;
  }

  .tab-group {
    display: flex;
    border-radius: 0;
  }

  .tab-group__tabs {
    display: flex;
    position: relative;
  }

  .tab-group__indicator {
    position: absolute;
    transition:
      var(--sl-transition-fast) translate ease,
      var(--sl-transition-fast) width ease;
  }

  .tab-group--has-scroll-controls .tab-group__nav-container {
    position: relative;
    padding: 0 var(--sl-spacing-x-large);
  }

  .tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden,
  .tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden {
    visibility: hidden;
  }

  .tab-group__body {
    display: block;
    overflow: auto;
  }

  .tab-group__scroll-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--sl-spacing-x-large);
  }

  .tab-group__scroll-button--start {
    left: 0;
  }

  .tab-group__scroll-button--end {
    right: 0;
  }

  .tab-group--rtl .tab-group__scroll-button--start {
    left: auto;
    right: 0;
  }

  .tab-group--rtl .tab-group__scroll-button--end {
    left: 0;
    right: auto;
  }

  /*
   * Top
   */

  .tab-group--top {
    flex-direction: column;
  }

  .tab-group--top .tab-group__nav-container {
    order: 1;
  }

  .tab-group--top .tab-group__nav {
    display: flex;
    overflow-x: auto;

    /* Hide scrollbar in Firefox */
    scrollbar-width: none;
  }

  /* Hide scrollbar in Chrome/Safari */
  .tab-group--top .tab-group__nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .tab-group--top .tab-group__tabs {
    flex: 1 1 auto;
    position: relative;
    flex-direction: row;
    border-bottom: solid var(--track-width) var(--track-color);
  }

  .tab-group--top .tab-group__indicator {
    bottom: calc(-1 * var(--track-width));
    border-bottom: solid var(--track-width) var(--indicator-color);
  }

  .tab-group--top .tab-group__body {
    order: 2;
  }

  .tab-group--top ::slotted(sl-tab-panel) {
    --padding: var(--sl-spacing-medium) 0;
  }

  /*
   * Bottom
   */

  .tab-group--bottom {
    flex-direction: column;
  }

  .tab-group--bottom .tab-group__nav-container {
    order: 2;
  }

  .tab-group--bottom .tab-group__nav {
    display: flex;
    overflow-x: auto;

    /* Hide scrollbar in Firefox */
    scrollbar-width: none;
  }

  /* Hide scrollbar in Chrome/Safari */
  .tab-group--bottom .tab-group__nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .tab-group--bottom .tab-group__tabs {
    flex: 1 1 auto;
    position: relative;
    flex-direction: row;
    border-top: solid var(--track-width) var(--track-color);
  }

  .tab-group--bottom .tab-group__indicator {
    top: calc(-1 * var(--track-width));
    border-top: solid var(--track-width) var(--indicator-color);
  }

  .tab-group--bottom .tab-group__body {
    order: 1;
  }

  .tab-group--bottom ::slotted(sl-tab-panel) {
    --padding: var(--sl-spacing-medium) 0;
  }

  /*
   * Start
   */

  .tab-group--start {
    flex-direction: row;
  }

  .tab-group--start .tab-group__nav-container {
    order: 1;
  }

  .tab-group--start .tab-group__tabs {
    flex: 0 0 auto;
    flex-direction: column;
    border-inline-end: solid var(--track-width) var(--track-color);
  }

  .tab-group--start .tab-group__indicator {
    right: calc(-1 * var(--track-width));
    border-right: solid var(--track-width) var(--indicator-color);
  }

  .tab-group--start.tab-group--rtl .tab-group__indicator {
    right: auto;
    left: calc(-1 * var(--track-width));
  }

  .tab-group--start .tab-group__body {
    flex: 1 1 auto;
    order: 2;
  }

  .tab-group--start ::slotted(sl-tab-panel) {
    --padding: 0 var(--sl-spacing-medium);
  }

  /*
   * End
   */

  .tab-group--end {
    flex-direction: row;
  }

  .tab-group--end .tab-group__nav-container {
    order: 2;
  }

  .tab-group--end .tab-group__tabs {
    flex: 0 0 auto;
    flex-direction: column;
    border-left: solid var(--track-width) var(--track-color);
  }

  .tab-group--end .tab-group__indicator {
    left: calc(-1 * var(--track-width));
    border-inline-start: solid var(--track-width) var(--indicator-color);
  }

  .tab-group--end.tab-group--rtl .tab-group__indicator {
    right: calc(-1 * var(--track-width));
    left: auto;
  }

  .tab-group--end .tab-group__body {
    flex: 1 1 auto;
    order: 1;
  }

  .tab-group--end ::slotted(sl-tab-panel) {
    --padding: 0 var(--sl-spacing-medium);
  }
`
function gx(n, r) {
  return {
    top: Math.round(
      n.getBoundingClientRect().top - r.getBoundingClientRect().top,
    ),
    left: Math.round(
      n.getBoundingClientRect().left - r.getBoundingClientRect().left,
    ),
  }
}
function uh(n, r, i = 'vertical', a = 'smooth') {
  const l = gx(n, r),
    d = l.top + r.scrollTop,
    f = l.left + r.scrollLeft,
    v = r.scrollLeft,
    m = r.scrollLeft + r.offsetWidth,
    _ = r.scrollTop,
    k = r.scrollTop + r.offsetHeight
  ;(i === 'horizontal' || i === 'both') &&
    (f < v
      ? r.scrollTo({ left: f, behavior: a })
      : f + n.clientWidth > m &&
        r.scrollTo({ left: f - r.offsetWidth + n.clientWidth, behavior: a })),
    (i === 'vertical' || i === 'both') &&
      (d < _
        ? r.scrollTo({ top: d, behavior: a })
        : d + n.clientHeight > k &&
          r.scrollTo({ top: d - r.offsetHeight + n.clientHeight, behavior: a }))
}
var Wt = class extends Se {
  constructor() {
    super(...arguments),
      (this.tabs = []),
      (this.focusableTabs = []),
      (this.panels = []),
      (this.localize = new hi(this)),
      (this.hasScrollControls = !1),
      (this.shouldHideScrollStartButton = !1),
      (this.shouldHideScrollEndButton = !1),
      (this.placement = 'top'),
      (this.activation = 'auto'),
      (this.noScrollControls = !1),
      (this.fixedScrollControls = !1),
      (this.scrollOffset = 1)
  }
  connectedCallback() {
    const n = Promise.all([
      customElements.whenDefined('sl-tab'),
      customElements.whenDefined('sl-tab-panel'),
    ])
    super.connectedCallback(),
      (this.resizeObserver = new ResizeObserver(() => {
        this.repositionIndicator(), this.updateScrollControls()
      })),
      (this.mutationObserver = new MutationObserver(r => {
        r.some(
          i => !['aria-labelledby', 'aria-controls'].includes(i.attributeName),
        ) && setTimeout(() => this.setAriaLabels()),
          r.some(i => i.attributeName === 'disabled') &&
            this.syncTabsAndPanels()
      })),
      this.updateComplete.then(() => {
        this.syncTabsAndPanels(),
          this.mutationObserver.observe(this, {
            attributes: !0,
            childList: !0,
            subtree: !0,
          }),
          this.resizeObserver.observe(this.nav),
          n.then(() => {
            new IntersectionObserver((i, a) => {
              var l
              i[0].intersectionRatio > 0 &&
                (this.setAriaLabels(),
                this.setActiveTab(
                  (l = this.getActiveTab()) != null ? l : this.tabs[0],
                  { emitEvents: !1 },
                ),
                a.unobserve(i[0].target))
            }).observe(this.tabGroup)
          })
      })
  }
  disconnectedCallback() {
    var n, r
    super.disconnectedCallback(),
      (n = this.mutationObserver) == null || n.disconnect(),
      this.nav && ((r = this.resizeObserver) == null || r.unobserve(this.nav))
  }
  getAllTabs() {
    return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()
  }
  getAllPanels() {
    return [...this.body.assignedElements()].filter(
      n => n.tagName.toLowerCase() === 'sl-tab-panel',
    )
  }
  getActiveTab() {
    return this.tabs.find(n => n.active)
  }
  handleClick(n) {
    const i = n.target.closest('sl-tab')
    ;(i == null ? void 0 : i.closest('sl-tab-group')) === this &&
      i !== null &&
      this.setActiveTab(i, { scrollBehavior: 'smooth' })
  }
  handleKeyDown(n) {
    const i = n.target.closest('sl-tab')
    if (
      (i == null ? void 0 : i.closest('sl-tab-group')) === this &&
      (['Enter', ' '].includes(n.key) &&
        i !== null &&
        (this.setActiveTab(i, { scrollBehavior: 'smooth' }),
        n.preventDefault()),
      [
        'ArrowLeft',
        'ArrowRight',
        'ArrowUp',
        'ArrowDown',
        'Home',
        'End',
      ].includes(n.key))
    ) {
      const l = this.tabs.find(v => v.matches(':focus')),
        d = this.localize.dir() === 'rtl'
      let f = null
      if ((l == null ? void 0 : l.tagName.toLowerCase()) === 'sl-tab') {
        if (n.key === 'Home') f = this.focusableTabs[0]
        else if (n.key === 'End')
          f = this.focusableTabs[this.focusableTabs.length - 1]
        else if (
          (['top', 'bottom'].includes(this.placement) &&
            n.key === (d ? 'ArrowRight' : 'ArrowLeft')) ||
          (['start', 'end'].includes(this.placement) && n.key === 'ArrowUp')
        ) {
          const v = this.tabs.findIndex(m => m === l)
          f = this.findNextFocusableTab(v, 'backward')
        } else if (
          (['top', 'bottom'].includes(this.placement) &&
            n.key === (d ? 'ArrowLeft' : 'ArrowRight')) ||
          (['start', 'end'].includes(this.placement) && n.key === 'ArrowDown')
        ) {
          const v = this.tabs.findIndex(m => m === l)
          f = this.findNextFocusableTab(v, 'forward')
        }
        if (!f) return
        ;(f.tabIndex = 0),
          f.focus({ preventScroll: !0 }),
          this.activation === 'auto'
            ? this.setActiveTab(f, { scrollBehavior: 'smooth' })
            : this.tabs.forEach(v => {
                v.tabIndex = v === f ? 0 : -1
              }),
          ['top', 'bottom'].includes(this.placement) &&
            uh(f, this.nav, 'horizontal'),
          n.preventDefault()
      }
    }
  }
  handleScrollToStart() {
    this.nav.scroll({
      left:
        this.localize.dir() === 'rtl'
          ? this.nav.scrollLeft + this.nav.clientWidth
          : this.nav.scrollLeft - this.nav.clientWidth,
      behavior: 'smooth',
    })
  }
  handleScrollToEnd() {
    this.nav.scroll({
      left:
        this.localize.dir() === 'rtl'
          ? this.nav.scrollLeft - this.nav.clientWidth
          : this.nav.scrollLeft + this.nav.clientWidth,
      behavior: 'smooth',
    })
  }
  setActiveTab(n, r) {
    if (
      ((r = ai(
        {
          emitEvents: !0,
          scrollBehavior: 'auto',
        },
        r,
      )),
      n !== this.activeTab && !n.disabled)
    ) {
      const i = this.activeTab
      ;(this.activeTab = n),
        this.tabs.forEach(a => {
          ;(a.active = a === this.activeTab),
            (a.tabIndex = a === this.activeTab ? 0 : -1)
        }),
        this.panels.forEach(a => {
          var l
          return (a.active =
            a.name === ((l = this.activeTab) == null ? void 0 : l.panel))
        }),
        this.syncIndicator(),
        ['top', 'bottom'].includes(this.placement) &&
          uh(this.activeTab, this.nav, 'horizontal', r.scrollBehavior),
        r.emitEvents &&
          (i && this.emit('sl-tab-hide', { detail: { name: i.panel } }),
          this.emit('sl-tab-show', { detail: { name: this.activeTab.panel } }))
    }
  }
  setAriaLabels() {
    this.tabs.forEach(n => {
      const r = this.panels.find(i => i.name === n.panel)
      r &&
        (n.setAttribute('aria-controls', r.getAttribute('id')),
        r.setAttribute('aria-labelledby', n.getAttribute('id')))
    })
  }
  repositionIndicator() {
    const n = this.getActiveTab()
    if (!n) return
    const r = n.clientWidth,
      i = n.clientHeight,
      a = this.localize.dir() === 'rtl',
      l = this.getAllTabs(),
      f = l.slice(0, l.indexOf(n)).reduce(
        (v, m) => ({
          left: v.left + m.clientWidth,
          top: v.top + m.clientHeight,
        }),
        { left: 0, top: 0 },
      )
    switch (this.placement) {
      case 'top':
      case 'bottom':
        ;(this.indicator.style.width = `${r}px`),
          (this.indicator.style.height = 'auto'),
          (this.indicator.style.translate = a
            ? `${-1 * f.left}px`
            : `${f.left}px`)
        break
      case 'start':
      case 'end':
        ;(this.indicator.style.width = 'auto'),
          (this.indicator.style.height = `${i}px`),
          (this.indicator.style.translate = `0 ${f.top}px`)
        break
    }
  }
  // This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.
  syncTabsAndPanels() {
    ;(this.tabs = this.getAllTabs()),
      (this.focusableTabs = this.tabs.filter(n => !n.disabled)),
      (this.panels = this.getAllPanels()),
      this.syncIndicator(),
      this.updateComplete.then(() => this.updateScrollControls())
  }
  findNextFocusableTab(n, r) {
    let i = null
    const a = r === 'forward' ? 1 : -1
    let l = n + a
    for (; n < this.tabs.length; ) {
      if (((i = this.tabs[l] || null), i === null)) {
        r === 'forward'
          ? (i = this.focusableTabs[0])
          : (i = this.focusableTabs[this.focusableTabs.length - 1])
        break
      }
      if (!i.disabled) break
      l += a
    }
    return i
  }
  updateScrollButtons() {
    this.hasScrollControls &&
      !this.fixedScrollControls &&
      ((this.shouldHideScrollStartButton =
        this.scrollFromStart() <= this.scrollOffset),
      (this.shouldHideScrollEndButton = this.isScrolledToEnd()))
  }
  isScrolledToEnd() {
    return (
      this.scrollFromStart() + this.nav.clientWidth >=
      this.nav.scrollWidth - this.scrollOffset
    )
  }
  scrollFromStart() {
    return this.localize.dir() === 'rtl'
      ? -this.nav.scrollLeft
      : this.nav.scrollLeft
  }
  updateScrollControls() {
    this.noScrollControls
      ? (this.hasScrollControls = !1)
      : (this.hasScrollControls =
          ['top', 'bottom'].includes(this.placement) &&
          this.nav.scrollWidth > this.nav.clientWidth + 1),
      this.updateScrollButtons()
  }
  syncIndicator() {
    this.getActiveTab()
      ? ((this.indicator.style.display = 'block'), this.repositionIndicator())
      : (this.indicator.style.display = 'none')
  }
  /** Shows the specified tab panel. */
  show(n) {
    const r = this.tabs.find(i => i.panel === n)
    r && this.setActiveTab(r, { scrollBehavior: 'smooth' })
  }
  render() {
    const n = this.localize.dir() === 'rtl'
    return X`
      <div
        part="base"
        class=${pn({
          'tab-group': !0,
          'tab-group--top': this.placement === 'top',
          'tab-group--bottom': this.placement === 'bottom',
          'tab-group--start': this.placement === 'start',
          'tab-group--end': this.placement === 'end',
          'tab-group--rtl': this.localize.dir() === 'rtl',
          'tab-group--has-scroll-controls': this.hasScrollControls,
        })}
        @click=${this.handleClick}
        @keydown=${this.handleKeyDown}
      >
        <div class="tab-group__nav-container" part="nav">
          ${
            this.hasScrollControls
              ? X`
                <sl-icon-button
                  part="scroll-button scroll-button--start"
                  exportparts="base:scroll-button__base"
                  class=${pn({
                    'tab-group__scroll-button': !0,
                    'tab-group__scroll-button--start': !0,
                    'tab-group__scroll-button--start--hidden':
                      this.shouldHideScrollStartButton,
                  })}
                  name=${n ? 'chevron-right' : 'chevron-left'}
                  library="system"
                  tabindex="-1"
                  aria-hidden="true"
                  label=${this.localize.term('scrollToStart')}
                  @click=${this.handleScrollToStart}
                ></sl-icon-button>
              `
              : ''
          }

          <div class="tab-group__nav" @scrollend=${this.updateScrollButtons}>
            <div part="tabs" class="tab-group__tabs" role="tablist">
              <div part="active-tab-indicator" class="tab-group__indicator"></div>
              <sl-resize-observer @sl-resize=${this.syncIndicator}>
                <slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
              </sl-resize-observer>
            </div>
          </div>

          ${
            this.hasScrollControls
              ? X`
                <sl-icon-button
                  part="scroll-button scroll-button--end"
                  exportparts="base:scroll-button__base"
                  class=${pn({
                    'tab-group__scroll-button': !0,
                    'tab-group__scroll-button--end': !0,
                    'tab-group__scroll-button--end--hidden':
                      this.shouldHideScrollEndButton,
                  })}
                  name=${n ? 'chevron-left' : 'chevron-right'}
                  library="system"
                  tabindex="-1"
                  aria-hidden="true"
                  label=${this.localize.term('scrollToEnd')}
                  @click=${this.handleScrollToEnd}
                ></sl-icon-button>
              `
              : ''
          }
        </div>

        <slot part="body" class="tab-group__body" @slotchange=${
          this.syncTabsAndPanels
        }></slot>
      </div>
    `
  }
}
Wt.styles = [vn, px]
Wt.dependencies = { 'sl-icon-button': de, 'sl-resize-observer': $r }
R([Ie('.tab-group')], Wt.prototype, 'tabGroup', 2)
R([Ie('.tab-group__body')], Wt.prototype, 'body', 2)
R([Ie('.tab-group__nav')], Wt.prototype, 'nav', 2)
R([Ie('.tab-group__indicator')], Wt.prototype, 'indicator', 2)
R([li()], Wt.prototype, 'hasScrollControls', 2)
R([li()], Wt.prototype, 'shouldHideScrollStartButton', 2)
R([li()], Wt.prototype, 'shouldHideScrollEndButton', 2)
R([V()], Wt.prototype, 'placement', 2)
R([V()], Wt.prototype, 'activation', 2)
R(
  [V({ attribute: 'no-scroll-controls', type: Boolean })],
  Wt.prototype,
  'noScrollControls',
  2,
)
R(
  [V({ attribute: 'fixed-scroll-controls', type: Boolean })],
  Wt.prototype,
  'fixedScrollControls',
  2,
)
R([$y({ passive: !0 })], Wt.prototype, 'updateScrollButtons', 1)
R(
  [le('noScrollControls', { waitUntilFirstUpdate: !0 })],
  Wt.prototype,
  'updateScrollControls',
  1,
)
R(
  [le('placement', { waitUntilFirstUpdate: !0 })],
  Wt.prototype,
  'syncIndicator',
  1,
)
var vx = (n, r) => {
    let i = 0
    return function (...a) {
      window.clearTimeout(i),
        (i = window.setTimeout(() => {
          n.call(this, ...a)
        }, r))
    }
  },
  hh = (n, r, i) => {
    const a = n[r]
    n[r] = function (...l) {
      a.call(this, ...l), i.call(this, a, ...l)
    }
  },
  mx = 'onscrollend' in window
if (!mx) {
  const n = /* @__PURE__ */ new Set(),
    r = /* @__PURE__ */ new WeakMap(),
    i = l => {
      for (const d of l.changedTouches) n.add(d.identifier)
    },
    a = l => {
      for (const d of l.changedTouches) n.delete(d.identifier)
    }
  document.addEventListener('touchstart', i, !0),
    document.addEventListener('touchend', a, !0),
    document.addEventListener('touchcancel', a, !0),
    hh(EventTarget.prototype, 'addEventListener', function (l, d) {
      if (d !== 'scrollend') return
      const f = vx(() => {
        n.size ? f() : this.dispatchEvent(new Event('scrollend'))
      }, 100)
      l.call(this, 'scroll', f, { passive: !0 }), r.set(this, f)
    }),
    hh(EventTarget.prototype, 'removeEventListener', function (l, d) {
      if (d !== 'scrollend') return
      const f = r.get(this)
      f && l.call(this, 'scroll', f, { passive: !0 })
    })
}
class dh extends mn(Wt) {
  constructor() {
    super(),
      (this.size = Pt.M),
      (this.inverse = !1),
      (this.placement = Yy.Top),
      (this.variant = bt.Neutral),
      (this.fullwidth = !1)
  }
  get elSlotNav() {
    var r
    return (r = this.renderRoot) == null
      ? void 0
      : r.querySelector('slot[name="nav"]')
  }
  async firstUpdated() {
    ;(this.resizeObserver = new ResizeObserver(() => {
      this.repositionIndicator(), this.updateScrollControls()
    })),
      (this.mutationObserver = new MutationObserver(i => {
        i.some(a =>
          $t(['aria-labelledby', 'aria-controls'].includes(a.attributeName)),
        ) && setTimeout(() => this.setAriaLabels()),
          i.some(a => a.attributeName === 'disabled') &&
            this.syncTabsAndPanels()
      }))
    const r = Promise.all([
      customElements.whenDefined('tbk-tab'),
      customElements.whenDefined('tbk-tab-panel'),
    ])
    await super.firstUpdated(),
      this.updateComplete.then(() => {
        this.syncTabsAndPanels(),
          this.mutationObserver.observe(this, {
            attributes: !0,
            childList: !0,
            subtree: !0,
          }),
          this.resizeObserver.observe(this.nav),
          r.then(() => {
            setTimeout(() => {
              new IntersectionObserver((a, l) => {
                a[0].intersectionRatio > 0 &&
                  (this.setAriaLabels(),
                  this.setActiveTab(this.getActiveTab() ?? this.tabs[0], {
                    emitEvents: !1,
                  }),
                  l.unobserve(a[0].target))
              }).observe(this.tabGroup),
                this.getAllTabs().forEach(a => {
                  a.setAttribute('size', this.size),
                    qt(a.variant) && (a.variant = this.variant),
                    this.inverse && (a.inverse = this.inverse)
                }),
                this.getAllPanels().forEach(a => {
                  a.setAttribute('size', this.size),
                    qt(a.getAttribute('variant')) &&
                      a.setAttribute('variant', this.variant)
                })
            }, 500)
          })
      })
  }
  getAllTabs(r = { includeDisabled: !0 }) {
    return (
      this.elSlotNav ? [...this.elSlotNav.assignedElements()] : []
    ).filter(a =>
      r.includeDisabled
        ? a.tagName.toLowerCase() === 'tbk-tab'
        : a.tagName.toLowerCase() === 'tbk-tab' && !a.disabled,
    )
  }
  getAllPanels() {
    return [...this.body.assignedElements()].filter(
      r => r.tagName.toLowerCase() === 'tbk-tab-panel',
    )
  }
  handleClick(r) {
    const a = r.target.closest('tbk-tab')
    ;(a == null ? void 0 : a.closest('tbk-tabs')) === this &&
      a !== null &&
      (this.setActiveTab(a, { scrollBehavior: 'smooth' }),
      this.emit('tab-change', {
        detail: new this.emit.EventDetail(a.panel, r),
      }))
  }
  handleKeyDown(r) {
    const a = r.target.closest('tbk-tab')
    if (
      (a == null ? void 0 : a.closest('tbk-tabs')) === this &&
      (['Enter', ' '].includes(r.key) &&
        a !== null &&
        (this.setActiveTab(a, { scrollBehavior: 'smooth' }),
        r.preventDefault()),
      [
        'ArrowLeft',
        'ArrowRight',
        'ArrowUp',
        'ArrowDown',
        'Home',
        'End',
      ].includes(r.key))
    ) {
      const d = this.tabs.find(v => v.matches(':focus')),
        f = this.localize.dir() === 'rtl'
      if ((d == null ? void 0 : d.tagName.toLowerCase()) === 'tbk-tab') {
        let v = this.tabs.indexOf(d)
        r.key === 'Home'
          ? (v = 0)
          : r.key === 'End'
          ? (v = this.tabs.length - 1)
          : (['top', 'bottom'].includes(this.placement) &&
              r.key === (f ? 'ArrowRight' : 'ArrowLeft')) ||
            (['start', 'end'].includes(this.placement) && r.key === 'ArrowUp')
          ? v--
          : ((['top', 'bottom'].includes(this.placement) &&
              r.key === (f ? 'ArrowLeft' : 'ArrowRight')) ||
              (['start', 'end'].includes(this.placement) &&
                r.key === 'ArrowDown')) &&
            v++,
          v < 0 && (v = this.tabs.length - 1),
          v > this.tabs.length - 1 && (v = 0),
          this.tabs[v].focus({ preventScroll: !0 }),
          this.activation === 'auto' &&
            this.setActiveTab(this.tabs[v], { scrollBehavior: 'smooth' }),
          ['top', 'bottom'].includes(this.placement) &&
            Fy(this.tabs[v], this.nav, 'horizontal'),
          r.preventDefault()
      }
    }
  }
}
Y(dh, 'styles', [Wt.styles, It(), ce(), Ar(), bn('tabs', 1.25, 4), dt(fx)]),
  Y(dh, 'properties', {
    ...Wt.properties,
    size: { type: String, reflect: !0 },
    variant: { type: String, reflect: !0 },
    inverse: { type: Boolean, reflect: !0 },
    fullwidth: { type: Boolean, reflect: !0 },
  })
var bx = en`
  :host {
    --padding: 0;

    display: none;
  }

  :host([active]) {
    display: block;
  }

  .tab-panel {
    display: block;
    padding: var(--padding);
  }
`,
  yx = 0,
  Zn = class extends Se {
    constructor() {
      super(...arguments),
        (this.attrId = ++yx),
        (this.componentId = `sl-tab-panel-${this.attrId}`),
        (this.name = ''),
        (this.active = !1)
    }
    connectedCallback() {
      super.connectedCallback(),
        (this.id = this.id.length > 0 ? this.id : this.componentId),
        this.setAttribute('role', 'tabpanel')
    }
    handleActiveChange() {
      this.setAttribute('aria-hidden', this.active ? 'false' : 'true')
    }
    render() {
      return X`
      <slot
        part="base"
        class=${pn({
          'tab-panel': !0,
          'tab-panel--active': this.active,
        })}
      ></slot>
    `
    }
  }
Zn.styles = [vn, bx]
R([V({ reflect: !0 })], Zn.prototype, 'name', 2)
R([V({ type: Boolean, reflect: !0 })], Zn.prototype, 'active', 2)
R([le('active')], Zn.prototype, 'handleActiveChange', 1)
const _x = `:host {
  --tab-panel-font-size: var(--font-size);

  width: 100%;
  height: 100%;
}
[part='base'] {
  width: 100%;
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
}
`
class fh extends mn(Zn, Eo) {
  constructor() {
    super()
    Y(this, 'componentId', `tbk-tab-panel-${this.attrId}`)
    this.size = Pt.M
  }
}
Y(fh, 'styles', [Zn.styles, It(), ce(), bn('tab-panel', 1.5, 3), dt(_x)]),
  Y(fh, 'properties', {
    ...Zn.properties,
    size: { type: String, reflect: !0 },
  })
const wx = `:host {
  --datetime-color: var(--color-gray-800);
  --datetime-background-timezone: var(--color-gray-10);

  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
:host-context([mode='dark']) {
  --datetime-color: var(--color-gray-200);
}
[part='timezone'] {
  line-height: 1;
  background: var(--datetime-background-timezone);
  border-radius: calc(var(--font-size) / 3);
  font-weight: var(--text-black);
  padding: calc(var(--step)) calc(var(--step) + var(--step-3) / 4) calc(var(--step) - var(--half))
    var(--step-2);
  text-transform: uppercase;
  font-size: calc(var(--font-size) * 0.8);
}
[part='date'] {
  padding: calc(var(--step)) var(--step-2) calc(var(--step) - var(--half)) var(--step-2);
  font-weight: var(--text-semibold);
}
[part='time'] {
  margin: 0;
  padding: calc(var(--step)) var(--step-2) calc(var(--step) - var(--half)) 0;
}
tbk-badge::part(base) {
  color: var(--datetime-color);
  padding: 0;
  font-variant-numeric: slashed-zero;
  font-weight: var(--text-light);
}
`
function $x(n) {
  const r = {
    timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
    timeZoneName: 'short',
  }
  return new Intl.DateTimeFormat(xx(), r)
    .formatToParts(n)
    .find(i => i.type === 'timeZoneName').value
}
function xx() {
  var n
  return (
    (typeof window < 'u' &&
      window.navigator &&
      (((n = window.navigator.languages) == null ? void 0 : n[0]) ||
        window.navigator.language ||
        window.navigator.userLanguage ||
        window.navigator.browserLanguage)) ||
    'en-US'
  )
}
class ph extends mn(ue, Mw) {
  constructor() {
    super()
    Y(this, '_defaultFormat', 'YYYY-MM-DD HH:mm:ss')
    ;(this.label = ''),
      (this.date = Date.now()),
      (this.format = this._defaultFormat),
      (this.size = Pt.XXS),
      (this.side = Qe.Right),
      (this.realtime = !1),
      (this.hideTimezone = !1),
      (this.hideDate = !1)
  }
  get hasTime() {
    const i = this.format.toLowerCase()
    return i.includes('h') || i.includes('m') || i.includes('s')
  }
  firstUpdated() {
    super.firstUpdated()
    try {
      this._timestamp = Ph(+this.date)
        ? +this.date
        : new Date(this.date).getTime()
    } catch {
      throw new Error('Invalid date format')
    }
    this.realtime &&
      (this._interval = setInterval(() => {
        this._timestamp = Date.now()
      }, 1e3))
  }
  willUpdate(i) {
    i.has('timezone') &&
      (this._displayTimezone = this.isUTC
        ? Ge.title(Ge.UTC)
        : $x(new Date(this._timestamp)))
  }
  renderTimezone() {
    return Tt(
      $t(this.hideTimezone),
      X`<span part="timezone">${this._displayTimezone}</span>`,
    )
  }
  renderContent() {
    let i = []
    if (this.format === this._defaultFormat) {
      const [a, l] = (
        this.isUTC
          ? wu(this._timestamp, this.format)
          : $u(this._timestamp, this.format)
      ).split(' ')
      i = [
        X`<span part="date">${a}</span>`,
        l && X`<span part="time">${l}</span>`,
      ].filter(Boolean)
    } else {
      const a = this.isUTC
        ? wu(this._timestamp, this.format)
        : $u(this._timestamp, this.format)
      i = [X`<span part="date">${a}</span>`]
    }
    return X`${i}`
  }
  render() {
    return X`<tbk-badge
      title="${this._timestamp}"
      size="${this.size}"
      variant="${bt.Neutral}"
    >
      ${Tt(this.side === Qe.Left, this.renderTimezone())}
      ${Tt($t(this.hideDate), this.renderContent())}
      ${Tt(this.side === Qe.Right, this.renderTimezone())}
    </tbk-badge>`
  }
}
Y(ph, 'styles', [It(), dt(wx)]),
  Y(ph, 'properties', {
    date: { type: [String, Number], reflect: !0 },
    size: { type: String, reflect: !0 },
    side: { type: String, reflect: !0 },
    realtime: { type: Boolean, reflect: !0 },
    format: { type: String },
    hideTimezone: { type: Boolean, attribute: 'hide-timezone' },
    hideDate: { type: Boolean, attribute: 'hide-date' },
    _timestamp: { type: Number, state: !0 },
    _displayTimezone: { type: String, state: !0 },
  })
export {
  Iu as Badge,
  aa as Button,
  ph as Datetime,
  sh as Details,
  Mu as Icon,
  Xu as Information,
  eh as Metadata,
  nh as MetadataItem,
  rh as MetadataSection,
  ju as ModelName,
  zx as ResizeObserver,
  V$ as Scroll,
  Qu as SourceList,
  Ju as SourceListItem,
  th as SourceListSection,
  oh as SplitPane,
  ch as Tab,
  fh as TabPanel,
  dh as Tabs,
  Zu as TextBlock,
  Vu as Tooltip,
}
