@telperion/elements 6.1.0 → 7.1.0

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.
Files changed (140) hide show
  1. package/.build-manifest.json +22 -1
  2. package/README.md +40 -5
  3. package/_chunks/code-cdn-element-ClAO2lep.d.cts +200 -0
  4. package/_chunks/code-cdn-element-ClAO2lep.d.ts +200 -0
  5. package/code/bundled-language-loader.cjs +18 -0
  6. package/code/bundled-language-loader.cjs.map +1 -0
  7. package/code/bundled-language-loader.js +16 -0
  8. package/code/bundled-language-loader.js.map +1 -0
  9. package/code/cdn-language-loader.cjs +41 -0
  10. package/code/cdn-language-loader.cjs.map +1 -0
  11. package/code/cdn-language-loader.js +36 -0
  12. package/code/cdn-language-loader.js.map +1 -0
  13. package/code/cdn.cjs +21 -0
  14. package/code/cdn.cjs.map +1 -0
  15. package/code/cdn.d.cts +3 -0
  16. package/code/cdn.d.ts +3 -0
  17. package/code/cdn.js +16 -0
  18. package/code/cdn.js.map +1 -0
  19. package/code/code-element-base.cjs +241 -0
  20. package/code/code-element-base.cjs.map +1 -0
  21. package/code/code-element-base.js +239 -0
  22. package/code/code-element-base.js.map +1 -0
  23. package/code/code-element.cjs +16 -0
  24. package/code/code-element.cjs.map +1 -0
  25. package/code/code-element.js +14 -0
  26. package/code/code-element.js.map +1 -0
  27. package/code/copy.cjs +41 -0
  28. package/code/copy.cjs.map +1 -0
  29. package/code/copy.js +39 -0
  30. package/code/copy.js.map +1 -0
  31. package/code/css-variables-theme.cjs +24 -0
  32. package/code/css-variables-theme.cjs.map +1 -0
  33. package/code/css-variables-theme.js +21 -0
  34. package/code/css-variables-theme.js.map +1 -0
  35. package/code/highlighter.cjs +84 -0
  36. package/code/highlighter.cjs.map +1 -0
  37. package/code/highlighter.js +80 -0
  38. package/code/highlighter.js.map +1 -0
  39. package/code/index.cjs +19 -0
  40. package/code/index.cjs.map +1 -0
  41. package/code/index.d.cts +13 -0
  42. package/code/index.d.ts +13 -0
  43. package/code/index.js +6 -0
  44. package/code/index.js.map +1 -0
  45. package/code/language-loader.cjs +22 -0
  46. package/code/language-loader.cjs.map +1 -0
  47. package/code/language-loader.js +19 -0
  48. package/code/language-loader.js.map +1 -0
  49. package/code/line-ranges.cjs +28 -0
  50. package/code/line-ranges.cjs.map +1 -0
  51. package/code/line-ranges.js +25 -0
  52. package/code/line-ranges.js.map +1 -0
  53. package/code/source.cjs +52 -0
  54. package/code/source.cjs.map +1 -0
  55. package/code/source.js +48 -0
  56. package/code/source.js.map +1 -0
  57. package/code/styles.cjs +183 -0
  58. package/code/styles.cjs.map +1 -0
  59. package/code/styles.js +181 -0
  60. package/code/styles.js.map +1 -0
  61. package/code/templates.cjs +66 -0
  62. package/code/templates.cjs.map +1 -0
  63. package/code/templates.js +63 -0
  64. package/code/templates.js.map +1 -0
  65. package/custom-elements.json +3993 -2377
  66. package/fesm/elements.mjs +501 -216
  67. package/fesm/elements.mjs.map +1 -1
  68. package/iife/code/cdn.js +263 -0
  69. package/iife/code/cdn.js.map +1 -0
  70. package/iife/elements.js +36 -36
  71. package/iife/elements.js.map +1 -1
  72. package/iife/router/index.js +23 -23
  73. package/iife/router/index.js.map +1 -1
  74. package/index.cjs +23 -18
  75. package/index.cjs.map +1 -1
  76. package/index.d.cts +1 -1
  77. package/index.d.ts +1 -1
  78. package/index.js +8 -6
  79. package/index.js.map +1 -1
  80. package/package.json +39 -2
  81. package/router/history-managed.cjs +1 -1
  82. package/router/history-managed.cjs.map +1 -1
  83. package/router/history-managed.js +1 -1
  84. package/router/history-managed.js.map +1 -1
  85. package/router/index.cjs +23 -18
  86. package/router/index.cjs.map +1 -1
  87. package/router/index.d.cts +273 -168
  88. package/router/index.d.ts +273 -168
  89. package/router/index.js +8 -6
  90. package/router/index.js.map +1 -1
  91. package/router/route-element.cjs +244 -0
  92. package/router/route-element.cjs.map +1 -0
  93. package/router/route-element.js +239 -0
  94. package/router/route-element.js.map +1 -0
  95. package/router/route-events.cjs +14 -0
  96. package/router/route-events.cjs.map +1 -0
  97. package/router/route-events.js +10 -0
  98. package/router/route-events.js.map +1 -0
  99. package/router/route-source.cjs +134 -0
  100. package/router/route-source.cjs.map +1 -0
  101. package/router/route-source.js +129 -0
  102. package/router/route-source.js.map +1 -0
  103. package/router/route-templates.cjs +18 -0
  104. package/router/route-templates.cjs.map +1 -0
  105. package/router/route-templates.js +16 -0
  106. package/router/route-templates.js.map +1 -0
  107. package/router/{tha-router-config.cjs → router-config-element.cjs} +51 -51
  108. package/router/router-config-element.cjs.map +1 -0
  109. package/router/{tha-router-config.js → router-config-element.js} +52 -52
  110. package/router/router-config-element.js.map +1 -0
  111. package/router/{tha-router.cjs → router-element.cjs} +47 -33
  112. package/router/router-element.cjs.map +1 -0
  113. package/router/{tha-router.js → router-element.js} +47 -33
  114. package/router/router-element.js.map +1 -0
  115. package/router/{tha-router-link.cjs → router-link-element.cjs} +15 -15
  116. package/router/router-link-element.cjs.map +1 -0
  117. package/router/{tha-router-link.js → router-link-element.js} +16 -16
  118. package/router/router-link-element.js.map +1 -0
  119. package/router/{tha-router-outlet.cjs → router-outlet-element.cjs} +44 -31
  120. package/router/router-outlet-element.cjs.map +1 -0
  121. package/router/{tha-router-outlet.js → router-outlet-element.js} +43 -30
  122. package/router/router-outlet-element.js.map +1 -0
  123. package/router/{tha-router-param.cjs → router-param-element.cjs} +62 -62
  124. package/router/router-param-element.cjs.map +1 -0
  125. package/router/{tha-router-param.js → router-param-element.js} +62 -62
  126. package/router/router-param-element.js.map +1 -0
  127. package/router/tha-route.cjs +0 -128
  128. package/router/tha-route.cjs.map +0 -1
  129. package/router/tha-route.js +0 -125
  130. package/router/tha-route.js.map +0 -1
  131. package/router/tha-router-config.cjs.map +0 -1
  132. package/router/tha-router-config.js.map +0 -1
  133. package/router/tha-router-link.cjs.map +0 -1
  134. package/router/tha-router-link.js.map +0 -1
  135. package/router/tha-router-outlet.cjs.map +0 -1
  136. package/router/tha-router-outlet.js.map +0 -1
  137. package/router/tha-router-param.cjs.map +0 -1
  138. package/router/tha-router-param.js.map +0 -1
  139. package/router/tha-router.cjs.map +0 -1
  140. package/router/tha-router.js.map +0 -1
