@telperion/elements 1.0.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 (86) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +102 -0
  3. package/bundle.js +164 -0
  4. package/bundle.mjs +2630 -0
  5. package/drag-drop/drag-element.cjs +438 -0
  6. package/drag-drop/drag-element.d.ts +120 -0
  7. package/drag-drop/drag-element.js +437 -0
  8. package/drag-drop/drag-element.js.map +1 -0
  9. package/drag-drop/drag-handle-element.cjs +35 -0
  10. package/drag-drop/drag-handle-element.d.ts +12 -0
  11. package/drag-drop/drag-handle-element.js +34 -0
  12. package/drag-drop/drag-handle-element.js.map +1 -0
  13. package/drag-drop/dropzone-element.cjs +117 -0
  14. package/drag-drop/dropzone-element.d.ts +17 -0
  15. package/drag-drop/dropzone-element.js +116 -0
  16. package/drag-drop/dropzone-element.js.map +1 -0
  17. package/drag-drop/index.cjs +11 -0
  18. package/drag-drop/index.d.ts +22 -0
  19. package/drag-drop/index.js +6 -0
  20. package/drag-drop/index.js.map +1 -0
  21. package/drag-drop/private-props.cjs +6 -0
  22. package/drag-drop/private-props.d.ts +3 -0
  23. package/drag-drop/private-props.js +5 -0
  24. package/drag-drop/private-props.js.map +1 -0
  25. package/drag-drop/tha-drag-event.cjs +34 -0
  26. package/drag-drop/tha-drag-event.d.ts +19 -0
  27. package/drag-drop/tha-drag-event.js +32 -0
  28. package/drag-drop/tha-drag-event.js.map +1 -0
  29. package/icon/icon-element.cjs +114 -0
  30. package/icon/icon-element.d.ts +40 -0
  31. package/icon/icon-element.js +113 -0
  32. package/icon/icon-element.js.map +1 -0
  33. package/icon/index.cjs +5 -0
  34. package/icon/index.d.ts +1 -0
  35. package/icon/index.js +3 -0
  36. package/icon/index.js.map +1 -0
  37. package/icon/material-symbols.css +22 -0
  38. package/index.cjs +11 -0
  39. package/index.d.ts +6 -0
  40. package/index.js +10 -0
  41. package/index.js.map +1 -0
  42. package/package.json +127 -0
  43. package/router/history-managed.cjs +97 -0
  44. package/router/history-managed.d.ts +76 -0
  45. package/router/history-managed.js +95 -0
  46. package/router/history-managed.js.map +1 -0
  47. package/router/history.cjs +65 -0
  48. package/router/history.d.ts +48 -0
  49. package/router/history.js +63 -0
  50. package/router/history.js.map +1 -0
  51. package/router/index.cjs +15 -0
  52. package/router/index.d.ts +6 -0
  53. package/router/index.js +8 -0
  54. package/router/index.js.map +1 -0
  55. package/router/signal-watcher-lit-element.cjs +11 -0
  56. package/router/signal-watcher-lit-element.d.ts +25 -0
  57. package/router/signal-watcher-lit-element.js +10 -0
  58. package/router/signal-watcher-lit-element.js.map +1 -0
  59. package/router/tha-route.cjs +125 -0
  60. package/router/tha-route.d.ts +90 -0
  61. package/router/tha-route.js +124 -0
  62. package/router/tha-route.js.map +1 -0
  63. package/router/tha-router-config.cjs +241 -0
  64. package/router/tha-router-config.d.ts +223 -0
  65. package/router/tha-router-config.js +240 -0
  66. package/router/tha-router-config.js.map +1 -0
  67. package/router/tha-router-link.cjs +209 -0
  68. package/router/tha-router-link.d.ts +95 -0
  69. package/router/tha-router-link.js +208 -0
  70. package/router/tha-router-link.js.map +1 -0
  71. package/router/tha-router-outlet.cjs +215 -0
  72. package/router/tha-router-outlet.d.ts +112 -0
  73. package/router/tha-router-outlet.js +214 -0
  74. package/router/tha-router-outlet.js.map +1 -0
  75. package/router/tha-router-param.cjs +278 -0
  76. package/router/tha-router-param.d.ts +226 -0
  77. package/router/tha-router-param.js +277 -0
  78. package/router/tha-router-param.js.map +1 -0
  79. package/router/tha-router.cjs +163 -0
  80. package/router/tha-router.d.ts +69 -0
  81. package/router/tha-router.js +162 -0
  82. package/router/tha-router.js.map +1 -0
  83. package/tha-url-output.cjs +79 -0
  84. package/tha-url-output.d.ts +41 -0
  85. package/tha-url-output.js +78 -0
  86. package/tha-url-output.js.map +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 thalesrc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # @telperion/elements
