@hotosm/ui 0.2.0-b1 → 0.2.0-b2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,10 +14,11 @@ export declare class Tracking extends LitElement {
14
14
  siteId: string;
15
15
  /** The domains to apply tracking. */
16
16
  domain: string;
17
+ /** Force display the banner. */
18
+ force: boolean;
17
19
  isOpen: boolean;
18
20
  static styles: import("lit").CSSResult[];
19
21
  protected render(): import("lit").TemplateResult<1>;
20
- private _closeAlert;
21
22
  private _setAgree;
22
23
  private _setDisagree;
23
24
  connectedCallback(): void;
@@ -20,6 +20,8 @@ export class Tracking extends LitElement {
20
20
  this.siteId = "";
21
21
  /** The domains to apply tracking. */
22
22
  this.domain = "";
23
+ /** Force display the banner. */
24
+ this.force = false;
23
25
  this.isOpen = true;
24
26
  }
25
27
  render() {
@@ -46,65 +48,64 @@ export class Tracking extends LitElement {
46
48
  By clicking "I Agree", you consent to the use of cookies.
47
49
  </p>
48
50
 
49
- <sl-button @click=${(e) => {
50
- this._setAgree(e);
51
- }}>I Agree</sl-button>
52
- <sl-button @click=${(e) => {
53
- this._setDisagree(e);
54
- }}>I Do Not Agree</sl-button>
51
+ <sl-button @click=${this._setAgree}>I Agree</sl-button>
52
+ <sl-button @click=${this._setDisagree}>I Do Not Agree</sl-button>
55
53
  </sl-alert>`;
56
54
  }
57
- _closeAlert() {
58
- this.isOpen = false;
59
- localStorage.setItem(`${this.siteId}-optout-closed`, 'true');
60
- }
61
55
  _setAgree(_e) {
62
56
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
63
57
  const _paq = (window._paq = window._paq || []);
64
- if (_paq.length === 0) {
58
+ if (_paq.length === 0)
65
59
  return;
66
- }
67
60
  _paq.push(['rememberConsentGiven']);
68
- this._closeAlert();
61
+ this.isOpen = false;
62
+ localStorage.setItem(`${this.siteId}-matomo-agree`, 'true');
69
63
  this.dispatchEvent(new Event('agree', { bubbles: true, composed: true }));
70
64
  }
71
65
  _setDisagree(_e) {
72
66
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
73
67
  const _paq = (window._paq = window._paq || []);
74
- if (_paq.length === 0) {
68
+ if (_paq.length === 0)
75
69
  return;
76
- }
77
70
  _paq.push(['forgetConsentGiven']);
78
- this._closeAlert();
71
+ this.isOpen = false;
72
+ localStorage.setItem(`${this.siteId}-matomo-agree`, 'false');
79
73
  this.dispatchEvent(new Event('disagree', { bubbles: true, composed: true }));
80
74
  }
81
75
  connectedCallback() {
82
76
  super.connectedCallback();
83
- // Close automatically if already optout
84
- if (localStorage.getItem(`${this.siteId}-optout-closed`) === 'true') {
77
+ // Close and halt execution if wrong domain
78
+ if (!this.force && window.location.hostname !== this.domain) {
79
+ console.warn('Matomo init failed. Provided domain does not match current domain.');
85
80
  this.isOpen = false;
86
81
  return;
87
82
  }
88
- // Close automatically if wrong domain
89
- if (window.location.hostname !== this.domain) {
83
+ const matomoTrackingId = this.siteId;
84
+ // Close and halt execution if siteId or domain not set
85
+ if (!this.force && (matomoTrackingId.length === 0 || this.domain.length === 0)) {
86
+ console.warn('Matomo init failed. No site id or domains provided.');
90
87
  this.isOpen = false;
91
88
  return;
92
89
  }
93
- // Configure Matomo tracking
94
- const matomoTrackingId = this.siteId;
95
- if ((matomoTrackingId.length === 0) || this.domain.length === 0) {
96
- console.warn('Matomo init failed. No site id or domains provided.');
90
+ // Close and halt execution if already disagreed
91
+ const consent = localStorage.getItem(`${this.siteId}-matomo-agree`);
92
+ if (consent === 'false') {
97
93
  this.isOpen = false;
98
94
  return;
99
95
  }
96
+ // Close prompt only if already agreed, continue
97
+ if (consent === 'true') {
98
+ this.isOpen = false;
99
+ }
100
+ console.log(`Setting Matomo tracking for site=${matomoTrackingId} domain=${this.domain}`);
100
101
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
101
102
  const _paq = (window._paq = window._paq || []);
102
- /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
103
+ // tracker methods like "setCustomDimension" should be called before "trackPageView"
103
104
  _paq.push(['requireConsent']);
104
105
  _paq.push(['setDomains', [this.domain]]);
105
106
  _paq.push(['trackPageView']);
106
107
  _paq.push(['enableLinkTracking']); // Tracks downloads
107
- _paq.push(['trackVisibleContentImpressions']); // Tracks content blocks
108
+ _paq.push(['trackVisibleContentImpressions']); // Tracks content
108
109
  (function () {
109
110
  const u = '//matomo.hotosm.org/';
110
111
  _paq.push(['setTrackerUrl', u + 'matomo.php']);
@@ -112,7 +113,7 @@ export class Tracking extends LitElement {
112
113
  const d = document;
113
114
  const g = d.createElement('script');
114
115
  const s = d.getElementsByTagName('script')[0];
115
- if ((s?.parentNode) != null) {
116
+ if (s?.parentNode != null) {
116
117
  g.async = true;
117
118
  g.src = u + 'matomo.js';
118
119
  s.parentNode.insertBefore(g, s);
@@ -156,6 +157,9 @@ __decorate([
156
157
  __decorate([
157
158
  property({ type: String })
158
159
  ], Tracking.prototype, "domain", void 0);
160
+ __decorate([
161
+ property({ type: Boolean })
162
+ ], Tracking.prototype, "force", void 0);
159
163
  __decorate([
160
164
  state()
161
165
  ], Tracking.prototype, "isOpen", void 0);
@@ -14,7 +14,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const _=globalThis,$=_.trustedTypes,k=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+C,S=`<${E}>`,z=document,P=()=>z.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,B="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,T=/>/g,N=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,D=/"/g,F=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),j=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),I=new WeakMap,W=z.createTreeWalker(z,129);function q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const G=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",s=M;for(let e=0;e<o;e++){const o=t[e];let a,l,c=-1,h=0;for(;h<o.length&&(s.lastIndex=h,l=s.exec(o),null!==l);)h=s.lastIndex,s===M?"!--"===l[1]?s=R:void 0!==l[1]?s=T:void 0!==l[2]?(F.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=N):void 0!==l[3]&&(s=N):s===N?">"===l[0]?(s=r??M,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?N:'"'===l[3]?D:U):s===D||s===U?s=N:s===R||s===T?s=M:(s=N,r=void 0);const d=s===N&&t[e+1].startsWith("/>")?" ":"";n+=s===M?o+S:c>=0?(i.push(a),o.slice(0,c)+A+o.slice(c)+C+d):o+C+(-2===c?e:d)}return[q(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class K{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const s=t.length-1,a=this.parts,[l,c]=G(t,e);if(this.el=K.createElement(l,o),W.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=c[n++],o=i.getAttribute(t).split(C),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:s[2],strings:o,ctor:"."===s[1]?Q:"?"===s[1]?tt:"@"===s[1]?et:J}),i.removeAttribute(t)}else t.startsWith(C)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(F.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],P()),W.nextNode(),a.push({type:2,index:++r});i.append(t[e],P())}}}else if(8===i.nodeType)if(i.data===E)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)a.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const o=z.createElement("template");return o.innerHTML=t,o}}function Z(t,e,o=t,i){if(e===j)return e;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=O(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(e=Z(t,r._$AS(t,e.values),r,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??z).importNode(e,!0);W.currentNode=i;let r=W.nextNode(),n=0,s=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new Y(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ot(r,this,t)),this._$AV.push(e),a=o[++s]}n!==a?.index&&(r=W.nextNode(),n++)}return W.currentNode=z,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),O(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>L(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==H&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(q(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new K(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new Y(this.S(P()),this.S(P()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class J{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=H}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=Z(this,t,e,0),n=!O(t)||t!==this._$AH&&t!==j,n&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=Z(this,i[o+s],e,s),a===j&&(a=this._$AH[s]),n||=!O(a)||a!==this._$AH[s],a===H?t=H:t!==H&&(t+=(a??"")+r[s+1]),this._$AH[s]=a}n&&!i&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Q extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class tt extends J{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}class et extends J{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??H)===j)return;const o=this._$AH,i=t===H&&o!==H||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==H&&(o===H||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=_.litHtmlPolyfillSupport;it?.(K,Y),(_.litHtmlVersions??=[]).push("3.1.3");
17
+ const _=globalThis,$=_.trustedTypes,k=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+C,S=`<${E}>`,z=document,P=()=>z.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,M="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,T=/>/g,N=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,D=/"/g,F=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),j=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),I=new WeakMap,W=z.createTreeWalker(z,129);function q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const G=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",s=B;for(let e=0;e<o;e++){const o=t[e];let a,l,c=-1,h=0;for(;h<o.length&&(s.lastIndex=h,l=s.exec(o),null!==l);)h=s.lastIndex,s===B?"!--"===l[1]?s=R:void 0!==l[1]?s=T:void 0!==l[2]?(F.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=N):void 0!==l[3]&&(s=N):s===N?">"===l[0]?(s=r??B,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?N:'"'===l[3]?D:U):s===D||s===U?s=N:s===R||s===T?s=B:(s=N,r=void 0);const d=s===N&&t[e+1].startsWith("/>")?" ":"";n+=s===B?o+S:c>=0?(i.push(a),o.slice(0,c)+A+o.slice(c)+C+d):o+C+(-2===c?e:d)}return[q(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class K{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const s=t.length-1,a=this.parts,[l,c]=G(t,e);if(this.el=K.createElement(l,o),W.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=c[n++],o=i.getAttribute(t).split(C),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:s[2],strings:o,ctor:"."===s[1]?Q:"?"===s[1]?tt:"@"===s[1]?et:J}),i.removeAttribute(t)}else t.startsWith(C)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(F.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],P()),W.nextNode(),a.push({type:2,index:++r});i.append(t[e],P())}}}else if(8===i.nodeType)if(i.data===E)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)a.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const o=z.createElement("template");return o.innerHTML=t,o}}function Z(t,e,o=t,i){if(e===j)return e;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=O(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(e=Z(t,r._$AS(t,e.values),r,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??z).importNode(e,!0);W.currentNode=i;let r=W.nextNode(),n=0,s=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new Y(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ot(r,this,t)),this._$AV.push(e),a=o[++s]}n!==a?.index&&(r=W.nextNode(),n++)}return W.currentNode=z,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),O(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>L(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==H&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(q(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new K(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new Y(this.S(P()),this.S(P()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class J{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=H}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=Z(this,t,e,0),n=!O(t)||t!==this._$AH&&t!==j,n&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=Z(this,i[o+s],e,s),a===j&&(a=this._$AH[s]),n||=!O(a)||a!==this._$AH[s],a===H?t=H:t!==H&&(t+=(a??"")+r[s+1]),this._$AH[s]=a}n&&!i&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Q extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class tt extends J{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}class et extends J{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??H)===j)return;const o=this._$AH,i=t===H&&o!==H||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==H&&(o===H||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=_.litHtmlPolyfillSupport;it?.(K,Y),(_.litHtmlVersions??=[]).push("3.1.3");
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -26,12 +26,12 @@ let rt=class extends x{constructor(){super(...arguments),this.renderOptions={hos
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- const Ot={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},Lt=(t=Ot,e,o)=>{const{kind:i,metadata:r}=o;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const r=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const r=this[i];e.call(this,o),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function Bt(t){return(e,o)=>"object"==typeof o?Lt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)
29
+ const Ot={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},Lt=(t=Ot,e,o)=>{const{kind:i,metadata:r}=o;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const r=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=o;return function(o){const r=this[i];e.call(this,o),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function Mt(t){return(e,o)=>"object"==typeof o?Lt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */}function Mt(t){return Bt({...t,state:!0,attribute:!1})}
34
+ */}function Bt(t){return Mt({...t,state:!0,attribute:!1})}
35
35
  /**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
@@ -42,12 +42,12 @@ const Ot={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},Lt=(t=Ot
42
42
  * Copyright 2017 Google LLC
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
44
  */
45
- function Rt(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var Tt=class extends rt{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,St({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let r=" (unknown version)",n=r;"version"in e&&e.version&&(r=" v"+e.version),"version"in i&&i.version&&(n=" v"+i.version),r&&n&&r===n||console.warn(`Attempted to register <${t}>${r}, but <${t}>${n} has already been registered.`)}};Tt.version="2.15.1",Tt.dependencies={},Pt([Bt()],Tt.prototype,"dir",2),Pt([Bt()],Tt.prototype,"lang",2);var Nt=class extends Tt{constructor(){super(...arguments),this.localize=new vt(this)}render(){return V`<svg part="base" class="spinner" role="progressbar" aria-label="${this.localize.term("loading")}"><circle class="spinner__track"></circle><circle class="spinner__indicator"></circle></svg>`}};Nt.styles=[yt,st];var Ut=new WeakMap,Dt=new WeakMap,Ft=new WeakMap,Vt=new WeakSet,jt=new WeakMap,Ht=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!r&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Ut.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),jt.set(this.host,[])},this.handleInteraction=t=>{const e=jt.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.checkValidity&&!e.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=St({form:t=>{const e=t.form;if(e){const o=t.getRootNode().querySelector(`#${e}`);if(o)return o}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>{var e;return null!=(e=t.disabled)&&e},reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),setValue:(t,e)=>t.value=e,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),jt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),jt.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,Ut.has(this.form)?Ut.get(this.form).add(this.host):Ut.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),Dt.has(this.form)||(Dt.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Ft.has(this.form)||(Ft.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Ut.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),Dt.has(this.form)&&(this.form.reportValidity=Dt.get(this.form),Dt.delete(this.form)),Ft.has(this.form)&&(this.form.checkValidity=Ft.get(this.form),Ft.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Vt.add(t):Vt.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return null!=(t=this.form)?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=Boolean(Vt.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||null==t||t.preventDefault()}},It=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(zt(St({},It),{valid:!1,valueMissing:!0})),Object.freeze(zt(St({},It),{valid:!1,customError:!0}));var Wt=n`:host{display:inline-block;position:relative;width:auto;cursor:pointer}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--sl-input-border-width);font-family:var(--sl-input-font-family);font-weight:var(--sl-font-weight-semibold);text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--sl-transition-x-fast) background-color,var(--sl-transition-x-fast) color,var(--sl-transition-x-fast) border,var(--sl-transition-x-fast) box-shadow;cursor:inherit}.button::-moz-focus-inner{border:0}.button:focus{outline:0}.button:focus-visible{outline:var(--sl-focus-ring);outline-offset:var(--sl-focus-ring-offset)}.button--disabled{opacity:.5;cursor:not-allowed}.button--disabled *{pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center;pointer-events:none}.button__label{display:inline-block}.button__label::slotted(sl-icon){vertical-align:-2px}.button--standard.button--default{background-color:var(--sl-color-neutral-0);border-color:var(--sl-color-neutral-300);color:var(--sl-color-neutral-700)}.button--standard.button--default:hover:not(.button--disabled){background-color:var(--sl-color-primary-50);border-color:var(--sl-color-primary-300);color:var(--sl-color-primary-700)}.button--standard.button--default:active:not(.button--disabled){background-color:var(--sl-color-primary-100);border-color:var(--sl-color-primary-400);color:var(--sl-color-primary-700)}.button--standard.button--primary{background-color:var(--sl-color-primary-600);border-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--standard.button--primary:hover:not(.button--disabled){background-color:var(--sl-color-primary-500);border-color:var(--sl-color-primary-500);color:var(--sl-color-neutral-0)}.button--standard.button--primary:active:not(.button--disabled){background-color:var(--sl-color-primary-600);border-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--standard.button--success{background-color:var(--sl-color-success-600);border-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--standard.button--success:hover:not(.button--disabled){background-color:var(--sl-color-success-500);border-color:var(--sl-color-success-500);color:var(--sl-color-neutral-0)}.button--standard.button--success:active:not(.button--disabled){background-color:var(--sl-color-success-600);border-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--standard.button--neutral{background-color:var(--sl-color-neutral-600);border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--standard.button--neutral:hover:not(.button--disabled){background-color:var(--sl-color-neutral-500);border-color:var(--sl-color-neutral-500);color:var(--sl-color-neutral-0)}.button--standard.button--neutral:active:not(.button--disabled){background-color:var(--sl-color-neutral-600);border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--standard.button--warning{background-color:var(--sl-color-warning-600);border-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--standard.button--warning:hover:not(.button--disabled){background-color:var(--sl-color-warning-500);border-color:var(--sl-color-warning-500);color:var(--sl-color-neutral-0)}.button--standard.button--warning:active:not(.button--disabled){background-color:var(--sl-color-warning-600);border-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--standard.button--danger{background-color:var(--sl-color-danger-600);border-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--standard.button--danger:hover:not(.button--disabled){background-color:var(--sl-color-danger-500);border-color:var(--sl-color-danger-500);color:var(--sl-color-neutral-0)}.button--standard.button--danger:active:not(.button--disabled){background-color:var(--sl-color-danger-600);border-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--outline{background:0 0;border:solid 1px}.button--outline.button--default{border-color:var(--sl-color-neutral-300);color:var(--sl-color-neutral-700)}.button--outline.button--default.button--checked:not(.button--disabled),.button--outline.button--default:hover:not(.button--disabled){border-color:var(--sl-color-primary-600);background-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--outline.button--default:active:not(.button--disabled){border-color:var(--sl-color-primary-700);background-color:var(--sl-color-primary-700);color:var(--sl-color-neutral-0)}.button--outline.button--primary{border-color:var(--sl-color-primary-600);color:var(--sl-color-primary-600)}.button--outline.button--primary.button--checked:not(.button--disabled),.button--outline.button--primary:hover:not(.button--disabled){background-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--outline.button--primary:active:not(.button--disabled){border-color:var(--sl-color-primary-700);background-color:var(--sl-color-primary-700);color:var(--sl-color-neutral-0)}.button--outline.button--success{border-color:var(--sl-color-success-600);color:var(--sl-color-success-600)}.button--outline.button--success.button--checked:not(.button--disabled),.button--outline.button--success:hover:not(.button--disabled){background-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--outline.button--success:active:not(.button--disabled){border-color:var(--sl-color-success-700);background-color:var(--sl-color-success-700);color:var(--sl-color-neutral-0)}.button--outline.button--neutral{border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-600)}.button--outline.button--neutral.button--checked:not(.button--disabled),.button--outline.button--neutral:hover:not(.button--disabled){background-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--outline.button--neutral:active:not(.button--disabled){border-color:var(--sl-color-neutral-700);background-color:var(--sl-color-neutral-700);color:var(--sl-color-neutral-0)}.button--outline.button--warning{border-color:var(--sl-color-warning-600);color:var(--sl-color-warning-600)}.button--outline.button--warning.button--checked:not(.button--disabled),.button--outline.button--warning:hover:not(.button--disabled){background-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--outline.button--warning:active:not(.button--disabled){border-color:var(--sl-color-warning-700);background-color:var(--sl-color-warning-700);color:var(--sl-color-neutral-0)}.button--outline.button--danger{border-color:var(--sl-color-danger-600);color:var(--sl-color-danger-600)}.button--outline.button--danger.button--checked:not(.button--disabled),.button--outline.button--danger:hover:not(.button--disabled){background-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--outline.button--danger:active:not(.button--disabled){border-color:var(--sl-color-danger-700);background-color:var(--sl-color-danger-700);color:var(--sl-color-neutral-0)}@media (forced-colors:active){.button.button--outline.button--checked:not(.button--disabled){outline:solid 2px transparent}}.button--text{background-color:transparent;border-color:transparent;color:var(--sl-color-primary-600)}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-500)}.button--text:focus-visible:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-500)}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-700)}.button--small{height:auto;min-height:var(--sl-input-height-small);font-size:var(--sl-button-font-size-small);line-height:calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-small)}.button--medium{height:auto;min-height:var(--sl-input-height-medium);font-size:var(--sl-button-font-size-medium);line-height:calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-medium)}.button--large{height:auto;min-height:var(--sl-input-height-large);font-size:var(--sl-button-font-size-large);line-height:calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-large)}.button--pill.button--small{border-radius:var(--sl-input-height-small)}.button--pill.button--medium{border-radius:var(--sl-input-height-medium)}.button--pill.button--large{border-radius:var(--sl-input-height-large)}.button--circle{padding-left:0;padding-right:0}.button--circle.button--small{width:var(--sl-input-height-small);border-radius:50%}.button--circle.button--medium{width:var(--sl-input-height-medium);border-radius:50%}.button--circle.button--large{width:var(--sl-input-height-large);border-radius:50%}.button--circle .button__caret,.button--circle .button__prefix,.button--circle .button__suffix{display:none}.button--caret .button__suffix{display:none}.button--caret .button__caret{height:auto}.button--loading{position:relative;cursor:wait}.button--loading .button__caret,.button--loading .button__label,.button--loading .button__prefix,.button--loading .button__suffix{visibility:hidden}.button--loading sl-spinner{--indicator-color:currentColor;position:absolute;font-size:1em;height:1em;width:1em;top:calc(50% - .5em);left:calc(50% - .5em)}.button ::slotted(sl-badge){position:absolute;top:0;right:0;translate:50% -50%;pointer-events:none}.button--rtl ::slotted(sl-badge){right:auto;left:0;translate:-50% -50%}.button--has-label.button--small .button__label{padding:0 var(--sl-spacing-small)}.button--has-label.button--medium .button__label{padding:0 var(--sl-spacing-medium)}.button--has-label.button--large .button__label{padding:0 var(--sl-spacing-large)}.button--has-prefix.button--small{padding-inline-start:var(--sl-spacing-x-small)}.button--has-prefix.button--small .button__label{padding-inline-start:var(--sl-spacing-x-small)}.button--has-prefix.button--medium{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--medium .button__label{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--large{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--large .button__label{padding-inline-start:var(--sl-spacing-small)}.button--caret.button--small,.button--has-suffix.button--small{padding-inline-end:var(--sl-spacing-x-small)}.button--caret.button--small .button__label,.button--has-suffix.button--small .button__label{padding-inline-end:var(--sl-spacing-x-small)}.button--caret.button--medium,.button--has-suffix.button--medium{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--medium .button__label,.button--has-suffix.button--medium .button__label{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--large,.button--has-suffix.button--large{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--large .button__label,.button--has-suffix.button--large .button__label{padding-inline-end:var(--sl-spacing-small)}:host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button{border-start-end-radius:0;border-end-end-radius:0}:host([data-sl-button-group__button--inner]) .button{border-radius:0}:host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button{border-start-start-radius:0;border-end-start-radius:0}:host([data-sl-button-group__button]:not([data-sl-button-group__button--first])){margin-inline-start:calc(-1 * var(--sl-input-border-width))}:host([data-sl-button-group__button]:not([data-sl-button-group__button--first],[data-sl-button-group__button--radio],[variant=default]):not(:hover)) .button:after{content:'';position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px rgb(128 128 128 / 33%);mix-blend-mode:multiply}:host([data-sl-button-group__button--hover]){z-index:1}:host([data-sl-button-group__button--focus]),:host([data-sl-button-group__button][checked]){z-index:2}`,qt=n`:host{display:inline-block;width:1em;height:1em;box-sizing:content-box!important}svg{display:block;height:100%;width:100%}`,Gt="";function Kt(t){Gt=t}var Zt={name:"default",resolver:t=>function(t=""){if(!Gt){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)Kt(e.getAttribute("data-shoelace"));else{const e=t.find((t=>/shoelace(\.min)?\.js($|\?)/.test(t.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(t.src)));let o="";e&&(o=e.getAttribute("src")),Kt(o.split("/").slice(0,-1).join("/"))}}return Gt.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},Xt={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <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"/>\n <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"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <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"/>\n <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"/>\n <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"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <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>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <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>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <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>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <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>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"x-circle-fill":'\n <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">\n <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>\n </svg>\n '},Yt=[Zt,{name:"system",resolver:t=>t in Xt?`data:image/svg+xml,${encodeURIComponent(Xt[t])}`:""}],Jt=[];function Qt(t){return Yt.find((e=>e.name===t))}function te(t,e){!function(t){Yt=Yt.filter((e=>e.name!==t))}(t),Yt.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),Jt.forEach((e=>{e.library===t&&e.setIcon()}))}function ee(t,e){const o=St({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:r}=e,n=Array.isArray(t)?t:[t];e.update=function(t){n.forEach((e=>{const r=e;if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,n))}})),r.call(this,t)}}}
45
+ function Rt(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var Tt=class extends rt{constructor(){super(),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,St({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i)return void customElements.define(t,class extends e{},o);let r=" (unknown version)",n=r;"version"in e&&e.version&&(r=" v"+e.version),"version"in i&&i.version&&(n=" v"+i.version),r&&n&&r===n||console.warn(`Attempted to register <${t}>${r}, but <${t}>${n} has already been registered.`)}};Tt.version="2.15.1",Tt.dependencies={},Pt([Mt()],Tt.prototype,"dir",2),Pt([Mt()],Tt.prototype,"lang",2);var Nt=class extends Tt{constructor(){super(...arguments),this.localize=new vt(this)}render(){return V`<svg part="base" class="spinner" role="progressbar" aria-label="${this.localize.term("loading")}"><circle class="spinner__track"></circle><circle class="spinner__indicator"></circle></svg>`}};Nt.styles=[yt,st];var Ut=new WeakMap,Dt=new WeakMap,Ft=new WeakMap,Vt=new WeakSet,jt=new WeakMap,Ht=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!r&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Ut.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),jt.set(this.host,[])},this.handleInteraction=t=>{const e=jt.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.checkValidity&&!e.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=St({form:t=>{const e=t.form;if(e){const o=t.getRootNode().querySelector(`#${e}`);if(o)return o}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>{var e;return null!=(e=t.disabled)&&e},reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),setValue:(t,e)=>t.value=e,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),jt.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),jt.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,Ut.has(this.form)?Ut.get(this.form).add(this.host):Ut.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),Dt.has(this.form)||(Dt.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Ft.has(this.form)||(Ft.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Ut.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),Dt.has(this.form)&&(this.form.reportValidity=Dt.get(this.form),Dt.delete(this.form)),Ft.has(this.form)&&(this.form.checkValidity=Ft.get(this.form),Ft.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Vt.add(t):Vt.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return null!=(t=this.form)?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=Boolean(Vt.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||null==t||t.preventDefault()}},It=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(zt(St({},It),{valid:!1,valueMissing:!0})),Object.freeze(zt(St({},It),{valid:!1,customError:!0}));var Wt=n`:host{display:inline-block;position:relative;width:auto;cursor:pointer}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--sl-input-border-width);font-family:var(--sl-input-font-family);font-weight:var(--sl-font-weight-semibold);text-decoration:none;user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--sl-transition-x-fast) background-color,var(--sl-transition-x-fast) color,var(--sl-transition-x-fast) border,var(--sl-transition-x-fast) box-shadow;cursor:inherit}.button::-moz-focus-inner{border:0}.button:focus{outline:0}.button:focus-visible{outline:var(--sl-focus-ring);outline-offset:var(--sl-focus-ring-offset)}.button--disabled{opacity:.5;cursor:not-allowed}.button--disabled *{pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center;pointer-events:none}.button__label{display:inline-block}.button__label::slotted(sl-icon){vertical-align:-2px}.button--standard.button--default{background-color:var(--sl-color-neutral-0);border-color:var(--sl-color-neutral-300);color:var(--sl-color-neutral-700)}.button--standard.button--default:hover:not(.button--disabled){background-color:var(--sl-color-primary-50);border-color:var(--sl-color-primary-300);color:var(--sl-color-primary-700)}.button--standard.button--default:active:not(.button--disabled){background-color:var(--sl-color-primary-100);border-color:var(--sl-color-primary-400);color:var(--sl-color-primary-700)}.button--standard.button--primary{background-color:var(--sl-color-primary-600);border-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--standard.button--primary:hover:not(.button--disabled){background-color:var(--sl-color-primary-500);border-color:var(--sl-color-primary-500);color:var(--sl-color-neutral-0)}.button--standard.button--primary:active:not(.button--disabled){background-color:var(--sl-color-primary-600);border-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--standard.button--success{background-color:var(--sl-color-success-600);border-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--standard.button--success:hover:not(.button--disabled){background-color:var(--sl-color-success-500);border-color:var(--sl-color-success-500);color:var(--sl-color-neutral-0)}.button--standard.button--success:active:not(.button--disabled){background-color:var(--sl-color-success-600);border-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--standard.button--neutral{background-color:var(--sl-color-neutral-600);border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--standard.button--neutral:hover:not(.button--disabled){background-color:var(--sl-color-neutral-500);border-color:var(--sl-color-neutral-500);color:var(--sl-color-neutral-0)}.button--standard.button--neutral:active:not(.button--disabled){background-color:var(--sl-color-neutral-600);border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--standard.button--warning{background-color:var(--sl-color-warning-600);border-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--standard.button--warning:hover:not(.button--disabled){background-color:var(--sl-color-warning-500);border-color:var(--sl-color-warning-500);color:var(--sl-color-neutral-0)}.button--standard.button--warning:active:not(.button--disabled){background-color:var(--sl-color-warning-600);border-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--standard.button--danger{background-color:var(--sl-color-danger-600);border-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--standard.button--danger:hover:not(.button--disabled){background-color:var(--sl-color-danger-500);border-color:var(--sl-color-danger-500);color:var(--sl-color-neutral-0)}.button--standard.button--danger:active:not(.button--disabled){background-color:var(--sl-color-danger-600);border-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--outline{background:0 0;border:solid 1px}.button--outline.button--default{border-color:var(--sl-color-neutral-300);color:var(--sl-color-neutral-700)}.button--outline.button--default.button--checked:not(.button--disabled),.button--outline.button--default:hover:not(.button--disabled){border-color:var(--sl-color-primary-600);background-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--outline.button--default:active:not(.button--disabled){border-color:var(--sl-color-primary-700);background-color:var(--sl-color-primary-700);color:var(--sl-color-neutral-0)}.button--outline.button--primary{border-color:var(--sl-color-primary-600);color:var(--sl-color-primary-600)}.button--outline.button--primary.button--checked:not(.button--disabled),.button--outline.button--primary:hover:not(.button--disabled){background-color:var(--sl-color-primary-600);color:var(--sl-color-neutral-0)}.button--outline.button--primary:active:not(.button--disabled){border-color:var(--sl-color-primary-700);background-color:var(--sl-color-primary-700);color:var(--sl-color-neutral-0)}.button--outline.button--success{border-color:var(--sl-color-success-600);color:var(--sl-color-success-600)}.button--outline.button--success.button--checked:not(.button--disabled),.button--outline.button--success:hover:not(.button--disabled){background-color:var(--sl-color-success-600);color:var(--sl-color-neutral-0)}.button--outline.button--success:active:not(.button--disabled){border-color:var(--sl-color-success-700);background-color:var(--sl-color-success-700);color:var(--sl-color-neutral-0)}.button--outline.button--neutral{border-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-600)}.button--outline.button--neutral.button--checked:not(.button--disabled),.button--outline.button--neutral:hover:not(.button--disabled){background-color:var(--sl-color-neutral-600);color:var(--sl-color-neutral-0)}.button--outline.button--neutral:active:not(.button--disabled){border-color:var(--sl-color-neutral-700);background-color:var(--sl-color-neutral-700);color:var(--sl-color-neutral-0)}.button--outline.button--warning{border-color:var(--sl-color-warning-600);color:var(--sl-color-warning-600)}.button--outline.button--warning.button--checked:not(.button--disabled),.button--outline.button--warning:hover:not(.button--disabled){background-color:var(--sl-color-warning-600);color:var(--sl-color-neutral-0)}.button--outline.button--warning:active:not(.button--disabled){border-color:var(--sl-color-warning-700);background-color:var(--sl-color-warning-700);color:var(--sl-color-neutral-0)}.button--outline.button--danger{border-color:var(--sl-color-danger-600);color:var(--sl-color-danger-600)}.button--outline.button--danger.button--checked:not(.button--disabled),.button--outline.button--danger:hover:not(.button--disabled){background-color:var(--sl-color-danger-600);color:var(--sl-color-neutral-0)}.button--outline.button--danger:active:not(.button--disabled){border-color:var(--sl-color-danger-700);background-color:var(--sl-color-danger-700);color:var(--sl-color-neutral-0)}@media (forced-colors:active){.button.button--outline.button--checked:not(.button--disabled){outline:solid 2px transparent}}.button--text{background-color:transparent;border-color:transparent;color:var(--sl-color-primary-600)}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-500)}.button--text:focus-visible:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-500)}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;color:var(--sl-color-primary-700)}.button--small{height:auto;min-height:var(--sl-input-height-small);font-size:var(--sl-button-font-size-small);line-height:calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-small)}.button--medium{height:auto;min-height:var(--sl-input-height-medium);font-size:var(--sl-button-font-size-medium);line-height:calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-medium)}.button--large{height:auto;min-height:var(--sl-input-height-large);font-size:var(--sl-button-font-size-large);line-height:calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);border-radius:var(--sl-input-border-radius-large)}.button--pill.button--small{border-radius:var(--sl-input-height-small)}.button--pill.button--medium{border-radius:var(--sl-input-height-medium)}.button--pill.button--large{border-radius:var(--sl-input-height-large)}.button--circle{padding-left:0;padding-right:0}.button--circle.button--small{width:var(--sl-input-height-small);border-radius:50%}.button--circle.button--medium{width:var(--sl-input-height-medium);border-radius:50%}.button--circle.button--large{width:var(--sl-input-height-large);border-radius:50%}.button--circle .button__caret,.button--circle .button__prefix,.button--circle .button__suffix{display:none}.button--caret .button__suffix{display:none}.button--caret .button__caret{height:auto}.button--loading{position:relative;cursor:wait}.button--loading .button__caret,.button--loading .button__label,.button--loading .button__prefix,.button--loading .button__suffix{visibility:hidden}.button--loading sl-spinner{--indicator-color:currentColor;position:absolute;font-size:1em;height:1em;width:1em;top:calc(50% - .5em);left:calc(50% - .5em)}.button ::slotted(sl-badge){position:absolute;top:0;right:0;translate:50% -50%;pointer-events:none}.button--rtl ::slotted(sl-badge){right:auto;left:0;translate:-50% -50%}.button--has-label.button--small .button__label{padding:0 var(--sl-spacing-small)}.button--has-label.button--medium .button__label{padding:0 var(--sl-spacing-medium)}.button--has-label.button--large .button__label{padding:0 var(--sl-spacing-large)}.button--has-prefix.button--small{padding-inline-start:var(--sl-spacing-x-small)}.button--has-prefix.button--small .button__label{padding-inline-start:var(--sl-spacing-x-small)}.button--has-prefix.button--medium{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--medium .button__label{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--large{padding-inline-start:var(--sl-spacing-small)}.button--has-prefix.button--large .button__label{padding-inline-start:var(--sl-spacing-small)}.button--caret.button--small,.button--has-suffix.button--small{padding-inline-end:var(--sl-spacing-x-small)}.button--caret.button--small .button__label,.button--has-suffix.button--small .button__label{padding-inline-end:var(--sl-spacing-x-small)}.button--caret.button--medium,.button--has-suffix.button--medium{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--medium .button__label,.button--has-suffix.button--medium .button__label{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--large,.button--has-suffix.button--large{padding-inline-end:var(--sl-spacing-small)}.button--caret.button--large .button__label,.button--has-suffix.button--large .button__label{padding-inline-end:var(--sl-spacing-small)}:host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button{border-start-end-radius:0;border-end-end-radius:0}:host([data-sl-button-group__button--inner]) .button{border-radius:0}:host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button{border-start-start-radius:0;border-end-start-radius:0}:host([data-sl-button-group__button]:not([data-sl-button-group__button--first])){margin-inline-start:calc(-1 * var(--sl-input-border-width))}:host([data-sl-button-group__button]:not([data-sl-button-group__button--first],[data-sl-button-group__button--radio],[variant=default]):not(:hover)) .button:after{content:'';position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px rgb(128 128 128 / 33%);mix-blend-mode:multiply}:host([data-sl-button-group__button--hover]){z-index:1}:host([data-sl-button-group__button--focus]),:host([data-sl-button-group__button][checked]){z-index:2}`,qt=n`:host{display:inline-block;width:1em;height:1em;box-sizing:content-box!important}svg{display:block;height:100%;width:100%}`,Gt="";function Kt(t){Gt=t}var Zt={name:"default",resolver:t=>function(t=""){if(!Gt){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)Kt(e.getAttribute("data-shoelace"));else{const e=t.find((t=>/shoelace(\.min)?\.js($|\?)/.test(t.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(t.src)));let o="";e&&(o=e.getAttribute("src")),Kt(o.split("/").slice(0,-1).join("/"))}}return Gt.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},Xt={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <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"/>\n <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"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <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"/>\n <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"/>\n <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"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <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>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <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>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <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>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <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>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <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"/>\n </svg>\n ',"x-circle-fill":'\n <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">\n <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>\n </svg>\n '},Yt=[Zt,{name:"system",resolver:t=>t in Xt?`data:image/svg+xml,${encodeURIComponent(Xt[t])}`:""}],Jt=[];function Qt(t){return Yt.find((e=>e.name===t))}function te(t,e){!function(t){Yt=Yt.filter((e=>e.name!==t))}(t),Yt.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),Jt.forEach((e=>{e.library===t&&e.setIcon()}))}function ee(t,e){const o=St({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:r}=e,n=Array.isArray(t)?t:[t];e.update=function(t){n.forEach((e=>{const r=e;if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,n))}})),r.call(this,t)}}}
46
46
  /**
47
47
  * @license
48
48
  * Copyright 2020 Google LLC
49
49
  * SPDX-License-Identifier: BSD-3-Clause
50
- */var oe,ie=Symbol(),re=Symbol(),ne=new Map,se=class extends Tt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet){this.svg=V`<svg part="svg"><use part="use" href="${t}"></use></svg>`,await this.updateComplete;const o=this.shadowRoot.querySelector("[part='svg']");return"function"==typeof e.mutator&&e.mutator(o),this.svg}try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?ie:re}catch(t){return re}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return ie;oe||(oe=new DOMParser);const r=oe.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return r?(r.part.add("svg"),document.adoptNode(r)):ie}catch(t){return ie}}connectedCallback(){var t;super.connectedCallback(),t=this,Jt.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,Jt=Jt.filter((e=>e!==t))}getIconSource(){const t=Qt(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&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 t;const{url:e,fromLibrary:o}=this.getIconSource(),i=o?Qt(this.library):void 0;if(!e)return void(this.svg=null);let r=ne.get(e);if(r||(r=this.resolveIcon(e,i),ne.set(e,r)),!this.initialRender)return;const n=await r;if(n===re&&ne.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0!==t?._$litType$)(n))this.svg=n;else switch(n){case re:case ie:this.svg=null,this.emit("sl-error");break;default:this.svg=n.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};se.styles=[yt,qt],Pt([Mt()],se.prototype,"svg",2),Pt([Bt({reflect:!0})],se.prototype,"name",2),Pt([Bt()],se.prototype,"src",2),Pt([Bt()],se.prototype,"label",2),Pt([Bt({reflect:!0})],se.prototype,"library",2),Pt([ee("label")],se.prototype,"handleLabelChange",1),Pt([ee(["name","src","library"])],se.prototype,"setIcon",1);var ae=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};
50
+ */var oe,ie=Symbol(),re=Symbol(),ne=new Map,se=class extends Tt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet){this.svg=V`<svg part="svg"><use part="use" href="${t}"></use></svg>`,await this.updateComplete;const o=this.shadowRoot.querySelector("[part='svg']");return"function"==typeof e.mutator&&e.mutator(o),this.svg}try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?ie:re}catch(t){return re}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return ie;oe||(oe=new DOMParser);const r=oe.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return r?(r.part.add("svg"),document.adoptNode(r)):ie}catch(t){return ie}}connectedCallback(){var t;super.connectedCallback(),t=this,Jt.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,Jt=Jt.filter((e=>e!==t))}getIconSource(){const t=Qt(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&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 t;const{url:e,fromLibrary:o}=this.getIconSource(),i=o?Qt(this.library):void 0;if(!e)return void(this.svg=null);let r=ne.get(e);if(r||(r=this.resolveIcon(e,i),ne.set(e,r)),!this.initialRender)return;const n=await r;if(n===re&&ne.delete(e),e===this.getIconSource().url)if(((t,e)=>void 0!==t?._$litType$)(n))this.svg=n;else switch(n){case re:case ie:this.svg=null,this.emit("sl-error");break;default:this.svg=n.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};se.styles=[yt,qt],Pt([Bt()],se.prototype,"svg",2),Pt([Mt({reflect:!0})],se.prototype,"name",2),Pt([Mt()],se.prototype,"src",2),Pt([Mt()],se.prototype,"label",2),Pt([Mt({reflect:!0})],se.prototype,"library",2),Pt([ee("label")],se.prototype,"handleLabelChange",1),Pt([ee(["name","src","library"])],se.prototype,"setIcon",1);var ae=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};
51
51
  /**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
@@ -89,7 +89,7 @@ function Rt(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Ref
89
89
  ${this.caret?fe` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
90
90
  ${this.loading?fe`<sl-spinner part="spinner"></sl-spinner>`:""}
91
91
  </${e}>
92
- `}};function ve(t){var e,o,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(o=ve(t[e]))&&(i&&(i+=" "),i+=o);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}me.styles=[yt,Wt],me.dependencies={"sl-icon":se,"sl-spinner":Nt},Pt([Rt(".button")],me.prototype,"button",2),Pt([Mt()],me.prototype,"hasFocus",2),Pt([Mt()],me.prototype,"invalid",2),Pt([Bt()],me.prototype,"title",2),Pt([Bt({reflect:!0})],me.prototype,"variant",2),Pt([Bt({reflect:!0})],me.prototype,"size",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"caret",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"disabled",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"loading",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"outline",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"pill",2),Pt([Bt({type:Boolean,reflect:!0})],me.prototype,"circle",2),Pt([Bt()],me.prototype,"type",2),Pt([Bt()],me.prototype,"name",2),Pt([Bt()],me.prototype,"value",2),Pt([Bt()],me.prototype,"href",2),Pt([Bt()],me.prototype,"target",2),Pt([Bt()],me.prototype,"rel",2),Pt([Bt()],me.prototype,"download",2),Pt([Bt()],me.prototype,"form",2),Pt([Bt({attribute:"formaction"})],me.prototype,"formAction",2),Pt([Bt({attribute:"formenctype"})],me.prototype,"formEnctype",2),Pt([Bt({attribute:"formmethod"})],me.prototype,"formMethod",2),Pt([Bt({attribute:"formnovalidate",type:Boolean})],me.prototype,"formNoValidate",2),Pt([Bt({attribute:"formtarget"})],me.prototype,"formTarget",2),Pt([ee("disabled",{waitUntilFirstUpdate:!0})],me.prototype,"handleDisabledChange",1),me.define("sl-button");const ye=t=>"boolean"==typeof t?"".concat(t):0===t?"0":t,we=function(){for(var t,e,o=0,i="";o<arguments.length;)(t=arguments[o++])&&(e=ve(t))&&(i&&(i+=" "),i+=e);return i};var xe=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};const _e=($e="bg-primary text-white py-3 px-6 rounded leading-[1.15]",ke={variants:{variant:{primary:"bg-primary border-2 border-primary text-white",secondary:"\n bg-white border-2 border-primary text-primary! hover:bg-lightGray\n focus:bg-transparent focus:border-primary\n "},disabled:{true:"opacity-50 cursor-not-allowed",false:""}}},t=>{var e;if(null==(null==ke?void 0:ke.variants))return we($e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:o,defaultVariants:i}=ke,r=Object.keys(o).map((e=>{const r=null==t?void 0:t[e],n=null==i?void 0:i[e];if(null===r)return null;const s=ye(r)||ye(n);return o[e][s]})),n=t&&Object.entries(t).reduce(((t,e)=>{let[o,i]=e;return void 0===i||(t[o]=i),t}),{}),s=null==ke||null===(e=ke.compoundVariants)||void 0===e?void 0:e.reduce(((t,e)=>{let{class:o,className:r,...s}=e;return Object.entries(s).every((t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...i,...n}[e]):{...i,...n}[e]===o}))?[...t,o,r]:t}),[]);return we($e,r,s,null==t?void 0:t.class,null==t?void 0:t.className)});var $e,ke;class Ae extends rt{constructor(){super(...arguments),this.name="hot-button",this.disabled=!1,this.variant="primary"}render(){return V`<sl-button class="${_e({variant:this.variant,disabled:this.disabled})}" ?disabled="${this.disabled}" @click="${t=>{this._handleClick(t)}}"><slot></slot></sl-button>`}_handleClick(t){t.stopPropagation(),this.dispatchEvent(new Event("click"))}}Ae.styles=[n`@unocss-placeholder;`],xe([Bt()],Ae.prototype,"name",void 0),xe([Bt({type:Boolean})],Ae.prototype,"disabled",void 0),xe([Bt({type:String})],Ae.prototype,"variant",void 0),customElements.define("hot-button",Ae);var Ce=n`:host{display:inline-block;color:var(--sl-color-neutral-600)}.icon-button{flex:0 0 auto;display:flex;align-items:center;background:0 0;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:focus-visible:not(.icon-button--disabled),.icon-button:hover: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:0}.icon-button--disabled{opacity:.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}`,Ee=class extends Tt{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(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?pe`a`:pe`button`;return fe`
92
+ `}};function ve(t){var e,o,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(o=ve(t[e]))&&(i&&(i+=" "),i+=o);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}me.styles=[yt,Wt],me.dependencies={"sl-icon":se,"sl-spinner":Nt},Pt([Rt(".button")],me.prototype,"button",2),Pt([Bt()],me.prototype,"hasFocus",2),Pt([Bt()],me.prototype,"invalid",2),Pt([Mt()],me.prototype,"title",2),Pt([Mt({reflect:!0})],me.prototype,"variant",2),Pt([Mt({reflect:!0})],me.prototype,"size",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"caret",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"disabled",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"loading",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"outline",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"pill",2),Pt([Mt({type:Boolean,reflect:!0})],me.prototype,"circle",2),Pt([Mt()],me.prototype,"type",2),Pt([Mt()],me.prototype,"name",2),Pt([Mt()],me.prototype,"value",2),Pt([Mt()],me.prototype,"href",2),Pt([Mt()],me.prototype,"target",2),Pt([Mt()],me.prototype,"rel",2),Pt([Mt()],me.prototype,"download",2),Pt([Mt()],me.prototype,"form",2),Pt([Mt({attribute:"formaction"})],me.prototype,"formAction",2),Pt([Mt({attribute:"formenctype"})],me.prototype,"formEnctype",2),Pt([Mt({attribute:"formmethod"})],me.prototype,"formMethod",2),Pt([Mt({attribute:"formnovalidate",type:Boolean})],me.prototype,"formNoValidate",2),Pt([Mt({attribute:"formtarget"})],me.prototype,"formTarget",2),Pt([ee("disabled",{waitUntilFirstUpdate:!0})],me.prototype,"handleDisabledChange",1),me.define("sl-button");const ye=t=>"boolean"==typeof t?"".concat(t):0===t?"0":t,we=function(){for(var t,e,o=0,i="";o<arguments.length;)(t=arguments[o++])&&(e=ve(t))&&(i&&(i+=" "),i+=e);return i};var xe=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};const _e=($e="bg-primary text-white py-3 px-6 rounded leading-[1.15]",ke={variants:{variant:{primary:"bg-primary border-2 border-primary text-white",secondary:"\n bg-white border-2 border-primary text-primary! hover:bg-lightGray\n focus:bg-transparent focus:border-primary\n "},disabled:{true:"opacity-50 cursor-not-allowed",false:""}}},t=>{var e;if(null==(null==ke?void 0:ke.variants))return we($e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:o,defaultVariants:i}=ke,r=Object.keys(o).map((e=>{const r=null==t?void 0:t[e],n=null==i?void 0:i[e];if(null===r)return null;const s=ye(r)||ye(n);return o[e][s]})),n=t&&Object.entries(t).reduce(((t,e)=>{let[o,i]=e;return void 0===i||(t[o]=i),t}),{}),s=null==ke||null===(e=ke.compoundVariants)||void 0===e?void 0:e.reduce(((t,e)=>{let{class:o,className:r,...s}=e;return Object.entries(s).every((t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...i,...n}[e]):{...i,...n}[e]===o}))?[...t,o,r]:t}),[]);return we($e,r,s,null==t?void 0:t.class,null==t?void 0:t.className)});var $e,ke;class Ae extends rt{constructor(){super(...arguments),this.name="hot-button",this.disabled=!1,this.variant="primary"}render(){return V`<sl-button class="${_e({variant:this.variant,disabled:this.disabled})}" ?disabled="${this.disabled}" @click="${t=>{this._handleClick(t)}}"><slot></slot></sl-button>`}_handleClick(t){t.stopPropagation(),this.dispatchEvent(new Event("click"))}}Ae.styles=[n`@unocss-placeholder;`],xe([Mt()],Ae.prototype,"name",void 0),xe([Mt({type:Boolean})],Ae.prototype,"disabled",void 0),xe([Mt({type:String})],Ae.prototype,"variant",void 0),customElements.define("hot-button",Ae);var Ce=n`:host{display:inline-block;color:var(--sl-color-neutral-600)}.icon-button{flex:0 0 auto;display:flex;align-items:center;background:0 0;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:focus-visible:not(.icon-button--disabled),.icon-button:hover: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:0}.icon-button--disabled{opacity:.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}`,Ee=class extends Tt{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(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?pe`a`:pe`button`;return fe`
93
93
  <${e}
94
94
  part="base"
95
95
  class=${he({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})}
@@ -115,7 +115,7 @@ function Rt(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Ref
115
115
  aria-hidden="true"
116
116
  ></sl-icon>
117
117
  </${e}>
118
- `}};Ee.styles=[yt,Ce],Ee.dependencies={"sl-icon":se},Pt([Rt(".icon-button")],Ee.prototype,"button",2),Pt([Mt()],Ee.prototype,"hasFocus",2),Pt([Bt()],Ee.prototype,"name",2),Pt([Bt()],Ee.prototype,"library",2),Pt([Bt()],Ee.prototype,"src",2),Pt([Bt()],Ee.prototype,"href",2),Pt([Bt()],Ee.prototype,"target",2),Pt([Bt()],Ee.prototype,"download",2),Pt([Bt()],Ee.prototype,"label",2),Pt([Bt({type:Boolean,reflect:!0})],Ee.prototype,"disabled",2),Ee.define("sl-icon-button");var Se=n`:host{--padding:0;display:none}:host([active]){display:block}.tab-panel{display:block;padding:var(--padding)}`,ze=0,Pe=class extends Tt{constructor(){super(...arguments),this.attrId=++ze,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 V`<slot part="base" class="${he({"tab-panel":!0,"tab-panel--active":this.active})}"></slot>`}};Pe.styles=[yt,Se],Pt([Bt({reflect:!0})],Pe.prototype,"name",2),Pt([Bt({type:Boolean,reflect:!0})],Pe.prototype,"active",2),Pt([ee("active")],Pe.prototype,"handleActiveChange",1),Pe.define("sl-tab-panel");var Oe=n`: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)}.tab:focus{outline:0}.tab:focus-visible:not(.tab--disabled){color:var(--sl-color-primary-600)}.tab: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:.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}}`,Le=0,Be=class extends Tt{constructor(){super(...arguments),this.localize=new vt(this),this.attrId=++Le,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(t){t.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,V`<div part="base" class="${he({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})}" tabindex="${this.disabled?"-1":"0"}"><slot></slot>${this.closable?V`<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>`}};Be.styles=[yt,Oe],Be.dependencies={"sl-icon-button":Ee},Pt([Rt(".tab")],Be.prototype,"tab",2),Pt([Bt({reflect:!0})],Be.prototype,"panel",2),Pt([Bt({type:Boolean,reflect:!0})],Be.prototype,"active",2),Pt([Bt({type:Boolean})],Be.prototype,"closable",2),Pt([Bt({type:Boolean,reflect:!0})],Be.prototype,"disabled",2),Pt([ee("active")],Be.prototype,"handleActiveChange",1),Pt([ee("disabled")],Be.prototype,"handleDisabledChange",1),Be.define("sl-tab");const Me={list:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',"info-circle":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">\n <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>\n <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>\n </svg>\n ',"arrow-counterclockwise":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"/>\n <path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"/>\n </svg>\n ',"arrow-clockwise":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"/>\n <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"/>\n </svg>\n ',"type-bold":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-bold" viewBox="0 0 16 16">\n <path d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13H8.21zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z"/>\n </svg>\n ',"type-italic":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-italic" viewBox="0 0 16 16">\n <path d="M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z"/>\n </svg>\n ',"type-underline":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-underline" viewBox="0 0 16 16">\n <path d="M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57-1.709 0-2.687-1.08-2.687-2.57V3.136zM12.5 15h-9v-1h9v1z"/>\n </svg>\n ',"justify-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',justify:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',"justify-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n '},Re=t=>t in Me?`data:image/svg+xml,${encodeURIComponent(Me[t])}`:"";function Te(){te("bundled",{resolver:Re})}var Ne=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();const Ue=new URL(new URL("assets/logo-CqlPtOQW.png",import.meta.url).href,import.meta.url);class De extends rt{constructor(){super(...arguments),this.name="hot-header",this.title="",this.logo=Ue,this.drawer=!0}render(){const t="string"==typeof this.logo||this.logo instanceof URL?"string"==typeof this.logo?this.logo:this.logo.href:"";return V`<header>${t.length>0?V`<div id="logo-block"><img id="logo" src="${this.logo}" alt="Logo"></div>`:null} ${this.title.length>0?V`<h1>${this.title}</h1>`:null}<sl-tab-group><sl-tab slot="nav" panel="projects">Explore Projects</sl-tab><sl-tab slot="nav" panel="organisations">Manage Organizations</sl-tab></sl-tab-group>${this.drawer?V`<div id="drawer-block" style="font-size:32px"><sl-icon-button library="bundled" name="list" label="drawer-open"></sl-icon-button></div>`:null}</header>`}}De.styles=[n`@unocss-placeholder;`,n`header{display:flex;justify-content:space-between;align-items:center;background:var(--app-color-primary);color:#fff;padding:12px;padding-top:4px;position:fixed;left:0;top:0;height:50px;width:100%;-webkit-app-region:drag}header h1{margin-top:0;margin-bottom:0;font-size:12px;font-weight:700}nav a{margin-left:10px}#logo-block{height:40px;max-width:50%;display:flex;justify-content:space-between;align-items:center;gap:8px}#logo{height:100%;width:100%}#drawer-block{display:flex;justify-content:space-between;align-items:right;gap:8px;padding-right:30px}@media(prefers-color-scheme:light){header{color:#000}nav a{color:initial}}`],Ne([Bt()],De.prototype,"name",void 0),Ne([Bt({type:String})],De.prototype,"title",void 0),Ne([Bt({type:String})],De.prototype,"logo",void 0),Ne([Bt({type:Boolean})],De.prototype,"drawer",void 0),customElements.define("hot-header",De);var Fe=n`:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`,Ve=class extends Tt{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--focus",!0)}handleBlur(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--focus",!1)}handleMouseOver(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--hover",!0)}handleMouseOut(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--hover",!1)}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),i=je(e);i&&(i.toggleAttribute("data-sl-button-group__button",!0),i.toggleAttribute("data-sl-button-group__button--first",0===o),i.toggleAttribute("data-sl-button-group__button--inner",o>0&&o<t.length-1),i.toggleAttribute("data-sl-button-group__button--last",o===t.length-1),i.toggleAttribute("data-sl-button-group__button--radio","sl-radio-button"===i.tagName.toLowerCase()))}))}render(){return V`<div part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}"><slot @slotchange="${this.handleSlotChange}"></slot></div>`}};function je(t){var e;const o="sl-button, sl-radio-button";return null!=(e=t.closest(o))?e:t.querySelector(o)}Ve.styles=[yt,Fe],Pt([Rt("slot")],Ve.prototype,"defaultSlot",2),Pt([Mt()],Ve.prototype,"disableRole",2),Pt([Bt()],Ve.prototype,"label",2),Ve.define("sl-button-group"),se.define("sl-icon");var He=n`: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}`,Ie=n`:host{--arrow-color:var(--sl-color-neutral-1000);--arrow-size:6px;--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}.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 We=Math.min,qe=Math.max,Ge=Math.round,Ke=Math.floor,Ze=t=>({x:t,y:t}),Xe={left:"right",right:"left",bottom:"top",top:"bottom"},Ye={start:"end",end:"start"};function Je(t,e,o){return qe(t,We(e,o))}function Qe(t,e){return"function"==typeof t?t(e):t}function to(t){return t.split("-")[0]}function eo(t){return t.split("-")[1]}function oo(t){return"x"===t?"y":"x"}function io(t){return"y"===t?"height":"width"}function ro(t){return["top","bottom"].includes(to(t))?"y":"x"}function no(t){return oo(ro(t))}function so(t){return t.replace(/start|end/g,(t=>Ye[t]))}function ao(t){return t.replace(/left|right|bottom|top/g,(t=>Xe[t]))}function lo(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function co(t){const{x:e,y:o,width:i,height:r}=t;return{width:i,height:r,top:o,left:e,right:e+i,bottom:o+r,x:e,y:o}}function ho(t,e,o){let{reference:i,floating:r}=t;const n=ro(e),s=no(e),a=io(s),l=to(e),c="y"===n,h=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,u=i[a]/2-r[a]/2;let p;switch(l){case"top":p={x:h,y:i.y-r.height};break;case"bottom":p={x:h,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(eo(e)){case"start":p[s]-=u*(o&&c?-1:1);break;case"end":p[s]+=u*(o&&c?-1:1)}return p}async function uo(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=Qe(e,t),b=lo(p),f=a[u?"floating"===d?"reference":"floating":d],g=co(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(f)))||o?f:f.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),y=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},w=co(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+b.top)/y.y,bottom:(w.bottom-g.bottom+b.bottom)/y.y,left:(g.left-w.left+b.left)/y.x,right:(w.right-g.right+b.right)/y.x}}function po(t){return go(t)?(t.nodeName||"").toLowerCase():"#document"}function bo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function fo(t){var e;return null==(e=(go(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function go(t){return t instanceof Node||t instanceof bo(t).Node}function mo(t){return t instanceof Element||t instanceof bo(t).Element}function vo(t){return t instanceof HTMLElement||t instanceof bo(t).HTMLElement}function yo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof bo(t).ShadowRoot)}function wo(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=Ao(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function xo(t){return["table","td","th"].includes(po(t))}function _o(t){const e=$o(),o=Ao(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function $o(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ko(t){return["html","body","#document"].includes(po(t))}function Ao(t){return bo(t).getComputedStyle(t)}function Co(t){return mo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Eo(t){if("html"===po(t))return t;const e=t.assignedSlot||t.parentNode||yo(t)&&t.host||fo(t);return yo(e)?e.host:e}function So(t){const e=Eo(t);return ko(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&wo(e)?e:So(e)}function zo(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=So(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=bo(r);return n?e.concat(s,s.visualViewport||[],wo(r)?r:[],s.frameElement&&o?zo(s.frameElement):[]):e.concat(r,zo(r,[],o))}function Po(t){const e=Ao(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=vo(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=Ge(o)!==n||Ge(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function Oo(t){return mo(t)?t:t.contextElement}function Lo(t){const e=Oo(t);if(!vo(e))return Ze(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=Po(e);let s=(n?Ge(o.width):o.width)/i,a=(n?Ge(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Bo=Ze(0);function Mo(t){const e=bo(t);return $o()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Bo}function Ro(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Oo(t);let s=Ze(1);e&&(i?mo(i)&&(s=Lo(i)):s=Lo(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==bo(t))&&e}(n,o,i)?Mo(n):Ze(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,h=r.width/s.x,d=r.height/s.y;if(n){const t=bo(n),e=i&&mo(i)?bo(i):i;let o=t,r=o.frameElement;for(;r&&i&&e!==o;){const t=Lo(r),e=r.getBoundingClientRect(),i=Ao(r),n=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=n,c+=s,o=bo(r),r=o.frameElement}}return co({width:h,height:d,x:l,y:c})}const To=[":popover-open",":modal"];function No(t){return To.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Uo(t){return Ro(fo(t)).left+Co(t).scrollLeft}function Do(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=bo(t),i=fo(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=$o();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=fo(t),o=Co(t),i=t.ownerDocument.body,r=qe(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=qe(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Uo(t);const a=-o.scrollTop;return"rtl"===Ao(i).direction&&(s+=qe(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}(fo(t));else if(mo(e))i=function(t,e){const o=Ro(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=vo(t)?Lo(t):Ze(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=Mo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return co(i)}function Fo(t,e){const o=Eo(t);return!(o===e||!mo(o)||ko(o))&&("fixed"===Ao(o).position||Fo(o,e))}function Vo(t,e,o){const i=vo(e),r=fo(e),n="fixed"===o,s=Ro(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=Ze(0);if(i||!i&&!n)if(("body"!==po(e)||wo(r))&&(a=Co(e)),i){const t=Ro(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Uo(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function jo(t){return"static"===Ao(t).position}function Ho(t,e){return vo(t)&&"fixed"!==Ao(t).position?e?e(t):t.offsetParent:null}function Io(t,e){const o=bo(t);if(No(t))return o;if(!vo(t)){let e=Eo(t);for(;e&&!ko(e);){if(mo(e)&&!jo(e))return e;e=Eo(e)}return o}let i=Ho(t,e);for(;i&&xo(i)&&jo(i);)i=Ho(i,e);return i&&ko(i)&&jo(i)&&!_o(i)?o:i||function(t){let e=Eo(t);for(;vo(e)&&!ko(e);){if(_o(e))return e;e=Eo(e)}return null}(t)||o}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:i,strategy:r}=t;const n="fixed"===r,s=fo(i),a=!!e&&No(e.floating);if(i===s||a&&n)return o;let l={scrollLeft:0,scrollTop:0},c=Ze(1);const h=Ze(0),d=vo(i);if((d||!d&&!n)&&(("body"!==po(i)||wo(s))&&(l=Co(i)),vo(i))){const t=Ro(i);c=Lo(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x,y:o.y*c.y-l.scrollTop*c.y+h.y}},getDocumentElement:fo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?No(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=zo(t,[],!1).filter((t=>mo(t)&&"body"!==po(t))),r=null;const n="fixed"===Ao(t).position;let s=n?Eo(t):t;for(;mo(s)&&!ko(s);){const e=Ao(s),o=_o(s);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||wo(s)&&!o&&Fo(t,s))?i=i.filter((t=>t!==s)):r=e,s=Eo(s)}return e.set(t,i),i}(e,this._c):[].concat(o),i],s=n[0],a=n.reduce(((t,o)=>{const i=Do(e,o,r);return t.top=qe(i.top,t.top),t.right=We(i.right,t.right),t.bottom=We(i.bottom,t.bottom),t.left=qe(i.left,t.left),t}),Do(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Io,getElementRects:async function(t){const e=this.getOffsetParent||Io,o=this.getDimensions,i=await o(t.floating);return{reference:Vo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Po(t);return{width:e,height:o}},getScale:Lo,isElement:mo,isRTL:function(t){return"rtl"===Ao(t).direction}};function qo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oo(t),h=r||n?[...c?zo(c):[],...zo(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),n&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const r=fo(t);function n(){var t;clearTimeout(o),null==(t=i)||t.disconnect(),i=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:h,width:d,height:u}=t.getBoundingClientRect();if(a||e(),!d||!u)return;const p={rootMargin:-Ke(h)+"px "+-Ke(r.clientWidth-(c+d))+"px "+-Ke(r.clientHeight-(h+u))+"px "+-Ke(c)+"px",threshold:qe(0,We(1,l))||1};let b=!0;function f(t){const e=t[0].intersectionRatio;if(e!==l){if(!b)return s();e?s(!1,e):o=setTimeout((()=>{s(!1,1e-7)}),1e3)}b=!1}try{i=new IntersectionObserver(f,{...p,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(f,p)}i.observe(t)}(!0),n}(c,o):null;let u,p=-1,b=null;s&&(b=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),o()})),c&&!l&&b.observe(c),b.observe(e));let f=l?Ro(t):null;return l&&function e(){const i=Ro(t);!f||i.x===f.x&&i.y===f.y&&i.width===f.width&&i.height===f.height||o();f=i,u=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{r&&t.removeEventListener("scroll",o),n&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=b)||t.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const Go=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:r,y:n,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:r}=t,n=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=to(o),a=eo(o),l="y"===ro(o),c=["left","top"].includes(s)?-1:1,h=n&&l?-1:1,d=Qe(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof b&&(p="end"===a?-1*b:b),l?{x:p*h,y:u*c}:{x:u*c,y:p*h}}(e,t);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:n+l.y,data:{...l,placement:s}}}}},Ko=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=Qe(t,e),c={x:o,y:i},h=await uo(e,l),d=ro(to(r)),u=oo(d);let p=c[u],b=c[d];if(n){const t="y"===u?"bottom":"right";p=Je(p+h["y"===u?"top":"left"],p,p-h[t])}if(s){const t="y"===d?"bottom":"right";b=Je(b+h["y"===d?"top":"left"],b,b-h[t])}const f=a.fn({...e,[u]:p,[d]:b});return{...f,data:{x:f.x-o,y:f.y-i}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:r,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:f=!0,...g}=Qe(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const m=to(r),v=to(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(v||!f?[ao(a)]:function(t){const e=ao(t);return[so(t),e,so(e)]}(a));u||"none"===b||w.push(...function(t,e,o,i){const r=eo(t);let n=function(t,e,o){const i=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?n:s;default:return[]}}(to(t),"start"===o,i);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(so)))),n}(a,f,b,y));const x=[a,...w],_=await uo(e,g),$=[];let k=(null==(i=n.flip)?void 0:i.overflows)||[];if(h&&$.push(_[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=eo(t),r=no(t),n=io(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=ao(s)),[s,ao(s)]}(r,s,y);$.push(_[t[0]],_[t[1]])}if(k=[...k,{placement:r,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=n.flip)?void 0:A.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(r!==o)return{reset:{placement:o}}}return{}}}},Xo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:r,elements:n}=e,{apply:s=(()=>{}),...a}=Qe(t,e),l=await uo(e,a),c=to(o),h=eo(o),d="y"===ro(o),{width:u,height:p}=i.floating;let b,f;"top"===c||"bottom"===c?(b=c,f=h===(await(null==r.isRTL?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"):(f=c,b="end"===h?"top":"bottom");const g=p-l.top-l.bottom,m=u-l.left-l.right,v=We(p-l[b],g),y=We(u-l[f],m),w=!e.middlewareData.shift;let x=v,_=y;if(d?_=h||w?We(y,m):m:x=h||w?We(v,g):g,w&&!h){const t=qe(l.left,0),e=qe(l.right,0),o=qe(l.top,0),i=qe(l.bottom,0);d?_=u-2*(0!==t||0!==e?t+e:qe(l.left,l.right)):x=p-2*(0!==o||0!==i?o+i:qe(l.top,l.bottom))}await s({...e,availableWidth:_,availableHeight:x});const $=await r.getDimensions(n.floating);return u!==$.width||p!==$.height?{reset:{rects:!0}}:{}}}},Yo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:n,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=Qe(t,e)||{};if(null==c)return{};const d=lo(h),u={x:o,y:i},p=no(r),b=io(p),f=await s.getDimensions(c),g="y"===p,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=n.reference[b]+n.reference[p]-u[p]-n.floating[b],x=u[p]-n.reference[p],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let $=_?_[y]:0;$&&await(null==s.isElement?void 0:s.isElement(_))||($=a.floating[y]||n.floating[b]);const k=w/2-x/2,A=$/2-f[b]/2-1,C=We(d[m],A),E=We(d[v],A),S=C,z=$-f[b]-E,P=$/2-f[b]/2+k,O=Je(S,P,z),L=!l.arrow&&null!=eo(r)&&P!==O&&n.reference[b]/2-(P<S?C:E)-f[b]/2<0,B=L?P<S?P-S:P-z:0;return{[p]:u[p]+B,data:{[p]:O,centerOffset:P-O-B,...L&&{alignmentOffset:B}},reset:L}}}),Jo=(t,e,o)=>{const i=new Map,r={platform:Wo,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:d}=ho(c,i,l),u=i,p={},b=0;for(let o=0;o<a.length;o++){const{name:n,fn:f}=a[o],{x:g,y:m,data:v,reset:y}=await f({x:h,y:d,initialPlacement:i,placement:u,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,d=null!=m?m:d,p={...p,[n]:{...p[n],...v}},y&&b<=50&&(b++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:h,y:d}=ho(c,u,l))),o=-1)}return{x:h,y:d,placement:u,strategy:r,middlewareData:p}})(t,e,{...r,platform:n})};function Qo(t){return function(t){for(let e=t;e;e=ti(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=ti(t);e;e=ti(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function ti(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var ei=class extends Tt{constructor(){super(...arguments),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 t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,r=0,n=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(o=t.left,i=t.bottom,r=t.right,n=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):(o=e.left,i=e.bottom,r=e.right,n=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(o=t.right,i=t.top,r=e.left,n=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom):(o=e.right,i=e.top,r=t.left,n=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${i}px`),this.style.setProperty("--hover-bridge-top-right-x",`${r}px`),this.style.setProperty("--hover-bridge-top-right-y",`${n}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t instanceof Element)}(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.start()}start(){this.anchorEl&&(this.cleanup=qo(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{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((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Go({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xo({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,o="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=o?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Zo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Ko({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xo({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Yo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Wo.getOffsetParent(t,Qo):Wo.getOffsetParent;Jo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:zt(St({},Wo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const r="rtl"===getComputedStyle(this).direction,n={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",s="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=r?o:"",l=r?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=r?"":o,l=r?o:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:s,bottom:a,left:l,[n]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return V`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><span part="hover-bridge" class="${he({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}"></span><div part="popup" class="${he({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow})}"><slot></slot>${this.arrow?V`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}</div>`}};ei.styles=[yt,Ie],Pt([Rt(".popup")],ei.prototype,"popup",2),Pt([Rt(".popup__arrow")],ei.prototype,"arrowEl",2),Pt([Bt()],ei.prototype,"anchor",2),Pt([Bt({type:Boolean,reflect:!0})],ei.prototype,"active",2),Pt([Bt({reflect:!0})],ei.prototype,"placement",2),Pt([Bt({reflect:!0})],ei.prototype,"strategy",2),Pt([Bt({type:Number})],ei.prototype,"distance",2),Pt([Bt({type:Number})],ei.prototype,"skidding",2),Pt([Bt({type:Boolean})],ei.prototype,"arrow",2),Pt([Bt({attribute:"arrow-placement"})],ei.prototype,"arrowPlacement",2),Pt([Bt({attribute:"arrow-padding",type:Number})],ei.prototype,"arrowPadding",2),Pt([Bt({type:Boolean})],ei.prototype,"flip",2),Pt([Bt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],ei.prototype,"flipFallbackPlacements",2),Pt([Bt({attribute:"flip-fallback-strategy"})],ei.prototype,"flipFallbackStrategy",2),Pt([Bt({type:Object})],ei.prototype,"flipBoundary",2),Pt([Bt({attribute:"flip-padding",type:Number})],ei.prototype,"flipPadding",2),Pt([Bt({type:Boolean})],ei.prototype,"shift",2),Pt([Bt({type:Object})],ei.prototype,"shiftBoundary",2),Pt([Bt({attribute:"shift-padding",type:Number})],ei.prototype,"shiftPadding",2),Pt([Bt({attribute:"auto-size"})],ei.prototype,"autoSize",2),Pt([Bt()],ei.prototype,"sync",2),Pt([Bt({type:Object})],ei.prototype,"autoSizeBoundary",2),Pt([Bt({attribute:"auto-size-padding",type:Number})],ei.prototype,"autoSizePadding",2),Pt([Bt({attribute:"hover-bridge",type:Boolean})],ei.prototype,"hoverBridge",2);var oi=new Map,ii=new WeakMap;function ri(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function ni(t,e){oi.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function si(t,e,o){const i=ii.get(t);if(null==i?void 0:i[e])return ri(i[e],o.dir);const r=oi.get(e);return r?ri(r,o.dir):{keyframes:[],options:{duration:0}}}function ai(t,e){return new Promise((o=>{t.addEventListener(e,(function i(r){r.target===t&&(t.removeEventListener(e,i),o())}))}))}function li(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=t.animate(e,zt(St({},o),{duration:hi()?0:o.duration}));r.addEventListener("cancel",i,{once:!0}),r.addEventListener("finish",i,{once:!0})}))}function ci(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function hi(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function di(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}var ui=class extends Tt{constructor(){super(),this.localize=new vt(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=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=ci(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=ci(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}},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 t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await di(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=si(this,"tooltip.show",{dir:this.localize.dir()});await li(this.popup.popup,e,o),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await di(this.body);const{keyframes:t,options:o}=si(this,"tooltip.hide",{dir:this.localize.dir()});await li(this.popup.popup,t,o),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()}async show(){if(!this.open)return this.open=!0,ai(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ai(this,"sl-after-hide")}render(){return V`<sl-popup part="base" exportparts="
118
+ `}};Ee.styles=[yt,Ce],Ee.dependencies={"sl-icon":se},Pt([Rt(".icon-button")],Ee.prototype,"button",2),Pt([Bt()],Ee.prototype,"hasFocus",2),Pt([Mt()],Ee.prototype,"name",2),Pt([Mt()],Ee.prototype,"library",2),Pt([Mt()],Ee.prototype,"src",2),Pt([Mt()],Ee.prototype,"href",2),Pt([Mt()],Ee.prototype,"target",2),Pt([Mt()],Ee.prototype,"download",2),Pt([Mt()],Ee.prototype,"label",2),Pt([Mt({type:Boolean,reflect:!0})],Ee.prototype,"disabled",2),Ee.define("sl-icon-button");var Se=n`:host{--padding:0;display:none}:host([active]){display:block}.tab-panel{display:block;padding:var(--padding)}`,ze=0,Pe=class extends Tt{constructor(){super(...arguments),this.attrId=++ze,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 V`<slot part="base" class="${he({"tab-panel":!0,"tab-panel--active":this.active})}"></slot>`}};Pe.styles=[yt,Se],Pt([Mt({reflect:!0})],Pe.prototype,"name",2),Pt([Mt({type:Boolean,reflect:!0})],Pe.prototype,"active",2),Pt([ee("active")],Pe.prototype,"handleActiveChange",1),Pe.define("sl-tab-panel");var Oe=n`: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)}.tab:focus{outline:0}.tab:focus-visible:not(.tab--disabled){color:var(--sl-color-primary-600)}.tab: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:.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}}`,Le=0,Me=class extends Tt{constructor(){super(...arguments),this.localize=new vt(this),this.attrId=++Le,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(t){t.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,V`<div part="base" class="${he({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})}" tabindex="${this.disabled?"-1":"0"}"><slot></slot>${this.closable?V`<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>`}};Me.styles=[yt,Oe],Me.dependencies={"sl-icon-button":Ee},Pt([Rt(".tab")],Me.prototype,"tab",2),Pt([Mt({reflect:!0})],Me.prototype,"panel",2),Pt([Mt({type:Boolean,reflect:!0})],Me.prototype,"active",2),Pt([Mt({type:Boolean})],Me.prototype,"closable",2),Pt([Mt({type:Boolean,reflect:!0})],Me.prototype,"disabled",2),Pt([ee("active")],Me.prototype,"handleActiveChange",1),Pt([ee("disabled")],Me.prototype,"handleDisabledChange",1),Me.define("sl-tab");const Be={list:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',"info-circle":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">\n <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>\n <path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>\n </svg>\n ',"arrow-counterclockwise":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"/>\n <path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"/>\n </svg>\n ',"arrow-clockwise":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"/>\n <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"/>\n </svg>\n ',"type-bold":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-bold" viewBox="0 0 16 16">\n <path d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13H8.21zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z"/>\n </svg>\n ',"type-italic":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-italic" viewBox="0 0 16 16">\n <path d="M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z"/>\n </svg>\n ',"type-underline":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-type-underline" viewBox="0 0 16 16">\n <path d="M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57-1.709 0-2.687-1.08-2.687-2.57V3.136zM12.5 15h-9v-1h9v1z"/>\n </svg>\n ',"justify-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',justify:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n ',"justify-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-justify-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/>\n </svg>\n '},Re=t=>t in Be?`data:image/svg+xml,${encodeURIComponent(Be[t])}`:"";function Te(){te("bundled",{resolver:Re})}var Ne=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();const Ue=new URL(new URL("assets/logo-CqlPtOQW.png",import.meta.url).href,import.meta.url);class De extends rt{constructor(){super(...arguments),this.name="hot-header",this.title="",this.logo=Ue,this.drawer=!0}render(){const t="string"==typeof this.logo||this.logo instanceof URL?"string"==typeof this.logo?this.logo:this.logo.href:"";return V`<header>${t.length>0?V`<div id="logo-block"><img id="logo" src="${this.logo}" alt="Logo"></div>`:null} ${this.title.length>0?V`<h1>${this.title}</h1>`:null}<sl-tab-group><sl-tab slot="nav" panel="projects">Explore Projects</sl-tab><sl-tab slot="nav" panel="organisations">Manage Organizations</sl-tab></sl-tab-group>${this.drawer?V`<div id="drawer-block" style="font-size:32px"><sl-icon-button library="bundled" name="list" label="drawer-open"></sl-icon-button></div>`:null}</header>`}}De.styles=[n`@unocss-placeholder;`,n`header{display:flex;justify-content:space-between;align-items:center;background:var(--app-color-primary);color:#fff;padding:12px;padding-top:4px;position:fixed;left:0;top:0;height:50px;width:100%;-webkit-app-region:drag}header h1{margin-top:0;margin-bottom:0;font-size:12px;font-weight:700}nav a{margin-left:10px}#logo-block{height:40px;max-width:50%;display:flex;justify-content:space-between;align-items:center;gap:8px}#logo{height:100%;width:100%}#drawer-block{display:flex;justify-content:space-between;align-items:right;gap:8px;padding-right:30px}@media(prefers-color-scheme:light){header{color:#000}nav a{color:initial}}`],Ne([Mt()],De.prototype,"name",void 0),Ne([Mt({type:String})],De.prototype,"title",void 0),Ne([Mt({type:String})],De.prototype,"logo",void 0),Ne([Mt({type:Boolean})],De.prototype,"drawer",void 0),customElements.define("hot-header",De);var Fe=n`:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`,Ve=class extends Tt{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--focus",!0)}handleBlur(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--focus",!1)}handleMouseOver(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--hover",!0)}handleMouseOut(t){const e=je(t.target);null==e||e.toggleAttribute("data-sl-button-group__button--hover",!1)}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const o=t.indexOf(e),i=je(e);i&&(i.toggleAttribute("data-sl-button-group__button",!0),i.toggleAttribute("data-sl-button-group__button--first",0===o),i.toggleAttribute("data-sl-button-group__button--inner",o>0&&o<t.length-1),i.toggleAttribute("data-sl-button-group__button--last",o===t.length-1),i.toggleAttribute("data-sl-button-group__button--radio","sl-radio-button"===i.tagName.toLowerCase()))}))}render(){return V`<div part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}"><slot @slotchange="${this.handleSlotChange}"></slot></div>`}};function je(t){var e;const o="sl-button, sl-radio-button";return null!=(e=t.closest(o))?e:t.querySelector(o)}Ve.styles=[yt,Fe],Pt([Rt("slot")],Ve.prototype,"defaultSlot",2),Pt([Bt()],Ve.prototype,"disableRole",2),Pt([Mt()],Ve.prototype,"label",2),Ve.define("sl-button-group"),se.define("sl-icon");var He=n`: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}`,Ie=n`:host{--arrow-color:var(--sl-color-neutral-1000);--arrow-size:6px;--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}.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 We=Math.min,qe=Math.max,Ge=Math.round,Ke=Math.floor,Ze=t=>({x:t,y:t}),Xe={left:"right",right:"left",bottom:"top",top:"bottom"},Ye={start:"end",end:"start"};function Je(t,e,o){return qe(t,We(e,o))}function Qe(t,e){return"function"==typeof t?t(e):t}function to(t){return t.split("-")[0]}function eo(t){return t.split("-")[1]}function oo(t){return"x"===t?"y":"x"}function io(t){return"y"===t?"height":"width"}function ro(t){return["top","bottom"].includes(to(t))?"y":"x"}function no(t){return oo(ro(t))}function so(t){return t.replace(/start|end/g,(t=>Ye[t]))}function ao(t){return t.replace(/left|right|bottom|top/g,(t=>Xe[t]))}function lo(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function co(t){const{x:e,y:o,width:i,height:r}=t;return{width:i,height:r,top:o,left:e,right:e+i,bottom:o+r,x:e,y:o}}function ho(t,e,o){let{reference:i,floating:r}=t;const n=ro(e),s=no(e),a=io(s),l=to(e),c="y"===n,h=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,u=i[a]/2-r[a]/2;let p;switch(l){case"top":p={x:h,y:i.y-r.height};break;case"bottom":p={x:h,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(eo(e)){case"start":p[s]-=u*(o&&c?-1:1);break;case"end":p[s]+=u*(o&&c?-1:1)}return p}async function uo(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=Qe(e,t),b=lo(p),f=a[u?"floating"===d?"reference":"floating":d],g=co(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(f)))||o?f:f.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),m="floating"===d?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),y=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},w=co(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-w.top+b.top)/y.y,bottom:(w.bottom-g.bottom+b.bottom)/y.y,left:(g.left-w.left+b.left)/y.x,right:(w.right-g.right+b.right)/y.x}}function po(t){return go(t)?(t.nodeName||"").toLowerCase():"#document"}function bo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function fo(t){var e;return null==(e=(go(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function go(t){return t instanceof Node||t instanceof bo(t).Node}function mo(t){return t instanceof Element||t instanceof bo(t).Element}function vo(t){return t instanceof HTMLElement||t instanceof bo(t).HTMLElement}function yo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof bo(t).ShadowRoot)}function wo(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=Ao(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function xo(t){return["table","td","th"].includes(po(t))}function _o(t){const e=$o(),o=Ao(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function $o(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ko(t){return["html","body","#document"].includes(po(t))}function Ao(t){return bo(t).getComputedStyle(t)}function Co(t){return mo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Eo(t){if("html"===po(t))return t;const e=t.assignedSlot||t.parentNode||yo(t)&&t.host||fo(t);return yo(e)?e.host:e}function So(t){const e=Eo(t);return ko(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&wo(e)?e:So(e)}function zo(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=So(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=bo(r);return n?e.concat(s,s.visualViewport||[],wo(r)?r:[],s.frameElement&&o?zo(s.frameElement):[]):e.concat(r,zo(r,[],o))}function Po(t){const e=Ao(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=vo(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=Ge(o)!==n||Ge(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function Oo(t){return mo(t)?t:t.contextElement}function Lo(t){const e=Oo(t);if(!vo(e))return Ze(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=Po(e);let s=(n?Ge(o.width):o.width)/i,a=(n?Ge(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Mo=Ze(0);function Bo(t){const e=bo(t);return $o()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Mo}function Ro(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Oo(t);let s=Ze(1);e&&(i?mo(i)&&(s=Lo(i)):s=Lo(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==bo(t))&&e}(n,o,i)?Bo(n):Ze(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,h=r.width/s.x,d=r.height/s.y;if(n){const t=bo(n),e=i&&mo(i)?bo(i):i;let o=t,r=o.frameElement;for(;r&&i&&e!==o;){const t=Lo(r),e=r.getBoundingClientRect(),i=Ao(r),n=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=n,c+=s,o=bo(r),r=o.frameElement}}return co({width:h,height:d,x:l,y:c})}const To=[":popover-open",":modal"];function No(t){return To.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Uo(t){return Ro(fo(t)).left+Co(t).scrollLeft}function Do(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=bo(t),i=fo(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=$o();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=fo(t),o=Co(t),i=t.ownerDocument.body,r=qe(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=qe(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Uo(t);const a=-o.scrollTop;return"rtl"===Ao(i).direction&&(s+=qe(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}(fo(t));else if(mo(e))i=function(t,e){const o=Ro(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=vo(t)?Lo(t):Ze(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=Bo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return co(i)}function Fo(t,e){const o=Eo(t);return!(o===e||!mo(o)||ko(o))&&("fixed"===Ao(o).position||Fo(o,e))}function Vo(t,e,o){const i=vo(e),r=fo(e),n="fixed"===o,s=Ro(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=Ze(0);if(i||!i&&!n)if(("body"!==po(e)||wo(r))&&(a=Co(e)),i){const t=Ro(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Uo(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function jo(t){return"static"===Ao(t).position}function Ho(t,e){return vo(t)&&"fixed"!==Ao(t).position?e?e(t):t.offsetParent:null}function Io(t,e){const o=bo(t);if(No(t))return o;if(!vo(t)){let e=Eo(t);for(;e&&!ko(e);){if(mo(e)&&!jo(e))return e;e=Eo(e)}return o}let i=Ho(t,e);for(;i&&xo(i)&&jo(i);)i=Ho(i,e);return i&&ko(i)&&jo(i)&&!_o(i)?o:i||function(t){let e=Eo(t);for(;vo(e)&&!ko(e);){if(_o(e))return e;e=Eo(e)}return null}(t)||o}const Wo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:i,strategy:r}=t;const n="fixed"===r,s=fo(i),a=!!e&&No(e.floating);if(i===s||a&&n)return o;let l={scrollLeft:0,scrollTop:0},c=Ze(1);const h=Ze(0),d=vo(i);if((d||!d&&!n)&&(("body"!==po(i)||wo(s))&&(l=Co(i)),vo(i))){const t=Ro(i);c=Lo(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x,y:o.y*c.y-l.scrollTop*c.y+h.y}},getDocumentElement:fo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n=[..."clippingAncestors"===o?No(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=zo(t,[],!1).filter((t=>mo(t)&&"body"!==po(t))),r=null;const n="fixed"===Ao(t).position;let s=n?Eo(t):t;for(;mo(s)&&!ko(s);){const e=Ao(s),o=_o(s);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||wo(s)&&!o&&Fo(t,s))?i=i.filter((t=>t!==s)):r=e,s=Eo(s)}return e.set(t,i),i}(e,this._c):[].concat(o),i],s=n[0],a=n.reduce(((t,o)=>{const i=Do(e,o,r);return t.top=qe(i.top,t.top),t.right=We(i.right,t.right),t.bottom=We(i.bottom,t.bottom),t.left=qe(i.left,t.left),t}),Do(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Io,getElementRects:async function(t){const e=this.getOffsetParent||Io,o=this.getDimensions,i=await o(t.floating);return{reference:Vo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Po(t);return{width:e,height:o}},getScale:Lo,isElement:mo,isRTL:function(t){return"rtl"===Ao(t).direction}};function qo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oo(t),h=r||n?[...c?zo(c):[],...zo(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",o,{passive:!0}),n&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const r=fo(t);function n(){var t;clearTimeout(o),null==(t=i)||t.disconnect(),i=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),n();const{left:c,top:h,width:d,height:u}=t.getBoundingClientRect();if(a||e(),!d||!u)return;const p={rootMargin:-Ke(h)+"px "+-Ke(r.clientWidth-(c+d))+"px "+-Ke(r.clientHeight-(h+u))+"px "+-Ke(c)+"px",threshold:qe(0,We(1,l))||1};let b=!0;function f(t){const e=t[0].intersectionRatio;if(e!==l){if(!b)return s();e?s(!1,e):o=setTimeout((()=>{s(!1,1e-7)}),1e3)}b=!1}try{i=new IntersectionObserver(f,{...p,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(f,p)}i.observe(t)}(!0),n}(c,o):null;let u,p=-1,b=null;s&&(b=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),o()})),c&&!l&&b.observe(c),b.observe(e));let f=l?Ro(t):null;return l&&function e(){const i=Ro(t);!f||i.x===f.x&&i.y===f.y&&i.width===f.width&&i.height===f.height||o();f=i,u=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{r&&t.removeEventListener("scroll",o),n&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=b)||t.disconnect(),b=null,l&&cancelAnimationFrame(u)}}const Go=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:r,y:n,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:r}=t,n=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=to(o),a=eo(o),l="y"===ro(o),c=["left","top"].includes(s)?-1:1,h=n&&l?-1:1,d=Qe(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof b&&(p="end"===a?-1*b:b),l?{x:p*h,y:u*c}:{x:u*c,y:p*h}}(e,t);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:n+l.y,data:{...l,placement:s}}}}},Ko=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=Qe(t,e),c={x:o,y:i},h=await uo(e,l),d=ro(to(r)),u=oo(d);let p=c[u],b=c[d];if(n){const t="y"===u?"bottom":"right";p=Je(p+h["y"===u?"top":"left"],p,p-h[t])}if(s){const t="y"===d?"bottom":"right";b=Je(b+h["y"===d?"top":"left"],b,b-h[t])}const f=a.fn({...e,[u]:p,[d]:b});return{...f,data:{x:f.x-o,y:f.y-i}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:r,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:f=!0,...g}=Qe(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const m=to(r),v=to(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(v||!f?[ao(a)]:function(t){const e=ao(t);return[so(t),e,so(e)]}(a));u||"none"===b||w.push(...function(t,e,o,i){const r=eo(t);let n=function(t,e,o){const i=["left","right"],r=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?r:i:e?i:r;case"left":case"right":return e?n:s;default:return[]}}(to(t),"start"===o,i);return r&&(n=n.map((t=>t+"-"+r)),e&&(n=n.concat(n.map(so)))),n}(a,f,b,y));const x=[a,...w],_=await uo(e,g),$=[];let k=(null==(i=n.flip)?void 0:i.overflows)||[];if(h&&$.push(_[m]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=eo(t),r=no(t),n=io(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=ao(s)),[s,ao(s)]}(r,s,y);$.push(_[t[0]],_[t[1]])}if(k=[...k,{placement:r,overflows:$}],!$.every((t=>t<=0))){var A,C;const t=((null==(A=n.flip)?void 0:A.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:k},reset:{placement:e}};let o=null==(C=k.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!o)switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:E[0];t&&(o=t);break}case"initialPlacement":o=a}if(r!==o)return{reset:{placement:o}}}return{}}}},Xo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:r,elements:n}=e,{apply:s=(()=>{}),...a}=Qe(t,e),l=await uo(e,a),c=to(o),h=eo(o),d="y"===ro(o),{width:u,height:p}=i.floating;let b,f;"top"===c||"bottom"===c?(b=c,f=h===(await(null==r.isRTL?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"):(f=c,b="end"===h?"top":"bottom");const g=p-l.top-l.bottom,m=u-l.left-l.right,v=We(p-l[b],g),y=We(u-l[f],m),w=!e.middlewareData.shift;let x=v,_=y;if(d?_=h||w?We(y,m):m:x=h||w?We(v,g):g,w&&!h){const t=qe(l.left,0),e=qe(l.right,0),o=qe(l.top,0),i=qe(l.bottom,0);d?_=u-2*(0!==t||0!==e?t+e:qe(l.left,l.right)):x=p-2*(0!==o||0!==i?o+i:qe(l.top,l.bottom))}await s({...e,availableWidth:_,availableHeight:x});const $=await r.getDimensions(n.floating);return u!==$.width||p!==$.height?{reset:{rects:!0}}:{}}}},Yo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:n,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=Qe(t,e)||{};if(null==c)return{};const d=lo(h),u={x:o,y:i},p=no(r),b=io(p),f=await s.getDimensions(c),g="y"===p,m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=n.reference[b]+n.reference[p]-u[p]-n.floating[b],x=u[p]-n.reference[p],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let $=_?_[y]:0;$&&await(null==s.isElement?void 0:s.isElement(_))||($=a.floating[y]||n.floating[b]);const k=w/2-x/2,A=$/2-f[b]/2-1,C=We(d[m],A),E=We(d[v],A),S=C,z=$-f[b]-E,P=$/2-f[b]/2+k,O=Je(S,P,z),L=!l.arrow&&null!=eo(r)&&P!==O&&n.reference[b]/2-(P<S?C:E)-f[b]/2<0,M=L?P<S?P-S:P-z:0;return{[p]:u[p]+M,data:{[p]:O,centerOffset:P-O-M,...L&&{alignmentOffset:M}},reset:L}}}),Jo=(t,e,o)=>{const i=new Map,r={platform:Wo,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:d}=ho(c,i,l),u=i,p={},b=0;for(let o=0;o<a.length;o++){const{name:n,fn:f}=a[o],{x:g,y:m,data:v,reset:y}=await f({x:h,y:d,initialPlacement:i,placement:u,strategy:r,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,d=null!=m?m:d,p={...p,[n]:{...p[n],...v}},y&&b<=50&&(b++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:h,y:d}=ho(c,u,l))),o=-1)}return{x:h,y:d,placement:u,strategy:r,middlewareData:p}})(t,e,{...r,platform:n})};function Qo(t){return function(t){for(let e=t;e;e=ti(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=ti(t);e;e=ti(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function ti(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var ei=class extends Tt{constructor(){super(...arguments),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 t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,r=0,n=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(o=t.left,i=t.bottom,r=t.right,n=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):(o=e.left,i=e.bottom,r=e.right,n=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(o=t.right,i=t.top,r=e.left,n=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom):(o=e.right,i=e.top,r=t.left,n=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${i}px`),this.style.setProperty("--hover-bridge-top-right-x",`${r}px`),this.style.setProperty("--hover-bridge-top-right-y",`${n}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t instanceof Element)}(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.start()}start(){this.anchorEl&&(this.cleanup=qo(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{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((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Go({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xo({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,o="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=o?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Zo({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Ko({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xo({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Yo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>Wo.getOffsetParent(t,Qo):Wo.getOffsetParent;Jo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:zt(St({},Wo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const r="rtl"===getComputedStyle(this).direction,n={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",s="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=r?o:"",l=r?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=r?"":o,l=r?o:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:s,bottom:a,left:l,[n]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return V`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><span part="hover-bridge" class="${he({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}"></span><div part="popup" class="${he({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow})}"><slot></slot>${this.arrow?V`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}</div>`}};ei.styles=[yt,Ie],Pt([Rt(".popup")],ei.prototype,"popup",2),Pt([Rt(".popup__arrow")],ei.prototype,"arrowEl",2),Pt([Mt()],ei.prototype,"anchor",2),Pt([Mt({type:Boolean,reflect:!0})],ei.prototype,"active",2),Pt([Mt({reflect:!0})],ei.prototype,"placement",2),Pt([Mt({reflect:!0})],ei.prototype,"strategy",2),Pt([Mt({type:Number})],ei.prototype,"distance",2),Pt([Mt({type:Number})],ei.prototype,"skidding",2),Pt([Mt({type:Boolean})],ei.prototype,"arrow",2),Pt([Mt({attribute:"arrow-placement"})],ei.prototype,"arrowPlacement",2),Pt([Mt({attribute:"arrow-padding",type:Number})],ei.prototype,"arrowPadding",2),Pt([Mt({type:Boolean})],ei.prototype,"flip",2),Pt([Mt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],ei.prototype,"flipFallbackPlacements",2),Pt([Mt({attribute:"flip-fallback-strategy"})],ei.prototype,"flipFallbackStrategy",2),Pt([Mt({type:Object})],ei.prototype,"flipBoundary",2),Pt([Mt({attribute:"flip-padding",type:Number})],ei.prototype,"flipPadding",2),Pt([Mt({type:Boolean})],ei.prototype,"shift",2),Pt([Mt({type:Object})],ei.prototype,"shiftBoundary",2),Pt([Mt({attribute:"shift-padding",type:Number})],ei.prototype,"shiftPadding",2),Pt([Mt({attribute:"auto-size"})],ei.prototype,"autoSize",2),Pt([Mt()],ei.prototype,"sync",2),Pt([Mt({type:Object})],ei.prototype,"autoSizeBoundary",2),Pt([Mt({attribute:"auto-size-padding",type:Number})],ei.prototype,"autoSizePadding",2),Pt([Mt({attribute:"hover-bridge",type:Boolean})],ei.prototype,"hoverBridge",2);var oi=new Map,ii=new WeakMap;function ri(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function ni(t,e){oi.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function si(t,e,o){const i=ii.get(t);if(null==i?void 0:i[e])return ri(i[e],o.dir);const r=oi.get(e);return r?ri(r,o.dir):{keyframes:[],options:{duration:0}}}function ai(t,e){return new Promise((o=>{t.addEventListener(e,(function i(r){r.target===t&&(t.removeEventListener(e,i),o())}))}))}function li(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=t.animate(e,zt(St({},o),{duration:hi()?0:o.duration}));r.addEventListener("cancel",i,{once:!0}),r.addEventListener("finish",i,{once:!0})}))}function ci(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function hi(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function di(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}var ui=class extends Tt{constructor(){super(),this.localize=new vt(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=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=ci(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=ci(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}},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 t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await di(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=si(this,"tooltip.show",{dir:this.localize.dir()});await li(this.popup.popup,e,o),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await di(this.body);const{keyframes:t,options:o}=si(this,"tooltip.hide",{dir:this.localize.dir()});await li(this.popup.popup,t,o),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()}async show(){if(!this.open)return this.open=!0,ai(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ai(this,"sl-after-hide")}render(){return V`<sl-popup part="base" exportparts="
119
119
  popup:base__popup,
120
120
  arrow:base__arrow
121
- " class="${he({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>`}};ui.styles=[yt,He],ui.dependencies={"sl-popup":ei},Pt([Rt("slot:not([name])")],ui.prototype,"defaultSlot",2),Pt([Rt(".tooltip__body")],ui.prototype,"body",2),Pt([Rt("sl-popup")],ui.prototype,"popup",2),Pt([Bt()],ui.prototype,"content",2),Pt([Bt()],ui.prototype,"placement",2),Pt([Bt({type:Boolean,reflect:!0})],ui.prototype,"disabled",2),Pt([Bt({type:Number})],ui.prototype,"distance",2),Pt([Bt({type:Boolean,reflect:!0})],ui.prototype,"open",2),Pt([Bt({type:Number})],ui.prototype,"skidding",2),Pt([Bt()],ui.prototype,"trigger",2),Pt([Bt({type:Boolean})],ui.prototype,"hoist",2),Pt([ee("open",{waitUntilFirstUpdate:!0})],ui.prototype,"handleOpenChange",1),Pt([ee(["content","distance","hoist","placement","skidding"])],ui.prototype,"handleOptionsChange",1),Pt([ee("disabled")],ui.prototype,"handleDisabledChange",1),ni("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),ni("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ui.define("sl-tooltip");var pi=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();class bi extends rt{constructor(){super(...arguments),this.name="hot-toolbar",this.tooltipPosition="top",this.undo=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-undo-click"))},this.redo=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-redo-click"))},this.bold=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-bold-click"))},this.italic=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-italic-click"))},this.underline=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-underline-click"))},this.alignLeft=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-leftalign-click"))},this.alignCenter=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-centeralign-click"))},this.alignRight=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-rightalign-click"))}}render(){return V`<div class="button-group-toolbar">${this.renderButtonGroup("History",[{content:"Undo",icon:"arrow-counterclockwise",label:"Undo",action:this.undo},{content:"Redo",icon:"arrow-clockwise",label:"Redo",action:this.redo}])} ${this.renderButtonGroup("Formatting",[{content:"Bold",icon:"type-bold",label:"Bold",action:this.bold},{content:"Italic",icon:"type-italic",label:"Italic",action:this.italic},{content:"Underline",icon:"type-underline",label:"Underline",action:this.underline}])} ${this.renderButtonGroup("Alignment",[{content:"Align Left",icon:"justify-left",label:"Align Left",action:this.alignLeft},{content:"Align Center",icon:"justify",label:"Align Center",action:this.alignCenter},{content:"Align Right",icon:"justify-right",label:"Align Right",action:this.alignRight}])}</div>`}renderButtonGroup(t,e){return V`<sl-button-group label="${t}">${e.map((t=>this.renderButton(t)))}</sl-button-group>`}renderButton({content:t,icon:e,label:o,action:i}){return V`<sl-tooltip content="${t}" placement="${this.tooltipPosition}"><sl-button @click="${i??(()=>{})}"><sl-icon library="bundled" name="${e}" label="${o}"></sl-icon></sl-button></sl-tooltip>`}}bi.styles=[n`@unocss-placeholder;`],pi([Bt()],bi.prototype,"name",void 0),pi([Bt({type:String,attribute:"tooltip-position"})],bi.prototype,"tooltipPosition",void 0),customElements.define("hot-toolbar",bi);var fi=n`:host{display:contents;margin:0}.alert{position:relative;display:flex;align-items:stretch;background-color:var(--sl-panel-background-color);border:solid var(--sl-panel-border-width) var(--sl-panel-border-color);border-top-width:calc(var(--sl-panel-border-width) * 3);border-radius:var(--sl-border-radius-medium);font-family:var(--sl-font-sans);font-size:var(--sl-font-size-small);font-weight:var(--sl-font-weight-normal);line-height:1.6;color:var(--sl-color-neutral-700);margin:inherit}.alert:not(.alert--closable) .alert__close-button,.alert:not(.alert--has-icon) .alert__icon{display:none}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--sl-font-size-large);padding-inline-start:var(--sl-spacing-large)}.alert--primary{border-top-color:var(--sl-color-primary-600)}.alert--primary .alert__icon{color:var(--sl-color-primary-600)}.alert--success{border-top-color:var(--sl-color-success-600)}.alert--success .alert__icon{color:var(--sl-color-success-600)}.alert--neutral{border-top-color:var(--sl-color-neutral-600)}.alert--neutral .alert__icon{color:var(--sl-color-neutral-600)}.alert--warning{border-top-color:var(--sl-color-warning-600)}.alert--warning .alert__icon{color:var(--sl-color-warning-600)}.alert--danger{border-top-color:var(--sl-color-danger-600)}.alert--danger .alert__icon{color:var(--sl-color-danger-600)}.alert__message{flex:1 1 auto;display:block;padding:var(--sl-spacing-large);overflow:hidden}.alert__close-button{flex:0 0 auto;display:flex;align-items:center;font-size:var(--sl-font-size-medium);padding-inline-end:var(--sl-spacing-medium)}`,gi=Object.assign(document.createElement("div"),{className:"sl-toast-stack"}),mi=class extends Tt{constructor(){super(...arguments),this.hasSlotController=new ae(this,"icon","suffix"),this.localize=new vt(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}handleCloseClick(){this.hide()}handleMouseMove(){this.restartAutoHide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await di(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=si(this,"alert.show",{dir:this.localize.dir()});await li(this.base,t,e),this.emit("sl-after-show")}else{this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),await di(this.base);const{keyframes:t,options:e}=si(this,"alert.hide",{dir:this.localize.dir()});await li(this.base,t,e),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,ai(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ai(this,"sl-after-hide")}async toast(){return new Promise((t=>{null===gi.parentElement&&document.body.append(gi),gi.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sl-after-hide",(()=>{gi.removeChild(this),t(),null===gi.querySelector("sl-alert")&&gi.remove()}),{once:!0})}))}render(){return V`<div part="base" class="${he({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":"primary"===this.variant,"alert--success":"success"===this.variant,"alert--neutral":"neutral"===this.variant,"alert--warning":"warning"===this.variant,"alert--danger":"danger"===this.variant})}" role="alert" aria-hidden="${this.open?"false":"true"}" @mousemove="${this.handleMouseMove}"><div part="icon" class="alert__icon"><slot name="icon"></slot></div><div part="message" class="alert__message" aria-live="polite"><slot></slot></div>${this.closable?V`<sl-icon-button part="close-button" exportparts="base:close-button__base" class="alert__close-button" name="x-lg" library="system" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"></sl-icon-button>`:""}</div>`}};mi.styles=[yt,fi],mi.dependencies={"sl-icon-button":Ee},Pt([Rt('[part~="base"]')],mi.prototype,"base",2),Pt([Bt({type:Boolean,reflect:!0})],mi.prototype,"open",2),Pt([Bt({type:Boolean,reflect:!0})],mi.prototype,"closable",2),Pt([Bt({reflect:!0})],mi.prototype,"variant",2),Pt([Bt({type:Number})],mi.prototype,"duration",2),Pt([ee("open",{waitUntilFirstUpdate:!0})],mi.prototype,"handleOpenChange",1),Pt([ee("duration")],mi.prototype,"handleDurationChange",1),ni("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ni("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),mi.define("sl-alert");var vi=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();class yi extends rt{constructor(){super(...arguments),this.name="hot-tracking",this.siteId="",this.domain="",this.isOpen=!0}render(){return V`<sl-alert variant="danger" ?open="${this.isOpen}"><sl-icon id="hot-red-text" library="bundled" slot="icon" name="info-circle"></sl-icon><p id="tracking-header">About the information we collect</p><p>We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity. You can learn about how we use the data about your visit or information you provide reading our <a id="hot-red-text" href="https://www.hotosm.org/privacy" target="_blank" rel="noopener noreferrer">privacy policy</a>. By clicking "I Agree", you consent to the use of cookies.</p><sl-button @click="${t=>{this._setAgree(t)}}">I Agree</sl-button><sl-button @click="${t=>{this._setDisagree(t)}}">I Do Not Agree</sl-button></sl-alert>`}_closeAlert(){this.isOpen=!1,localStorage.setItem(`${this.siteId}-optout-closed`,"true")}_setAgree(t){const e=window._paq=window._paq||[];0!==e.length&&(e.push(["rememberConsentGiven"]),this._closeAlert(),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0})))}_setDisagree(t){const e=window._paq=window._paq||[];0!==e.length&&(e.push(["forgetConsentGiven"]),this._closeAlert(),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0})))}connectedCallback(){if(super.connectedCallback(),"true"===localStorage.getItem(`${this.siteId}-optout-closed`))return void(this.isOpen=!1);if(window.location.hostname!==this.domain)return void(this.isOpen=!1);const t=this.siteId;if(0===t.length||0===this.domain.length)return console.warn("Matomo init failed. No site id or domains provided."),void(this.isOpen=!1);const e=window._paq=window._paq||[];e.push(["requireConsent"]),e.push(["setDomains",[this.domain]]),e.push(["trackPageView"]),e.push(["enableLinkTracking"]),e.push(["trackVisibleContentImpressions"]),function(){const o="//matomo.hotosm.org/";e.push(["setTrackerUrl",o+"matomo.php"]),e.push(["setSiteId",t]);const i=document,r=i.createElement("script"),n=i.getElementsByTagName("script")[0];null!=n?.parentNode?(r.async=!0,r.src=o+"matomo.js",n.parentNode.insertBefore(r,n)):console.warn("Script insertion failed. Parent node is null.")}()}}yi.styles=[n`@unocss-placeholder;`,n`#tracking-header{font-weight:var(--sl-font-weight-bold);font-size:var(--sl-font-size-large);color:#d63f3f}#hot-red-text{color:#d63f3f}sl-alert::part(base){position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:1000;width:80vw}`],vi([Bt()],yi.prototype,"name",void 0),vi([Bt({type:String,attribute:"site-id"})],yi.prototype,"siteId",void 0),vi([Bt({type:String})],yi.prototype,"domain",void 0),vi([Mt()],yi.prototype,"isOpen",void 0),customElements.define("hot-tracking",yi);export{Ae as Button,De as Header,bi as Toolbar,yi as Tracking};
121
+ " class="${he({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>`}};ui.styles=[yt,He],ui.dependencies={"sl-popup":ei},Pt([Rt("slot:not([name])")],ui.prototype,"defaultSlot",2),Pt([Rt(".tooltip__body")],ui.prototype,"body",2),Pt([Rt("sl-popup")],ui.prototype,"popup",2),Pt([Mt()],ui.prototype,"content",2),Pt([Mt()],ui.prototype,"placement",2),Pt([Mt({type:Boolean,reflect:!0})],ui.prototype,"disabled",2),Pt([Mt({type:Number})],ui.prototype,"distance",2),Pt([Mt({type:Boolean,reflect:!0})],ui.prototype,"open",2),Pt([Mt({type:Number})],ui.prototype,"skidding",2),Pt([Mt()],ui.prototype,"trigger",2),Pt([Mt({type:Boolean})],ui.prototype,"hoist",2),Pt([ee("open",{waitUntilFirstUpdate:!0})],ui.prototype,"handleOpenChange",1),Pt([ee(["content","distance","hoist","placement","skidding"])],ui.prototype,"handleOptionsChange",1),Pt([ee("disabled")],ui.prototype,"handleDisabledChange",1),ni("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),ni("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ui.define("sl-tooltip");var pi=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();class bi extends rt{constructor(){super(...arguments),this.name="hot-toolbar",this.tooltipPosition="top",this.undo=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-undo-click"))},this.redo=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-redo-click"))},this.bold=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-bold-click"))},this.italic=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-italic-click"))},this.underline=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-underline-click"))},this.alignLeft=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-leftalign-click"))},this.alignCenter=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-centeralign-click"))},this.alignRight=t=>{t.stopPropagation(),this.dispatchEvent(new Event("hot-rightalign-click"))}}render(){return V`<div class="button-group-toolbar">${this.renderButtonGroup("History",[{content:"Undo",icon:"arrow-counterclockwise",label:"Undo",action:this.undo},{content:"Redo",icon:"arrow-clockwise",label:"Redo",action:this.redo}])} ${this.renderButtonGroup("Formatting",[{content:"Bold",icon:"type-bold",label:"Bold",action:this.bold},{content:"Italic",icon:"type-italic",label:"Italic",action:this.italic},{content:"Underline",icon:"type-underline",label:"Underline",action:this.underline}])} ${this.renderButtonGroup("Alignment",[{content:"Align Left",icon:"justify-left",label:"Align Left",action:this.alignLeft},{content:"Align Center",icon:"justify",label:"Align Center",action:this.alignCenter},{content:"Align Right",icon:"justify-right",label:"Align Right",action:this.alignRight}])}</div>`}renderButtonGroup(t,e){return V`<sl-button-group label="${t}">${e.map((t=>this.renderButton(t)))}</sl-button-group>`}renderButton({content:t,icon:e,label:o,action:i}){return V`<sl-tooltip content="${t}" placement="${this.tooltipPosition}"><sl-button @click="${i??(()=>{})}"><sl-icon library="bundled" name="${e}" label="${o}"></sl-icon></sl-button></sl-tooltip>`}}bi.styles=[n`@unocss-placeholder;`],pi([Mt()],bi.prototype,"name",void 0),pi([Mt({type:String,attribute:"tooltip-position"})],bi.prototype,"tooltipPosition",void 0),customElements.define("hot-toolbar",bi);var fi=n`:host{display:contents;margin:0}.alert{position:relative;display:flex;align-items:stretch;background-color:var(--sl-panel-background-color);border:solid var(--sl-panel-border-width) var(--sl-panel-border-color);border-top-width:calc(var(--sl-panel-border-width) * 3);border-radius:var(--sl-border-radius-medium);font-family:var(--sl-font-sans);font-size:var(--sl-font-size-small);font-weight:var(--sl-font-weight-normal);line-height:1.6;color:var(--sl-color-neutral-700);margin:inherit}.alert:not(.alert--closable) .alert__close-button,.alert:not(.alert--has-icon) .alert__icon{display:none}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--sl-font-size-large);padding-inline-start:var(--sl-spacing-large)}.alert--primary{border-top-color:var(--sl-color-primary-600)}.alert--primary .alert__icon{color:var(--sl-color-primary-600)}.alert--success{border-top-color:var(--sl-color-success-600)}.alert--success .alert__icon{color:var(--sl-color-success-600)}.alert--neutral{border-top-color:var(--sl-color-neutral-600)}.alert--neutral .alert__icon{color:var(--sl-color-neutral-600)}.alert--warning{border-top-color:var(--sl-color-warning-600)}.alert--warning .alert__icon{color:var(--sl-color-warning-600)}.alert--danger{border-top-color:var(--sl-color-danger-600)}.alert--danger .alert__icon{color:var(--sl-color-danger-600)}.alert__message{flex:1 1 auto;display:block;padding:var(--sl-spacing-large);overflow:hidden}.alert__close-button{flex:0 0 auto;display:flex;align-items:center;font-size:var(--sl-font-size-medium);padding-inline-end:var(--sl-spacing-medium)}`,gi=Object.assign(document.createElement("div"),{className:"sl-toast-stack"}),mi=class extends Tt{constructor(){super(...arguments),this.hasSlotController=new ae(this,"icon","suffix"),this.localize=new vt(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}handleCloseClick(){this.hide()}handleMouseMove(){this.restartAutoHide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await di(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=si(this,"alert.show",{dir:this.localize.dir()});await li(this.base,t,e),this.emit("sl-after-show")}else{this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),await di(this.base);const{keyframes:t,options:e}=si(this,"alert.hide",{dir:this.localize.dir()});await li(this.base,t,e),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,ai(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ai(this,"sl-after-hide")}async toast(){return new Promise((t=>{null===gi.parentElement&&document.body.append(gi),gi.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sl-after-hide",(()=>{gi.removeChild(this),t(),null===gi.querySelector("sl-alert")&&gi.remove()}),{once:!0})}))}render(){return V`<div part="base" class="${he({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":"primary"===this.variant,"alert--success":"success"===this.variant,"alert--neutral":"neutral"===this.variant,"alert--warning":"warning"===this.variant,"alert--danger":"danger"===this.variant})}" role="alert" aria-hidden="${this.open?"false":"true"}" @mousemove="${this.handleMouseMove}"><div part="icon" class="alert__icon"><slot name="icon"></slot></div><div part="message" class="alert__message" aria-live="polite"><slot></slot></div>${this.closable?V`<sl-icon-button part="close-button" exportparts="base:close-button__base" class="alert__close-button" name="x-lg" library="system" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"></sl-icon-button>`:""}</div>`}};mi.styles=[yt,fi],mi.dependencies={"sl-icon-button":Ee},Pt([Rt('[part~="base"]')],mi.prototype,"base",2),Pt([Mt({type:Boolean,reflect:!0})],mi.prototype,"open",2),Pt([Mt({type:Boolean,reflect:!0})],mi.prototype,"closable",2),Pt([Mt({reflect:!0})],mi.prototype,"variant",2),Pt([Mt({type:Number})],mi.prototype,"duration",2),Pt([ee("open",{waitUntilFirstUpdate:!0})],mi.prototype,"handleOpenChange",1),Pt([ee("duration")],mi.prototype,"handleDurationChange",1),ni("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ni("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),mi.define("sl-alert");var vi=function(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};Te();class yi extends rt{constructor(){super(...arguments),this.name="hot-tracking",this.siteId="",this.domain="",this.force=!1,this.isOpen=!0}render(){return V`<sl-alert variant="danger" ?open="${this.isOpen}"><sl-icon id="hot-red-text" library="bundled" slot="icon" name="info-circle"></sl-icon><p id="tracking-header">About the information we collect</p><p>We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity. You can learn about how we use the data about your visit or information you provide reading our <a id="hot-red-text" href="https://www.hotosm.org/privacy" target="_blank" rel="noopener noreferrer">privacy policy</a>. By clicking "I Agree", you consent to the use of cookies.</p><sl-button @click="${this._setAgree}">I Agree</sl-button><sl-button @click="${this._setDisagree}">I Do Not Agree</sl-button></sl-alert>`}_setAgree(t){const e=window._paq=window._paq||[];0!==e.length&&(e.push(["rememberConsentGiven"]),this.isOpen=!1,localStorage.setItem(`${this.siteId}-matomo-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0})))}_setDisagree(t){const e=window._paq=window._paq||[];0!==e.length&&(e.push(["forgetConsentGiven"]),this.isOpen=!1,localStorage.setItem(`${this.siteId}-matomo-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0})))}connectedCallback(){if(super.connectedCallback(),!this.force&&window.location.hostname!==this.domain)return console.warn("Matomo init failed. Provided domain does not match current domain."),void(this.isOpen=!1);const t=this.siteId;if(!this.force&&(0===t.length||0===this.domain.length))return console.warn("Matomo init failed. No site id or domains provided."),void(this.isOpen=!1);const e=localStorage.getItem(`${this.siteId}-matomo-agree`);if("false"===e)return void(this.isOpen=!1);"true"===e&&(this.isOpen=!1),console.log(`Setting Matomo tracking for site=${t} domain=${this.domain}`);const o=window._paq=window._paq||[];o.push(["requireConsent"]),o.push(["setDomains",[this.domain]]),o.push(["trackPageView"]),o.push(["enableLinkTracking"]),o.push(["trackVisibleContentImpressions"]),function(){const e="//matomo.hotosm.org/";o.push(["setTrackerUrl",e+"matomo.php"]),o.push(["setSiteId",t]);const i=document,r=i.createElement("script"),n=i.getElementsByTagName("script")[0];null!=n?.parentNode?(r.async=!0,r.src=e+"matomo.js",n.parentNode.insertBefore(r,n)):console.warn("Script insertion failed. Parent node is null.")}()}}yi.styles=[n`@unocss-placeholder;`,n`#tracking-header{font-weight:var(--sl-font-weight-bold);font-size:var(--sl-font-size-large);color:#d63f3f}#hot-red-text{color:#d63f3f}sl-alert::part(base){position:absolute;bottom:20px;left:50%;transform:translateX(-50%);z-index:1000;width:80vw}`],vi([Mt()],yi.prototype,"name",void 0),vi([Mt({type:String,attribute:"site-id"})],yi.prototype,"siteId",void 0),vi([Mt({type:String})],yi.prototype,"domain",void 0),vi([Mt({type:Boolean})],yi.prototype,"force",void 0),vi([Bt()],yi.prototype,"isOpen",void 0),customElements.define("hot-tracking",yi);export{Ae as Button,De as Header,bi as Toolbar,yi as Tracking};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotosm/ui",
3
- "version": "0.2.0b1",
3
+ "version": "0.2.0b2",
4
4
  "description": "Shared UI components with theming for use across HOTOSM tools.",
5
5
  "type": "module",
6
6
  "engines": {
package/react/Toolbar.js CHANGED
@@ -7,14 +7,14 @@ const reactWrapper = createComponent({
7
7
  elementClass: Toolbar,
8
8
  react: React,
9
9
  events: {
10
- onHotUndoClick: 'hot-undo-click',
11
- onHotRedoClick: 'hot-redo-click',
12
- onHotBoldClick: 'hot-bold-click',
13
- onHotItalicClick: 'hot-italic-click',
14
- onHotUnderlineClick: 'hot-underline-click',
15
- onHotLeftalignClick: 'hot-leftalign-click',
16
- onHotCenteralignClick: 'hot-centeralign-click',
17
- onHotRightalignClick: 'hot-rightalign-click',
10
+ onUndoClick: 'hot-undo-click',
11
+ onRedoClick: 'hot-redo-click',
12
+ onBoldClick: 'hot-bold-click',
13
+ onItalicClick: 'hot-italic-click',
14
+ onUnderlineClick: 'hot-underline-click',
15
+ onLeftalignClick: 'hot-leftalign-click',
16
+ onCenteralignClick: 'hot-centeralign-click',
17
+ onRightalignClick: 'hot-rightalign-click',
18
18
  },
19
19
  displayName: 'hot-toolbar'
20
20
  });
package/react/Tracking.js CHANGED
@@ -7,8 +7,8 @@ const reactWrapper = createComponent({
7
7
  elementClass: Tracking,
8
8
  react: React,
9
9
  events: {
10
- onHotAgree: 'agree',
11
- onHotDisagree: 'disagree',
10
+ onAgree: 'agree',
11
+ onDisagree: 'disagree',
12
12
  },
13
13
  displayName: 'hot-tracking'
14
14
  });