@telperion/elements 1.0.0 → 1.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 (115) hide show
  1. package/.build-manifest.json +58 -0
  2. package/README.md +14 -8
  3. package/drag-drop/drag-element.cjs +59 -60
  4. package/drag-drop/drag-element.cjs.map +1 -0
  5. package/drag-drop/drag-element.js +8 -8
  6. package/drag-drop/drag-element.js.map +1 -1
  7. package/drag-drop/drag-handle-element.cjs +19 -19
  8. package/drag-drop/drag-handle-element.cjs.map +1 -0
  9. package/drag-drop/drag-handle-element.js +8 -7
  10. package/drag-drop/drag-handle-element.js.map +1 -1
  11. package/drag-drop/dropzone-element.cjs +32 -32
  12. package/drag-drop/dropzone-element.cjs.map +1 -0
  13. package/drag-drop/dropzone-element.js +6 -5
  14. package/drag-drop/dropzone-element.js.map +1 -1
  15. package/drag-drop/index.cjs +23 -11
  16. package/drag-drop/index.cjs.map +1 -0
  17. package/drag-drop/{drag-element.d.ts → index.d.cts} +73 -5
  18. package/drag-drop/index.d.ts +172 -6
  19. package/drag-drop/index.js +4 -5
  20. package/drag-drop/index.js.map +1 -1
  21. package/drag-drop/private-props.cjs +10 -6
  22. package/drag-drop/private-props.cjs.map +1 -0
  23. package/drag-drop/private-props.js +4 -3
  24. package/drag-drop/private-props.js.map +1 -1
  25. package/drag-drop/tha-drag-event.cjs +8 -6
  26. package/drag-drop/tha-drag-event.cjs.map +1 -0
  27. package/drag-drop/tha-drag-event.js +4 -2
  28. package/drag-drop/tha-drag-event.js.map +1 -1
  29. package/fesm/elements.mjs +1939 -0
  30. package/fesm/elements.mjs.map +1 -0
  31. package/icon/icon-element.cjs +136 -37
  32. package/icon/icon-element.cjs.map +1 -0
  33. package/icon/icon-element.js +105 -5
  34. package/icon/icon-element.js.map +1 -1
  35. package/icon/index.cjs +16 -5
  36. package/icon/index.cjs.map +1 -0
  37. package/icon/index.d.cts +89 -0
  38. package/icon/index.d.ts +89 -1
  39. package/icon/index.js +2 -2
  40. package/icon/index.js.map +1 -1
  41. package/icon/simple-icons-sprite.cjs +129 -0
  42. package/icon/simple-icons-sprite.cjs.map +1 -0
  43. package/icon/simple-icons-sprite.js +124 -0
  44. package/icon/simple-icons-sprite.js.map +1 -0
  45. package/iife/elements.js +180 -0
  46. package/iife/elements.js.map +1 -0
  47. package/index.cjs +53 -11
  48. package/index.cjs.map +1 -0
  49. package/index.d.cts +6 -0
  50. package/index.d.ts +6 -6
  51. package/index.js +10 -9
  52. package/index.js.map +1 -1
  53. package/package.json +41 -83
  54. package/router/history-managed.cjs +22 -18
  55. package/router/history-managed.cjs.map +1 -0
  56. package/router/history-managed.js +9 -7
  57. package/router/history-managed.js.map +1 -1
  58. package/router/history.cjs +20 -16
  59. package/router/history.cjs.map +1 -0
  60. package/router/history.js +8 -6
  61. package/router/history.js.map +1 -1
  62. package/router/index.cjs +36 -15
  63. package/router/index.cjs.map +1 -0
  64. package/router/index.d.cts +895 -0
  65. package/router/index.d.ts +895 -6
  66. package/router/index.js +6 -7
  67. package/router/index.js.map +1 -1
  68. package/router/signal-watcher-lit-element.cjs +9 -6
  69. package/router/signal-watcher-lit-element.cjs.map +1 -0
  70. package/router/signal-watcher-lit-element.js +5 -3
  71. package/router/signal-watcher-lit-element.js.map +1 -1
  72. package/router/tha-route.cjs +25 -22
  73. package/router/tha-route.cjs.map +1 -0
  74. package/router/tha-route.js +8 -7
  75. package/router/tha-route.js.map +1 -1
  76. package/router/tha-router-config.cjs +17 -17
  77. package/router/tha-router-config.cjs.map +1 -0
  78. package/router/tha-router-config.js +8 -7
  79. package/router/tha-router-config.js.map +1 -1
  80. package/router/tha-router-link.cjs +36 -36
  81. package/router/tha-router-link.cjs.map +1 -0
  82. package/router/tha-router-link.js +9 -8
  83. package/router/tha-router-link.js.map +1 -1
  84. package/router/tha-router-outlet.cjs +51 -48
  85. package/router/tha-router-outlet.cjs.map +1 -0
  86. package/router/tha-router-outlet.js +12 -11
  87. package/router/tha-router-outlet.js.map +1 -1
  88. package/router/tha-router-param.cjs +21 -21
  89. package/router/tha-router-param.cjs.map +1 -0
  90. package/router/tha-router-param.js +7 -6
  91. package/router/tha-router-param.js.map +1 -1
  92. package/router/tha-router.cjs +33 -33
  93. package/router/tha-router.cjs.map +1 -0
  94. package/router/tha-router.js +11 -10
  95. package/router/tha-router.js.map +1 -1
  96. package/bundle.js +0 -164
  97. package/bundle.mjs +0 -2630
  98. package/drag-drop/drag-handle-element.d.ts +0 -12
  99. package/drag-drop/dropzone-element.d.ts +0 -17
  100. package/drag-drop/private-props.d.ts +0 -3
  101. package/drag-drop/tha-drag-event.d.ts +0 -19
  102. package/icon/icon-element.d.ts +0 -40
  103. package/router/history-managed.d.ts +0 -76
  104. package/router/history.d.ts +0 -48
  105. package/router/signal-watcher-lit-element.d.ts +0 -25
  106. package/router/tha-route.d.ts +0 -90
  107. package/router/tha-router-config.d.ts +0 -223
  108. package/router/tha-router-link.d.ts +0 -95
  109. package/router/tha-router-outlet.d.ts +0 -112
  110. package/router/tha-router-param.d.ts +0 -226
  111. package/router/tha-router.d.ts +0 -69
  112. package/tha-url-output.cjs +0 -79
  113. package/tha-url-output.d.ts +0 -41
  114. package/tha-url-output.js +0 -78
  115. package/tha-url-output.js.map +0 -1