2
+
3
+ [![npm version](https://badge.fury.io/js/@telperion%2Felements.svg)](https://badge.fury.io/js/@telperion%2Felements)
4
+ [![npm](https://img.shields.io/npm/dm/@telperion/elements.svg)](https://www.npmjs.com/package/@telperion/elements)
5
+
6
+ A collection of custom web components built with [Lit Elements](https://lit.dev/). This library provides a suite of reusable, framework-independent web components for modern web applications.
7
+
8
+ ## ✨ Features
9
+
10
+ - 🌐 **Framework Independent**: Built as custom web elements, works with any framework (React, Vue, Angular, Vanilla JS)
11
+ - 🔧 **Custom Components**: A growing collection of useful web components
12
+ - 🎨 **CSS Custom Properties**: Rich CSS variable support for styling
13
+ - 📦 **Modular**: Import only the components you need
14
+ - 🔄 **Reactive**: Built on Lit's reactive properties system
15
+ - 🎯 **TypeScript**: Full TypeScript support with type definitions
16
+
17
+ ## 📦 Installation
18
+
19
+ ```bash
20
+ npm install @telperion/elements
21
+ ```
22
+
23
+ ```bash
24
+ yarn add @telperion/elements
25
+ ```
26
+
27
+ ```bash
28
+ pnpm add @telperion/elements
29
+ ```
30
+
31
+ > **Tailwind v4 consumers:** some elements (e.g. `<tp-icon>`) render Tailwind utility classes from inside the published package. Add `@source "../node_modules/@telperion/elements";` to your Tailwind entry CSS so the JIT scanner picks them up. See each module's README for details.
32
+
33
+ ## 🚀 Usage
34
+
35
+ ```typescript
36
+ import '@telperion/elements';
37
+
38
+ // Use the components in your HTML
39
+ ```
40
+
41
+ ## 📚 Components
42
+
43
+ ### Icon
44
+
45
+ A framework-agnostic Material Symbols icon element.
46
+
47
+ **Includes:**
48
+ - `<tp-icon>` &mdash; renders a single Material Symbols glyph
49
+
50
+ **Features:**
51
+ - Three variants: `outlined` (default), `round`, `sharp`
52
+ - All four Material variable-font axes exposed as attributes (`filled`, `grade`, `weight`, `optical-size`)
53
+ - Light-DOM rendering so consumer styling (Tailwind, CSS variables, color/size) "just works"
54
+ - Loads fonts via the Google Fonts CSS API &mdash; no broken hash URLs when Google rotates them
55
+ - Self-host friendly &mdash; swap one CSS file to ship the fonts yourself
56
+
57
+ ```ts
58
+ import "@telperion/elements/icon";
59
+ import "@telperion/elements/icon/material-symbols.css";
60
+ ```
61
+
62
+ ```html
63
+ <tp-icon>home</tp-icon>
64
+ <tp-icon variant="round" filled weight="700">favorite</tp-icon>
65
+ ```
66
+
67
+ [Icon Documentation →](./src/icon/README.md)
68
+
69
+ ---
70
+
71
+ ### Router Components
72
+
73
+ A complete client-side routing solution for single-page applications, built with declarative web components.
74
+
75
+ **Includes:**
76
+ - `<tha-router>` - Main router component managing URL matching and navigation
77
+ - `<tha-route>` - Route definitions with URLPattern syntax for path matching
78
+ - `<tha-router-outlet>` - Content rendering outlet for active routes
79
+ - `<tha-router-link>` - Navigation links with automatic active state detection
80
+ - `<tha-route-config>` - Global router configuration
81
+
82
+ **Features:**
83
+ - Template-based routing without JavaScript configuration
84
+ - Multiple history strategies (browser, hash, memory)
85
+ - Dynamic route parameters and wildcards
86
+ - Relative path navigation
87
+ - Automatic active link detection
88
+ - Signal-based reactive updates
89
+
90
+ [Router Documentation →](./src/router/README.md)
91
+
92
+ ---
93
+
94
+ This library is actively being developed. More components will be added over time.
95
+
96
+ ## 🤝 Contributing
97
+
98
+ Contributions are welcome! Please feel free to submit a Pull Request.
99
+
100
+ ## 📄 License
101
+
102
+ MIT © [Thales RC](https://github.com/thalesrc)
package/bundle.js ADDED
@@ -0,0 +1,164 @@
1
+ "use strict";var Rr=e=>{throw TypeError(e)};var Dr=(e,t,r)=>t.has(e)||Rr("Cannot "+r);var at=(e,t,r)=>(Dr(e,t,"read from private field"),r?r.call(e):t.get(e)),ft=(e,t,r)=>t.has(e)?Rr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ye=(e,t,r,n)=>(Dr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const Xt=globalThis,yr=Xt.ShadowRoot&&(Xt.ShadyCSS===void 0||Xt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$r=Symbol(),xr=new WeakMap;let on=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==$r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(yr&&t===void 0){const n=r!==void 0&&r.length===1;n&&(t=xr.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&xr.set(r,t))}return t}toString(){return this.cssText}};const Yn=e=>new on(typeof e=="string"?e:e+"",void 0,$r),Ve=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,s,a)=>n+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+e[a+1],e[0]);return new on(r,e,$r)},Fn=(e,t)=>{if(yr)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const n=document.createElement("style"),s=Xt.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}},Nr=yr?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return Yn(r)})(e):e;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:Jn,defineProperty:Kn,getOwnPropertyDescriptor:jn,getOwnPropertyNames:Qn,getOwnPropertySymbols:Xn,getPrototypeOf:ts}=Object,et=globalThis,Mr=et.trustedTypes,es=Mr?Mr.emptyScript:"",Fe=et.reactiveElementPolyfillSupport,It=(e,t)=>e,Re={toAttribute(e,t){switch(t){case Boolean:e=e?es:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},wr=(e,t)=>!Jn(e,t),Wr={attribute:!0,type:String,converter:Re,reflect:!1,useDefault:!1,hasChanged:wr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),et.litPropertyMetadata??(et.litPropertyMetadata=new WeakMap);let vt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Wr){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const n=Symbol(),s=this.getPropertyDescriptor(t,n,r);s!==void 0&&Kn(this.prototype,t,s)}}static getPropertyDescriptor(t,r,n){const{get:s,set:a}=jn(this.prototype,t)??{get(){return this[r]},set(i){this[r]=i}};return{get:s,set(i){const h=s==null?void 0:s.call(this);a==null||a.call(this,i),this.requestUpdate(t,h,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Wr}static _$Ei(){if(this.hasOwnProperty(It("elementProperties")))return;const t=ts(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(It("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(It("properties"))){const r=this.properties,n=[...Qn(r),...Xn(r)];for(const s of n)this.createProperty(s,r[s])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[n,s]of r)this.elementProperties.set(n,s)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const s=this._$Eu(r,n);s!==void 0&&this._$Eh.set(s,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const s of n)r.unshift(Nr(s))}else t!==void 0&&r.push(Nr(t));return r}static _$Eu(t,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fn(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){var a;const n=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,n);if(s!==void 0&&n.reflect===!0){const i=(((a=n.converter)==null?void 0:a.toAttribute)!==void 0?n.converter:Re).toAttribute(r,n.type);this._$Em=t,i==null?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,r){var a,i;const n=this.constructor,s=n._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const h=n.getPropertyOptions(s),o=typeof h.converter=="function"?{fromAttribute:h.converter}:((a=h.converter)==null?void 0:a.fromAttribute)!==void 0?h.converter:Re;this._$Em=s;const u=o.fromAttribute(r,h.type);this[s]=u??((i=this._$Ej)==null?void 0:i.get(s))??u,this._$Em=null}}requestUpdate(t,r,n){var s;if(t!==void 0){const a=this.constructor,i=this[t];if(n??(n=a.getPropertyOptions(t)),!((n.hasChanged??wr)(i,r)||n.useDefault&&n.reflect&&i===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(a._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:s,wrapped:a},i){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,i??r??this[t]),a!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,i]of s){const{wrapped:h}=i,o=this[a];h!==!0||this._$AL.has(a)||o===void 0||this.C(a,void 0,i,o)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(r)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(n=>{var s;return(s=n.hostUpdated)==null?void 0:s.call(n)}),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=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};vt.elementStyles=[],vt.shadowRootOptions={mode:"open"},vt[It("elementProperties")]=new Map,vt[It("finalized")]=new Map,Fe==null||Fe({ReactiveElement:vt}),(et.reactiveElementVersions??(et.reactiveElementVersions=[])).push("2.1.1");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const Ht=globalThis,De=Ht.trustedTypes,Lr=De?De.createPolicy("lit-html",{createHTML:e=>e}):void 0,hn="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,cn="?"+tt,rs=`<${cn}>`,pt=document,Bt=()=>pt.createComment(""),Gt=e=>e===null||typeof e!="object"&&typeof e!="function",Er=Array.isArray,ns=e=>Er(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Je=`[
14
+ \f\r]`,Pt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ir=/-->/g,Hr=/>/g,it=RegExp(`>|${Je}(?:([^\\s"'>=/]+)(${Je}*=${Je}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ur=/'/g,zr=/"/g,ln=/^(?:script|style|textarea|title)$/i,ss=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Be=ss(1),At=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Vr=new WeakMap,lt=pt.createTreeWalker(pt,129);function un(e,t){if(!Er(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lr!==void 0?Lr.createHTML(t):t}const as=(e,t)=>{const r=e.length-1,n=[];let s,a=t===2?"<svg>":t===3?"<math>":"",i=Pt;for(let h=0;h<r;h++){const o=e[h];let u,g,d=-1,E=0;for(;E<o.length&&(i.lastIndex=E,g=i.exec(o),g!==null);)E=i.lastIndex,i===Pt?g[1]==="!--"?i=Ir:g[1]!==void 0?i=Hr:g[2]!==void 0?(ln.test(g[2])&&(s=RegExp("</"+g[2],"g")),i=it):g[3]!==void 0&&(i=it):i===it?g[0]===">"?(i=s??Pt,d=-1):g[1]===void 0?d=-2:(d=i.lastIndex-g[2].length,u=g[1],i=g[3]===void 0?it:g[3]==='"'?zr:Ur):i===zr||i===Ur?i=it:i===Ir||i===Hr?i=Pt:(i=it,s=void 0);const y=i===it&&e[h+1].startsWith("/>")?" ":"";a+=i===Pt?o+rs:d>=0?(n.push(u),o.slice(0,d)+hn+o.slice(d)+tt+y):o+tt+(d===-2?h:y)}return[un(e,a+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class qt{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let a=0,i=0;const h=t.length-1,o=this.parts,[u,g]=as(t,r);if(this.el=qt.createElement(u,n),lt.currentNode=this.el.content,r===2||r===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=lt.nextNode())!==null&&o.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(const d of s.getAttributeNames())if(d.endsWith(hn)){const E=g[i++],y=s.getAttribute(d).split(tt),R=/([.?@])?(.*)/.exec(E);o.push({type:1,index:a,name:R[2],strings:y,ctor:R[1]==="."?os:R[1]==="?"?hs:R[1]==="@"?cs:Ge}),s.removeAttribute(d)}else d.startsWith(tt)&&(o.push({type:6,index:a}),s.removeAttribute(d));if(ln.test(s.tagName)){const d=s.textContent.split(tt),E=d.length-1;if(E>0){s.textContent=De?De.emptyScript:"";for(let y=0;y<E;y++)s.append(d[y],Bt()),lt.nextNode(),o.push({type:2,index:++a});s.append(d[E],Bt())}}}else if(s.nodeType===8)if(s.data===cn)o.push({type:2,index:a});else{let d=-1;for(;(d=s.data.indexOf(tt,d+1))!==-1;)o.push({type:7,index:a}),d+=tt.length-1}a++}}static createElement(t,r){const n=pt.createElement("template");return n.innerHTML=t,n}}function Ct(e,t,r=e,n){var i,h;if(t===At)return t;let s=n!==void 0?(i=r._$Co)==null?void 0:i[n]:r._$Cl;const a=Gt(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==a&&((h=s==null?void 0:s._$AO)==null||h.call(s,!1),a===void 0?s=void 0:(s=new a(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=s:r._$Cl=s),s!==void 0&&(t=Ct(e,s._$AS(e,t.values),s,n)),t}class is{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:n}=this._$AD,s=((t==null?void 0:t.creationScope)??pt).importNode(r,!0);lt.currentNode=s;let a=lt.nextNode(),i=0,h=0,o=n[0];for(;o!==void 0;){if(i===o.index){let u;o.type===2?u=new Ft(a,a.nextSibling,this,t):o.type===1?u=new o.ctor(a,o.name,o.strings,this,t):o.type===6&&(u=new ls(a,this,t)),this._$AV.push(u),o=n[++h]}i!==(o==null?void 0:o.index)&&(a=lt.nextNode(),i++)}return lt.currentNode=pt,s}p(t){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}}class Ft{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Ct(this,t,r),Gt(t)?t===b||t==null||t===""?(this._$AH!==b&&this._$AR(),this._$AH=b):t!==this._$AH&&t!==At&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ns(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!==b&&Gt(this._$AH)?this._$AA.nextSibling.data=t:this.T(pt.createTextNode(t)),this._$AH=t}$(t){var a;const{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=qt.createElement(un(n.h,n.h[0]),this.options)),n);if(((a=this._$AH)==null?void 0:a._$AD)===s)this._$AH.p(r);else{const i=new is(s,this),h=i.u(this.options);i.p(r),this.T(h),this._$AH=i}}_$AC(t){let r=Vr.get(t.strings);return r===void 0&&Vr.set(t.strings,r=new qt(t)),r}k(t){Er(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,s=0;for(const a of t)s===r.length?r.push(n=new Ft(this.O(Bt()),this.O(Bt()),this,this.options)):n=r[s],n._$AI(a),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,r);t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class Ge{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,a){this.type=1,this._$AH=b,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=a,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=b}_$AI(t,r=this,n,s){const a=this.strings;let i=!1;if(a===void 0)t=Ct(this,t,r,0),i=!Gt(t)||t!==this._$AH&&t!==At,i&&(this._$AH=t);else{const h=t;let o,u;for(t=a[0],o=0;o<a.length-1;o++)u=Ct(this,h[n+o],r,o),u===At&&(u=this._$AH[o]),i||(i=!Gt(u)||u!==this._$AH[o]),u===b?t=b:t!==b&&(t+=(u??"")+a[o+1]),this._$AH[o]=u}i&&!s&&this.j(t)}j(t){t===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class os extends Ge{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===b?void 0:t}}class hs extends Ge{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==b)}}class cs extends Ge{constructor(t,r,n,s,a){super(t,r,n,s,a),this.type=5}_$AI(t,r=this){if((t=Ct(this,t,r,0)??b)===At)return;const n=this._$AH,s=t===b&&n!==b||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,a=t!==b&&(n===b||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class ls{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Ct(this,t)}}const Ke=Ht.litHtmlPolyfillSupport;Ke==null||Ke(qt,Ft),(Ht.litHtmlVersions??(Ht.litHtmlVersions=[])).push("3.3.1");const us=(e,t,r)=>{const n=(r==null?void 0:r.renderBefore)??t;let s=n._$litPart$;if(s===void 0){const a=(r==null?void 0:r.renderBefore)??null;n._$litPart$=s=new Ft(t.insertBefore(Bt(),a),a,void 0,r??{})}return s._$AI(e),s};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const ut=globalThis;let F=class extends vt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=us(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return At}};var an;F._$litElement$=!0,F.finalized=!0,(an=ut.litElementHydrateSupport)==null||an.call(ut,{LitElement:F});const je=ut.litElementPolyfillSupport;je==null||je({LitElement:F});(ut.litElementVersions??(ut.litElementVersions=[])).push("4.2.1");/**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const K=e=>(t,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/**
24
+ * @license
25
+ * Copyright 2017 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */const ds={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:wr},ps=(e=ds,t,r)=>{const{kind:n,metadata:s}=r;let a=globalThis.litPropertyMetadata.get(s);if(a===void 0&&globalThis.litPropertyMetadata.set(s,a=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),a.set(r.name,e),n==="accessor"){const{name:i}=r;return{set(h){const o=t.get.call(this);t.set.call(this,h),this.requestUpdate(i,o,e)},init(h){return h!==void 0&&this.C(i,void 0,e,h),h}}}if(n==="setter"){const{name:i}=r;return function(h){const o=this[i];t.call(this,h),this.requestUpdate(i,o,e)}}throw Error("Unsupported decorator location: "+n)};function C(e){return(t,r)=>typeof r=="object"?ps(e,t,r):((n,s,a)=>{const i=s.hasOwnProperty(a);return s.constructor.createProperty(a,n),i?Object.getOwnPropertyDescriptor(s,a):void 0})(e,t,r)}/**
28
+ * @license
29
+ * Copyright 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */function fs(e){return C({...e,state:!0,attribute:!1})}var vs=Object.defineProperty,gs=(e,t,r)=>t in e?vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qe=(e,t,r)=>(gs(e,typeof t!="symbol"?t+"":t,r),r),_s=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Xe=(e,t)=>{if(Object(t)!==t)throw TypeError('Cannot use the "in" operator on this value');return e.has(t)},Qt=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Br=(e,t,r)=>(_s(e,t,"access private method"),r);/**
32
+ * @license
33
+ * Copyright Google LLC All Rights Reserved.
34
+ *
35
+ * Use of this source code is governed by an MIT-style license that can be
36
+ * found in the LICENSE file at https://angular.io/license
37
+ */function dn(e,t){return Object.is(e,t)}/**
38
+ * @license
39
+ * Copyright Google LLC All Rights Reserved.
40
+ *
41
+ * Use of this source code is governed by an MIT-style license that can be
42
+ * found in the LICENSE file at https://angular.io/license
43
+ */let S=null,Ut=!1,te=1;const xe=Symbol("SIGNAL");function yt(e){const t=S;return S=e,t}function ms(){return S}function ys(){return Ut}const Ar={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 qe(e){if(Ut)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(S===null)return;S.consumerOnSignalRead(e);const t=S.nextProducerIndex++;if(St(S),t<S.producerNode.length&&S.producerNode[t]!==e&&hr(S)){const r=S.producerNode[t];Ze(r,S.producerIndexOfThis[t])}S.producerNode[t]!==e&&(S.producerNode[t]=e,S.producerIndexOfThis[t]=hr(S)?vn(e,S,t):0),S.producerLastReadVersion[t]=e.version}function $s(){te++}function pn(e){if(!(!e.dirty&&e.lastCleanEpoch===te)){if(!e.producerMustRecompute(e)&&!Ss(e)){e.dirty=!1,e.lastCleanEpoch=te;return}e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=te}}function fn(e){if(e.liveConsumerNode===void 0)return;const t=Ut;Ut=!0;try{for(const r of e.liveConsumerNode)r.dirty||Es(r)}finally{Ut=t}}function ws(){return(S==null?void 0:S.consumerAllowSignalWrites)!==!1}function Es(e){var t;e.dirty=!0,fn(e),(t=e.consumerMarkedDirty)==null||t.call(e.wrapper??e)}function As(e){return e&&(e.nextProducerIndex=0),yt(e)}function Cs(e,t){if(yt(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(hr(e))for(let r=e.nextProducerIndex;r<e.producerNode.length;r++)Ze(e.producerNode[r],e.producerIndexOfThis[r]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Ss(e){St(e);for(let t=0;t<e.producerNode.length;t++){const r=e.producerNode[t],n=e.producerLastReadVersion[t];if(n!==r.version||(pn(r),n!==r.version))return!0}return!1}function vn(e,t,r){var n;if(Cr(e),St(e),e.liveConsumerNode.length===0){(n=e.watched)==null||n.call(e.wrapper);for(let s=0;s<e.producerNode.length;s++)e.producerIndexOfThis[s]=vn(e.producerNode[s],e,s)}return e.liveConsumerIndexOfThis.push(r),e.liveConsumerNode.push(t)-1}function Ze(e,t){var r;if(Cr(e),St(e),typeof ngDevMode<"u"&&ngDevMode&&t>=e.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${t} is out of bounds of ${e.liveConsumerNode.length} consumers)`);if(e.liveConsumerNode.length===1){(r=e.unwatched)==null||r.call(e.wrapper);for(let s=0;s<e.producerNode.length;s++)Ze(e.producerNode[s],e.producerIndexOfThis[s])}const n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){const s=e.liveConsumerIndexOfThis[t],a=e.liveConsumerNode[t];St(a),a.producerIndexOfThis[s]=t}}function hr(e){var t;return e.consumerIsAlwaysLive||(((t=e==null?void 0:e.liveConsumerNode)==null?void 0:t.length)??0)>0}function St(e){e.producerNode??(e.producerNode=[]),e.producerIndexOfThis??(e.producerIndexOfThis=[]),e.producerLastReadVersion??(e.producerLastReadVersion=[])}function Cr(e){e.liveConsumerNode??(e.liveConsumerNode=[]),e.liveConsumerIndexOfThis??(e.liveConsumerIndexOfThis=[])}/**
44
+ * @license
45
+ * Copyright Google LLC All Rights Reserved.
46
+ *
47
+ * Use of this source code is governed by an MIT-style license that can be
48
+ * found in the LICENSE file at https://angular.io/license
49
+ */function gn(e){if(pn(e),qe(e),e.value===cr)throw e.error;return e.value}function bs(e){const t=Object.create(Ts);t.computation=e;const r=()=>gn(t);return r[xe]=t,r}const tr=Symbol("UNSET"),er=Symbol("COMPUTING"),cr=Symbol("ERRORED"),Ts={...Ar,value:tr,dirty:!0,error:null,equal:dn,producerMustRecompute(e){return e.value===tr||e.value===er},producerRecomputeValue(e){if(e.value===er)throw new Error("Detected cycle in computations.");const t=e.value;e.value=er;const r=As(e);let n,s=!1;try{n=e.computation.call(e.wrapper),s=t!==tr&&t!==cr&&e.equal.call(e.wrapper,t,n)}catch(a){n=cr,e.error=a}finally{Cs(e,r)}if(s){e.value=t;return}e.value=n,e.version++}};/**
50
+ * @license
51
+ * Copyright Google LLC All Rights Reserved.
52
+ *
53
+ * Use of this source code is governed by an MIT-style license that can be
54
+ * found in the LICENSE file at https://angular.io/license
55
+ */function Ps(){throw new Error}let ks=Ps;function Os(){ks()}/**
56
+ * @license
57
+ * Copyright Google LLC All Rights Reserved.
58
+ *
59
+ * Use of this source code is governed by an MIT-style license that can be
60
+ * found in the LICENSE file at https://angular.io/license
61
+ */function Rs(e){const t=Object.create(Ns);t.value=e;const r=()=>(qe(t),t.value);return r[xe]=t,r}function Ds(){return qe(this),this.value}function xs(e,t){ws()||Os(),e.equal.call(e.wrapper,e.value,t)||(e.value=t,Ms(e))}const Ns={...Ar,equal:dn,value:void 0};function Ms(e){e.version++,$s(),fn(e)}/**
62
+ * @license
63
+ * Copyright 2024 Bloomberg Finance L.P.
64
+ *
65
+ * Licensed under the Apache License, Version 2.0 (the "License");
66
+ * you may not use this file except in compliance with the License.
67
+ * You may obtain a copy of the License at
68
+ *
69
+ * http://www.apache.org/licenses/LICENSE-2.0
70
+ *
71
+ * Unless required by applicable law or agreed to in writing, software
72
+ * distributed under the License is distributed on an "AS IS" BASIS,
73
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
+ * See the License for the specific language governing permissions and
75
+ * limitations under the License.
76
+ */const T=Symbol("node");var A;(e=>{var t,r,n,s;class a{constructor(o,u={}){Qt(this,r),Qe(this,t);const d=Rs(o)[xe];if(this[T]=d,d.wrapper=this,u){const E=u.equals;E&&(d.equal=E),d.watched=u[e.subtle.watched],d.unwatched=u[e.subtle.unwatched]}}get(){if(!(0,e.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Ds.call(this[T])}set(o){if(!(0,e.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(ys())throw new Error("Writes to signals not permitted during Watcher callback");const u=this[T];xs(u,o)}}t=T,r=new WeakSet,e.isState=h=>typeof h=="object"&&Xe(r,h),e.State=a;class i{constructor(o,u){Qt(this,s),Qe(this,n);const d=bs(o)[xe];if(d.consumerAllowSignalWrites=!0,this[T]=d,d.wrapper=this,u){const E=u.equals;E&&(d.equal=E),d.watched=u[e.subtle.watched],d.unwatched=u[e.subtle.unwatched]}}get(){if(!(0,e.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return gn(this[T])}}n=T,s=new WeakSet,e.isComputed=h=>typeof h=="object"&&Xe(s,h),e.Computed=i,(h=>{var o,u,g,d;function E(l){let f,p=null;try{p=yt(null),f=l()}finally{yt(p)}return f}h.untrack=E;function y(l){var f;if(!(0,e.isComputed)(l)&&!(0,e.isWatcher)(l))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((f=l[T].producerNode)==null?void 0:f.map(p=>p.wrapper))??[]}h.introspectSources=y;function R(l){var f;if(!(0,e.isComputed)(l)&&!(0,e.isState)(l))throw new TypeError("Called introspectSinks without a Signal argument");return((f=l[T].liveConsumerNode)==null?void 0:f.map(p=>p.wrapper))??[]}h.introspectSinks=R;function H(l){if(!(0,e.isComputed)(l)&&!(0,e.isState)(l))throw new TypeError("Called hasSinks without a Signal argument");const f=l[T].liveConsumerNode;return f?f.length>0:!1}h.hasSinks=H;function U(l){if(!(0,e.isComputed)(l)&&!(0,e.isWatcher)(l))throw new TypeError("Called hasSources without a Computed or Watcher argument");const f=l[T].producerNode;return f?f.length>0:!1}h.hasSources=U;class W{constructor(f){Qt(this,u),Qt(this,g),Qe(this,o);let p=Object.create(Ar);p.wrapper=this,p.consumerMarkedDirty=f,p.consumerIsAlwaysLive=!0,p.consumerAllowSignalWrites=!1,p.producerNode=[],this[T]=p}watch(...f){if(!(0,e.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Br(this,g,d).call(this,f);const p=this[T];p.dirty=!1;const m=yt(p);for(const _ of f)qe(_[T]);yt(m)}unwatch(...f){if(!(0,e.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Br(this,g,d).call(this,f);const p=this[T];St(p);for(let m=p.producerNode.length-1;m>=0;m--)if(f.includes(p.producerNode[m].wrapper)){Ze(p.producerNode[m],p.producerIndexOfThis[m]);const _=p.producerNode.length-1;if(p.producerNode[m]=p.producerNode[_],p.producerIndexOfThis[m]=p.producerIndexOfThis[_],p.producerNode.length--,p.producerIndexOfThis.length--,p.nextProducerIndex--,m<p.producerNode.length){const c=p.producerIndexOfThis[m],v=p.producerNode[m];Cr(v),v.liveConsumerIndexOfThis[c]=m}}}getPending(){if(!(0,e.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[T].producerNode.filter(p=>p.dirty).map(p=>p.wrapper)}}o=T,u=new WeakSet,g=new WeakSet,d=function(l){for(const f of l)if(!(0,e.isComputed)(f)&&!(0,e.isState)(f))throw new TypeError("Called watch/unwatch without a Computed or State argument")},e.isWatcher=l=>Xe(u,l),h.Watcher=W;function z(){var l;return(l=ms())==null?void 0:l.wrapper}h.currentComputed=z,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(e.subtle||(e.subtle={}))})(A||(A={}));/**
77
+ * @license
78
+ * Copyright 2023 Google LLC
79
+ * SPDX-License-Identifier: BSD-3-Clause
80
+ */let rr=!1;const Gr=new A.subtle.Watcher(()=>{rr||(rr=!0,queueMicrotask(()=>{rr=!1;for(const e of Gr.getPending())e.get();Gr.watch()}))}),Ws=Symbol("SignalWatcherBrand"),Ls=new FinalizationRegistry(e=>{e.unwatch(...A.subtle.introspectSources(e))}),qr=new WeakMap;function Is(e){return e[Ws]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),e):class extends e{constructor(){super(...arguments),this._$St=new Map,this._$So=new A.State(0),this._$Si=!1}_$Sl(){var t,r;const n=[],s=[];this._$St.forEach((i,h)=>{(i!=null&&i.beforeUpdate?n:s).push(h)});const a=(t=this.h)===null||t===void 0?void 0:t.getPending().filter(i=>i!==this._$Su&&!this._$St.has(i));n.forEach(i=>i.get()),(r=this._$Su)===null||r===void 0||r.get(),a.forEach(i=>i.get()),s.forEach(i=>i.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new A.Computed(()=>{this._$So.get(),super.performUpdate()});const t=this.h=new A.subtle.Watcher(function(){const r=qr.get(this);r!==void 0&&(r._$Si===!1&&(new Set(this.getPending()).has(r._$Su)?r.requestUpdate():r._$Sv()),this.watch())});qr.set(t,this),Ls.register(this,t),t.watch(this._$Su),t.watch(...Array.from(this._$St).map(([r])=>r))}_$Sp(){if(this.h===void 0)return;let t=!1;this.h.unwatch(...A.subtle.introspectSources(this.h).filter(r=>{var n;const s=((n=this._$St.get(r))===null||n===void 0?void 0:n.manualDispose)!==!0;return s&&this._$St.delete(r),t||(t=!s),s})),t||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(t,r){var n;this._$S_();const s=new A.Computed(()=>{t()});return this.h.watch(s),this._$St.set(s,r),(n=r==null?void 0:r.beforeUpdate)!==null&&n!==void 0&&n?A.subtle.untrack(()=>s.get()):this.updateComplete.then(()=>A.subtle.untrack(()=>s.get())),()=>{this._$St.delete(s),this.h.unwatch(s),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}/**
81
+ * @license
82
+ * Copyright 2017 Google LLC
83
+ * SPDX-License-Identifier: BSD-3-Clause
84
+ */const Hs={CHILD:2},Us=e=>(...t)=>({_$litDirective$:e,values:t});let zs=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/**
85
+ * @license
86
+ * Copyright 2020 Google LLC
87
+ * SPDX-License-Identifier: BSD-3-Clause
88
+ */const Vs=e=>e.strings===void 0;/**
89
+ * @license
90
+ * Copyright 2017 Google LLC
91
+ * SPDX-License-Identifier: BSD-3-Clause
92
+ */const zt=(e,t)=>{var n;const r=e._$AN;if(r===void 0)return!1;for(const s of r)(n=s._$AO)==null||n.call(s,t,!1),zt(s,t);return!0},Ne=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},_n=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),qs(t)}};function Bs(e){this._$AN!==void 0?(Ne(this),this._$AM=e,_n(this)):this._$AM=e}function Gs(e,t=!1,r=0){const n=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(n))for(let a=r;a<n.length;a++)zt(n[a],!1),Ne(n[a]);else n!=null&&(zt(n,!1),Ne(n));else zt(this,e)}const qs=e=>{e.type==Hs.CHILD&&(e._$AP??(e._$AP=Gs),e._$AQ??(e._$AQ=Bs))};class Zs extends zs{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,n){super._$AT(t,r,n),_n(this),this.isConnected=t._$AU}_$AO(t,r=!0){var n,s;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(s=this.disconnected)==null||s.call(this)),r&&(zt(this,t),Ne(this))}setValue(t){if(Vs(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/**
93
+ * @license
94
+ * Copyright 2023 Google LLC
95
+ * SPDX-License-Identifier: BSD-3-Clause
96
+ */let nr=!1;const lr=new A.subtle.Watcher(async()=>{nr||(nr=!0,queueMicrotask(()=>{nr=!1;for(const e of lr.getPending())e.get();lr.watch()}))});let Ys=class extends Zs{_$S_(){var t,r;this._$Sm===void 0&&(this._$Sj=new A.Computed(()=>{var n;const s=(n=this._$SW)===null||n===void 0?void 0:n.get();return this.setValue(s),s}),this._$Sm=(r=(t=this._$Sk)===null||t===void 0?void 0:t.h)!==null&&r!==void 0?r:lr,this._$Sm.watch(this._$Sj),A.subtle.untrack(()=>{var n;return(n=this._$Sj)===null||n===void 0?void 0:n.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(t){return A.subtle.untrack(()=>t.get())}update(t,[r]){var n,s;return(n=this._$Sk)!==null&&n!==void 0||(this._$Sk=(s=t.options)===null||s===void 0?void 0:s.host),r!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=r,this._$S_(),A.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}};const Fs=Us(Ys);/**
97
+ * @license
98
+ * Copyright 2023 Google LLC
99
+ * SPDX-License-Identifier: BSD-3-Clause
100
+ */const Js=e=>(t,...r)=>e(t,...r.map(n=>n instanceof A.State||n instanceof A.Computed?Fs(n):n)),Ks=Js(Be);/**
101
+ * @license
102
+ * Copyright 2023 Google LLC
103
+ * SPDX-License-Identifier: BSD-3-Clause
104
+ */A.State;A.Computed;const I=(e,t)=>new A.State(e,t),J=(e,t)=>new A.Computed(e,t);var js=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,mn=e=>{throw TypeError(e)},yn=(e,t,r,n)=>{for(var s=n>1?void 0:n?Qs(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&js(t,r,s),s},$n=(e,t,r)=>t.has(e)||mn("Cannot "+r),Zr=(e,t,r)=>($n(e,t,"read from private field"),r?r.call(e):t.get(e)),Yr=(e,t,r)=>t.has(e)?mn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Fr=(e,t,r)=>($n(e,t,"access private method"),r),Jr,Kr,jr,ee,re,ur;const dr=Symbol("ThaRoute:fragment"),Me=Symbol("ThaRoute:path-pattern");exports.ThaRoute=class extends(jr=F,Kr=dr,Jr=Me,jr){constructor(){super(...arguments),Yr(this,re),this[Kr]=I(Fr(this,re,ur).call(this)),this[Jr]=null,this.path=null,Yr(this,ee,new MutationObserver(()=>{this[dr].set(Fr(this,re,ur).call(this))}))}connectedCallback(){super.connectedCallback(),Zr(this,ee).observe(this,{childList:!0})}attributeChangedCallback(t,r,n){switch(super.attributeChangedCallback(t,r,n),t){case"path":this[Me]=n?new URLPattern({pathname:n}):null;break}}disconnectedCallback(){super.disconnectedCallback(),Zr(this,ee).disconnect()}};ee=new WeakMap;re=new WeakSet;ur=function(){const e=this.querySelector("template");return e?new WeakRef(e.content):null};yn([C({type:String})],exports.ThaRoute.prototype,"path",2);exports.ThaRoute=yn([K("tha-route")],exports.ThaRoute);function L(){}const Jt=Is(F);function st(){return st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},st.apply(null,arguments)}var x;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(x||(x={}));var bt=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function dt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var We="beforeunload",Xs="hashchange",wn="popstate";function ta(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,s=n.history;function a(){var _=n.location,c=_.pathname,v=_.search,$=_.hash,w=s.state||{};return[w.idx,bt({pathname:c,search:v,hash:$,state:w.usr||null,key:w.key||"default"})]}var i=null;function h(){if(i)y.call(i),i=null;else{var _=x.Pop,c=a(),v=c[0],$=c[1];if(y.length)if(v!=null){var w=g-v;w&&(i={action:_,location:$,retry:function(){p(w*-1)}},p(w))}else process.env.NODE_ENV!=="production"&&dt(!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 z(_)}}n.addEventListener(wn,h);var o=x.Pop,u=a(),g=u[0],d=u[1],E=Tt(),y=Tt();g==null&&(g=0,s.replaceState(st({},s.state,{idx:g}),""));function R(_){return typeof _=="string"?_:Vt(_)}function H(_,c){return c===void 0&&(c=null),bt(st({pathname:d.pathname,hash:"",search:""},typeof _=="string"?Zt(_):_,{state:c,key:Ie()}))}function U(_,c){return[{usr:_.state,key:_.key,idx:c},R(_)]}function W(_,c,v){return!y.length||(y.call({action:_,location:c,retry:v}),!1)}function z(_){o=_;var c=a();g=c[0],d=c[1],E.call({action:o,location:d})}function l(_,c){var v=x.Push,$=H(_,c);function w(){l(_,c)}if(W(v,$,w)){var P=U($,g+1),N=P[0],V=P[1];try{s.pushState(N,"",V)}catch{n.location.assign(V)}z(v)}}function f(_,c){var v=x.Replace,$=H(_,c);function w(){f(_,c)}if(W(v,$,w)){var P=U($,g),N=P[0],V=P[1];s.replaceState(N,"",V),z(v)}}function p(_){s.go(_)}var m={get action(){return o},get location(){return d},createHref:R,push:l,replace:f,go:p,back:function(){p(-1)},forward:function(){p(1)},listen:function(c){return E.push(c)},block:function(c){var v=y.push(c);return y.length===1&&n.addEventListener(We,Le),function(){v(),y.length||n.removeEventListener(We,Le)}}};return m}function ea(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,s=n.history;function a(){var c=Zt(n.location.hash.substr(1)),v=c.pathname,$=v===void 0?"/":v,w=c.search,P=w===void 0?"":w,N=c.hash,V=N===void 0?"":N,q=s.state||{};return[q.idx,bt({pathname:$,search:P,hash:V,state:q.usr||null,key:q.key||"default"})]}var i=null;function h(){if(i)y.call(i),i=null;else{var c=x.Pop,v=a(),$=v[0],w=v[1];if(y.length)if($!=null){var P=g-$;P&&(i={action:c,location:w,retry:function(){m(P*-1)}},m(P))}else process.env.NODE_ENV!=="production"&&dt(!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 l(c)}}n.addEventListener(wn,h),n.addEventListener(Xs,function(){var c=a(),v=c[1];Vt(v)!==Vt(d)&&h()});var o=x.Pop,u=a(),g=u[0],d=u[1],E=Tt(),y=Tt();g==null&&(g=0,s.replaceState(st({},s.state,{idx:g}),""));function R(){var c=document.querySelector("base"),v="";if(c&&c.getAttribute("href")){var $=n.location.href,w=$.indexOf("#");v=w===-1?$:$.slice(0,w)}return v}function H(c){return R()+"#"+(typeof c=="string"?c:Vt(c))}function U(c,v){return v===void 0&&(v=null),bt(st({pathname:d.pathname,hash:"",search:""},typeof c=="string"?Zt(c):c,{state:v,key:Ie()}))}function W(c,v){return[{usr:c.state,key:c.key,idx:v},H(c)]}function z(c,v,$){return!y.length||(y.call({action:c,location:v,retry:$}),!1)}function l(c){o=c;var v=a();g=v[0],d=v[1],E.call({action:o,location:d})}function f(c,v){var $=x.Push,w=U(c,v);function P(){f(c,v)}if(process.env.NODE_ENV!=="production"&&dt(w.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(c)+")"),z($,w,P)){var N=W(w,g+1),V=N[0],q=N[1];try{s.pushState(V,"",q)}catch{n.location.assign(q)}l($)}}function p(c,v){var $=x.Replace,w=U(c,v);function P(){p(c,v)}if(process.env.NODE_ENV!=="production"&&dt(w.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(c)+")"),z($,w,P)){var N=W(w,g),V=N[0],q=N[1];s.replaceState(V,"",q),l($)}}function m(c){s.go(c)}var _={get action(){return o},get location(){return d},createHref:H,push:f,replace:p,go:m,back:function(){m(-1)},forward:function(){m(1)},listen:function(v){return E.push(v)},block:function(v){var $=y.push(v);return y.length===1&&n.addEventListener(We,Le),function(){$(),y.length||n.removeEventListener(We,Le)}}};return _}function ra(e){e===void 0&&(e={});var t=e,r=t.initialEntries,n=r===void 0?["/"]:r,s=t.initialIndex,a=n.map(function(l){var f=bt(st({pathname:"/",search:"",hash:"",state:null,key:Ie()},typeof l=="string"?Zt(l):l));return process.env.NODE_ENV!=="production"&&dt(f.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(l)+")"),f}),i=Qr(s??a.length-1,0,a.length-1),h=x.Pop,o=a[i],u=Tt(),g=Tt();function d(l){return typeof l=="string"?l:Vt(l)}function E(l,f){return f===void 0&&(f=null),bt(st({pathname:o.pathname,search:"",hash:""},typeof l=="string"?Zt(l):l,{state:f,key:Ie()}))}function y(l,f,p){return!g.length||(g.call({action:l,location:f,retry:p}),!1)}function R(l,f){h=l,o=f,u.call({action:h,location:o})}function H(l,f){var p=x.Push,m=E(l,f);function _(){H(l,f)}process.env.NODE_ENV!=="production"&&dt(o.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(l)+")"),y(p,m,_)&&(i+=1,a.splice(i,a.length,m),R(p,m))}function U(l,f){var p=x.Replace,m=E(l,f);function _(){U(l,f)}process.env.NODE_ENV!=="production"&&dt(o.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(l)+")"),y(p,m,_)&&(a[i]=m,R(p,m))}function W(l){var f=Qr(i+l,0,a.length-1),p=x.Pop,m=a[f];function _(){W(l)}y(p,m,_)&&(i=f,R(p,m))}var z={get index(){return i},get action(){return h},get location(){return o},createHref:d,push:H,replace:U,go:W,back:function(){W(-1)},forward:function(){W(1)},listen:function(f){return u.push(f)},block:function(f){return g.push(f)}};return z}function Qr(e,t,r){return Math.min(Math.max(e,t),r)}function Le(e){e.preventDefault(),e.returnValue=""}function Tt(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function Ie(){return Math.random().toString(36).substr(2,8)}function Vt(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,s=n===void 0?"":n,a=e.hash,i=a===void 0?"":a;return s&&s!=="?"&&(r+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function Zt(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}const Xr={},na="browser",Sr=I(na);J(()=>En(Sr.get()));function En(e){let t=Xr[e];if(!t){switch(e){case"browser":t=ta();break;case"hash":t=ea();break;default:t=ra()}Xr[e]=t}return t}var sa=Object.defineProperty,aa=(e,t,r,n)=>{for(var s=void 0,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=i(t,r,s)||s);return s&&sa(t,r,s),s};const rt=Symbol("HistoryManaged:history"),wt=Symbol("HistoryManaged:historyType"),br=e=>{var a,i;var t,r,n;class s extends(n=e,r=wt,t=rt,n){constructor(){super(...arguments);ft(this,a);ft(this,i);this.history=void 0,Ye(this,a,I(this.history)),Ye(this,i,J(()=>{var g;const u=this.closest("tha-router-config, tha-router-outlet");return(g=u==null?void 0:u[wt])==null?void 0:g.get()})),this[r]=J(()=>at(this,a).get()??at(this,i).get()??Sr.get()),this[t]=J(()=>En(this[wt].get()))}attributeChangedCallback(u,g,d){switch(super.attributeChangedCallback(u,g,d),u){case"history":at(this,a).set(d);break}}}return a=new WeakMap,i=new WeakMap,aa([C({type:String})],s.prototype,"history"),s};function Tr(e=L){return new Promise((t,r)=>{setTimeout(()=>{try{const n=e();t(n)}catch(n){r(n)}},0)})}var ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,An=e=>{throw TypeError(e)},Kt=(e,t,r,n)=>{for(var s=n>1?void 0:n?oa(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&ia(t,r,s),s},Cn=(e,t,r)=>t.has(e)||An("Cannot "+r),M=(e,t,r)=>(Cn(e,t,"read from private field"),r?r.call(e):t.get(e)),ot=(e,t,r)=>t.has(e)?An("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),sr=(e,t,r,n)=>(Cn(e,t,"write to private field"),t.set(e,r),r),tn,gt,_t,pr,fr,ne,se,ae;const Sn=Symbol("ThaRouterOutlet:renderRoute"),ie=Symbol("ThaRouterOutlet:params");exports.ThaRouterOutlet=class extends Jt{constructor(){super(...arguments),ot(this,gt,I(void 0)),ot(this,_t,I(null)),ot(this,pr,J(()=>{var t,r;return((r=(t=M(this,_t).get())==null?void 0:t.deref())==null?void 0:r[dr].get())??null})),ot(this,fr,J(()=>{var a,i,h;const t=(a=M(this,gt).get())==null?void 0:a.deref(),r=(i=M(this,_t).get())==null?void 0:i.deref(),n=r==null?void 0:r[Me];if(!t||!n)return null;const{location:{pathname:s}}=t[rt].get();return((h=n.exec(s,"http://dummy.base"))==null?void 0:h.pathname.groups)??null})),this[tn]=J(()=>{var s;const t=M(this,fr).get()??{},r=(s=this.parentElement)==null?void 0:s.closest("tha-router-outlet"),n=(r==null?void 0:r[ie].get())??{};return Object.freeze({...n,...t})}),this.params={},ot(this,ne,L),ot(this,se,L),ot(this,ae,L),this.for=null,this.routePath=null,this.routeID=void 0}connectedCallback(){super.connectedCallback(),Tr(()=>{this.bindToRouter()}),sr(this,ne,this.updateEffect(()=>{var r;Array.from(this.renderRoot.children).forEach(n=>n.remove());const t=((r=M(this,pr).get())==null?void 0:r.deref())??null;t&&this.renderRoot.appendChild(t.cloneNode(!0))})),sr(this,se,this.updateEffect(()=>{var r;const t=((r=M(this,_t).get())==null?void 0:r.deref())??null;this.routePath=(t==null?void 0:t.getAttribute("path"))??null,this.routeID=t!=null&&t.id?t==null?void 0:t.id:void 0})),sr(this,ae,this.updateEffect(()=>{const t=this[ie].get();Array.from(this.attributes).filter(r=>r.name.startsWith("param-")).filter(r=>!(r.name.slice(6)in t)).forEach(r=>{this.removeAttribute(r.name)});for(const[r,n]of Object.entries(t))this.setAttribute(`param-${r}`,n??"");this.params=t}))}bindToRouter(t){var n,s;t||(this.for?t=this.getRootNode().querySelector(`tha-router#${this.for}`)??void 0:t=this.closest("tha-router")??void 0);const r=((s=(n=M(this,gt))==null?void 0:n.get())==null?void 0:s.deref())??null;return r===t?r:(r==null||r.assignOutlet(null),t==null||t.assignOutlet(this),M(this,gt).set(t?new WeakRef(t):void 0),t??null)}[(tn=ie,Sn)](t){M(this,_t).set(t?new WeakRef(t):null)}disconnectedCallback(){var t,r,n;super.disconnectedCallback(),(n=(r=(t=M(this,gt))==null?void 0:t.get())==null?void 0:r.deref())==null||n.assignOutlet(null);try{M(this,ne).call(this),M(this,se).call(this),M(this,ae).call(this)}catch{}}createRenderRoot(){return this}};gt=new WeakMap;_t=new WeakMap;pr=new WeakMap;fr=new WeakMap;ne=new WeakMap;se=new WeakMap;ae=new WeakMap;Kt([fs()],exports.ThaRouterOutlet.prototype,"params",2);Kt([C({type:String})],exports.ThaRouterOutlet.prototype,"for",2);Kt([C({type:String,reflect:!0})],exports.ThaRouterOutlet.prototype,"routePath",2);Kt([C({type:String,reflect:!0})],exports.ThaRouterOutlet.prototype,"routeID",2);exports.ThaRouterOutlet=Kt([K("tha-router-outlet")],exports.ThaRouterOutlet);var ha=Object.getOwnPropertyDescriptor,bn=e=>{throw TypeError(e)},ca=(e,t,r,n)=>{for(var s=n>1?void 0:n?ha(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=i(s)||s);return s},Tn=(e,t,r)=>t.has(e)||bn("Cannot "+r),k=(e,t,r)=>(Tn(e,t,"read from private field"),r?r.call(e):t.get(e)),j=(e,t,r)=>t.has(e)?bn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ar=(e,t,r,n)=>(Tn(e,t,"write to private field"),t.set(e,r),r),oe,he,ce,Rt,le,Dt,ue,xt;exports.ThaRouter=class extends br(Jt){constructor(){super(...arguments),j(this,oe,new MutationObserver(t=>{t.filter(n=>n.type==="childList").length&&k(this,le).set(Array.from(this.children).filter(n=>n instanceof exports.ThaRoute).map(n=>new WeakRef(n)))})),j(this,he,L),j(this,ce,L),j(this,Rt,L),j(this,le,I([])),j(this,Dt,I(null)),j(this,ue,I(null)),j(this,xt,t=>{const r=k(this,le).get().map(n=>n.deref()).filter(Boolean);for(const n of r){const s=n[Me];if(s!=null&&s.test({pathname:t.location.pathname})){k(this,Dt).set(new WeakRef(n));return}}k(this,Dt).set(null)})}connectedCallback(){super.connectedCallback(),k(this,oe).observe(this,{childList:!0}),ar(this,he,this.updateEffect(()=>{var n,s;const t=((n=k(this,Dt).get())==null?void 0:n.deref())??null,r=((s=k(this,ue).get())==null?void 0:s.deref())??null;r==null||r[Sn](t)})),ar(this,ce,this.updateEffect(()=>{const t=this[rt].get();k(this,Rt).call(this),k(this,xt).call(this,{location:this[rt].get().location,action:"POP"}),ar(this,Rt,t?t.listen(k(this,xt)):L)})),Tr(()=>{k(this,xt).call(this,{location:this[rt].get().location,action:"POP"})})}assignOutlet(t){k(this,ue).set(t?new WeakRef(t):null)}disconnectedCallback(){super.disconnectedCallback();try{k(this,he).call(this),k(this,ce).call(this)}catch{}k(this,oe).disconnect(),k(this,Rt).call(this)}createRenderRoot(){return this}};oe=new WeakMap;he=new WeakMap;ce=new WeakMap;Rt=new WeakMap;le=new WeakMap;Dt=new WeakMap;ue=new WeakMap;xt=new WeakMap;(()=>{const e=document.createElement("style");e.setAttribute("type","text/css"),e.setAttribute("data-id","tha-router-styles"),e.textContent=Ve`
105
+ tha-router {
106
+ & > :not(tha-router-outlet) {
107
+ display: none;
108
+ }
109
+ }
110
+ `.toString(),document.head.appendChild(e)})();exports.ThaRouter=ca([K("tha-router")],exports.ThaRouter);function la(e){return!!e}function en(e){return e.filter(la)}var ua=Object.defineProperty,da=Object.getOwnPropertyDescriptor,Pn=e=>{throw TypeError(e)},Pr=(e,t,r,n)=>{for(var s=n>1?void 0:n?da(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&ua(t,r,s),s},kn=(e,t,r)=>t.has(e)||Pn("Cannot "+r),ht=(e,t,r)=>(kn(e,t,"read from private field"),r?r.call(e):t.get(e)),kt=(e,t,r)=>t.has(e)?Pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),rn=(e,t,r,n)=>(kn(e,t,"write to private field"),t.set(e,r),r),de,pe,fe,vr,ve;exports.ThaRouterLink=class extends br(Jt){constructor(){super(...arguments),this.to=null,this.active=!1,kt(this,de,L),kt(this,pe,L),kt(this,fe,I(null)),kt(this,vr,J(()=>{const t=ht(this,fe).get();if(!t||t==="back"||t==="forward")return null;try{return new URLPattern({pathname:t})}catch{return null}})),kt(this,ve,t=>{var a;const r=this[rt].get();if(console.log(this[wt].get()),this.to==="back")return r.back();if(this.to==="forward")return r.forward();const n=r.location.pathname+r.location.search+r.location.hash;let s=this.to;if(s!=null&&s.startsWith(".")){const i=en(n.split("/")),h=en(s.split("/"));for(const o of h)o===".."?i.pop():o!=="."&&i.push(o);s="/"+i.join("/")}s=s==null?void 0:s.replaceAll("//","/"),(a=this[rt].get())==null||a.push(s||"/")})}connectedCallback(){super.connectedCallback(),this.addEventListener("click",ht(this,ve)),rn(this,de,this.updateEffect(()=>{const t=this[rt].get(),r=ht(this,vr).get();this.active=(r==null?void 0:r.test({pathname:(t==null?void 0:t.location.pathname)??""}))??!1,rn(this,pe,(t==null?void 0:t.listen(()=>{this.active=(r==null?void 0:r.test({pathname:t.location.pathname}))??!1}))??L)}))}attributeChangedCallback(t,r,n){switch(super.attributeChangedCallback(t,r,n),t){case"to":ht(this,fe).set(n);break}}disconnectedCallback(){super.disconnectedCallback();try{ht(this,de).call(this)}catch{}ht(this,pe).call(this),this.removeEventListener("click",ht(this,ve))}createRenderRoot(){return this}};de=new WeakMap;pe=new WeakMap;fe=new WeakMap;vr=new WeakMap;ve=new WeakMap;(()=>{const e=document.createElement("style");e.setAttribute("type","text/css"),e.setAttribute("data-id","tha-router-link-styles"),e.textContent=Ve`
111
+ tha-router-link {
112
+ cursor: pointer;
113
+ }
114
+ `.toString(),document.head.appendChild(e)})();Pr([C({type:String})],exports.ThaRouterLink.prototype,"to",2);Pr([C({type:Boolean,reflect:!0})],exports.ThaRouterLink.prototype,"active",2);exports.ThaRouterLink=Pr([K("tha-router-link")],exports.ThaRouterLink);var pa=Object.getOwnPropertyDescriptor,On=e=>{throw TypeError(e)},fa=(e,t,r,n)=>{for(var s=n>1?void 0:n?pa(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=i(s)||s);return s},Rn=(e,t,r)=>t.has(e)||On("Cannot "+r),va=(e,t,r)=>(Rn(e,t,"read from private field"),r?r.call(e):t.get(e)),ga=(e,t,r)=>t.has(e)?On("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),_a=(e,t,r,n)=>(Rn(e,t,"write to private field"),t.set(e,r),r),ge;exports.ThaRouterConfig=class extends br(Jt){constructor(){super(...arguments),ga(this,ge,L)}connectedCallback(){super.connectedCallback(),document.head.contains(this)&&(console.log("ThaRouterConfig: Setting global history type to",this[wt].get()),_a(this,ge,this.updateEffect(()=>{Sr.set(this[wt].get())})))}disconnectedCallback(){super.disconnectedCallback();try{va(this,ge).call(this)}catch{}}createRenderRoot(){return this}};ge=new WeakMap;exports.ThaRouterConfig=fa([K("tha-router-config")],exports.ThaRouterConfig);var ma=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,Dn=e=>{throw TypeError(e)},xn=(e,t,r,n)=>{for(var s=n>1?void 0:n?ya(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&ma(t,r,s),s},$a=(e,t,r)=>t.has(e)||Dn("Cannot "+r),Ot=(e,t,r)=>($a(e,t,"read from private field"),r?r.call(e):t.get(e)),ir=(e,t,r)=>t.has(e)?Dn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),_e,me,gr;exports.ThaRouterParam=class extends Jt{constructor(){super(...arguments),ir(this,_e,I(null)),ir(this,me,I("")),ir(this,gr,J(()=>{var t,r;return(r=(t=Ot(this,_e).get())==null?void 0:t[ie])==null?void 0:r.get()[Ot(this,me).get()]})),this.name=""}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>.");Ot(this,_e).set(t)}attributeChangedCallback(t,r,n){switch(super.attributeChangedCallback(t,r,n),t){case"name":Ot(this,me).set(n??"");break}}render(){return Ks`${Ot(this,gr)}`}};_e=new WeakMap;me=new WeakMap;gr=new WeakMap;xn([C({type:String})],exports.ThaRouterParam.prototype,"name",2);exports.ThaRouterParam=xn([K("tha-router-param")],exports.ThaRouterParam);const Nn=Symbol("Accept Drop"),Mn=Symbol("Register Handle"),Wn=Symbol("Unregister Handle");var He,Ue,ze,Ln;const $t=class $t extends DragEvent{constructor(r,{dragTarget:n,dropzoneTarget:s},a){super(r,a);ft(this,ze);this.dragTarget=n,this.dropzoneTarget=s}get name(){var r;return(r=at(this,ze,Ln).deref())==null?void 0:r.name}get dragData(){var r;return(r=this.dragTarget.deref())==null?void 0:r.dragData}acceptDrop(r){var n;(n=this.dragTarget.deref())==null||n[Nn](this.dropzoneTarget,r)}};He=new WeakMap,Ue=new WeakMap,ze=new WeakSet,Ln=function(){return at($t,Ue).includes(this.type)?this.dropzoneTarget:at($t,He).includes(this.type)?this.dragTarget:new WeakRef(this.target)},ft($t,He,["thadrag","thadragstart","thadragend","thadropzoneenter","thadropzoneleave","thadropzoneover","thadropped"]),ft($t,Ue,["thadrop","thadropend","thadragenter","thadragleave","thadragover"]);let nt=$t;var wa=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,In=e=>{throw TypeError(e)},G=(e,t,r,n)=>{for(var s=n>1?void 0:n?Ea(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&wa(t,r,s),s},kr=(e,t,r)=>t.has(e)||In("Cannot "+r),O=(e,t,r)=>(kr(e,t,"read from private field"),r?r.call(e):t.get(e)),Z=(e,t,r)=>t.has(e)?In("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),or=(e,t,r,n)=>(kr(e,t,"write to private field"),t.set(e,r),r),ct=(e,t,r)=>(kr(e,t,"access private method"),r),Nt,ye,Et,Y,Hn,$e,we,Ee,Ae,Ce,Un,zn,Vn,_r,Bn;exports.DragElement=class extends F{constructor(){super(...arguments),Z(this,Y),this.dragData={},this.preDragData={boundingRect:null,dragStartEvent:null,styles:{pointerEvents:""}},Z(this,Nt,null),Z(this,ye,null),Z(this,Et,new Set),this.draggingStrategy="move",this.dragging=!1,this.dragend=!1,this.draggedOver=null,this.dropAccepted=!1,Z(this,$e,t=>{var r;if(!ct(this,Y,Bn).call(this,t))return t.preventDefault();t.stopPropagation(),(r=t.dataTransfer)==null||r.setDragImage(exports.DragElement.TRANSPARENT_IMAGE,0,0),t.dataTransfer.effectAllowed=this.draggingStrategy,document.addEventListener("dragover",ct(this,Y,_r)),ct(this,Y,zn).call(this,t),ct(this,Y,Vn).call(this),Tr().then(()=>{if(this.style.pointerEvents="none",this.dragging=!0,this.replaceClone){const n=ct(this,Y,Un).call(this);or(this,ye,new WeakRef(n)),this.parentElement.insertBefore(n,this.nextSibling)}this.dispatchEvent(new nt("thadragstart",{dragTarget:new WeakRef(this)},t))})}),Z(this,we,t=>{var s;document.removeEventListener("dragover",ct(this,Y,_r)),this.dragend=!0;const r=(s=getComputedStyle(this).transitionDuration.match(/\d*\.?\d+/g))==null?void 0:s.map(Number).some(a=>a>0),n=()=>{var h,o;this.replaceClone&&((h=this.clone)==null||h.remove()),this.style.pointerEvents=this.preDragData.styles.pointerEvents,["--tha-width","--tha-height","--tha-left","--tha-top","--tha-x","--tha-y","--tha-cx","--tha-cy"].forEach(u=>{this.style.removeProperty(u)}),["width","height","left","right","top","bottom"].forEach(u=>{this.style.removeProperty(`--tha-target-${u}`)});const a=O(this,Nt),i=this.dropAccepted;this.dragging=!1,this.dragend=!1,this.draggedOver=null,this.dropAccepted=!1,or(this,Nt,null),i&&a&&((o=a.deref())==null||o.dispatchEvent(new nt("thadropend",{dragTarget:new WeakRef(this),dropzoneTarget:a},t))),this.dispatchEvent(new nt("thadragend",{dragTarget:new WeakRef(this)},t))};r?this.addEventListener("transitionend",n,{once:!0}):n()}),Z(this,Ee,t=>{const{x:r,y:n}=t;this.style.setProperty("--tha-cx",`${r}px`),this.style.setProperty("--tha-cy",`${n}px`)}),Z(this,Ae,t=>{var r,n;this.draggedOver=((n=(r=t.dropzoneTarget)==null?void 0:r.deref())==null?void 0:n.name)??""}),Z(this,Ce,()=>{this.draggedOver=null})}get clone(){return O(this,ye).deref()}connectedCallback(){super.connectedCallback(),this.draggable=!0,ct(this,Y,Hn).call(this),this.addEventListener("dragstart",O(this,$e)),this.addEventListener("dragend",O(this,we)),this.addEventListener("drag",O(this,Ee)),this.addEventListener("thadropzoneenter",O(this,Ae)),this.addEventListener("thadropzoneleave",O(this,Ce))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dragstart",O(this,$e)),this.removeEventListener("dragend",O(this,we)),this.removeEventListener("drag",O(this,Ee)),this.removeEventListener("thadropzoneenter",O(this,Ae)),this.removeEventListener("thadropzoneleave",O(this,Ce))}render(){return Be`<slot></slot>`}[Nn](t,r){if(this.dropAccepted=!0,or(this,Nt,t),!r)return;const{width:n,height:s,left:a,right:i,top:h,bottom:o}=r;for(const u in{width:n,height:s,left:a,right:i,top:h,bottom:o})this.style.setProperty(`--tha-target-${u}`,`${r[u]}px`)}[Mn](t){O(this,Et).add(t)}[Wn](t){O(this,Et).delete(t)}};Nt=new WeakMap;ye=new WeakMap;Et=new WeakMap;Y=new WeakSet;Hn=function(){exports.DragElement.DRAG_DATA_OBSERVER.observe(this,{attributes:!0});for(const{name:e,value:t}of Object.values(this.attributes).filter(r=>r.name.startsWith("data-drag-")))this.dragData[e.replace("data-drag-","")]=t};$e=new WeakMap;we=new WeakMap;Ee=new WeakMap;Ae=new WeakMap;Ce=new WeakMap;Un=function(){const e=document.createElement("tha-drag-clone");return Object.values(this.attributes).filter(t=>!["dragging","replaceclone","draggable"].includes(t.name)).forEach(t=>{e.attributes.setNamedItem(t.cloneNode())}),this.childNodes.forEach(t=>{e.appendChild(t.cloneNode(!0))}),e};zn=function(e){this.preDragData.boundingRect=this.getBoundingClientRect(),this.preDragData.dragStartEvent=e,this.preDragData.styles.pointerEvents=this.style.pointerEvents};Vn=function(){const{boundingRect:{width:e,height:t,left:r,top:n},dragStartEvent:{x:s,y:a}}=this.preDragData,i={width:e,height:t,left:r,top:n,x:s,y:a};for(const h in i)this.style.setProperty(`--tha-${h}`,`${i[h]}px`)};_r=function(e){e.preventDefault()};Bn=function(e){return this.disabled?!1:!!(!O(this,Et).size||O(this,Et).has(e.target))};exports.DragElement.DRAG_DATA_OBSERVER=new MutationObserver(e=>{for(const{attributeName:t,target:r}of e){if(!(t!=null&&t.startsWith("data-drag-")))continue;const n=r;n.dragData[t.replace("data-drag-","")]=n.getAttribute(t)}});exports.DragElement.styles=Ve`
115
+ :host {
116
+ --tha-diff-x: calc(var(--tha-cx) - var(--tha-x));
117
+ --tha-diff-y: calc(var(--tha-cy) - var(--tha-y));
118
+ }
119
+
120
+ :host([draggingstrategy="move"]),
121
+ :host([draggingstrategy="copyMove"]) {
122
+ transition-duration: .2s;
123
+ transition-timing-function: ease-out;
124
+ transition-property: none;
125
+ }
126
+
127
+ :host([draggingstrategy="move"][dragging]),
128
+ :host([draggingstrategy="copyMove"][dragging]) {
129
+ position: fixed;
130
+ width: var(--tha-width);
131
+ height: var(--tha-height);
132
+ left: calc(var(--tha-left) + var(--tha-diff-x) + var(--tha-offset-x));
133
+ top: calc(var(--tha-top) + var(--tha-diff-y) + var(--tha-offset-y));
134
+ transform-origin: calc(var(--tha-x) - var(--tha-left)) calc(var(--tha-y) - var(--tha-top));
135
+ z-index: 100;
136
+ }
137
+
138
+ :host([draggingstrategy="move"][dragend]),
139
+ :host([draggingstrategy="copyMove"][dragend]) {
140
+ left: var(--tha-left);
141
+ top: var(--tha-top);
142
+ transition-property: all;
143
+ }
144
+
145
+ :host([draggingstrategy="move"][dragend][dropaccepted]),
146
+ :host([draggingstrategy="copyMove"][dragend][dropaccepted]) {
147
+ left: var(--tha-target-left);
148
+ top: var(--tha-target-top);
149
+ width: var(--tha-target-width);
150
+ height: var(--tha-target-height);
151
+ }
152
+ `;(()=>{exports.DragElement.TRANSPARENT_IMAGE=new Image(1,1),exports.DragElement.TRANSPARENT_IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==";const e=exports.DragElement.GLOBAL_STYLE=document.createElement("style");e.innerHTML=`
153
+ @property --tha-offset-x {
154
+ syntax: '<length>';
155
+ initial-value: 0px;
156
+ inherits: true;
157
+ }
158
+
159
+ @property --tha-offset-y {
160
+ syntax: '<length>';
161
+ initial-value: 0px;
162
+ inherits: true;
163
+ }
164
+ `,document.head.appendChild(e)})();G([C({type:String})],exports.DragElement.prototype,"name",2);G([C({type:String,reflect:!0})],exports.DragElement.prototype,"draggingStrategy",2);G([C({type:String})],exports.DragElement.prototype,"dragGroup",2);G([C({type:Boolean})],exports.DragElement.prototype,"replaceClone",2);G([C({type:Boolean,reflect:!0})],exports.DragElement.prototype,"dragging",2);G([C({type:Boolean,reflect:!0})],exports.DragElement.prototype,"dragend",2);G([C({type:String,reflect:!0})],exports.DragElement.prototype,"draggedOver",2);G([C({type:Boolean,reflect:!0})],exports.DragElement.prototype,"dropAccepted",2);G([C({type:Boolean,reflect:!0})],exports.DragElement.prototype,"disabled",2);exports.DragElement=G([K("tha-drag")],exports.DragElement);var Aa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,Gn=e=>{throw TypeError(e)},jt=(e,t,r,n)=>{for(var s=n>1?void 0:n?Ca(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=(n?i(t,r,s):i(s))||s);return n&&s&&Aa(t,r,s),s},Or=(e,t,r)=>t.has(e)||Gn("Cannot "+r),D=(e,t,r)=>(Or(e,t,"read from private field"),r?r.call(e):t.get(e)),Q=(e,t,r)=>t.has(e)?Gn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),qn=(e,t,r,n)=>(Or(e,t,"write to private field"),t.set(e,r),r),X=(e,t,r)=>(Or(e,t,"access private method"),r),nn=(e,t,r,n)=>({set _(s){qn(e,t,s)},get _(){return D(e,t,n)}}),Mt,Se,mt,be,Te,Pe,ke,B,Wt,Lt;let Yt;document.addEventListener("thadragstart",e=>{Yt=e});exports.DropZoneElement=class extends F{constructor(){super(...arguments),Q(this,B),Q(this,Mt,0),this.accept=[],this.name="",this.itemDragged=null,this.acceptableDrag=!1,Q(this,Se,t=>{(!this.accept.length||this.accept.includes(t.name))&&(this.acceptableDrag=!0)}),Q(this,mt,()=>{this.itemDragged=null,this.acceptableDrag=!1,qn(this,Mt,0)}),Q(this,be,t=>{X(this,B,Wt).call(this)&&(++nn(this,Mt)._>1||(this.itemDragged=Yt.name??"",X(this,B,Lt).call(this,"thadragenter","thadropzoneenter",t)))}),Q(this,Te,t=>{X(this,B,Wt).call(this)&&(--nn(this,Mt)._>0||(this.itemDragged=null,X(this,B,Lt).call(this,"thadragleave","thadropzoneleave",t)))}),Q(this,Pe,t=>{X(this,B,Wt).call(this)&&X(this,B,Lt).call(this,"thadragover","thadropzoneover",t)}),Q(this,ke,t=>{X(this,B,Wt).call(this)&&X(this,B,Lt).call(this,"thadrop","thadropped",t)})}render(){return Be`<slot></slot>`}connectedCallback(){super.connectedCallback(),document.addEventListener("thadragstart",D(this,Se)),document.addEventListener("thadragend",D(this,mt)),document.addEventListener("thadropend",D(this,mt)),this.addEventListener("dragenter",D(this,be)),this.addEventListener("dragleave",D(this,Te)),this.addEventListener("dragover",D(this,Pe)),this.addEventListener("drop",D(this,ke))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("thadragstart",D(this,Se)),document.removeEventListener("thadragend",D(this,mt)),document.removeEventListener("thadropend",D(this,mt)),this.removeEventListener("dragenter",D(this,be)),this.removeEventListener("dragleave",D(this,Te)),this.removeEventListener("dragover",D(this,Pe)),this.removeEventListener("drop",D(this,ke))}};Mt=new WeakMap;Se=new WeakMap;mt=new WeakMap;be=new WeakMap;Te=new WeakMap;Pe=new WeakMap;ke=new WeakMap;B=new WeakSet;Wt=function(){return!Yt.name||!this.accept.length||this.accept.includes(Yt.name)};Lt=function(e,t,r){var a;const{dragTarget:n}=Yt,s=new WeakRef(this);this.dispatchEvent(new nt(e,{dragTarget:n,dropzoneTarget:s},r)),(a=n.deref())==null||a.dispatchEvent(new nt(t,{dragTarget:n,dropzoneTarget:s},r))};exports.DropZoneElement.styles=Ve``;jt([C({converter:e=>(e??"").split(",").map(t=>t.trim())})],exports.DropZoneElement.prototype,"accept",2);jt([C({type:String})],exports.DropZoneElement.prototype,"name",2);jt([C({type:String,reflect:!0})],exports.DropZoneElement.prototype,"itemDragged",2);jt([C({type:Boolean,reflect:!0})],exports.DropZoneElement.prototype,"acceptableDrag",2);exports.DropZoneElement=jt([K("tha-dropzone")],exports.DropZoneElement);function*Sa(e){for(;e.parentElement;)yield e=e.parentElement}var ba=Object.getOwnPropertyDescriptor,Zn=e=>{throw TypeError(e)},Ta=(e,t,r,n)=>{for(var s=n>1?void 0:n?ba(t,r):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(s=i(s)||s);return s},Pa=(e,t,r)=>t.has(e)||Zn("Cannot "+r),sn=(e,t,r)=>(Pa(e,t,"read from private field"),r?r.call(e):t.get(e)),ka=(e,t,r)=>t.has(e)?Zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Oe,mr;exports.DragHandleElement=class extends F{constructor(){super(...arguments),ka(this,Oe)}connectedCallback(){var t;super.connectedCallback(),this.draggable=!0,(t=sn(this,Oe,mr))==null||t[Mn](this)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=sn(this,Oe,mr))==null||t[Wn](this)}render(){return Be`<slot></slot>`}};Oe=new WeakSet;mr=function(){for(const e of Sa(this))if(e instanceof exports.DragElement)return e;return null};exports.DragHandleElement=Ta([K("tha-drag-handle")],exports.DragHandleElement);exports.ThaDragEvent=nt;