{"version":3,"file":"chevron_up-Dv6uTv9Z.js","sources":["../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../src/controllers/HasSlotController.ts","../src/shared-assets/chevron_up.svg"],"sourcesContent":["import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o){return(e,n)=>{const{slot:r,selector:s}=o??{},c=\"slot\"+(r?`[name=${r}]`:\":not([name])\");return t(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter((t=>t.matches(s)))}})}}export{o as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import type { ReactiveController, ReactiveControllerHost } from 'lit'\r\n\r\n/**\r\n * A reactive controller that determines when slots exist.\r\n * \r\n * From: https://github.com/shoelace-style/shoelace/blob/854db13bd7fbfad65f01de0838fe1a6b2dbf0a4d/src/internal/slot.ts#L3-L62\r\n */\r\nexport class HasSlotController implements ReactiveController {\r\n  host: ReactiveControllerHost & Element;\r\n  slotNames: string[] = [];\r\n\r\n  constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]) {\r\n    (this.host = host).addController(this);\r\n    this.slotNames = slotNames;\r\n    this.handleSlotChange = this.handleSlotChange.bind(this);\r\n  }\r\n\r\n  private hasDefaultSlot() {\r\n    return [...this.host.childNodes].some(node => {\r\n      if (node.nodeType === node.TEXT_NODE && node.textContent!.trim() !== '') {\r\n        return true;\r\n      }\r\n\r\n      if (node.nodeType === node.ELEMENT_NODE) {\r\n        const el = node as HTMLElement;\r\n        //const tagName = el.tagName.toLowerCase();\r\n\r\n        // Ignore visually hidden elements since they aren't rendered\r\n        // if (tagName === 'sl-visually-hidden') {\r\n        //   return false;\r\n        // }\r\n\r\n        // If it doesn't have a slot attribute, it's part of the default slot\r\n        if (!el.hasAttribute('slot')) {\r\n          return true;\r\n        }\r\n      }\r\n\r\n      return false;\r\n    });\r\n  }\r\n\r\n  private hasNamedSlot(name: string) {\r\n    return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\r\n  }\r\n\r\n  /**\r\n   * Tests if this element has anything slotted in the given `slotName`\r\n   * @param slotName use `[default]` for the unnamed `<slot>`\r\n   * @returns \r\n   */\r\n  public test(slotName: string): boolean {\r\n    return slotName === '[default]' ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\r\n  }\r\n\r\n  /**\r\n   * Tests if this element has at least 1 thing slotted in ANY of the given `slotNames` slots\r\n   * @param slotNames use `[default]` for the unnamed `<slot>`\r\n   * @returns \r\n   */\r\n  public testAny(...slotNames: string[]): boolean {\r\n    return slotNames.some(name => this.test(name));\r\n  }\r\n\r\n  /**\r\n   * Tests if this element has things slotted in ALL of the given `slotNames` slots\r\n   * @param slotNames use `[default]` for the unnamed `<slot>`\r\n   * @returns \r\n   */\r\n  public testAll(...slotNames: string[]): boolean {\r\n    return slotNames.every(name => this.test(name));\r\n  }\r\n\r\n  hostConnected() {\r\n    this.host.shadowRoot!.addEventListener('slotchange', this.handleSlotChange);\r\n  }\r\n\r\n  hostDisconnected() {\r\n    this.host.shadowRoot!.removeEventListener('slotchange', this.handleSlotChange);\r\n  }\r\n\r\n  protected handleSlotChange(event: Event) {\r\n    const slot = event.target as HTMLSlotElement;\r\n\r\n    if ((this.slotNames.includes('[default]') && !slot.name) || (slot.name && this.slotNames.includes(slot.name))) {\r\n      this.host.requestUpdate();\r\n    }\r\n  }\r\n}","export default \"data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M39.6339%2031.8839C39.1457%2032.372%2038.3543%2032.372%2037.8661%2031.8839L24%2018.0178L10.1339%2031.8839C9.64573%2032.372%208.85427%2032.372%208.36612%2031.8839C7.87796%2031.3957%207.87796%2030.6043%208.36612%2030.1161L23.1161%2015.3661C23.6043%2014.878%2024.3957%2014.878%2024.8839%2015.3661L39.6339%2030.1161C40.122%2030.6043%2040.122%2031.3957%2039.6339%2031.8839Z'%20fill='%23212121'/%3e%3c/svg%3e\""],"names":["o","e","n","r","s","c","t","_a","HasSlotController","host","slotNames","node","name","slotName","event","slot","CHEVRON_SVG"],"mappings":";AACA;AAAA;AAAA;AAAA;AAAA;AAIG,SAASA,EAAEA,GAAE;AAAC,SAAM,CAACC,GAAEC,MAAI;AAAC,UAAK,EAAC,MAAKC,GAAE,UAASC,EAAC,IAAEJ,KAAG,CAAA,GAAGK,IAAE,UAAQF,IAAE,SAASA,CAAC,MAAI;AAAgB,WAAOG,EAAEL,GAAEC,GAAE,EAAC,MAAK;;AAAC,YAAMI,KAAEC,IAAA,KAAK,eAAL,gBAAAA,EAAiB,cAAcF,IAAGJ,KAAEK,KAAA,gBAAAA,EAAG,iBAAiBN,OAAI;AAAG,aAAgBI,MAAT,SAAWH,IAAEA,EAAE,OAAQ,CAAAK,MAAGA,EAAE,QAAQF,CAAC,CAAG;AAAA,IAAA,EAAC,CAAC;AAAA,EAAC;AAAC;ACE/O,MAAMI,EAAgD;AAAA,EAI3D,YAAYC,MAA2CC,GAAqB;AAF5E,SAAA,YAAsB,CAAC,IAGpB,KAAK,OAAOD,GAAM,cAAc,IAAI,GACrC,KAAK,YAAYC,GACjB,KAAK,mBAAmB,KAAK,iBAAiB,KAAK,IAAI;AAAA,EAAA;AAAA,EAGjD,iBAAiB;AACvB,WAAO,CAAC,GAAG,KAAK,KAAK,UAAU,EAAE,KAAK,CAAQC,MACxCA,EAAK,aAAaA,EAAK,aAAaA,EAAK,YAAa,WAAW,MAIjEA,EAAK,aAAaA,EAAK,gBAUrB,CATOA,EASH,aAAa,MAAM,CAM9B;AAAA,EAAA;AAAA,EAGK,aAAaC,GAAc;AACjC,WAAO,KAAK,KAAK,cAAc,mBAAmBA,CAAI,IAAI,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3D,KAAKC,GAA2B;AACrC,WAAOA,MAAa,cAAc,KAAK,m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