@@ -0,0 +1,180 @@
1
+ var TelperionElements=function(t){"use strict";function e(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function r(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=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(i&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(e,t))}return t}toString(){return this.cssText}};const h=(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)},l=i?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:c,defineProperty:d,getOwnPropertyDescriptor:u,getOwnPropertyNames:p,getOwnPropertySymbols:g,getPrototypeOf:f}=Object,v=globalThis,m=v.trustedTypes,y=m?m.emptyScript:"",b=v.reactiveElementPolyfillSupport,E=(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}},_=(t,e)=>!c(t,e),S={attribute:!0,type:String,converter:$,reflect:!1,useDefault:!1,hasChanged:_};
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let w=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=S){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&&d(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{get:n,set:i}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const s=n?.call(this);i?.call(this,e),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...p(t),...g(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(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const r of e){const e=document.createElement("style"),i=n.litNonce;void 0!==i&&e.setAttribute("nonce",i),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 i=(void 0!==r.converter?.toAttribute?r.converter:$).toAttribute(e,r.type);this._$Em=t,null==i?this.removeAttribute(n):this.setAttribute(n,i),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),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:$;this._$Em=n;const s=i.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,i=this[t];if(r??=n.getPropertyOptions(t),!((r.hasChanged??_)(i,e)||r.useDefault&&r.reflect&&i===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:i},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==i||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){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[E("elementProperties")]=new Map,w[E("finalized")]=new Map,b?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.1.1");
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ const A=globalThis,C=A.trustedTypes,D=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,R="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+T,k=`<${O}>`,x=document,N=()=>x.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,U="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,H=/>/g,I=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,z=/"/g,V=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),q=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Z=new WeakMap,J=x.createTreeWalker(x,129);function F(t,e){if(!L(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==D?D.createHTML(e):e}const K=(t,e)=>{const r=t.length-1,n=[];let i,s=2===e?"<svg>":3===e?"<math>":"",o=M;for(let e=0;e<r;e++){const r=t[e];let a,h,l=-1,c=0;for(;c<r.length&&(o.lastIndex=c,h=o.exec(r),null!==h);)c=o.lastIndex,o===M?"!--"===h[1]?o=W:void 0!==h[1]?o=H:void 0!==h[2]?(V.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=I):void 0!==h[3]&&(o=I):o===I?">"===h[0]?(o=i??M,l=-1):void 0===h[1]?l=-2:(l=o.lastIndex-h[2].length,a=h[1],o=void 0===h[3]?I:'"'===h[3]?z:j):o===z||o===j?o=I:o===W||o===H?o=M:(o=I,i=void 0);const d=o===I&&t[e+1].startsWith("/>")?" ":"";s+=o===M?r+k:l>=0?(n.push(a),r.slice(0,l)+R+r.slice(l)+T+d):r+T+(-2===l?e:d)}return[F(t,s+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class Y{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let i=0,s=0;const o=t.length-1,a=this.parts,[h,l]=K(t,e);if(this.el=Y.createElement(h,r),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=J.nextNode())&&a.length<o;){if(1===n.nodeType){if(n.hasAttributes())for(const t of n.getAttributeNames())if(t.endsWith(R)){const e=l[s++],r=n.getAttribute(t).split(T),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:r,ctor:"."===o[1]?rt:"?"===o[1]?nt:"@"===o[1]?it:et}),n.removeAttribute(t)}else t.startsWith(T)&&(a.push({type:6,index:i}),n.removeAttribute(t));if(V.test(n.tagName)){const t=n.textContent.split(T),e=t.length-1;if(e>0){n.textContent=C?C.emptyScript:"";for(let r=0;r<e;r++)n.append(t[r],N()),J.nextNode(),a.push({type:2,index:++i});n.append(t[e],N())}}}else if(8===n.nodeType)if(n.data===O)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=n.data.indexOf(T,t+1));)a.push({type:7,index:i}),t+=T.length-1}i++}}static createElement(t,e){const r=x.createElement("template");return r.innerHTML=t,r}}function Q(t,e,r=t,n){if(e===q)return e;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const s=P(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(t),i._$AT(t,r,n)),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(e=Q(t,i._$AS(t,e.values),i,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??x).importNode(e,!0);J.currentNode=n;let i=J.nextNode(),s=0,o=0,a=r[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new tt(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new st(i,this,t)),this._$AV.push(e),a=r[++o]}s!==a?.index&&(i=J.nextNode(),s++)}return J.currentNode=x,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=G,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),P(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>L(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}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!==G&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.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=Y.createElement(F(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=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new Y(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,n=0;for(const i of t)n===e.length?e.push(r=new tt(this.O(N()),this.O(N()),this,this.options)):r=e[n],r._$AI(i),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,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=G}_$AI(t,e=this,r,n){const i=this.strings;let s=!1;if(void 0===i)t=Q(this,t,e,0),s=!P(t)||t!==this._$AH&&t!==q,s&&(this._$AH=t);else{const n=t;let o,a;for(t=i[0],o=0;o<i.length-1;o++)a=Q(this,n[r+o],e,o),a===q&&(a=this._$AH[o]),s||=!P(a)||a!==this._$AH[o],a===G?t=G:t!==G&&(t+=(a??"")+i[o+1]),this._$AH[o]=a}s&&!n&&this.j(t)}j(t){t===G?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===G?void 0:t}}class nt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class it extends et{constructor(t,e,r,n,i){super(t,e,r,n,i),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??G)===q)return;const r=this._$AH,n=t===G&&r!==G||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==G&&(r===G||n);n&&this.element.removeEventListener(this.name,this,r),i&&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 ot=A.litHtmlPolyfillSupport;ot?.(Y,tt),(A.litHtmlVersions??=[]).push("3.3.1");const at=globalThis;
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */let ht=class extends w{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 i=n._$litPart$;if(void 0===i){const t=r?.renderBefore??null;n._$litPart$=i=new tt(e.insertBefore(N(),t),t,void 0,r??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}};ht._$litElement$=!0,ht.finalized=!0,at.litElementHydrateSupport?.({LitElement:ht});const lt=at.litElementPolyfillSupport;lt?.({LitElement:ht}),(at.litElementVersions??=[]).push("4.2.1");
24
+ /**
25
+ * @license
26
+ * Copyright 2017 Google LLC
27
+ * SPDX-License-Identifier: BSD-3-Clause
28
+ */
29
+ const ct=t=>(e,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},dt={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:_},ut=(t=dt,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,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 i=e.get.call(this);e.set.call(this,r),this.requestUpdate(n,i,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 i=this[n];e.call(this,r),this.requestUpdate(n,i,t)}}throw Error("Unsupported decorator location: "+n)};
30
+ /**
31
+ * @license
32
+ * Copyright 2017 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */function pt(t){return(e,r)=>"object"==typeof r?ut(t,e,r):((t,e,r)=>{const n=e.hasOwnProperty(r);return e.constructor.createProperty(r,t),n?Object.getOwnPropertyDescriptor(e,r):void 0})(t,e,r)}
35
+ /**
36
+ * @license
37
+ * Copyright 2017 Google LLC
38
+ * SPDX-License-Identifier: BSD-3-Clause
39
+ */var gt=Object.defineProperty,ft=(t,e,r)=>(((t,e,r)=>{e in t?gt(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)},mt=(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
+ /**
41
+ * @license
42
+ * Copyright Google LLC All Rights Reserved.
43
+ *
44
+ * Use of this source code is governed by an MIT-style license that can be
45
+ * found in the LICENSE file at https://angular.io/license
46
+ */
47
+ function bt(t,e){return Object.is(t,e)}
48
+ /**
49
+ * @license
50
+ * Copyright Google LLC All Rights Reserved.
51
+ *
52
+ * Use of this source code is governed by an MIT-style license that can be
53
+ * found in the LICENSE file at https://angular.io/license
54
+ */let Et=null,$t=!1,_t=1;const St=Symbol("SIGNAL");function wt(t){const e=Et;return Et=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 Ct(t){if($t)throw new Error("undefined"!=typeof ngDevMode&&ngDevMode?"Assertion error: signal read during notification phase":"");if(null===Et)return;Et.consumerOnSignalRead(t);const e=Et.nextProducerIndex++;if(Nt(Et),e<Et.producerNode.length&&Et.producerNode[e]!==t&&xt(Et)){kt(Et.producerNode[e],Et.producerIndexOfThis[e])}Et.producerNode[e]!==t&&(Et.producerNode[e]=t,Et.producerIndexOfThis[e]=xt(Et)?Ot(t,Et,e):0),Et.producerLastReadVersion[e]=t.version}function Dt(t){if(t.dirty||t.lastCleanEpoch!==_t){if(!t.producerMustRecompute(t)&&!function(t){Nt(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(Dt(r),n!==r.version)return!0}return!1}(t))return t.dirty=!1,void(t.lastCleanEpoch=_t);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=_t}}function Rt(t){if(void 0===t.liveConsumerNode)return;const e=$t;$t=!0;try{for(const e of t.liveConsumerNode)e.dirty||Tt(e)}finally{$t=e}}function Tt(t){var e;t.dirty=!0,Rt(t),null==(e=t.consumerMarkedDirty)||e.call(t.wrapper??t)}function Ot(t,e,r){var n;if(Pt(t),Nt(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 kt(t,e){var r;if(Pt(t),Nt(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++)kt(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];Nt(n),n.producerIndexOfThis[r]=e}}function xt(t){var e;return t.consumerIsAlwaysLive||((null==(e=null==t?void 0:t.liveConsumerNode)?void 0:e.length)??0)>0}function Nt(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Pt(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}
55
+ /**
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 Lt(t){if(Dt(t),Ct(t),t.value===Wt)throw t.error;return t.value}const Ut=Symbol("UNSET"),Mt=Symbol("COMPUTING"),Wt=Symbol("ERRORED"),Ht=(()=>({...At,value:Ut,dirty:!0,error:null,equal:bt,producerMustRecompute:t=>t.value===Ut||t.value===Mt,producerRecomputeValue(t){if(t.value===Mt)throw new Error("Detected cycle in computations.");const e=t.value;t.value=Mt;const r=function(t){return t&&(t.nextProducerIndex=0),wt(t)}(t);let n,i=!1;try{n=t.computation.call(t.wrapper);i=e!==Ut&&e!==Wt&&t.equal.call(t.wrapper,e,n)}catch(e){n=Wt,t.error=e}finally{!function(t,e){if(wt(e),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(xt(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)kt(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(t,r)}i?t.value=e:(t.value=n,t.version++)}}))();let It=
62
+ /**
63
+ * @license
64
+ * Copyright Google LLC All Rights Reserved.
65
+ *
66
+ * Use of this source code is governed by an MIT-style license that can be
67
+ * found in the LICENSE file at https://angular.io/license
68
+ */
69
+ function(){throw new Error};function jt(){return Ct(this),this.value}function zt(t,e){!1===(null==Et?void 0:Et.consumerAllowSignalWrites)&&It(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,function(t){t.version++,_t++,Rt(t)}
70
+ /**
71
+ * @license
72
+ * Copyright 2024 Bloomberg Finance L.P.
73
+ *
74
+ * Licensed under the Apache License, Version 2.0 (the "License");
75
+ * you may not use this file except in compliance with the License.
76
+ * You may obtain a copy of the License at
77
+ *
78
+ * http://www.apache.org/licenses/LICENSE-2.0
79
+ *
80
+ * Unless required by applicable law or agreed to in writing, software
81
+ * distributed under the License is distributed on an "AS IS" BASIS,
82
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83
+ * See the License for the specific language governing permissions and
84
+ * limitations under the License.
85
+ */(t))}const Vt=(()=>({...At,equal:bt,value:void 0}))();const Bt=Symbol("node");var qt;(t=>{var e,r,n,i;e=Bt,r=new WeakSet,t.isState=t=>"object"==typeof t&&vt(r,t),t.State=class{constructor(n,i={}){mt(this,r),ft(this,e);const s=
86
+ /**
87
+ * @license
88
+ * Copyright Google LLC All Rights Reserved.
89
+ *
90
+ * Use of this source code is governed by an MIT-style license that can be
91
+ * found in the LICENSE file at https://angular.io/license
92
+ */
93
+ function(t){const e=Object.create(Vt);e.value=t;const r=()=>(Ct(e),e.value);return r[St]=e,r}(n),o=s[St];if(this[Bt]=o,o.wrapper=this,i){const e=i.equals;e&&(o.equal=e),o.watched=i[t.subtle.watched],o.unwatched=i[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return jt.call(this[Bt])}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");zt(this[Bt],e)}};n=Bt,i=new WeakSet,t.isComputed=t=>"object"==typeof t&&vt(i,t),t.Computed=class{constructor(e,r){mt(this,i),ft(this,n);const s=function(t){const e=Object.create(Ht);e.computation=t;const r=()=>Lt(e);return r[St]=e,r}(e),o=s[St];if(o.consumerAllowSignalWrites=!0,this[Bt]=o,o.wrapper=this,r){const e=r.equals;e&&(o.equal=e),o.watched=r[t.subtle.watched],o.unwatched=r[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Lt(this[Bt])}},(e=>{var r,n,i,s;e.untrack=function(t){let e,r=null;try{r=wt(null),e=t()}finally{wt(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[Bt].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[Bt].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[Bt].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[Bt].producerNode;return!!r&&r.length>0};r=Bt,n=new WeakSet,i=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){mt(this,n),mt(this,i),ft(this,r);let e=Object.create(At);e.wrapper=this,e.consumerMarkedDirty=t,e.consumerIsAlwaysLive=!0,e.consumerAllowSignalWrites=!1,e.producerNode=[],this[Bt]=e}watch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");yt(this,i,s).call(this,e);const r=this[Bt];r.dirty=!1;const n=wt(r);for(const t of e)Ct(t[Bt]);wt(n)}unwatch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");yt(this,i,s).call(this,e);const r=this[Bt];Nt(r);for(let t=r.producerNode.length-1;t>=0;t--)if(e.includes(r.producerNode[t].wrapper)){kt(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];Pt(n),n.liveConsumerIndexOfThis[e]=t}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[Bt].producerNode.filter(t=>t.dirty).map(t=>t.wrapper)}},e.currentComputed=function(){var t;return null==(t=Et)?void 0:t.wrapper},e.watched=Symbol("watched"),e.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(qt||(qt={}));
94
+ /**
95
+ * @license
96
+ * Copyright 2023 Google LLC
97
+ * SPDX-License-Identifier: BSD-3-Clause
98
+ */
99
+ let Gt=!1;const Zt=new qt.subtle.Watcher(()=>{Gt||(Gt=!0,queueMicrotask(()=>{Gt=!1;for(const t of Zt.getPending())t.get();Zt.watch()}))}),Jt=Symbol("SignalWatcherBrand"),Ft=new FinalizationRegistry(t=>{t.unwatch(...qt.subtle.introspectSources(t))}),Kt=new WeakMap;
100
+ /**
101
+ * @license
102
+ * Copyright 2017 Google LLC
103
+ * SPDX-License-Identifier: BSD-3-Clause
104
+ */
105
+ const Yt=2;let Qt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
106
+ /**
107
+ * @license
108
+ * Copyright 2020 Google LLC
109
+ * SPDX-License-Identifier: BSD-3-Clause
110
+ */const Xt=(t,e)=>{const r=t._$AN;if(void 0===r)return!1;for(const t of r)t._$AO?.(e,!1),Xt(t,e);return!0},te=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===r?.size)},ee=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)}};
111
+ /**
112
+ * @license
113
+ * Copyright 2017 Google LLC
114
+ * SPDX-License-Identifier: BSD-3-Clause
115
+ */function re(t){void 0!==this._$AN?(te(this),this._$AM=t,ee(this)):this._$AM=t}function ne(t,e=!1,r=0){const n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(n))for(let t=r;t<n.length;t++)Xt(n[t],!1),te(n[t]);else null!=n&&(Xt(n,!1),te(n));else Xt(this,t)}const ie=t=>{t.type==Yt&&(t._$AP??=ne,t._$AQ??=re)};class se extends Qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),ee(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Xt(this,t),te(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(){}}
116
+ /**
117
+ * @license
118
+ * Copyright 2023 Google LLC
119
+ * SPDX-License-Identifier: BSD-3-Clause
120
+ */let oe=!1;const ae=new qt.subtle.Watcher(async()=>{oe||(oe=!0,queueMicrotask(()=>{oe=!1;for(const t of ae.getPending())t.get();ae.watch()}))});const he=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends se{_$S_(){var t,e;void 0===this._$Sm&&(this._$Sj=new qt.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:ae,this._$Sm.watch(this._$Sj),qt.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 qt.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_(),qt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}}),le=(t=>(e,...r)=>t(e,...r.map(t=>t instanceof qt.State||t instanceof qt.Computed?he(t):t)))(B);
121
+ /**
122
+ * @license
123
+ * Copyright 2023 Google LLC
124
+ * SPDX-License-Identifier: BSD-3-Clause
125
+ */
126
+ /**
127
+ * @license
128
+ * Copyright 2023 Google LLC
129
+ * SPDX-License-Identifier: BSD-3-Clause
130
+ */
131
+ qt.State,qt.Computed;const ce=(t,e)=>new qt.State(t,e),de=(t,e)=>new qt.Computed(t,e);var ue,pe;const ge=Symbol("ThaRoute:fragment"),fe=Symbol("ThaRoute:path-pattern");function ve(){}t.ThaRoute=class extends ht{constructor(){super(...arguments),this[ue]=ce(this.#t()),this[pe]=null,this.path=null,this.#e=new MutationObserver(()=>{this[ge].set(this.#t())})}static{ue=ge,pe=fe}#e;connectedCallback(){super.connectedCallback(),this.#e.observe(this,{childList:!0})}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"path"===t)this[fe]=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([ct("tha-route")],t.ThaRoute);const me=function(t){return!0===t[Jt]?(console.warn("SignalWatcher should not be applied to the same class more than once."),t):class extends t{constructor(){super(...arguments),this._$St=new Map,this._$So=new qt.State(0),this._$Si=!1}_$Sl(){var t,e;const r=[],n=[];this._$St.forEach((t,e)=>{((null==t?void 0:t.beforeUpdate)?r:n).push(e)});const i=null===(t=this.h)||void 0===t?void 0:t.getPending().filter(t=>t!==this._$Su&&!this._$St.has(t));r.forEach(t=>t.get()),null===(e=this._$Su)||void 0===e||e.get(),i.forEach(t=>t.get()),n.forEach(t=>t.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(void 0!==this.h)return;this._$Su=new qt.Computed(()=>{this._$So.get(),super.performUpdate()});const t=this.h=new qt.subtle.Watcher(function(){const t=Kt.get(this);void 0!==t&&(!1===t._$Si&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Kt.set(t,this),Ft.register(this,t),t.watch(this._$Su),t.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(void 0===this.h)return;let t=!1;this.h.unwatch(...qt.subtle.introspectSources(this.h).filter(e=>{var r;const n=!0!==(null===(r=this._$St.get(e))||void 0===r?void 0:r.manualDispose);return n&&this._$St.delete(e),t||(t=!n),n})),t||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(t,e){var r;this._$S_();const n=new qt.Computed(()=>{t()});return this.h.watch(n),this._$St.set(n,e),null!==(r=null==e?void 0:e.beforeUpdate)&&void 0!==r&&r?qt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>qt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),!1===this.isConnected&&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(()=>{!1===this.isConnected&&this._$Sp()})}}}(ht);function ye(){return ye=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},ye.apply(null,arguments)}var be;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(be||(be={}));var Ee="production"!==process.env.NODE_ENV?function(t){return Object.freeze(t)}:function(t){return t};function $e(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}var _e="beforeunload",Se="popstate";function we(t){void 0===t&&(t={});var e=t.window,r=void 0===e?document.defaultView:e,n=r.history;function i(){var t=Oe(r.location.hash.substr(1)),e=t.pathname,i=void 0===e?"/":e,s=t.search,o=void 0===s?"":s,a=t.hash,h=void 0===a?"":a,l=n.state||{};return[l.idx,Ee({pathname:i,search:o,hash:h,state:l.usr||null,key:l.key||"default"})]}var s=null;function o(){if(s)u.call(s),s=null;else{var t=be.Pop,e=i(),r=e[0],n=e[1];if(u.length)if(null!=r){var o=l-r;o&&(s={action:t,location:n,retry:function(){y(-1*o)}},y(o))}else"production"!==process.env.NODE_ENV&&$e(!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)}}r.addEventListener(Se,o),r.addEventListener("hashchange",function(){Te(i()[1])!==Te(c)&&o()});var a=be.Pop,h=i(),l=h[0],c=h[1],d=De(),u=De();function p(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var n=r.location.href,i=n.indexOf("#");e=-1===i?n:n.slice(0,i)}return e}()+"#"+("string"==typeof t?t:Te(t))}function g(t,e){return void 0===e&&(e=null),Ee(ye({pathname:c.pathname,hash:"",search:""},"string"==typeof t?Oe(t):t,{state:e,key:Re()}))}function f(t,e){return[{usr:t.state,key:t.key,idx:e},p(t)]}function v(t,e,r){return!u.length||(u.call({action:t,location:e,retry:r}),!1)}function m(t){a=t;var e=i();l=e[0],c=e[1],d.call({action:a,location:c})}function y(t){n.go(t)}null==l&&(l=0,n.replaceState(ye({},n.state,{idx:l}),""));var b={get action(){return a},get location(){return c},createHref:p,push:function t(e,i){var s=be.Push,o=g(e,i);if("production"!==process.env.NODE_ENV&&$e("/"===o.pathname.charAt(0),"Relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")"),v(s,o,function(){t(e,i)})){var a=f(o,l+1),h=a[0],c=a[1];try{n.pushState(h,"",c)}catch(t){r.location.assign(c)}m(s)}},replace:function t(e,r){var i=be.Replace,s=g(e,r);if("production"!==process.env.NODE_ENV&&$e("/"===s.pathname.charAt(0),"Relative pathnames are not supported in hash history.replace("+JSON.stringify(e)+")"),v(i,s,function(){t(e,r)})){var o=f(s,l),a=o[0],h=o[1];n.replaceState(a,"",h),m(i)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(t){return d.push(t)},block:function(t){var e=u.push(t);return 1===u.length&&r.addEventListener(_e,Ce),function(){e(),u.length||r.removeEventListener(_e,Ce)}}};return b}function Ae(t,e,r){return Math.min(Math.max(t,e),r)}function Ce(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 Re(){return Math.random().toString(36).substr(2,8)}function Te(t){var e=t.pathname,r=void 0===e?"/":e,n=t.search,i=void 0===n?"":n,s=t.hash,o=void 0===s?"":s;return i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function Oe(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 ke={},xe=ce("browser");function Ne(t){let e=ke[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 i(){var t=r.location,e=t.pathname,i=t.search,s=t.hash,o=n.state||{};return[o.idx,Ee({pathname:e,search:i,hash:s,state:o.usr||null,key:o.key||"default"})]}var s=null;r.addEventListener(Se,function(){if(s)d.call(s),s=null;else{var t=be.Pop,e=i(),r=e[0],n=e[1];if(d.length)if(null!=r){var o=h-r;o&&(s={action:t,location:n,retry:function(){m(-1*o)}},m(o))}else"production"!==process.env.NODE_ENV&&$e(!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 o=be.Pop,a=i(),h=a[0],l=a[1],c=De(),d=De();function u(t){return"string"==typeof t?t:Te(t)}function p(t,e){return void 0===e&&(e=null),Ee(ye({pathname:l.pathname,hash:"",search:""},"string"==typeof t?Oe(t):t,{state:e,key:Re()}))}function g(t,e){return[{usr:t.state,key:t.key,idx:e},u(t)]}function f(t,e,r){return!d.length||(d.call({action:t,location:e,retry:r}),!1)}function v(t){o=t;var e=i();h=e[0],l=e[1],c.call({action:o,location:l})}function m(t){n.go(t)}null==h&&(h=0,n.replaceState(ye({},n.state,{idx:h}),""));var y={get action(){return o},get location(){return l},createHref:u,push:function t(e,i){var s=be.Push,o=p(e,i);if(f(s,o,function(){t(e,i)})){var a=g(o,h+1),l=a[0],c=a[1];try{n.pushState(l,"",c)}catch(t){r.location.assign(c)}v(s)}},replace:function t(e,r){var i=be.Replace,s=p(e,r);if(f(i,s,function(){t(e,r)})){var o=g(s,h),a=o[0],l=o[1];n.replaceState(a,"",l),v(i)}},go:m,back:function(){m(-1)},forward:function(){m(1)},listen:function(t){return c.push(t)},block:function(t){var e=d.push(t);return 1===d.length&&r.addEventListener(_e,Ce),function(){e(),d.length||r.removeEventListener(_e,Ce)}}};return y}();break;case"hash":e=we();break;default:e=function(t){void 0===t&&(t={});var e=t,r=e.initialEntries,n=void 0===r?["/"]:r,i=e.initialIndex,s=n.map(function(t){var e=Ee(ye({pathname:"/",search:"",hash:"",state:null,key:Re()},"string"==typeof t?Oe(t):t));return"production"!==process.env.NODE_ENV&&$e("/"===e.pathname.charAt(0),"Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(t)+")"),e}),o=Ae(null==i?s.length-1:i,0,s.length-1),a=be.Pop,h=s[o],l=De(),c=De();function d(t,e){return void 0===e&&(e=null),Ee(ye({pathname:h.pathname,search:"",hash:""},"string"==typeof t?Oe(t):t,{state:e,key:Re()}))}function u(t,e,r){return!c.length||(c.call({action:t,location:e,retry:r}),!1)}function p(t,e){a=t,h=e,l.call({action:a,location:h})}function g(t){var e=Ae(o+t,0,s.length-1),r=be.Pop,n=s[e];u(r,n,function(){g(t)})&&(o=e,p(r,n))}var f={get index(){return o},get action(){return a},get location(){return h},createHref:function(t){return"string"==typeof t?t:Te(t)},push:function t(e,r){var n=be.Push,i=d(e,r);"production"!==process.env.NODE_ENV&&$e("/"===h.pathname.charAt(0),"Relative pathnames are not supported in memory history.push("+JSON.stringify(e)+")"),u(n,i,function(){t(e,r)})&&(o+=1,s.splice(o,s.length,i),p(n,i))},replace:function t(e,r){var n=be.Replace,i=d(e,r);"production"!==process.env.NODE_ENV&&$e("/"===h.pathname.charAt(0),"Relative pathnames are not supported in memory history.replace("+JSON.stringify(e)+")"),u(n,i,function(){t(e,r)})&&(s[o]=i,p(n,i))},go:g,back:function(){g(-1)},forward:function(){g(1)},listen:function(t){return l.push(t)},block:function(t){return c.push(t)}};return f}()}ke[t]=e}return e}de(()=>Ne(xe.get()));const Pe=Symbol("HistoryManaged:history"),Le=Symbol("HistoryManaged:historyType"),Ue=t=>{var n,i;class s extends t{constructor(){super(...arguments),this.history=void 0,this.#r=ce(this.history),this.#n=de(()=>{const t=this.closest("tha-router-config, tha-router-outlet");return t?.[Le]?.get()}),this[n]=de(()=>this.#r.get()??this.#n.get()??xe.get()),this[i]=de(()=>Ne(this[Le].get()))}static{n=Le,i=Pe}#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)],s.prototype,"history",void 0),s};function Me(t=ve){return new Promise((e,r)=>{setTimeout(()=>{try{const r=t();e(r)}catch(t){r(t)}},0)})}var We;const He=Symbol("ThaRouterOutlet:renderRoute"),Ie=Symbol("ThaRouterOutlet:params");function je(t){return!!t}function ze(t){return t.filter(je)}t.ThaRouterOutlet=class extends me{constructor(){super(...arguments),this.#i=ce(void 0),this.#s=ce(null),this.#o=de(()=>this.#s.get()?.deref()?.[ge].get()??null),this.#a=de(()=>{const t=this.#i.get()?.deref(),e=this.#s.get()?.deref(),r=e?.[fe];if(!t||!r)return null;const{location:{pathname:n}}=t[Pe].get();return r.exec(n,"http://dummy.base")?.pathname.groups??null}),this[We]=de(()=>{const t=this.#a.get()??{},e=this.parentElement?.closest("tha-router-outlet"),r=e?.[Ie].get()??{};return Object.freeze({...r,...t})}),this.params={},this.#h=ve,this.#l=ve,this.#c=ve,this.for=null,this.routePath=null,this.routeID=void 0}#i;#s;#o;#a;#h;#l;#c;connectedCallback(){super.connectedCallback(),Me(()=>{this.bindToRouter()}),this.#h=this.updateEffect(()=>{Array.from(this.renderRoot.children).forEach(t=>t.remove());const t=this.#o.get()?.deref()??null;t&&this.renderRoot.appendChild(t.cloneNode(!0))}),this.#l=this.updateEffect(()=>{const t=this.#s.get()?.deref()??null;this.routePath=t?.getAttribute("path")??null,this.routeID=t?.id?t?.id:void 0}),this.#c=this.updateEffect(()=>{const t=this[Ie].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.#i?.get()?.deref()??null;return e===t?e:(e?.assignOutlet(null),t?.assignOutlet(this),this.#i.set(t?new WeakRef(t):void 0),t??null)}[(We=Ie,He)](t){this.#s.set(t?new WeakRef(t):null)}disconnectedCallback(){super.disconnectedCallback(),this.#i?.get()?.deref()?.assignOutlet(null);try{this.#h(),this.#l(),this.#c()}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([ct("tha-router-outlet")],t.ThaRouterOutlet),t.ThaRouter=class extends(Ue(me)){static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tha-router-styles"),t.textContent=h`
132
+ tha-router {
133
+ & > :not(tha-router-outlet) {
134
+ display: none;
135
+ }
136
+ }
137
+ `.toString(),document.head.appendChild(t)}#d=new MutationObserver(e=>{e.filter(t=>"childList"===t.type).length&&this.#u.set(Array.from(this.children).filter(e=>e instanceof t.ThaRoute).map(t=>new WeakRef(t)))});#p=ve;#g=ve;#f=ve;#u=ce([]);#v=ce(null);#m=ce(null);connectedCallback(){super.connectedCallback(),this.#d.observe(this,{childList:!0}),this.#p=this.updateEffect(()=>{const t=this.#v.get()?.deref()??null,e=this.#m.get()?.deref()??null;e?.[He](t)}),this.#g=this.updateEffect(()=>{const t=this[Pe].get();this.#f(),this.#y({location:this[Pe].get().location,action:"POP"}),this.#f=t?t.listen(this.#y):ve}),Me(()=>{this.#y({location:this[Pe].get().location,action:"POP"})})}assignOutlet(t){this.#m.set(t?new WeakRef(t):null)}#y=t=>{const e=this.#u.get().map(t=>t.deref()).filter(Boolean);for(const r of e){const e=r[fe];if(e?.test({pathname:t.location.pathname}))return void this.#v.set(new WeakRef(r))}this.#v.set(null)};disconnectedCallback(){super.disconnectedCallback();try{this.#p(),this.#g()}catch{}this.#d.disconnect(),this.#f()}createRenderRoot(){return this}},t.ThaRouter=e([ct("tha-router")],t.ThaRouter),t.ThaRouterLink=class extends(Ue(me)){constructor(){super(...arguments),this.to=null,this.active=!1,this.#b=ve,this.#f=ve,this.#E=ce(null),this.#$=de(()=>{const t=this.#E.get();if(!t||"back"===t||"forward"===t)return null;try{return new URLPattern({pathname:t})}catch{return null}}),this.#_=t=>{const e=this[Pe].get();if(console.log(this[Le].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[Pe].get()?.push(n||"/")}}static{const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-id","tha-router-link-styles"),t.textContent=h`
138
+ tha-router-link {
139
+ cursor: pointer;
140
+ }
141
+ `.toString(),document.head.appendChild(t)}#b;#f;#E;#$;connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#_),this.#b=this.updateEffect(()=>{const t=this[Pe].get(),e=this.#$.get();this.active=e?.test({pathname:t?.location.pathname??""})??!1,this.#f=t?.listen(()=>{this.active=e?.test({pathname:t.location.pathname})??!1})??ve})}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"to"===t)this.#E.set(r)}#_;disconnectedCallback(){super.disconnectedCallback();try{this.#b()}catch{}this.#f(),this.removeEventListener("click",this.#_)}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([ct("tha-router-link")],t.ThaRouterLink),t.ThaRouterConfig=class extends(Ue(me)){#S=ve;connectedCallback(){super.connectedCallback(),document.head.contains(this)&&(console.log("ThaRouterConfig: Setting global history type to",this[Le].get()),this.#S=this.updateEffect(()=>{xe.set(this[Le].get())}))}disconnectedCallback(){super.disconnectedCallback();try{this.#S()}catch{}}createRenderRoot(){return this}},t.ThaRouterConfig=e([ct("tha-router-config")],t.ThaRouterConfig),t.ThaRouterParam=class extends me{constructor(){super(...arguments),this.#m=ce(null),this.#w=ce(""),this.#A=de(()=>this.#m.get()?.[Ie]?.get()[this.#w.get()]),this.name=""}#m;#w;#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.#m.set(t)}attributeChangedCallback(t,e,r){if(super.attributeChangedCallback(t,e,r),"name"===t)this.#w.set(r??"")}render(){return le`${this.#A}`}},e([pt({type:String}),r("design:type",String)],t.ThaRouterParam.prototype,"name",void 0),t.ThaRouterParam=e([ct("tha-router-param")],t.ThaRouterParam);const Ve=Symbol("Accept Drop"),Be=Symbol("Register Handle"),qe=Symbol("Unregister Handle");var Ge,Ze;class Je extends DragEvent{static#C=["thadrag","thadragstart","thadragend","thadropzoneenter","thadropzoneleave","thadropzoneover","thadropped"];static#D=["thadrop","thadropend","thadragenter","thadragleave","thadragover"];get#R(){return Ge.#D.includes(this.type)?this.dropzoneTarget:Ge.#C.includes(this.type)?this.dragTarget:new WeakRef(this.target)}get name(){return this.#R.deref()?.name}get dragData(){return this.dragTarget.deref()?.dragData}constructor(t,{dragTarget:e,dropzoneTarget:r},n){super(t,n),this.dragTarget=e,this.dropzoneTarget=r}acceptDrop(t){this.dragTarget.deref()?.[Ve](this.dropzoneTarget,t)}}let Fe;return Ge=Je,t.DragElement=class extends ht{constructor(){super(...arguments),this.dragData={},this.preDragData={boundingRect:null,dragStartEvent:null,styles:{pointerEvents:""}},this.#T=null,this.#O=null,this.#k=new Set,this.draggingStrategy="move",this.dragging=!1,this.dragend=!1,this.draggedOver=null,this.dropAccepted=!1,this.#x=t=>{if(!this.#N(t))return t.preventDefault();t.stopPropagation(),t.dataTransfer?.setDragImage(Ze.TRANSPARENT_IMAGE,0,0),t.dataTransfer.effectAllowed=this.draggingStrategy,document.addEventListener("dragover",this.#P),this.#L(t),this.#U(),Me().then(()=>{if(this.style.pointerEvents="none",this.dragging=!0,this.replaceClone){const t=this.#M();this.#O=new WeakRef(t),this.parentElement.insertBefore(t,this.nextSibling)}this.dispatchEvent(new Je("thadragstart",{dragTarget:new WeakRef(this)},t))})},this.#W=t=>{document.removeEventListener("dragover",this.#P),this.dragend=!0;const e=getComputedStyle(this).transitionDuration.match(/\d*\.?\d+/g)?.map(Number).some(t=>t>0),r=()=>{this.replaceClone&&this.clone?.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(t=>{this.style.removeProperty(t)}),["width","height","left","right","top","bottom"].forEach(t=>{this.style.removeProperty(`--tha-target-${t}`)});const e=this.#T,r=this.dropAccepted;this.dragging=!1,this.dragend=!1,this.draggedOver=null,this.dropAccepted=!1,this.#T=null,r&&e&&e.deref()?.dispatchEvent(new Je("thadropend",{dragTarget:new WeakRef(this),dropzoneTarget:e},t)),this.dispatchEvent(new Je("thadragend",{dragTarget:new WeakRef(this)},t))};e?this.addEventListener("transitionend",r,{once:!0}):r()},this.#H=t=>{const{x:e,y:r}=t;this.style.setProperty("--tha-cx",`${e}px`),this.style.setProperty("--tha-cy",`${r}px`)},this.#I=t=>{this.draggedOver=t.dropzoneTarget?.deref()?.name??""},this.#j=()=>{this.draggedOver=null}}static{Ze=this}static{this.DRAG_DATA_OBSERVER=new MutationObserver(t=>{for(const{attributeName:e,target:r}of t){if(!e?.startsWith("data-drag-"))continue;const t=r;t.dragData[e.replace("data-drag-","")]=t.getAttribute(e)}})}static{this.styles=h`
142
+ :host {
143
+ --tha-diff-x: calc(var(--tha-cx) - var(--tha-x));
144
+ --tha-diff-y: calc(var(--tha-cy) - var(--tha-y));
145
+ }
146
+
147
+ :host([draggingstrategy="move"]),
148
+ :host([draggingstrategy="copyMove"]) {
149
+ transition-duration: .2s;
150
+ transition-timing-function: ease-out;
151
+ transition-property: none;
152
+ }
153
+
154
+ :host([draggingstrategy="move"][dragging]),
155
+ :host([draggingstrategy="copyMove"][dragging]) {
156
+ position: fixed;
157
+ width: var(--tha-width);
158
+ height: var(--tha-height);
159
+ left: calc(var(--tha-left) + var(--tha-diff-x) + var(--tha-offset-x));
160
+ top: calc(var(--tha-top) + var(--tha-diff-y) + var(--tha-offset-y));
161
+ transform-origin: calc(var(--tha-x) - var(--tha-left)) calc(var(--tha-y) - var(--tha-top));
162
+ z-index: 100;
163
+ }
164
+
165
+ :host([draggingstrategy="move"][dragend]),
166
+ :host([draggingstrategy="copyMove"][dragend]) {
167
+ left: var(--tha-left);
168
+ top: var(--tha-top);
169
+ transition-property: all;
170
+ }
171
+
172
+ :host([draggingstrategy="move"][dragend][dropaccepted]),
173
+ :host([draggingstrategy="copyMove"][dragend][dropaccepted]) {
174
+ left: var(--tha-target-left);
175
+ top: var(--tha-target-top);
176
+ width: var(--tha-target-width);
177
+ height: var(--tha-target-height);
178
+ }
179
+ `}static{this.TRANSPARENT_IMAGE=new Image(1,1),this.TRANSPARENT_IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==";const t=this.GLOBAL_STYLE=document.createElement("style");t.innerHTML="\n @property --tha-offset-x {\n syntax: '<length>';\n initial-value: 0px;\n inherits: true;\n }\n\n @property --tha-offset-y {\n syntax: '<length>';\n initial-value: 0px;\n inherits: true;\n }\n ",document.head.appendChild(t)}#T;#O;#k;get clone(){return this.#O.deref()}connectedCallback(){super.connectedCallback(),this.draggable=!0,this.#z(),this.addEventListener("dragstart",this.#x),this.addEventListener("dragend",this.#W),this.addEventListener("drag",this.#H),this.addEventListener("thadropzoneenter",this.#I),this.addEventListener("thadropzoneleave",this.#j)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dragstart",this.#x),this.removeEventListener("dragend",this.#W),this.removeEventListener("drag",this.#H),this.removeEventListener("thadropzoneenter",this.#I),this.removeEventListener("thadropzoneleave",this.#j)}render(){return B`<slot></slot>`}[Ve](t,e){if(this.dropAccepted=!0,this.#T=t,!e)return;const{width:r,height:n,left:i,right:s,top:o,bottom:a}=e;for(const t in{width:r,height:n,left:i,right:s,top:o,bottom:a})this.style.setProperty(`--tha-target-${t}`,`${e[t]}px`)}[Be](t){this.#k.add(t)}[qe](t){this.#k.delete(t)}#z(){Ze.DRAG_DATA_OBSERVER.observe(this,{attributes:!0});for(const{name:t,value:e}of Object.values(this.attributes).filter(t=>t.name.startsWith("data-drag-")))this.dragData[t.replace("data-drag-","")]=e}#x;#W;#H;#I;#j;#M(){const t=document.createElement("tha-drag-clone");return Object.values(this.attributes).filter(t=>!["dragging","replaceclone","draggable"].includes(t.name)).forEach(e=>{t.attributes.setNamedItem(e.cloneNode())}),this.childNodes.forEach(e=>{t.appendChild(e.cloneNode(!0))}),t}#L(t){this.preDragData.boundingRect=this.getBoundingClientRect(),this.preDragData.dragStartEvent=t,this.preDragData.styles.pointerEvents=this.style.pointerEvents}#U(){const{boundingRect:{width:t,height:e,left:r,top:n},dragStartEvent:{x:i,y:s}}=this.preDragData,o={width:t,height:e,left:r,top:n,x:i,y:s};for(const t in o)this.style.setProperty(`--tha-${t}`,`${o[t]}px`)}#P(t){t.preventDefault()}#N(t){return!this.disabled&&(!this.#k.size||!!this.#k.has(t.target))}},e([pt({type:String}),r("design:type",String)],t.DragElement.prototype,"name",void 0),e([pt({type:String,reflect:!0}),r("design:type",String)],t.DragElement.prototype,"draggingStrategy",void 0),e([pt({type:String}),r("design:type",String)],t.DragElement.prototype,"dragGroup",void 0),e([pt({type:Boolean}),r("design:type",Boolean)],t.DragElement.prototype,"replaceClone",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.DragElement.prototype,"dragging",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.DragElement.prototype,"dragend",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.DragElement.prototype,"draggedOver",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.DragElement.prototype,"dropAccepted",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Boolean)],t.DragElement.prototype,"disabled",void 0),t.DragElement=Ze=e([ct("tha-drag")],t.DragElement),document.addEventListener("thadragstart",t=>{Fe=t}),t.DropZoneElement=class extends ht{constructor(){super(...arguments),this.#V=0,this.accept=[],this.name="",this.itemDragged=null,this.acceptableDrag=!1,this.#B=t=>{this.accept.length&&!this.accept.includes(t.name)||(this.acceptableDrag=!0)},this.#q=()=>{this.itemDragged=null,this.acceptableDrag=!1,this.#V=0},this.#G=t=>{this.#Z()&&(++this.#V>1||(this.itemDragged=Fe.name??"",this.#J("thadragenter","thadropzoneenter",t)))},this.#F=t=>{this.#Z()&&(--this.#V>0||(this.itemDragged=null,this.#J("thadragleave","thadropzoneleave",t)))},this.#K=t=>{this.#Z()&&this.#J("thadragover","thadropzoneover",t)},this.#Y=t=>{this.#Z()&&this.#J("thadrop","thadropped",t)}}static{this.styles=h``}#V;render(){return B`<slot></slot>`}connectedCallback(){super.connectedCallback(),document.addEventListener("thadragstart",this.#B),document.addEventListener("thadragend",this.#q),document.addEventListener("thadropend",this.#q),this.addEventListener("dragenter",this.#G),this.addEventListener("dragleave",this.#F),this.addEventListener("dragover",this.#K),this.addEventListener("drop",this.#Y)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("thadragstart",this.#B),document.removeEventListener("thadragend",this.#q),document.removeEventListener("thadropend",this.#q),this.removeEventListener("dragenter",this.#G),this.removeEventListener("dragleave",this.#F),this.removeEventListener("dragover",this.#K),this.removeEventListener("drop",this.#Y)}#B;#q;#G;#F;#K;#Y;#Z(){return!Fe.name||!this.accept.length||this.accept.includes(Fe.name)}#J(t,e,r){const{dragTarget:n}=Fe,i=new WeakRef(this);this.dispatchEvent(new Je(t,{dragTarget:n,dropzoneTarget:i},r)),n.deref()?.dispatchEvent(new Je(e,{dragTarget:n,dropzoneTarget:i},r))}},e([pt({converter:t=>(t??"").split(",").map(t=>t.trim())}),r("design:type",Array)],t.DropZoneElement.prototype,"accept",void 0),e([pt({type:String}),r("design:type",Object)],t.DropZoneElement.prototype,"name",void 0),e([pt({type:String,reflect:!0}),r("design:type",Object)],t.DropZoneElement.prototype,"itemDragged",void 0),e([pt({type:Boolean,reflect:!0}),r("design:type",Object)],t.DropZoneElement.prototype,"acceptableDrag",void 0),t.DropZoneElement=e([ct("tha-dropzone")],t.DropZoneElement),t.DragHandleElement=class extends ht{get#Q(){for(const e of function*(t){for(;t.parentElement;)yield t=t.parentElement}(this))if(e instanceof t.DragElement)return e;return null}connectedCallback(){super.connectedCallback(),this.draggable=!0,this.#Q?.[Be](this)}disconnectedCallback(){super.disconnectedCallback(),this.#Q?.[qe](this)}render(){return B`<slot></slot>`}},t.DragHandleElement=e([ct("tha-drag-handle")],t.DragHandleElement),t.ThaDragEvent=Je,t}({});
180
+ //# sourceMappingURL=elements.js.map