@@ -1,32 +1,32 @@
1
- this.TelperionElements=this.TelperionElements||{},function(t){"use strict";function e(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function r(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
1
+ this.TelperionElements=this.TelperionElements||{},function(t){"use strict";function e(t,e,r,n){var o,s=arguments.length,i=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i}function r(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const n=globalThis,o=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let a=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(e,t))}return t}toString(){return this.cssText}};const c=(t,...e)=>{const r=1===t.length?t[0]:e.reduce((e,r,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[n+1],t[0]);return new a(r,t,i)},l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,i))(e)})(t):t,{is:h,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:f,getPrototypeOf:v}=Object,m=globalThis,y=m.trustedTypes,g=y?y.emptyScript:"",$=m.reactiveElementPolyfillSupport,_=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},S=(t,e)=>!h(t,e),w={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:S};
7
+ const n=globalThis,o=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let a=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(e,t))}return t}toString(){return this.cssText}};const l=(t,...e)=>{const r=1===t.length?t[0]:e.reduce((e,r,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[n+1],t[0]);return new a(r,t,s)},c=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:h,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:f,getPrototypeOf:m}=Object,v=globalThis,g=v.trustedTypes,y=g?g.emptyScript:"",$=v.reactiveElementPolyfillSupport,b=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},S=(t,e)=>!h(t,e),w={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:S};
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let C=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&u(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:o}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const i=n?.call(this);o?.call(this,e),this.requestUpdate(t,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=v(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...p(t),...f(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const r of e){const e=document.createElement("style"),o=n.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=r.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const o=(void 0!==r.converter?.toAttribute?r.converter:b).toAttribute(e,r.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=n;const i=o.fromAttribute(e,t.type);this[n]=i??this._$Ej?.get(n)??i,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,o=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??S)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:o},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),!0!==o||void 0!==i)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[_("elementProperties")]=new Map,C[_("finalized")]=new Map,$?.({ReactiveElement:C}),(m.reactiveElementVersions??=[]).push("2.1.1");
12
+ */Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&u(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:o}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const s=n?.call(this);o?.call(this,e),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=m(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...p(t),...f(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const r of e){const e=document.createElement("style"),o=n.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=r.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(void 0!==n&&!0===r.reflect){const o=(void 0!==r.converter?.toAttribute?r.converter:_).toAttribute(e,r.type);this._$Em=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=n;const s=o.fromAttribute(e,t.type);this[n]=s??this._$Ej?.get(n)??s,this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){const n=this.constructor,o=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??S)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==o||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),!0===n&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t){const{wrapped:t}=r,n=this[e];!0!==t||this._$AL.has(e)||void 0===n||this.C(e,void 0,r,n)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[b("elementProperties")]=new Map,E[b("finalized")]=new Map,$?.({ReactiveElement:E}),(v.reactiveElementVersions??=[]).push("2.1.1");
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const A=globalThis,E=A.trustedTypes,R=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+k,x=`<${O}>`,N=document,P=()=>N.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,I="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,L=/-->/g,W=/>/g,j=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,V=/"/g,q=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),B=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),F=new WeakMap,G=N.createTreeWalker(N,129);function K(t,e){if(!M(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}const Y=(t,e)=>{const r=t.length-1,n=[];let o,i=2===e?"<svg>":3===e?"<math>":"",s=H;for(let e=0;e<r;e++){const r=t[e];let a,c,l=-1,h=0;for(;h<r.length&&(s.lastIndex=h,c=s.exec(r),null!==c);)h=s.lastIndex,s===H?"!--"===c[1]?s=L:void 0!==c[1]?s=W:void 0!==c[2]?(q.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=j):void 0!==c[3]&&(s=j):s===j?">"===c[0]?(s=o??H,l=-1):void 0===c[1]?l=-2:(l=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?j:'"'===c[3]?V:D):s===V||s===D?s=j:s===L||s===W?s=H:(s=j,o=void 0);const u=s===j&&t[e+1].startsWith("/>")?" ":"";i+=s===H?r+x:l>=0?(n.push(a),r.slice(0,l)+T+r.slice(l)+k+u):r+k+(-2===l?e:u)}return[K(t,i+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class Z{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let o=0,i=0;const s=t.length-1,a=this.parts,[c,l]=Y(t,e);if(this.el=Z.createElement(c,r),G.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=G.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(T)){const e=l[i++],r=n.getAttribute(t).split(k),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:s[2],strings:r,ctor:"."===s[1]?rt:"?"===s[1]?nt:"@"===s[1]?ot:et}),n.removeAttribute(t)}else t.startsWith(k)&&(a.push({type:6,index:o}),n.removeAttribute(t));if(q.test(n.tagName)){const t=n.textContent.split(k),e=t.length-1;if(e>0){n.textContent=E?E.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],P()),G.nextNode(),a.push({type:2,index:++o});n.append(t[e],P())}}}else if(8===n.nodeType)if(n.data===O)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=n.data.indexOf(k,t+1));)a.push({type:7,index:o}),t+=k.length-1}o++}}static createElement(t,e){const r=N.createElement("template");return r.innerHTML=t,r}}function Q(t,e,r=t,n){if(e===B)return e;let o=void 0!==n?r._$Co?.[n]:r._$Cl;const i=U(e)?void 0:e._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(t),o._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=o:r._$Cl=o),void 0!==o&&(e=Q(t,o._$AS(t,e.values),o,n)),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:r}=this._$AD,n=(t?.creationScope??N).importNode(e,!0);G.currentNode=n;let o=G.nextNode(),i=0,s=0,a=r[0];for(;void 0!==a;){if(i===a.index){let e;2===a.type?e=new tt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new it(o,this,t)),this._$AV.push(e),a=r[++s]}i!==a?.index&&(o=G.nextNode(),i++)}return G.currentNode=N,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.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=Q(this,t,e),U(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==J&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Z.createElement(K(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new X(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=F.get(t.strings);return void 0===e&&F.set(t.strings,e=new Z(t)),e}k(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const o of t)n===e.length?e.push(r=new tt(this.O(P()),this.O(P()),this,this.options)):r=e[n],r._$AI(o),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,o){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=J}_$AI(t,e=this,r,n){const o=this.strings;let i=!1;if(void 0===o)t=Q(this,t,e,0),i=!U(t)||t!==this._$AH&&t!==B,i&&(this._$AH=t);else{const n=t;let s,a;for(t=o[0],s=0;s<o.length-1;s++)a=Q(this,n[r+s],e,s),a===B&&(a=this._$AH[s]),i||=!U(a)||a!==this._$AH[s],a===J?t=J:t!==J&&(t+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!n&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rt extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}class nt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}}class ot extends et{constructor(t,e,r,n,o){super(t,e,r,n,o),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??J)===B)return;const r=this._$AH,n=t===J&&r!==J||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==J&&(r===J||n);n&&this.element.removeEventListener(this.name,this,r),o&&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 it{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const st=A.litHtmlPolyfillSupport;st?.(Z,tt),(A.litHtmlVersions??=[]).push("3.3.1");const at=globalThis;
18
+ const C=globalThis,A=C.trustedTypes,R=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,O="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+k,x=`<${N}>`,T=document,P=()=>T.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,L="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,W=/>/g,j=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,V=/"/g,q=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),B=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),F=new WeakMap,G=T.createTreeWalker(T,129);function K(t,e){if(!M(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}const Y=(t,e)=>{const r=t.length-1,n=[];let o,s=2===e?"<svg>":3===e?"<math>":"",i=H;for(let e=0;e<r;e++){const r=t[e];let a,l,c=-1,h=0;for(;h<r.length&&(i.lastIndex=h,l=i.exec(r),null!==l);)h=i.lastIndex,i===H?"!--"===l[1]?i=I:void 0!==l[1]?i=W:void 0!==l[2]?(q.test(l[2])&&(o=RegExp("</"+l[2],"g")),i=j):void 0!==l[3]&&(i=j):i===j?">"===l[0]?(i=o??H,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,a=l[1],i=void 0===l[3]?j:'"'===l[3]?V:D):i===V||i===D?i=j:i===I||i===W?i=H:(i=j,o=void 0);const u=i===j&&t[e+1].startsWith("/>")?" ":"";s+=i===H?r+x:c>=0?(n.push(a),r.slice(0,c)+O+r.slice(c)+k+u):r+k+(-2===c?e:u)}return[K(t,s+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class Z{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let o=0,s=0;const i=t.length-1,a=this.parts,[l,c]=Y(t,e);if(this.el=Z.createElement(l,r),G.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=G.nextNode())&&a.length<i;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(O)){const e=c[s++],r=n.getAttribute(t).split(k),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:i[2],strings:r,ctor:"."===i[1]?rt:"?"===i[1]?nt:"@"===i[1]?ot:et}),n.removeAttribute(t)}else t.startsWith(k)&&(a.push({type:6,index:o}),n.removeAttribute(t));if(q.test(n.tagName)){const t=n.textContent.split(k),e=t.length-1;if(e>0){n.textContent=A?A.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],P()),G.nextNode(),a.push({type:2,index:++o});n.append(t[e],P())}}}else if(8===n.nodeType)if(n.data===N)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=n.data.indexOf(k,t+1));)a.push({type:7,index:o}),t+=k.length-1}o++}}static createElement(t,e){const r=T.createElement("template");return r.innerHTML=t,r}}function Q(t,e,r=t,n){if(e===B)return e;let o=void 0!==n?r._$Co?.[n]:r._$Cl;const s=U(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),void 0===s?o=void 0:(o=new s(t),o._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=o:r._$Cl=o),void 0!==o&&(e=Q(t,o._$AS(t,e.values),o,n)),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:r}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);G.currentNode=n;let o=G.nextNode(),s=0,i=0,a=r[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new tt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new st(o,this,t)),this._$AV.push(e),a=r[++i]}s!==a?.index&&(o=G.nextNode(),s++)}return G.currentNode=T,n}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.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=Q(this,t,e),U(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==J&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Z.createElement(K(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{const t=new X(n,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=F.get(t.strings);return void 0===e&&F.set(t.strings,e=new Z(t)),e}k(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const o of t)n===e.length?e.push(r=new tt(this.O(P()),this.O(P()),this,this.options)):r=e[n],r._$AI(o),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,o){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=J}_$AI(t,e=this,r,n){const o=this.strings;let s=!1;if(void 0===o)t=Q(this,t,e,0),s=!U(t)||t!==this._$AH&&t!==B,s&&(this._$AH=t);else{const n=t;let i,a;for(t=o[0],i=0;i<o.length-1;i++)a=Q(this,n[r+i],e,i),a===B&&(a=this._$AH[i]),s||=!U(a)||a!==this._$AH[i],a===J?t=J:t!==J&&(t+=(a??"")+o[i+1]),this._$AH[i]=a}s&&!n&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rt extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}class nt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}}class ot extends et{constructor(t,e,r,n,o){super(t,e,r,n,o),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??J)===B)return;const r=this._$AH,n=t===J&&r!==J||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==J&&(r===J||n);n&&this.element.removeEventListener(this.name,this,r),o&&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 st{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const it=C.litHtmlPolyfillSupport;it?.(Z,tt),(C.litHtmlVersions??=[]).push("3.3.1");const at=globalThis;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */let ct=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let o=n._$litPart$;if(void 0===o){const t=r?.renderBefore??null;n._$litPart$=o=new tt(e.insertBefore(P(),t),t,void 0,r??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};ct._$litElement$=!0,ct.finalized=!0,at.litElementHydrateSupport?.({LitElement:ct});const lt=at.litElementPolyfillSupport;lt?.({LitElement:ct}),(at.litElementVersions??=[]).push("4.2.1");
23
+ */let lt=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const n=r?.renderBefore??e;let o=n._$litPart$;if(void 0===o){const t=r?.renderBefore??null;n._$litPart$=o=new tt(e.insertBefore(P(),t),t,void 0,r??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};lt._$litElement$=!0,lt.finalized=!0,at.litElementHydrateSupport?.({LitElement:lt});const ct=at.litElementPolyfillSupport;ct?.({LitElement:lt}),(at.litElementVersions??=[]).push("4.2.1");
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- const ht=t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},ut={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:S},dt=(t=ut,e,r)=>{const{kind:n,metadata:o}=r;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),i.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const o=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,o,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const o=this[n];e.call(this,r),this.requestUpdate(n,o,t)}}throw Error("Unsupported decorator location: "+n)};
29
+ const ht=t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},ut={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:S},dt=(t=ut,e,r)=>{const{kind:n,metadata:o}=r;let s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),"accessor"===n){const{name:n}=r;return{set(r){const o=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,o,t)},init(e){return void 0!==e&&this.C(n,void 0,t,e),e}}}if("setter"===n){const{name:n}=r;return function(r){const o=this[n];e.call(this,r),this.requestUpdate(n,o,t)}}throw Error("Unsupported decorator location: "+n)};
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
@@ -36,7 +36,7 @@ const ht=t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */var ft=Object.defineProperty,vt=(t,e,r)=>(((t,e,r)=>{e in t?ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r})(t,"symbol"!=typeof e?e+"":e,r),r),mt=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},yt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},gt=(t,e,r)=>(((t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)})(t,e,"access private method"),r);
39
+ */var ft=Object.defineProperty,mt=(t,e,r)=>(((t,e,r)=>{e in t?ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r})(t,"symbol"!=typeof e?e+"":e,r),r),vt=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},gt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},yt=(t,e,r)=>(((t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)})(t,e,"access private method"),r);
40
40
  /**
41
41
  * @license
42
42
  * Copyright Google LLC All Rights Reserved.
@@ -51,14 +51,14 @@ function $t(t,e){return Object.is(t,e)}
51
51
  *
52
52
  * Use of this source code is governed by an MIT-style license that can be
53
53
  * found in the LICENSE file at https://angular.io/license
54
- */let _t=null,bt=!1,St=1;const wt=Symbol("SIGNAL");function Ct(t){const e=_t;return _t=t,e}const At={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Et(t){if(bt)throw new Error("undefined"!=typeof ngDevMode&&ngDevMode?"Assertion error: signal read during notification phase":"");if(null===_t)return;_t.consumerOnSignalRead(t);const e=_t.nextProducerIndex++;if(Pt(_t),e<_t.producerNode.length&&_t.producerNode[e]!==t&&Nt(_t)){xt(_t.producerNode[e],_t.producerIndexOfThis[e])}_t.producerNode[e]!==t&&(_t.producerNode[e]=t,_t.producerIndexOfThis[e]=Nt(_t)?Ot(t,_t,e):0),_t.producerLastReadVersion[e]=t.version}function Rt(t){if(t.dirty||t.lastCleanEpoch!==St){if(!t.producerMustRecompute(t)&&!function(t){Pt(t);for(let e=0;e<t.producerNode.length;e++){const r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version)return!0;if(Rt(r),n!==r.version)return!0}return!1}(t))return t.dirty=!1,void(t.lastCleanEpoch=St);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=St}}function Tt(t){if(void 0===t.liveConsumerNode)return;const e=bt;bt=!0;try{for(const e of t.liveConsumerNode)e.dirty||kt(e)}finally{bt=e}}function kt(t){var e;t.dirty=!0,Tt(t),null==(e=t.consumerMarkedDirty)||e.call(t.wrapper??t)}function Ot(t,e,r){var n;if(Ut(t),Pt(t),0===t.liveConsumerNode.length){null==(n=t.watched)||n.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)t.producerIndexOfThis[e]=Ot(t.producerNode[e],t,e)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function xt(t,e){var r;if(Ut(t),Pt(t),"undefined"!=typeof ngDevMode&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(1===t.liveConsumerNode.length){null==(r=t.unwatched)||r.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)xt(t.producerNode[e],t.producerIndexOfThis[e])}const n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){const r=t.liveConsumerIndexOfThis[e],n=t.liveConsumerNode[e];Pt(n),n.producerIndexOfThis[r]=e}}function Nt(t){var e;return t.consumerIsAlwaysLive||((null==(e=null==t?void 0:t.liveConsumerNode)?void 0:e.length)??0)>0}function Pt(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ut(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}
54
+ */let bt=null,_t=!1,St=1;const wt=Symbol("SIGNAL");function Et(t){const e=bt;return bt=t,e}const Ct={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function At(t){if(_t)throw new Error("undefined"!=typeof ngDevMode&&ngDevMode?"Assertion error: signal read during notification phase":"");if(null===bt)return;bt.consumerOnSignalRead(t);const e=bt.nextProducerIndex++;if(Pt(bt),e<bt.producerNode.length&&bt.producerNode[e]!==t&&Tt(bt)){xt(bt.producerNode[e],bt.producerIndexOfThis[e])}bt.producerNode[e]!==t&&(bt.producerNode[e]=t,bt.producerIndexOfThis[e]=Tt(bt)?Nt(t,bt,e):0),bt.producerLastReadVersion[e]=t.version}function Rt(t){if(t.dirty||t.lastCleanEpoch!==St){if(!t.producerMustRecompute(t)&&!function(t){Pt(t);for(let e=0;e<t.producerNode.length;e++){const r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version)return!0;if(Rt(r),n!==r.version)return!0}return!1}(t))return t.dirty=!1,void(t.lastCleanEpoch=St);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=St}}function Ot(t){if(void 0===t.liveConsumerNode)return;const e=_t;_t=!0;try{for(const e of t.liveConsumerNode)e.dirty||kt(e)}finally{_t=e}}function kt(t){var e;t.dirty=!0,Ot(t),null==(e=t.consumerMarkedDirty)||e.call(t.wrapper??t)}function Nt(t,e,r){var n;if(Ut(t),Pt(t),0===t.liveConsumerNode.length){null==(n=t.watched)||n.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)t.producerIndexOfThis[e]=Nt(t.producerNode[e],t,e)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function xt(t,e){var r;if(Ut(t),Pt(t),"undefined"!=typeof ngDevMode&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(1===t.liveConsumerNode.length){null==(r=t.unwatched)||r.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)xt(t.producerNode[e],t.producerIndexOfThis[e])}const n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){const r=t.liveConsumerIndexOfThis[e],n=t.liveConsumerNode[e];Pt(n),n.producerIndexOfThis[r]=e}}function Tt(t){var e;return t.consumerIsAlwaysLive||((null==(e=null==t?void 0:t.liveConsumerNode)?void 0:e.length)??0)>0}function Pt(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ut(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}
55
55
  /**
56
56
  * @license
57
57
  * Copyright Google LLC All Rights Reserved.
58
58
  *
59
59
  * Use of this source code is governed by an MIT-style license that can be
60
60
  * found in the LICENSE file at https://angular.io/license
61
- */function Mt(t){if(Rt(t),Et(t),t.value===Lt)throw t.error;return t.value}const It=Symbol("UNSET"),Ht=Symbol("COMPUTING"),Lt=Symbol("ERRORED"),Wt=(()=>({...At,value:It,dirty:!0,error:null,equal:$t,producerMustRecompute:t=>t.value===It||t.value===Ht,producerRecomputeValue(t){if(t.value===Ht)throw new Error("Detected cycle in computations.");const e=t.value;t.value=Ht;const r=function(t){return t&&(t.nextProducerIndex=0),Ct(t)}(t);let n,o=!1;try{n=t.computation.call(t.wrapper);o=e!==It&&e!==Lt&&t.equal.call(t.wrapper,e,n)}catch(e){n=Lt,t.error=e}finally{!function(t,e){if(Ct(e),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(Nt(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)xt(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(t,r)}o?t.value=e:(t.value=n,t.version++)}}))();let jt=
61
+ */function Mt(t){if(Rt(t),At(t),t.value===It)throw t.error;return t.value}const Lt=Symbol("UNSET"),Ht=Symbol("COMPUTING"),It=Symbol("ERRORED"),Wt=(()=>({...Ct,value:Lt,dirty:!0,error:null,equal:$t,producerMustRecompute:t=>t.value===Lt||t.value===Ht,producerRecomputeValue(t){if(t.value===Ht)throw new Error("Detected cycle in computations.");const e=t.value;t.value=Ht;const r=function(t){return t&&(t.nextProducerIndex=0),Et(t)}(t);let n,o=!1;try{n=t.computation.call(t.wrapper);o=e!==Lt&&e!==It&&t.equal.call(t.wrapper,e,n)}catch(e){n=It,t.error=e}finally{!function(t,e){if(Et(e),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(Tt(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)xt(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(t,r)}o?t.value=e:(t.value=n,t.version++)}}))();let jt=
62
62
  /**
63
63
  * @license
64
64
  * Copyright Google LLC All Rights Reserved.
@@ -66,7 +66,7 @@ function $t(t,e){return Object.is(t,e)}
66
66
  * Use of this source code is governed by an MIT-style license that can be
67
67
  * found in the LICENSE file at https://angular.io/license
68
68
  */
69
- function(){throw new Error};function Dt(){return Et(this),this.value}function Vt(t,e){!1===(null==_t?void 0:_t.consumerAllowSignalWrites)&&jt(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,function(t){t.version++,St++,Tt(t)}
69
+ function(){throw new Error};function Dt(){return At(this),this.value}function Vt(t,e){!1===(null==bt?void 0:bt.consumerAllowSignalWrites)&&jt(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,function(t){t.version++,St++,Ot(t)}
70
70
  /**
71
71
  * @license
72
72
  * Copyright 2024 Bloomberg Finance L.P.
@@ -82,7 +82,7 @@ function(){throw new Error};function Dt(){return Et(this),this.value}function Vt
82
82
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83
83
  * See the License for the specific language governing permissions and
84
84
  * limitations under the License.
85
- */(t))}const qt=(()=>({...At,equal:$t,value:void 0}))();const zt=Symbol("node");var Bt;(t=>{var e,r,n,o;e=zt,r=new WeakSet,t.isState=t=>"object"==typeof t&&mt(r,t),t.State=class{constructor(n,o={}){yt(this,r),vt(this,e);const i=
85
+ */(t))}const qt=(()=>({...Ct,equal:$t,value:void 0}))();const zt=Symbol("node");var Bt;(t=>{var e,r,n,o;e=zt,r=new WeakSet,t.isState=t=>"object"==typeof t&&vt(r,t),t.State=class{constructor(n,o={}){gt(this,r),mt(this,e);const s=
86
86
  /**
87
87
  * @license
88
88
  * Copyright Google LLC All Rights Reserved.
@@ -90,7 +90,7 @@ function(){throw new Error};function Dt(){return Et(this),this.value}function Vt
90
90
  * Use of this source code is governed by an MIT-style license that can be
91
91
  * found in the LICENSE file at https://angular.io/license
92
92
  */
93
- function(t){const e=Object.create(qt);e.value=t;const r=()=>(Et(e),e.value);return r[wt]=e,r}(n),s=i[wt];if(this[zt]=s,s.wrapper=this,o){const e=o.equals;e&&(s.equal=e),s.watched=o[t.subtle.watched],s.unwatched=o[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Dt.call(this[zt])}set(e){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(bt)throw new Error("Writes to signals not permitted during Watcher callback");Vt(this[zt],e)}};n=zt,o=new WeakSet,t.isComputed=t=>"object"==typeof t&&mt(o,t),t.Computed=class{constructor(e,r){yt(this,o),vt(this,n);const i=function(t){const e=Object.create(Wt);e.computation=t;const r=()=>Mt(e);return r[wt]=e,r}(e),s=i[wt];if(s.consumerAllowSignalWrites=!0,this[zt]=s,s.wrapper=this,r){const e=r.equals;e&&(s.equal=e),s.watched=r[t.subtle.watched],s.unwatched=r[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Mt(this[zt])}},(e=>{var r,n,o,i;e.untrack=function(t){let e,r=null;try{r=Ct(null),e=t()}finally{Ct(r)}return e},e.introspectSources=function(e){var r;if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return(null==(r=e[zt].producerNode)?void 0:r.map(t=>t.wrapper))??[]},e.introspectSinks=function(e){var r;if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called introspectSinks without a Signal argument");return(null==(r=e[zt].liveConsumerNode)?void 0:r.map(t=>t.wrapper))??[]},e.hasSinks=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called hasSinks without a Signal argument");const r=e[zt].liveConsumerNode;return!!r&&r.length>0},e.hasSources=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called hasSources without a Computed or Watcher argument");const r=e[zt].producerNode;return!!r&&r.length>0};r=zt,n=new WeakSet,o=new WeakSet,i=function(e){for(const r of e)if(!(0,t.isComputed)(r)&&!(0,t.isState)(r))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=t=>mt(n,t),e.Watcher=class{constructor(t){yt(this,n),yt(this,o),vt(this,r);let e=Object.create(At);e.wrapper=this,e.consumerMarkedDirty=t,e.consumerIsAlwaysLive=!0,e.consumerAllowSignalWrites=!1,e.producerNode=[],this[zt]=e}watch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");gt(this,o,i).call(this,e);const r=this[zt];r.dirty=!1;const n=Ct(r);for(const t of e)Et(t[zt]);Ct(n)}unwatch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");gt(this,o,i).call(this,e);const r=this[zt];Pt(r);for(let t=r.producerNode.length-1;t>=0;t--)if(e.includes(r.producerNode[t].wrapper)){xt(r.producerNode[t],r.producerIndexOfThis[t]);const e=r.producerNode.length-1;if(r.producerNode[t]=r.producerNode[e],r.producerIndexOfThis[t]=r.producerIndexOfThis[e],r.producerNode.length--,r.producerIndexOfThis.length--,r.nextProducerIndex--,t<r.producerNode.length){const e=r.producerIndexOfThis[t],n=r.producerNode[t];Ut(n),n.liveConsumerIndexOfThis[e]=t}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[zt].producerNode.filter(t=>t.dirty).map(t=>t.wrapper)}},e.currentComputed=function(){var t;return null==(t=_t)?void 0:t.wrapper},e.watched=Symbol("watched"),e.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(Bt||(Bt={}));
93
+ function(t){const e=Object.create(qt);e.value=t;const r=()=>(At(e),e.value);return r[wt]=e,r}(n),i=s[wt];if(this[zt]=i,i.wrapper=this,o){const e=o.equals;e&&(i.equal=e),i.watched=o[t.subtle.watched],i.unwatched=o[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Dt.call(this[zt])}set(e){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(_t)throw new Error("Writes to signals not permitted during Watcher callback");Vt(this[zt],e)}};n=zt,o=new WeakSet,t.isComputed=t=>"object"==typeof t&&vt(o,t),t.Computed=class{constructor(e,r){gt(this,o),mt(this,n);const s=function(t){const e=Object.create(Wt);e.computation=t;const r=()=>Mt(e);return r[wt]=e,r}(e),i=s[wt];if(i.consumerAllowSignalWrites=!0,this[zt]=i,i.wrapper=this,r){const e=r.equals;e&&(i.equal=e),i.watched=r[t.subtle.watched],i.unwatched=r[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Mt(this[zt])}},(e=>{var r,n,o,s;e.untrack=function(t){let e,r=null;try{r=Et(null),e=t()}finally{Et(r)}return e},e.introspectSources=function(e){var r;if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return(null==(r=e[zt].producerNode)?void 0:r.map(t=>t.wrapper))??[]},e.introspectSinks=function(e){var r;if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called introspectSinks without a Signal argument");return(null==(r=e[zt].liveConsumerNode)?void 0:r.map(t=>t.wrapper))??[]},e.hasSinks=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called hasSinks without a Signal argument");const r=e[zt].liveConsumerNode;return!!r&&r.length>0},e.hasSources=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called hasSources without a Computed or Watcher argument");const r=e[zt].producerNode;return!!r&&r.length>0};r=zt,n=new WeakSet,o=new WeakSet,s=function(e){for(const r of e)if(!(0,t.isComputed)(r)&&!(0,t.isState)(r))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=t=>vt(n,t),e.Watcher=class{constructor(t){gt(this,n),gt(this,o),mt(this,r);let e=Object.create(Ct);e.wrapper=this,e.consumerMarkedDirty=t,e.consumerIsAlwaysLive=!0,e.consumerAllowSignalWrites=!1,e.producerNode=[],this[zt]=e}watch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");yt(this,o,s).call(this,e);const r=this[zt];r.dirty=!1;const n=Et(r);for(const t of e)At(t[zt]);Et(n)}unwatch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");yt(this,o,s).call(this,e);const r=this[zt];Pt(r);for(let t=r.producerNode.length-1;t>=0;t--)if(e.includes(r.producerNode[t].wrapper)){xt(r.producerNode[t],r.producerIndexOfThis[t]);const e=r.producerNode.length-1;if(r.producerNode[t]=r.producerNode[e],r.producerIndexOfThis[t]=r.producerIndexOfThis[e],r.producerNode.length--,r.producerIndexOfThis.length--,r.nextProducerIndex--,t<r.producerNode.length){const e=r.producerIndexOfThis[t],n=r.producerNode[t];Ut(n),n.liveConsumerIndexOfThis[e]=t}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[zt].producerNode.filter(t=>t.dirty).map(t=>t.wrapper)}},e.currentComputed=function(){var t;return null==(t=bt)?void 0:t.wrapper},e.watched=Symbol("watched"),e.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(Bt||(Bt={}));
94
94
  /**
95
95
  * @license
96
96
  * Copyright 2023 Google LLC
@@ -106,17 +106,17 @@ let Jt=!1;const Ft=new Bt.subtle.Watcher(()=>{Jt||(Jt=!0,queueMicrotask(()=>{Jt=
106
106
  * @license
107
107
  * Copyright 2020 Google LLC
108
108
  * SPDX-License-Identifier: BSD-3-Clause
109
- */const te=(t,e)=>{const r=t._$AN;if(void 0===r)return!1;for(const t of r)t._$AO?.(e,!1),te(t,e);return!0},ee=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===r?.size)},re=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),ie(e)}};
109
+ */const te=(t,e)=>{const r=t._$AN;if(void 0===r)return!1;for(const t of r)t._$AO?.(e,!1),te(t,e);return!0},ee=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===r?.size)},re=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),se(e)}};
110
110
  /**
111
111
  * @license
112
112
  * Copyright 2017 Google LLC
113
113
  * SPDX-License-Identifier: BSD-3-Clause
114
- */function ne(t){void 0!==this._$AN?(ee(this),this._$AM=t,re(this)):this._$AM=t}function oe(t,e=!1,r=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=r;t<n.length;t++)te(n[t],!1),ee(n[t]);else null!=n&&(te(n,!1),ee(n));else te(this,t)}const ie=t=>{t.type==Qt&&(t._$AP??=oe,t._$AQ??=ne)};class se extends Xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),re(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(te(this,t),ee(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
114
+ */function ne(t){void 0!==this._$AN?(ee(this),this._$AM=t,re(this)):this._$AM=t}function oe(t,e=!1,r=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=r;t<n.length;t++)te(n[t],!1),ee(n[t]);else null!=n&&(te(n,!1),ee(n));else te(this,t)}const se=t=>{t.type==Qt&&(t._$AP??=oe,t._$AQ??=ne)};class ie extends Xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),re(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(te(this,t),ee(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
115
115
  /**
116
116
  * @license
117
117
  * Copyright 2023 Google LLC
118
118
  * SPDX-License-Identifier: BSD-3-Clause
119
- */let ae=!1;const ce=new Bt.subtle.Watcher(async()=>{ae||(ae=!0,queueMicrotask(()=>{ae=!1;for(const t of ce.getPending())t.get();ce.watch()}))});const le=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends se{_$S_(){var t,e;void 0===this._$Sm&&(this._$Sj=new Bt.Computed(()=>{var t;const e=null===(t=this._$SW)||void 0===t?void 0:t.get();return this.setValue(e),e}),this._$Sm=null!==(e=null===(t=this._$Sk)||void 0===t?void 0:t.h)&&void 0!==e?e:ce,this._$Sm.watch(this._$Sj),Bt.subtle.untrack(()=>{var t;return null===(t=this._$Sj)||void 0===t?void 0:t.get()}))}_$Sp(){void 0!==this._$Sm&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(t){return Bt.subtle.untrack(()=>t.get())}update(t,[e]){var r,n;return null!==(r=this._$Sk)&&void 0!==r||(this._$Sk=null===(n=t.options)||void 0===n?void 0:n.host),e!==this._$SW&&void 0!==this._$SW&&this._$Sp(),this._$SW=e,this._$S_(),Bt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}}),he=(t=>(e,...r)=>t(e,...r.map(t=>t instanceof Bt.State||t instanceof Bt.Computed?le(t):t)))(z);
119
+ */let ae=!1;const le=new Bt.subtle.Watcher(async()=>{ae||(ae=!0,queueMicrotask(()=>{ae=!1;for(const t of le.getPending())t.get();le.watch()}))});const ce=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ie{_$S_(){var t,e;void 0===this._$Sm&&(this._$Sj=new Bt.Computed(()=>{var t;const e=null===(t=this._$SW)||void 0===t?void 0:t.get();return this.setValue(e),e}),this._$Sm=null!==(e=null===(t=this._$Sk)||void 0===t?void 0:t.h)&&void 0!==e?e:le,this._$Sm.watch(this._$Sj),Bt.subtle.untrack(()=>{var t;return null===(t=this._$Sj)||void 0===t?void 0:t.get()}))}_$Sp(){void 0!==this._$Sm&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(t){return Bt.subtle.untrack(()=>t.get())}update(t,[e]){var r,n;return null!==(r=this._$Sk)&&void 0!==r||(this._$Sk=null===(n=t.options)||void 0===n?void 0:n.host),e!==this._$SW&&void 0!==this._$SW&&this._$Sp(),this._$SW=e,this._$S_(),Bt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}}),he=(t=>(e,...r)=>t(e,...r.map(t=>t instanceof Bt.State||t instanceof Bt.Computed?ce(t):t)))(z);
120
120
  /**
121
121
  * @license
122
122
  * Copyright 2023 Google LLC
@@ -127,7 +127,7 @@ let Jt=!1;const Ft=new Bt.subtle.Watcher(()=>{Jt||(Jt=!0,queueMicrotask(()=>{Jt=
127
127
  * Copyright 2023 Google LLC
128
128
  * SPDX-License-Identifier: BSD-3-Clause
129
129
  */
130
- Bt.State,Bt.Computed;const ue=(t,e)=>new Bt.State(t,e),de=(t,e)=>new Bt.Computed(t,e);var pe,fe;const ve=Symbol("ThaRoute:fragment"),me=Symbol("ThaRoute:path-pattern");function ye(){}t.ThaRoute=class extends ct{constructor(){super(...arguments),this[pe]=ue(this.#t()),this[fe]=null,this.path=null,this.#e=new MutationObserver(()=>{this[ve].set(this.#t())})}static{pe=ve,fe=me}#e;connectedCallback(){super.connectedCallback(),this.#e.observe(this,{childList:!0})}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"path"===t)this[me]=r?new URLPattern({pathname:r}):null}#t(){const t=this.querySelector("template");return t?new WeakRef(t.content):null}disconnectedCallback(){super.disconnectedCallback(),this.#e.disconnect()}},e([pt({type:String}),r("design:type",Object)],t.ThaRoute.prototype,"path",void 0),t.ThaRoute=e([ht("tha-route")],t.ThaRoute);class ge extends ct{constructor(){super(...arguments),this.color="contrast",this.shade=500,this.mixer="none"}static{this.rootStyles=(()=>{const t=c`
130
+ Bt.State,Bt.Computed;const ue=(t,e)=>new Bt.State(t,e),de=(t,e)=>new Bt.Computed(t,e),pe="tp-route-load",fe="tp-route-error";function me(t,e){return new CustomEvent(t,{detail:e,bubbles:!0,composed:!0})}const ve=Object.freeze({status:"none",url:null,fragment:null,error:null}),ge=async(t,e)=>{const r=await fetch(t,{signal:e});if(!r.ok)throw new Error(`Failed to load route source "${t}": ${r.status} ${r.statusText}`);return r.text()};function ye(t){const e=document.createElement("template");return e.innerHTML=t,e.content}class $e{#t;#e;#r;constructor(t=()=>{}){this.state=ue(ve),this.#t=null,this.#e=null,this.#r=t}get url(){return this.state.get().url}setUrl(t){t!==this.url&&(this.#n(),this.#o(t?{status:"idle",url:t,fragment:null,error:null}:ve))}load(t){const{status:e,url:r}=this.state.get();if(!r||"loaded"===e)return Promise.resolve();if(this.#e)return this.#e;const n=new AbortController;this.#t=n,this.#o({status:"loading",url:r,fragment:null,error:null});const o=this.#s(t,r,n).finally(()=>{this.#t===n&&(this.#t=null,this.#e=null)});return this.#e=o,o}abort(){if(!this.#t)return;const{url:t}=this.state.get();this.#n(),this.#o({status:"idle",url:t,fragment:null,error:null})}async#s(t,e,r){try{const n=await t(e,r.signal);if(r.signal.aborted)return;this.#o({status:"loaded",url:e,fragment:ye(n),error:null})}catch(t){if(r.signal.aborted)return;this.#o({status:"error",url:e,fragment:null,error:t})}}#n(){this.#t?.abort(),this.#t=null,this.#e=null}#o(t){this.state.set(t),this.#r(t)}}function be(t){const e=Array.from(t.children).filter(t=>t instanceof HTMLTemplateElement),r=t=>e.find(t)?.content??null;return{content:r(t=>!t.hasAttribute("data-loading")&&!t.hasAttribute("data-error")),loading:r(t=>t.hasAttribute("data-loading")),error:r(t=>t.hasAttribute("data-error"))}}var _e,Se,we;const Ee=Symbol("RouteElement:fragment"),Ce=Symbol("RouteElement:path-pattern"),Ae=Symbol("RouteElement:source-status"),Re=Symbol("RouteElement:set-active"),Oe=["loading","loaded","error"];function ke(){}t.RouteElement=class extends lt{constructor(){super(...arguments),this.#i=ue(be(this)),this.#a=new $e(t=>this.#l(t)),this.#c=!1,this[_e]=de(()=>{const t=this.#i.get(),{status:e,fragment:r}=this.#a.state.get();switch(e){case"none":return t.content;case"loaded":return r;case"error":return t.error;default:return t.loading}}),this[Se]=de(()=>this.#a.state.get().status),this[we]=null,this.path=null,this.src=null,this.loader=ge,this.#h=new MutationObserver(()=>{this.#i.set(be(this))})}#i;#a;#c;#h;connectedCallback(){super.connectedCallback(),this.#h.observe(this,{childList:!0}),this.#i.set(be(this)),this.#c&&this.#u()}attributeChangedCallback(t,e,r){switch(super.attributeChangedCallback(t,e,r),t){case"path":this[Ce]=r?new URLPattern({pathname:r}):null;break;case"src":this.#u()}}willUpdate(t){super.willUpdate(t),t.has("src")&&this.#u()}[(_e=Ee,Se=Ae,we=Ce,Re)](t){this.#c=t,this.#u()}#u(){this.#a.setUrl(this.src?function(t,e=document.baseURI){return new URL(t,e).href}(this.src):null),this.#c&&this.#a.load(this.loader)}#l({status:t,url:e,error:r}){for(const e of Oe)this.toggleAttribute(e,e===t);e&&("loaded"===t&&this.dispatchEvent(me(pe,{src:e})),"error"===t&&this.dispatchEvent(me(fe,{src:e,error:r})))}disconnectedCallback(){super.disconnectedCallback(),this.#h.disconnect(),this.#a.abort()}},e([pt({type:String}),r("design:type",Object)],t.RouteElement.prototype,"path",void 0),e([pt({type:String}),r("design:type",Object)],t.RouteElement.prototype,"src",void 0),t.RouteElement=e([ht("tp-route")],t.RouteElement);class Ne extends lt{constructor(){super(...arguments),this.color="contrast",this.shade=500,this.mixer="none"}static{this.rootStyles=(()=>{const t=l`
131
131
  @layer properties {
132
132
  :root {
133
133
  --tp-color-white: hsl(0 0% 100%);
@@ -143,7 +143,7 @@ Bt.State,Bt.Computed;const ue=(t,e)=>new Bt.State(t,e),de=(t,e)=>new Bt.Computed
143
143
  --tp-color-neutral: color-mix(in xyz, var(--tp-color-white) 50%, var(--tp-color-black) 50%);
144
144
  }
145
145
  }
146
- `;var e;return document.adoptedStyleSheets=(e=[...document.adoptedStyleSheets,t.styleSheet],[...new Set(e)]),t})()}static{this.shadedElementStyles=c`
146
+ `;var e;return document.adoptedStyleSheets=(e=[...document.adoptedStyleSheets,t.styleSheet],[...new Set(e)]),t})()}static{this.shadedElementStyles=l`
147
147
  --tp-element-color: var(--tp-color-primary);
148
148
  --tp-shade-attr: attr(shade type(<number>));
149
149
  --tp-shade-mixer-type: attr(mixer type(*));
@@ -171,15 +171,15 @@ Bt.State,Bt.Computed;const ue=(t,e)=>new Bt.State(t,e),de=(t,e)=>new Bt.Computed
171
171
  &[color="danger"] { --tp-element-color: var(--tp-color-danger); }
172
172
  &[color="warning"] { --tp-element-color: var(--tp-color-warning); }
173
173
  &[color="neutral"] { --tp-element-color: var(--tp-color-neutral); }
174
- `}willUpdate(t){t.has("shade")&&(this.mixer=500===this.shade?"none":this.shade>500?"black":"white")}}e([pt({type:String,reflect:!0}),r("design:type",String)],ge.prototype,"color",void 0),e([pt({type:Number,reflect:!0,converter(t,e){const r=Number(t);return isNaN(r)?500:function(t,e,r){return Math.max(Math.min(e,r),t)}(0,1e3,r)}}),r("design:type",Number)],ge.prototype,"shade",void 0),e([pt({type:String,reflect:!0}),r("design:type",String)],ge.prototype,"mixer",void 0);const $e=Zt(ct);function _e(){return _e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_e.apply(null,arguments)}var be;Zt(ge),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(be||(be={}));var Se="production"!==process.env.NODE_ENV?function(t){return Object.freeze(t)}:function(t){return t};function we(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}var Ce="beforeunload",Ae="popstate";function Ee(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=Ne(r.location.hash.substr(1)),e=t.pathname,o=void 0===e?"/":e,i=t.search,s=void 0===i?"":i,a=t.hash,c=void 0===a?"":a,l=n.state||{};return[l.idx,Se({pathname:o,search:s,hash:c,state:l.usr||null,key:l.key||"default"})]}var i=null;function s(){if(i)d.call(i),i=null;else{var t=be.Pop,e=o(),r=e[0],n=e[1];if(d.length)if(null!=r){var s=l-r;s&&(i={action:t,location:n,retry:function(){g(-1*s)}},g(s))}else"production"!==process.env.NODE_ENV&&we(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else y(t)}}r.addEventListener(Ae,s),r.addEventListener("hashchange",function(){xe(o()[1])!==xe(h)&&s()});var a=be.Pop,c=o(),l=c[0],h=c[1],u=ke(),d=ke();function p(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var n=r.location.href,o=n.indexOf("#");e=-1===o?n:n.slice(0,o)}return e}()+"#"+("string"==typeof t?t:xe(t))}function f(t,e){return void 0===e&&(e=null),Se(_e({pathname:h.pathname,hash:"",search:""},"string"==typeof t?Ne(t):t,{state:e,key:Oe()}))}function v(t,e){return[{usr:t.state,key:t.key,idx:e},p(t)]}function m(t,e,r){return!d.length||(d.call({action:t,location:e,retry:r}),!1)}function y(t){a=t;var e=o();l=e[0],h=e[1],u.call({action:a,location:h})}function g(t){n.go(t)}null==l&&(l=0,n.replaceState(_e({},n.state,{idx:l}),""));var $={get action(){return a},get location(){return h},createHref:p,push:function t(e,o){var i=be.Push,s=f(e,o);if("production"!==process.env.NODE_ENV&&we("/"===s.pathname.charAt(0),"Relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")"),m(i,s,function(){t(e,o)})){var a=v(s,l+1),c=a[0],h=a[1];try{n.pushState(c,"",h)}catch(t){r.location.assign(h)}y(i)}},replace:function t(e,r){var o=be.Replace,i=f(e,r);if("production"!==process.env.NODE_ENV&&we("/"===i.pathname.charAt(0),"Relative pathnames are not supported in hash history.replace("+JSON.stringify(e)+")"),m(o,i,function(){t(e,r)})){var s=v(i,l),a=s[0],c=s[1];n.replaceState(a,"",c),y(o)}},go:g,back:function(){g(-1)},forward:function(){g(1)},listen:function(t){return u.push(t)},block:function(t){var e=d.push(t);return 1===d.length&&r.addEventListener(Ce,Te),function(){e(),d.length||r.removeEventListener(Ce,Te)}}};return $}function Re(t,e,r){return Math.min(Math.max(t,e),r)}function Te(t){t.preventDefault(),t.returnValue=""}function ke(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter(function(t){return t!==e})}},call:function(e){t.forEach(function(t){return t&&t(e)})}}}function Oe(){return Math.random().toString(36).substr(2,8)}function xe(t){var e=t.pathname,r=void 0===e?"/":e,n=t.search,o=void 0===n?"":n,i=t.hash,s=void 0===i?"":i;return o&&"?"!==o&&(r+="?"===o.charAt(0)?o:"?"+o),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r}function Ne(t){var e={};if(t){var r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));var n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}const Pe={},Ue=ue("browser");function Me(t){let e=Pe[t];if(!e){switch(t){case"browser":e=function(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=r.location,e=t.pathname,o=t.search,i=t.hash,s=n.state||{};return[s.idx,Se({pathname:e,search:o,hash:i,state:s.usr||null,key:s.key||"default"})]}var i=null;r.addEventListener(Ae,function(){if(i)u.call(i),i=null;else{var t=be.Pop,e=o(),r=e[0],n=e[1];if(u.length)if(null!=r){var s=c-r;s&&(i={action:t,location:n,retry:function(){y(-1*s)}},y(s))}else"production"!==process.env.NODE_ENV&&we(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else m(t)}});var s=be.Pop,a=o(),c=a[0],l=a[1],h=ke(),u=ke();function d(t){return"string"==typeof t?t:xe(t)}function p(t,e){return void 0===e&&(e=null),Se(_e({pathname:l.pathname,hash:"",search:""},"string"==typeof t?Ne(t):t,{state:e,key:Oe()}))}function f(t,e){return[{usr:t.state,key:t.key,idx:e},d(t)]}function v(t,e,r){return!u.length||(u.call({action:t,location:e,retry:r}),!1)}function m(t){s=t;var e=o();c=e[0],l=e[1],h.call({action:s,location:l})}function y(t){n.go(t)}null==c&&(c=0,n.replaceState(_e({},n.state,{idx:c}),""));var g={get action(){return s},get location(){return l},createHref:d,push:function t(e,o){var i=be.Push,s=p(e,o);if(v(i,s,function(){t(e,o)})){var a=f(s,c+1),l=a[0],h=a[1];try{n.pushState(l,"",h)}catch(t){r.location.assign(h)}m(i)}},replace:function t(e,r){var o=be.Replace,i=p(e,r);if(v(o,i,function(){t(e,r)})){var s=f(i,c),a=s[0],l=s[1];n.replaceState(a,"",l),m(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(t){return h.push(t)},block:function(t){var e=u.push(t);return 1===u.length&&r.addEventListener(Ce,Te),function(){e(),u.length||r.removeEventListener(Ce,Te)}}};return g}();break;case"hash":e=Ee();break;default:e=function(t){void 0===t&&(t={});var e=t,r=e.initialEntries,n=void 0===r?["/"]:r,o=e.initialIndex,i=n.map(function(t){var e=Se(_e({pathname:"/",search:"",hash:"",state:null,key:Oe()},"string"==typeof t?Ne(t):t));return"production"!==process.env.NODE_ENV&&we("/"===e.pathname.charAt(0),"Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(t)+")"),e}),s=Re(null==o?i.length-1:o,0,i.length-1),a=be.Pop,c=i[s],l=ke(),h=ke();function u(t,e){return void 0===e&&(e=null),Se(_e({pathname:c.pathname,search:"",hash:""},"string"==typeof t?Ne(t):t,{state:e,key:Oe()}))}function d(t,e,r){return!h.length||(h.call({action:t,location:e,retry:r}),!1)}function p(t,e){a=t,c=e,l.call({action:a,location:c})}function f(t){var e=Re(s+t,0,i.length-1),r=be.Pop,n=i[e];d(r,n,function(){f(t)})&&(s=e,p(r,n))}var v={get index(){return s},get action(){return a},get location(){return c},createHref:function(t){return"string"==typeof t?t:xe(t)},push:function t(e,r){var n=be.Push,o=u(e,r);"production"!==process.env.NODE_ENV&&we("/"===c.pathname.charAt(0),"Relative pathnames are not supported in memory history.push("+JSON.stringify(e)+")"),d(n,o,function(){t(e,r)})&&(s+=1,i.splice(s,i.length,o),p(n,o))},replace:function t(e,r){var n=be.Replace,o=u(e,r);"production"!==process.env.NODE_ENV&&we("/"===c.pathname.charAt(0),"Relative pathnames are not supported in memory history.replace("+JSON.stringify(e)+")"),d(n,o,function(){t(e,r)})&&(i[s]=o,p(n,o))},go:f,back:function(){f(-1)},forward:function(){f(1)},listen:function(t){return l.push(t)},block:function(t){return h.push(t)}};return v}()}Pe[t]=e}return e}de(()=>Me(Ue.get()));const Ie=Symbol("HistoryManaged:history"),He=Symbol("HistoryManaged:historyType"),Le=t=>{var n,o;class i extends t{constructor(){super(...arguments),this.history=void 0,this.#r=ue(this.history),this.#n=de(()=>{const t=this.parentElement?.closest("tha-router-config, tha-router-outlet");return t?.[He]?.get()}),this[n]=de(()=>this.#r.get()??this.#n.get()??Ue.get()),this[o]=de(()=>Me(this[He].get()))}static{n=He,o=Ie}#r;#n;attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"history"===t)this.#r.set(r)}}return e([pt({type:String}),r("design:type",Object)],i.prototype,"history",void 0),i};function We(t=ye){return new Promise((e,r)=>{setTimeout(()=>{try{const r=t();e(r)}catch(t){r(t)}},0)})}var je;const De=Symbol("ThaRouterOutlet:renderRoute"),Ve=Symbol("ThaRouterOutlet:params");function qe(t){return!!t}function ze(t){return t.filter(qe)}t.ThaRouterOutlet=class extends $e{constructor(){super(...arguments),this.#o=ue(void 0),this.#i=ue(null),this.#s=de(()=>this.#i.get()?.deref()?.[ve].get()??null),this.#a=de(()=>{const t=this.#o.get()?.deref(),e=this.#i.get()?.deref(),r=e?.[me];if(!t||!r)return null;const{location:{pathname:n}}=t[Ie].get();return r.exec(n,"http://dummy.base")?.pathname.groups??null}),this[je]=de(()=>{const t=this.#a.get()??{},e=this.parentElement?.closest("tha-router-outlet"),r=e?.[Ve].get()??{};return Object.freeze({...r,...t})}),this.params={},this.#c=ye,this.#l=ye,this.#h=ye,this.for=null,this.routePath=null,this.routeID=void 0}#o;#i;#s;#a;#c;#l;#h;connectedCallback(){super.connectedCallback(),We(()=>{this.bindToRouter()}),this.#c=this.updateEffect(()=>{Array.from(this.renderRoot.children).forEach(t=>t.remove());const t=this.#s.get()?.deref()??null;t&&this.renderRoot.appendChild(t.cloneNode(!0))}),this.#l=this.updateEffect(()=>{const t=this.#i.get()?.deref()??null;this.routePath=t?.getAttribute("path")??null,this.routeID=t?.id?t?.id:void 0}),this.#h=this.updateEffect(()=>{const t=this[Ve].get();Array.from(this.attributes).filter(t=>t.name.startsWith("param-")).filter(e=>!(e.name.slice(6)in t)).forEach(t=>{this.removeAttribute(t.name)});for(const[e,r]of Object.entries(t))this.setAttribute(`param-${e}`,r??"");this.params=t})}bindToRouter(t){if(!t)if(this.for){t=this.getRootNode().querySelector(`tha-router#${this.for}`)??void 0}else t=this.closest("tha-router")??void 0;const e=this.#o?.get()?.deref()??null;return e===t?e:(e?.assignOutlet(null),t?.assignOutlet(this),this.#o.set(t?new WeakRef(t):void 0),t??null)}[(je=Ve,De)](t){this.#i.set(t?new WeakRef(t):null)}disconnectedCallback(){super.disconnectedCallback(),this.#o?.get()?.deref()?.assignOutlet(null);try{this.#c(),this.#l(),this.#h()}catch{}}createRenderRoot(){return this}},e([function(t){return pt({...t,state:!0,attribute:!1})}(),r("design:type",Object)],t.ThaRouterOutlet.prototype,"params",void 0),e([pt({type:String}),r("design:type",Object)],t.ThaRouterOutlet.prototype,"for",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.ThaRouterOutlet.prototype,"routePath",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.ThaRouterOutlet.prototype,"routeID",void 0),t.ThaRouterOutlet=e([ht("tha-router-outlet")],t.ThaRouterOutlet),t.ThaRouter=class extends(Le($e)){static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tha-router-styles"),t.textContent=c`
175
- tha-router {
176
- & > :not(tha-router-outlet) {
174
+ `}willUpdate(t){t.has("shade")&&(this.mixer=500===this.shade?"none":this.shade>500?"black":"white")}}e([pt({type:String,reflect:!0}),r("design:type",String)],Ne.prototype,"color",void 0),e([pt({type:Number,reflect:!0,converter(t,e){const r=Number(t);return isNaN(r)?500:function(t,e,r){return Math.max(Math.min(e,r),t)}(0,1e3,r)}}),r("design:type",Number)],Ne.prototype,"shade",void 0),e([pt({type:String,reflect:!0}),r("design:type",String)],Ne.prototype,"mixer",void 0);const xe=Zt(lt);function Te(){return Te=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Te.apply(null,arguments)}var Pe;Zt(Ne),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(Pe||(Pe={}));var Ue="production"!==process.env.NODE_ENV?function(t){return Object.freeze(t)}:function(t){return t};function Me(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}var Le="beforeunload",He="popstate";function Ie(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=ze(r.location.hash.substr(1)),e=t.pathname,o=void 0===e?"/":e,s=t.search,i=void 0===s?"":s,a=t.hash,l=void 0===a?"":a,c=n.state||{};return[c.idx,Ue({pathname:o,search:i,hash:l,state:c.usr||null,key:c.key||"default"})]}var s=null;function i(){if(s)d.call(s),s=null;else{var t=Pe.Pop,e=o(),r=e[0],n=e[1];if(d.length)if(null!=r){var i=c-r;i&&(s={action:t,location:n,retry:function(){y(-1*i)}},y(i))}else"production"!==process.env.NODE_ENV&&Me(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else g(t)}}r.addEventListener(He,i),r.addEventListener("hashchange",function(){qe(o()[1])!==qe(h)&&i()});var a=Pe.Pop,l=o(),c=l[0],h=l[1],u=De(),d=De();function p(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var n=r.location.href,o=n.indexOf("#");e=-1===o?n:n.slice(0,o)}return e}()+"#"+("string"==typeof t?t:qe(t))}function f(t,e){return void 0===e&&(e=null),Ue(Te({pathname:h.pathname,hash:"",search:""},"string"==typeof t?ze(t):t,{state:e,key:Ve()}))}function m(t,e){return[{usr:t.state,key:t.key,idx:e},p(t)]}function v(t,e,r){return!d.length||(d.call({action:t,location:e,retry:r}),!1)}function g(t){a=t;var e=o();c=e[0],h=e[1],u.call({action:a,location:h})}function y(t){n.go(t)}null==c&&(c=0,n.replaceState(Te({},n.state,{idx:c}),""));var $={get action(){return a},get location(){return h},createHref:p,push:function t(e,o){var s=Pe.Push,i=f(e,o);if("production"!==process.env.NODE_ENV&&Me("/"===i.pathname.charAt(0),"Relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")"),v(s,i,function(){t(e,o)})){var a=m(i,c+1),l=a[0],h=a[1];try{n.pushState(l,"",h)}catch(t){r.location.assign(h)}g(s)}},replace:function t(e,r){var o=Pe.Replace,s=f(e,r);if("production"!==process.env.NODE_ENV&&Me("/"===s.pathname.charAt(0),"Relative pathnames are not supported in hash history.replace("+JSON.stringify(e)+")"),v(o,s,function(){t(e,r)})){var i=m(s,c),a=i[0],l=i[1];n.replaceState(a,"",l),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(t){return u.push(t)},block:function(t){var e=d.push(t);return 1===d.length&&r.addEventListener(Le,je),function(){e(),d.length||r.removeEventListener(Le,je)}}};return $}function We(t,e,r){return Math.min(Math.max(t,e),r)}function je(t){t.preventDefault(),t.returnValue=""}function De(){var t=[];return{get length(){return t.length},push:function(e){return t.push(e),function(){t=t.filter(function(t){return t!==e})}},call:function(e){t.forEach(function(t){return t&&t(e)})}}}function Ve(){return Math.random().toString(36).substr(2,8)}function qe(t){var e=t.pathname,r=void 0===e?"/":e,n=t.search,o=void 0===n?"":n,s=t.hash,i=void 0===s?"":s;return o&&"?"!==o&&(r+="?"===o.charAt(0)?o:"?"+o),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}function ze(t){var e={};if(t){var r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));var n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}const Be={},Je=ue("browser");function Fe(t){let e=Be[t];if(!e){switch(t){case"browser":e=function(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function o(){var t=r.location,e=t.pathname,o=t.search,s=t.hash,i=n.state||{};return[i.idx,Ue({pathname:e,search:o,hash:s,state:i.usr||null,key:i.key||"default"})]}var s=null;r.addEventListener(He,function(){if(s)u.call(s),s=null;else{var t=Pe.Pop,e=o(),r=e[0],n=e[1];if(u.length)if(null!=r){var i=l-r;i&&(s={action:t,location:n,retry:function(){g(-1*i)}},g(i))}else"production"!==process.env.NODE_ENV&&Me(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else v(t)}});var i=Pe.Pop,a=o(),l=a[0],c=a[1],h=De(),u=De();function d(t){return"string"==typeof t?t:qe(t)}function p(t,e){return void 0===e&&(e=null),Ue(Te({pathname:c.pathname,hash:"",search:""},"string"==typeof t?ze(t):t,{state:e,key:Ve()}))}function f(t,e){return[{usr:t.state,key:t.key,idx:e},d(t)]}function m(t,e,r){return!u.length||(u.call({action:t,location:e,retry:r}),!1)}function v(t){i=t;var e=o();l=e[0],c=e[1],h.call({action:i,location:c})}function g(t){n.go(t)}null==l&&(l=0,n.replaceState(Te({},n.state,{idx:l}),""));var y={get action(){return i},get location(){return c},createHref:d,push:function t(e,o){var s=Pe.Push,i=p(e,o);if(m(s,i,function(){t(e,o)})){var a=f(i,l+1),c=a[0],h=a[1];try{n.pushState(c,"",h)}catch(t){r.location.assign(h)}v(s)}},replace:function t(e,r){var o=Pe.Replace,s=p(e,r);if(m(o,s,function(){t(e,r)})){var i=f(s,l),a=i[0],c=i[1];n.replaceState(a,"",c),v(o)}},go:g,back:function(){g(-1)},forward:function(){g(1)},listen:function(t){return h.push(t)},block:function(t){var e=u.push(t);return 1===u.length&&r.addEventListener(Le,je),function(){e(),u.length||r.removeEventListener(Le,je)}}};return y}();break;case"hash":e=Ie();break;default:e=function(t){void 0===t&&(t={});var e=t,r=e.initialEntries,n=void 0===r?["/"]:r,o=e.initialIndex,s=n.map(function(t){var e=Ue(Te({pathname:"/",search:"",hash:"",state:null,key:Ve()},"string"==typeof t?ze(t):t));return"production"!==process.env.NODE_ENV&&Me("/"===e.pathname.charAt(0),"Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(t)+")"),e}),i=We(null==o?s.length-1:o,0,s.length-1),a=Pe.Pop,l=s[i],c=De(),h=De();function u(t,e){return void 0===e&&(e=null),Ue(Te({pathname:l.pathname,search:"",hash:""},"string"==typeof t?ze(t):t,{state:e,key:Ve()}))}function d(t,e,r){return!h.length||(h.call({action:t,location:e,retry:r}),!1)}function p(t,e){a=t,l=e,c.call({action:a,location:l})}function f(t){var e=We(i+t,0,s.length-1),r=Pe.Pop,n=s[e];d(r,n,function(){f(t)})&&(i=e,p(r,n))}var m={get index(){return i},get action(){return a},get location(){return l},createHref:function(t){return"string"==typeof t?t:qe(t)},push:function t(e,r){var n=Pe.Push,o=u(e,r);"production"!==process.env.NODE_ENV&&Me("/"===l.pathname.charAt(0),"Relative pathnames are not supported in memory history.push("+JSON.stringify(e)+")"),d(n,o,function(){t(e,r)})&&(i+=1,s.splice(i,s.length,o),p(n,o))},replace:function t(e,r){var n=Pe.Replace,o=u(e,r);"production"!==process.env.NODE_ENV&&Me("/"===l.pathname.charAt(0),"Relative pathnames are not supported in memory history.replace("+JSON.stringify(e)+")"),d(n,o,function(){t(e,r)})&&(s[i]=o,p(n,o))},go:f,back:function(){f(-1)},forward:function(){f(1)},listen:function(t){return c.push(t)},block:function(t){return h.push(t)}};return m}()}Be[t]=e}return e}de(()=>Fe(Je.get()));const Ge=Symbol("HistoryManaged:history"),Ke=Symbol("HistoryManaged:historyType"),Ye=t=>{var n,o;class s extends t{constructor(){super(...arguments),this.history=void 0,this.#d=ue(this.history),this.#p=de(()=>{const t=this.parentElement?.closest("tp-router-config, tp-router-outlet");return t?.[Ke]?.get()}),this[n]=de(()=>this.#d.get()??this.#p.get()??Je.get()),this[o]=de(()=>Fe(this[Ke].get()))}static{n=Ke,o=Ge}#d;#p;attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"history"===t)this.#d.set(r)}}return e([pt({type:String}),r("design:type",Object)],s.prototype,"history",void 0),s};function Ze(t=ke){return new Promise((e,r)=>{setTimeout(()=>{try{const r=t();e(r)}catch(t){r(t)}},0)})}var Qe;const Xe=Symbol("RouterOutletElement:renderRoute"),tr=Symbol("RouterOutletElement:params");function er(t){return!!t}function rr(t){return t.filter(er)}t.RouterOutletElement=class extends xe{constructor(){super(...arguments),this.#f=ue(void 0),this.#m=ue(null),this.#v=de(()=>this.#m.get()?.deref()?.[Ee].get()??null),this.#g=de(()=>{const t=this.#f.get()?.deref(),e=this.#m.get()?.deref(),r=e?.[Ce];if(!t||!r)return null;const{location:{pathname:n}}=t[Ge].get();return r.exec(n,"http://dummy.base")?.pathname.groups??null}),this[Qe]=de(()=>{const t=this.#g.get()??{},e=this.parentElement?.closest("tp-router-outlet"),r=e?.[tr].get()??{};return Object.freeze({...r,...t})}),this.params={},this.#y=[],this.#$=ke,this.#b=ke,this.#_=ke,this.for=null,this.routePath=null,this.routeID=void 0}#f;#m;#v;#g;#y;#$;#b;#_;connectedCallback(){super.connectedCallback(),Ze(()=>{this.bindToRouter()}),this.#$=this.updateEffect(()=>{this.#y.forEach(t=>t.parentNode?.removeChild(t)),this.#y=[];const t=this.#v.get();if(!t)return;const e=t.cloneNode(!0);this.#y=Array.from(e.childNodes),this.renderRoot.appendChild(e)}),this.#b=this.updateEffect(()=>{const t=this.#m.get()?.deref()??null;this.routePath=t?.getAttribute("path")??null,this.routeID=t?.id?t?.id:void 0;const e=t?.[Ae].get()??null;this.toggleAttribute("route-loading","idle"===e||"loading"===e),this.toggleAttribute("route-error","error"===e)}),this.#_=this.updateEffect(()=>{const t=this[tr].get();Array.from(this.attributes).filter(t=>t.name.startsWith("param-")).filter(e=>!(e.name.slice(6)in t)).forEach(t=>{this.removeAttribute(t.name)});for(const[e,r]of Object.entries(t))this.setAttribute(`param-${e}`,r??"");this.params=t})}bindToRouter(t){if(!t)if(this.for){t=this.getRootNode().querySelector(`tp-router#${this.for}`)??void 0}else t=this.closest("tp-router")??void 0;const e=this.#f?.get()?.deref()??null;return e===t?e:(e?.assignOutlet(null),t?.assignOutlet(this),this.#f.set(t?new WeakRef(t):void 0),t??null)}[(Qe=tr,Xe)](t){this.#m.set(t?new WeakRef(t):null)}disconnectedCallback(){super.disconnectedCallback(),this.#f?.get()?.deref()?.assignOutlet(null);try{this.#$(),this.#b(),this.#_()}catch{}}createRenderRoot(){return this}},e([function(t){return pt({...t,state:!0,attribute:!1})}(),r("design:type",Object)],t.RouterOutletElement.prototype,"params",void 0),e([pt({type:String}),r("design:type",Object)],t.RouterOutletElement.prototype,"for",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.RouterOutletElement.prototype,"routePath",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.RouterOutletElement.prototype,"routeID",void 0),t.RouterOutletElement=e([ht("tp-router-outlet")],t.RouterOutletElement),t.RouterElement=class extends(Ye(xe)){static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tp-router-styles"),t.textContent=l`
175
+ tp-router {
176
+ & > :not(tp-router-outlet) {
177
177
  display: none;
178
178
  }
179
179
  }
180
- `.toString(),document.head.appendChild(t)}#u=new MutationObserver(e=>{e.filter(t=>"childList"===t.type).length&&this.#d.set(Array.from(this.children).filter(e=>e instanceof t.ThaRoute).map(t=>new WeakRef(t)))});#p=ye;#f=ye;#v=ye;#d=ue([]);#m=ue(null);#y=ue(null);connectedCallback(){super.connectedCallback(),this.#u.observe(this,{childList:!0}),this.#p=this.updateEffect(()=>{const t=this.#m.get()?.deref()??null,e=this.#y.get()?.deref()??null;e?.[De](t)}),this.#f=this.updateEffect(()=>{const t=this[Ie].get();this.#v(),this.#g({location:this[Ie].get().location,action:"POP"}),this.#v=t?t.listen(this.#g):ye}),We(()=>{this.#g({location:this[Ie].get().location,action:"POP"})})}assignOutlet(t){this.#y.set(t?new WeakRef(t):null)}#g=t=>{const e=this.#d.get().map(t=>t.deref()).filter(Boolean);for(const r of e){const e=r[me];if(e?.test({pathname:t.location.pathname}))return void this.#m.set(new WeakRef(r))}this.#m.set(null)};disconnectedCallback(){super.disconnectedCallback();try{this.#p(),this.#f()}catch{}this.#u.disconnect(),this.#v()}createRenderRoot(){return this}},t.ThaRouter=e([ht("tha-router")],t.ThaRouter),t.ThaRouterLink=class extends(Le($e)){constructor(){super(...arguments),this.to=null,this.active=!1,this.#$=ye,this.#v=ye,this.#_=ue(null),this.#b=de(()=>{const t=this.#_.get();if(!t||"back"===t||"forward"===t)return null;try{return new URLPattern({pathname:t})}catch{return null}}),this.#S=t=>{const e=this[Ie].get();if(console.log(this[He].get()),"back"===this.to)return e.back();if("forward"===this.to)return e.forward();const r=e.location.pathname+e.location.search+e.location.hash;let n=this.to;if(n?.startsWith(".")){const t=ze(r.split("/")),e=ze(n.split("/"));for(const r of e)".."===r?t.pop():"."!==r&&t.push(r);n="/"+t.join("/")}n=n?.replaceAll("//","/"),this[Ie].get()?.push(n||"/")}}static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tha-router-link-styles"),t.textContent=c`
181
- tha-router-link {
180
+ `.toString(),document.head.appendChild(t)}#S=new MutationObserver(e=>{e.filter(t=>"childList"===t.type).length&&this.#w.set(Array.from(this.children).filter(e=>e instanceof t.RouteElement).map(t=>new WeakRef(t)))});#E=ke;#C=ke;#A=ke;#w=ue([]);#R=ue(null);#O=ue(null);#k=null;connectedCallback(){super.connectedCallback(),this.#S.observe(this,{childList:!0}),this.#E=this.updateEffect(()=>{const t=this.#R.get()?.deref()??null,e=this.#O.get()?.deref()??null;e?.[Xe](t)}),this.#C=this.updateEffect(()=>{const t=this[Ge].get();this.#A(),this.#N({location:this[Ge].get().location,action:"POP"}),this.#A=t?t.listen(this.#N):ke}),Ze(()=>{this.#N({location:this[Ge].get().location,action:"POP"})})}assignOutlet(t){this.#O.set(t?new WeakRef(t):null)}#N=t=>{const e=this.#w.get().map(t=>t.deref()).filter(Boolean).find(e=>e[Ce]?.test({pathname:t.location.pathname}))??null;this.#x(e),this.#R.set(e?new WeakRef(e):null)};#x(t){const e=this.#k?.deref()??null;e&&e!==t&&e[Re](!1),t?.[Re](!0),this.#k=t?new WeakRef(t):null}disconnectedCallback(){super.disconnectedCallback();try{this.#E(),this.#C()}catch{}this.#S.disconnect(),this.#A()}createRenderRoot(){return this}},t.RouterElement=e([ht("tp-router")],t.RouterElement),t.RouterLinkElement=class extends(Ye(xe)){constructor(){super(...arguments),this.to=null,this.active=!1,this.#T=ke,this.#A=ke,this.#P=ue(null),this.#U=de(()=>{const t=this.#P.get();if(!t||"back"===t||"forward"===t)return null;try{return new URLPattern({pathname:t})}catch{return null}}),this.#M=t=>{const e=this[Ge].get();if(console.log(this[Ke].get()),"back"===this.to)return e.back();if("forward"===this.to)return e.forward();const r=e.location.pathname+e.location.search+e.location.hash;let n=this.to;if(n?.startsWith(".")){const t=rr(r.split("/")),e=rr(n.split("/"));for(const r of e)".."===r?t.pop():"."!==r&&t.push(r);n="/"+t.join("/")}n=n?.replaceAll("//","/"),this[Ge].get()?.push(n||"/")}}static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tp-router-link-styles"),t.textContent=l`
181
+ tp-router-link {
182
182
  cursor: pointer;
183
183
  }
184
- `.toString(),document.head.appendChild(t)}#$;#v;#_;#b;connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#S),this.#$=this.updateEffect(()=>{const t=this[Ie].get(),e=this.#b.get();this.active=e?.test({pathname:t?.location.pathname??""})??!1,this.#v=t?.listen(()=>{this.active=e?.test({pathname:t.location.pathname})??!1})??ye})}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"to"===t)this.#_.set(r)}#S;disconnectedCallback(){super.disconnectedCallback();try{this.#$()}catch{}this.#v(),this.removeEventListener("click",this.#S)}createRenderRoot(){return this}},e([pt({type:String}),r("design:type",Object)],t.ThaRouterLink.prototype,"to",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.ThaRouterLink.prototype,"active",void 0),t.ThaRouterLink=e([ht("tha-router-link")],t.ThaRouterLink),t.ThaRouterConfig=class extends(Le($e)){#w=ye;connectedCallback(){super.connectedCallback(),document.head.contains(this)&&(console.log("ThaRouterConfig: Setting global history type to",this[He].get()),this.#w=this.updateEffect(()=>{Ue.set(this[He].get())}))}disconnectedCallback(){super.disconnectedCallback();try{this.#w()}catch{}}createRenderRoot(){return this}},t.ThaRouterConfig=e([ht("tha-router-config")],t.ThaRouterConfig),t.ThaRouterParam=class extends $e{constructor(){super(...arguments),this.#y=ue(null),this.#C=ue(""),this.#A=de(()=>this.#y.get()?.[Ve]?.get()[this.#C.get()]),this.name=""}#y;#C;#A;connectedCallback(){super.connectedCallback();const t=this.closest("tha-router-outlet");if(!t)throw new Error("<tha-router-param> must be used within a <tha-router-outlet>.");this.#y.set(t)}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"name"===t)this.#C.set(r??"")}render(){return he`${this.#A}`}},e([pt({type:String}),r("design:type",String)],t.ThaRouterParam.prototype,"name",void 0),t.ThaRouterParam=e([ht("tha-router-param")],t.ThaRouterParam)}(this.TelperionElements.Router=this.TelperionElements.Router||{});
184
+ `.toString(),document.head.appendChild(t)}#T;#A;#P;#U;connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#M),this.#T=this.updateEffect(()=>{const t=this[Ge].get(),e=this.#U.get();this.active=e?.test({pathname:t?.location.pathname??""})??!1,this.#A=t?.listen(()=>{this.active=e?.test({pathname:t.location.pathname})??!1})??ke})}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"to"===t)this.#P.set(r)}#M;disconnectedCallback(){super.disconnectedCallback();try{this.#T()}catch{}this.#A(),this.removeEventListener("click",this.#M)}createRenderRoot(){return this}},e([pt({type:String}),r("design:type",Object)],t.RouterLinkElement.prototype,"to",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.RouterLinkElement.prototype,"active",void 0),t.RouterLinkElement=e([ht("tp-router-link")],t.RouterLinkElement),t.RouterConfigElement=class extends(Ye(xe)){#L=ke;connectedCallback(){super.connectedCallback(),document.head.contains(this)&&(console.log("RouterConfigElement: Setting global history type to",this[Ke].get()),this.#L=this.updateEffect(()=>{Je.set(this[Ke].get())}))}disconnectedCallback(){super.disconnectedCallback();try{this.#L()}catch{}}createRenderRoot(){return this}},t.RouterConfigElement=e([ht("tp-router-config")],t.RouterConfigElement),t.RouterParamElement=class extends xe{constructor(){super(...arguments),this.#O=ue(null),this.#H=ue(""),this.#I=de(()=>this.#O.get()?.[tr]?.get()[this.#H.get()]),this.name=""}#O;#H;#I;connectedCallback(){super.connectedCallback();const t=this.closest("tp-router-outlet");if(!t)throw new Error("<tp-router-param> must be used within a <tp-router-outlet>.");this.#O.set(t)}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"name"===t)this.#H.set(r??"")}render(){return he`${this.#I}`}},e([pt({type:String}),r("design:type",String)],t.RouterParamElement.prototype,"name",void 0),t.RouterParamElement=e([ht("tp-router-param")],t.RouterParamElement),t.ROUTE_ERROR_EVENT=fe,t.ROUTE_LOAD_EVENT=pe,t.defaultRouteSourceLoader=ge}(this.TelperionElements.Router=this.TelperionElements.Router||{});
185
185
  //# sourceMappingURL=index.js.map