@fluid-topics/ft-resizer 0.0.88 → 0.1.2

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- small
1
+ A resizer component.
2
2
 
3
3
  ## Install
4
4
 
@@ -1,27 +1,29 @@
1
- import { LitElement } from "lit";
2
- import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
1
+ import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
2
  export declare class ResizeEvent extends CustomEvent<{
4
3
  width: number;
5
4
  height: number;
6
5
  }> {
7
6
  constructor(width: number, height: number);
8
7
  }
9
- export declare class FtResizer extends LitElement {
8
+ export declare class FtResizer extends FtLitElement {
10
9
  static elementDefinitions: ElementDefinitionsMap;
11
- static styles: import("lit").CSSResult;
10
+ protected getStyles(): import("lit").CSSResult[];
12
11
  initialWidth: number;
13
12
  initialHeight: number;
14
13
  icon: string;
15
14
  cursor: string;
15
+ private dragging;
16
16
  private fixedWidth;
17
17
  private fixedHeight;
18
18
  private startX;
19
19
  private startY;
20
- private doDragHandler;
21
- private stopDragHandler;
22
- render(): import("lit-html").TemplateResult<1>;
20
+ protected getTemplate(): import("lit-html").TemplateResult<1>;
21
+ private initDragFromMouse;
22
+ private initDragFromTouch;
23
23
  private initDrag;
24
24
  private installDocumentEventListeners;
25
+ private doDragFromMouse;
26
+ private doDragFromTouch;
25
27
  private doDrag;
26
28
  private stopDrag;
27
29
  }
@@ -4,79 +4,105 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { css, html, LitElement } from "lit";
8
- import { customElement, property } from "lit/decorators.js";
7
+ import { css, html, unsafeCSS } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
+ import { FtLitElement, noTextSelect } from "@fluid-topics/ft-wc-utils";
9
10
  import { Icon } from "@material/mwc-icon";
10
11
  export class ResizeEvent extends CustomEvent {
11
12
  constructor(width, height) {
12
13
  super("resize", { detail: { width, height } });
13
14
  }
14
15
  }
15
- let FtResizer = class FtResizer extends LitElement {
16
+ let FtResizer = class FtResizer extends FtLitElement {
16
17
  constructor() {
17
18
  super(...arguments);
18
19
  this.initialWidth = 0;
19
20
  this.initialHeight = 0;
20
21
  this.icon = "drag_handle";
21
22
  this.cursor = "nwse-resize";
23
+ this.dragging = false;
22
24
  this.fixedWidth = 0;
23
25
  this.fixedHeight = 0;
24
26
  this.startX = 0;
25
27
  this.startY = 0;
26
- this.doDragHandler = this.doDrag.bind(this);
27
- this.stopDragHandler = this.stopDrag.bind(this);
28
+ this.doDragFromMouse = (e) => this.doDrag(e.clientX, e.clientY);
29
+ this.doDragFromTouch = (e) => this.doDrag(e.touches[0].clientX, e.touches[0].clientY);
30
+ this.stopDrag = () => {
31
+ this.dragging = false;
32
+ document.removeEventListener("mousemove", this.doDragFromMouse, false);
33
+ document.removeEventListener("mouseup", this.stopDrag, false);
34
+ document.removeEventListener("touchmove", this.doDragFromTouch, false);
35
+ document.removeEventListener("touchend", this.stopDrag, false);
36
+ document.removeEventListener("touchcancel", this.stopDrag, false);
37
+ };
28
38
  }
29
- render() {
30
- return html `
31
- <style>
32
- #container {
33
- cursor: ${this.cursor}
39
+ // language=CSS
40
+ getStyles() {
41
+ return [
42
+ noTextSelect,
43
+ css `
44
+ :host {
45
+ display: block;
46
+ }
47
+
48
+ .ft-resizer {
49
+ display: flex;
50
+ cursor: ${unsafeCSS(this.cursor)}
51
+ }
52
+
53
+ mwc-icon {
54
+ transform: rotate(-45deg);
55
+ color: var(--ft-color-outline, rgba(0, 0, 0, 0.14))
56
+ }
57
+
58
+ .ft-resizer--dragging mwc-icon,
59
+ .ft-resizer:hover mwc-icon {
60
+ color: var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60))
34
61
  }
35
- </style>
36
- <div id="container" @mousedown=${this.initDrag}>
62
+ `
63
+ ];
64
+ }
65
+ getTemplate() {
66
+ return html `
67
+ <div class="ft-resizer ft-no-text-select ${this.dragging ? "ft-resizer--dragging" : ""}"
68
+ @mousedown=${this.initDragFromMouse}
69
+ @touchstart=${this.initDragFromTouch}>
37
70
  <mwc-icon>${this.icon}</mwc-icon>
38
71
  </div>
39
72
  `;
40
73
  }
41
- initDrag(event) {
42
- this.startX = event.clientX;
43
- this.startY = event.clientY;
74
+ initDragFromMouse(e) {
75
+ this.initDrag(e.clientX, e.clientY);
76
+ }
77
+ initDragFromTouch(e) {
78
+ e.preventDefault();
79
+ e.stopPropagation();
80
+ this.initDrag(e.touches[0].clientX, e.touches[0].clientY);
81
+ }
82
+ initDrag(clientX, clientY) {
83
+ this.dragging = true;
84
+ this.startX = clientX;
85
+ this.startY = clientY;
44
86
  this.fixedWidth = this.initialWidth;
45
87
  this.fixedHeight = this.initialHeight;
46
88
  this.installDocumentEventListeners();
47
89
  }
48
90
  installDocumentEventListeners() {
49
- document.addEventListener("mousemove", this.doDragHandler, false);
50
- document.addEventListener("mouseup", this.stopDragHandler, false);
91
+ document.addEventListener("mousemove", this.doDragFromMouse, false);
92
+ document.addEventListener("mouseup", this.stopDrag, false);
93
+ document.addEventListener("touchmove", this.doDragFromTouch, false);
94
+ document.addEventListener("touchend", this.stopDrag, false);
95
+ document.addEventListener("touchcancel", this.stopDrag, false);
51
96
  }
52
- doDrag(e) {
53
- let currentX = this.fixedWidth + e.clientX - this.startX;
54
- let currentY = this.fixedHeight + e.clientY - this.startY;
97
+ doDrag(clientX, clientY) {
98
+ let currentX = this.fixedWidth + clientX - this.startX;
99
+ let currentY = this.fixedHeight + clientY - this.startY;
55
100
  this.dispatchEvent(new ResizeEvent(currentX, currentY));
56
101
  }
57
- stopDrag() {
58
- document.removeEventListener("mousemove", this.doDragHandler, false);
59
- document.removeEventListener("mouseup", this.stopDragHandler, false);
60
- }
61
102
  };
62
103
  FtResizer.elementDefinitions = {
63
104
  "mwc-icon": Icon,
64
105
  };
65
- // language=CSS
66
- FtResizer.styles = css `
67
- :host {
68
- display: block;
69
- }
70
-
71
- #container {
72
- display: flex;
73
- }
74
-
75
- mwc-icon {
76
- transform: rotate(-45deg);
77
- color: var(--ft-color-outline, rgba(0, 0, 0, 0.14))
78
- }
79
- `;
80
106
  __decorate([
81
107
  property({ type: Number })
82
108
  ], FtResizer.prototype, "initialWidth", void 0);
@@ -89,6 +115,9 @@ __decorate([
89
115
  __decorate([
90
116
  property()
91
117
  ], FtResizer.prototype, "cursor", void 0);
118
+ __decorate([
119
+ state()
120
+ ], FtResizer.prototype, "dragging", void 0);
92
121
  FtResizer = __decorate([
93
122
  customElement("ft-resizer")
94
123
  ], FtResizer);
@@ -4,51 +4,73 @@
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),e=new Map;class n{constructor(t,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=e.get(this.cssText);return i&&void 0===t&&(e.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,s,e)=>i+(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.")})(s)+t[e+1]),t[0]);return new n(e,s)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return(t=>new n("string"==typeof t?t:t+"",s))(i)})(t):t
7
+ const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),n=new Map;class s{constructor(t,i){if(this._$cssResult$=!0,i!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=n.get(this.cssText);return i&&void 0===t&&(n.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=t=>new s("string"==typeof t?t:t+"",e),r=(t,...i)=>{const n=1===t.length?t[0]:i.reduce(((i,e,n)=>i+(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.")})(e)+t[n+1]),t[0]);return new s(n,e)},l=(t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((i=>{const e=document.createElement("style"),n=window.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}))},h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return o(i)})(t):t
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */;var h;const l=window.trustedTypes,a=l?l.emptyScript:"",c=window.reactiveElementPolyfillSupport,u={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},d=(t,i)=>i!==t&&(i==i||t==t),v={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:d};class f extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=v){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const n=this[t];this[i]=e,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(r(t))}else void 0!==t&&i.push(r(t));return i}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{i?t.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((i=>{const s=document.createElement("style"),e=window.litNonce;void 0!==e&&s.setAttribute("nonce",e),s.textContent=i.cssText,t.appendChild(s)}))})(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$ES(t,i,s=v){var e,n;const o=this.constructor._$Eh(t,s);if(void 0!==o&&!0===s.reflect){const r=(null!==(n=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==n?n:u.toAttribute)(i,s.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var s,e,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),h=t.converter,l=null!==(n=null!==(e=null===(s=h)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:"function"==typeof h?h:null)&&void 0!==n?n:u.fromAttribute;this._$Ei=r,this[r]=l(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
12
+ */;var c;const u=window.trustedTypes,a=u?u.emptyScript:"",d=window.reactiveElementPolyfillSupport,v={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},f=(t,i)=>i!==t&&(i==i||t==t),w={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:f};class m extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const n=this._$Eh(e,i);void 0!==n&&(this._$Eu.set(n,e),t.push(n))})),t}static createProperty(t,i=w){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,e,i);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(n){const s=this[t];this[i]=n,this.requestUpdate(t,s,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||w}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(h(t))}else void 0!==t&&i.push(h(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return l(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=w){var n,s;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(s=null===(n=e.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==s?s:v.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,n,s;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(s=null!==(n=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==n?n:"function"==typeof l?l:null)&&void 0!==s?s:v.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let n=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,e))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- var p;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null==c||c({ReactiveElement:f}),(null!==(h=globalThis.reactiveElementVersions)&&void 0!==h?h:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,m=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,y="?"+w,b=`<${y}>`,S=document,$=(t="")=>S.createComment(t),_=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,x=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,T=/'/g,M=/"/g,U=/^(?:script|style|textarea|title)$/i,z=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),O=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),N=new WeakMap,R=S.createTreeWalker(S,129,null,!1),D=(t,i)=>{const s=t.length-1,e=[];let n,o=2===i?"<svg>":"",r=C;for(let i=0;i<s;i++){const s=t[i];let h,l,a=-1,c=0;for(;c<s.length&&(r.lastIndex=c,l=r.exec(s),null!==l);)c=r.lastIndex,r===C?"!--"===l[1]?r=k:void 0!==l[1]?r=x:void 0!==l[2]?(U.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=E):void 0!==l[3]&&(r=E):r===E?">"===l[0]?(r=null!=n?n:C,a=-1):void 0===l[1]?a=-2:(a=r.lastIndex-l[2].length,h=l[1],r=void 0===l[3]?E:'"'===l[3]?M:T):r===M||r===T?r=E:r===k||r===x?r=C:(r=E,n=void 0);const u=r===E&&t[i+1].startsWith("/>")?" ":"";o+=r===C?s+b:a>=0?(e.push(h),s.slice(0,a)+"$lit$"+s.slice(a)+w+u):s+w+(-2===a?(e.push(void 0),i):u)}const h=o+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(h):h,e]};class I{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let n=0,o=0;const r=t.length-1,h=this.parts,[l,a]=D(t,i);if(this.el=I.createElement(l,s),R.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=R.nextNode())&&h.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const s=a[o++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(s);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?J:"?"===i[1]?W:"@"===i[1]?Z:B})}else h.push({type:6,index:n})}for(const i of t)e.removeAttribute(i)}if(U.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=g?g.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],$()),R.nextNode(),h.push({type:2,index:++n});e.append(t[i],$())}}}else if(8===e.nodeType)if(e.data===y)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)h.push({type:7,index:n}),t+=w.length-1}n++}}static createElement(t,i){const s=S.createElement("template");return s.innerHTML=t,s}}function L(t,i,s=t,e){var n,o,r,h;if(i===O)return i;let l=void 0!==e?null===(n=s._$Cl)||void 0===n?void 0:n[e]:s._$Cu;const a=_(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,s,e)),void 0!==e?(null!==(r=(h=s)._$Cl)&&void 0!==r?r:h._$Cl=[])[e]=l:s._$Cu=l),void 0!==l&&(i=L(t,l._$AS(t,i.values),l,e)),i}class P{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(s,!0);R.currentNode=n;let o=R.nextNode(),r=0,h=0,l=e[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new H(o,o.nextSibling,this,t):1===l.type?i=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(i=new q(o,this,t)),this.v.push(i),l=e[++h]}r!==(null==l?void 0:l.index)&&(o=R.nextNode(),r++)}return n}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class H{constructor(t,i,s,e){var n;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(n=null==e?void 0:e.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),_(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==O&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return A(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&_(this._$AH)?this._$AA.nextSibling.data=t:this.S(S.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,n="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=I.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(s);else{const t=new P(n,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=N.get(t.strings);return void 0===i&&N.set(t.strings,i=new I(t)),i}A(t){A(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const n of t)e===i.length?i.push(s=new H(this.M($()),this.M($()),this,this.options)):s=i[e],s._$AI(n),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class B{constructor(t,i,s,e,n){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const n=this.strings;let o=!1;if(void 0===n)t=L(this,t,i,0),o=!_(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const e=t;let r,h;for(t=n[0],r=0;r<n.length-1;r++)h=L(this,e[s+r],i,r),h===O&&(h=this._$AH[r]),o||(o=!_(h)||h!==this._$AH[r]),h===j?t=j:t!==j&&(t+=(null!=h?h:"")+n[r+1]),this._$AH[r]=h}o&&!e&&this.k(t)}k(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends B{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===j?void 0:t}}const K=g?g.emptyScript:"";class W extends B{constructor(){super(...arguments),this.type=4}k(t){t&&t!==j?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class Z extends B{constructor(t,i,s,e,n){super(t,i,s,e,n),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=L(this,t,i,0))&&void 0!==s?s:j)===O)return;const e=this._$AH,n=t===j&&e!==j||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,o=t!==j&&(e===j||n);n&&this.element.removeEventListener(this.name,this,e),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class q{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const V=window.litHtmlPolyfillSupport;
18
+ var p;m.finalized=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:m}),(null!==(c=globalThis.reactiveElementVersions)&&void 0!==c?c:globalThis.reactiveElementVersions=[]).push("1.2.2");const b=globalThis.trustedTypes,g=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,y=`lit$${(Math.random()+"").slice(9)}$`,S="?"+y,$=`<${S}>`,E=document,j=(t="")=>E.createComment(t),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,A=/>/g,T=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,x=/'/g,R=/"/g,_=/^(?:script|style|textarea|title)$/i,z=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),D=new WeakMap,H=E.createTreeWalker(E,129,null,!1),N=(t,i)=>{const e=t.length-1,n=[];let s,o=2===i?"<svg>":"",r=C;for(let i=0;i<e;i++){const e=t[i];let l,h,c=-1,u=0;for(;u<e.length&&(r.lastIndex=u,h=r.exec(e),null!==h);)u=r.lastIndex,r===C?"!--"===h[1]?r=M:void 0!==h[1]?r=A:void 0!==h[2]?(_.test(h[2])&&(s=RegExp("</"+h[2],"g")),r=T):void 0!==h[3]&&(r=T):r===T?">"===h[0]?(r=null!=s?s:C,c=-1):void 0===h[1]?c=-2:(c=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?T:'"'===h[3]?R:x):r===R||r===x?r=T:r===M||r===A?r=C:(r=T,s=void 0);const a=r===T&&t[i+1].startsWith("/>")?" ":"";o+=r===C?e+$:c>=0?(n.push(l),e.slice(0,c)+"$lit$"+e.slice(c)+y+a):e+y+(-2===c?(n.push(void 0),i):a)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,n]};class F{constructor({strings:t,_$litType$:i},e){let n;this.parts=[];let s=0,o=0;const r=t.length-1,l=this.parts,[h,c]=N(t,i);if(this.el=F.createElement(h,e),H.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(n=H.nextNode())&&l.length<r;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const i of n.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(y)){const e=c[o++];if(t.push(i),void 0!==e){const t=n.getAttribute(e.toLowerCase()+"$lit$").split(y),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?B:"?"===i[1]?K:"@"===i[1]?Z:V})}else l.push({type:6,index:s})}for(const i of t)n.removeAttribute(i)}if(_.test(n.tagName)){const t=n.textContent.split(y),i=t.length-1;if(i>0){n.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)n.append(t[e],j()),H.nextNode(),l.push({type:2,index:++s});n.append(t[i],j())}}}else if(8===n.nodeType)if(n.data===S)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=n.data.indexOf(y,t+1));)l.push({type:7,index:s}),t+=y.length-1}s++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function I(t,i,e=t,n){var s,o,r,l;if(i===U)return i;let h=void 0!==n?null===(s=e._$Cl)||void 0===s?void 0:s[n]:e._$Cu;const c=k(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==c&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===c?h=void 0:(h=new c(t),h._$AT(t,e,n)),void 0!==n?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[n]=h:e._$Cu=h),void 0!==h&&(i=I(t,h._$AS(t,i.values),h,n)),i}class P{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:n}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:E).importNode(e,!0);H.currentNode=s;let o=H.nextNode(),r=0,l=0,h=n[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new W(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new q(o,this,t)),this.v.push(i),h=n[++l]}r!==(null==h?void 0:h.index)&&(o=H.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class W{constructor(t,i,e,n){var s;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=n,this._$Cg=null===(s=null==n?void 0:n.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=I(this,t,i),k(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return O(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==L&&k(this._$AH)?this._$AA.nextSibling.data=t:this.S(E.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=F.createElement(n.h,this.options)),n);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new P(s,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new F(t)),i}A(t){O(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,n=0;for(const s of t)n===i.length?i.push(e=new W(this.M(j()),this.M(j()),this,this.options)):e=i[n],e._$AI(s),n++;n<i.length&&(this._$AR(e&&e._$AB.nextSibling,n),i.length=n)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class V{constructor(t,i,e,n,s){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=i,this._$AM=n,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,n){const s=this.strings;let o=!1;if(void 0===s)t=I(this,t,i,0),o=!k(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const n=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=I(this,n[e+r],i,r),l===U&&(l=this._$AH[r]),o||(o=!k(l)||l!==this._$AH[r]),l===L?t=L:t!==L&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}o&&!n&&this.k(t)}k(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class B extends V{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===L?void 0:t}}const J=b?b.emptyScript:"";class K extends V{constructor(){super(...arguments),this.type=4}k(t){t&&t!==L?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class Z extends V{constructor(t,i,e,n,s){super(t,i,e,n,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=I(this,t,i,0))&&void 0!==e?e:L)===U)return;const n=this._$AH,s=t===L&&n!==L||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==L&&(n===L||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const G=window.litHtmlPolyfillSupport;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
23
  */
24
- var F,G;null==V||V(I,H),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.1.3");class Q extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,s)=>{var e,n;const o=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new H(i.insertBefore($(),t),t,void 0,null!=s?s:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return O}}Q.finalized=!0,Q._$litElement$=!0,null===(F=globalThis.litElementHydrateSupport)||void 0===F||F.call(globalThis,{LitElement:Q});const X=globalThis.litElementPolyfillSupport;null==X||X({LitElement:Q}),(null!==(G=globalThis.litElementVersions)&&void 0!==G?G:globalThis.litElementVersions=[]).push("3.1.2");
24
+ var Q,X;null==G||G(F,W),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.1.3");class Y extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var n,s;const o=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:i;let r=o._$litPart$;if(void 0===r){const t=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:null;o._$litPart$=r=new W(i.insertBefore(j(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return U}}Y.finalized=!0,Y._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:Y});const tt=globalThis.litElementPolyfillSupport;null==tt||tt({LitElement:Y}),(null!==(X=globalThis.litElementVersions)&&void 0!==X?X:globalThis.litElementVersions=[]).push("3.1.2");
25
25
  /**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
29
  */
30
- const Y=t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i)
30
+ const it=t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:n}=i;return{kind:e,elements:n,finisher(i){window.customElements.define(t,i)}}})(t,i)
31
31
  /**
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */,tt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(s){s.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(s){s.createProperty(i.key,t)}};function it(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):tt(t,i)
35
+ */,et=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};function nt(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):et(t,i)
36
+ /**
37
+ * @license
38
+ * Copyright 2017 Google LLC
39
+ * SPDX-License-Identifier: BSD-3-Clause
40
+ */}
41
+ /**
42
+ * @license
43
+ * Copyright 2021 Google LLC
44
+ * SPDX-License-Identifier: BSD-3-Clause
45
+ */
46
+ var st;null===(st=window.HTMLSlotElement)||void 0===st||st.prototype.assignedElements,function(){function t(t){var i=0;return function(){return i<t.length?{done:!1,value:t[i++]}:{done:!0}}}function i(i){var e="undefined"!=typeof Symbol&&Symbol.iterator&&i[Symbol.iterator];return e?e.call(i):{next:t(i)}}function e(t){if(!(t instanceof Array)){t=i(t);for(var e,n=[];!(e=t.next()).done;)n.push(e.value);t=n}return t}var n="function"==typeof Object.create?Object.create:function(t){function i(){}return i.prototype=t,new i};var s,o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var i=0;i<t.length;++i){var e=t[i];if(e&&e.Math==Math)return e}throw Error("Cannot find global object")}(this),r=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(i,e,n){return i=t(i,e),n&&Reflect.setPrototypeOf(i,n.prototype),i}}return function(t,i,e){return void 0===e&&(e=t),e=n(e.prototype||Object.prototype),Function.prototype.apply.call(t,e,i)||e}}();if("function"==typeof Object.setPrototypeOf)s=Object.setPrototypeOf;else{var l;t:{var h={};try{h.__proto__={a:!0},l=h.a;break t}catch(t){}l=!1}s=l?function(t,i){if(t.__proto__=i,t.__proto__!==i)throw new TypeError(t+" is not extensible");return t}:null}var c=s;if(!ShadowRoot.prototype.createElement){var u,a=window.HTMLElement,d=window.customElements.define,v=window.customElements.get,f=window.customElements,w=new WeakMap,m=new WeakMap,p=new WeakMap,b=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,e){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(e))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var n=e.prototype.attributeChangedCallback,s=new Set(e.observedAttributes||[]);if(y(e,s,n),n={g:e,connectedCallback:e.prototype.connectedCallback,disconnectedCallback:e.prototype.disconnectedCallback,adoptedCallback:e.prototype.adoptedCallback,attributeChangedCallback:n,formAssociated:e.formAssociated,formAssociatedCallback:e.prototype.formAssociatedCallback,formDisabledCallback:e.prototype.formDisabledCallback,formResetCallback:e.prototype.formResetCallback,formStateRestoreCallback:e.prototype.formStateRestoreCallback,observedAttributes:s},this.l.set(t,n),this.o.set(e,n),(s=v.call(f,t))||(s=g(t),d.call(f,t,s)),this===window.customElements&&(p.set(e,n),n.s=s),s=this.h.get(t)){this.h.delete(t);for(var o=(s=i(s)).next();!o.done;o=s.next())o=o.value,m.delete(o),$(o,n,!0)}return void 0!==(n=this.i.get(t))&&(n.resolve(e),this.i.delete(t)),e},window.CustomElementRegistry.prototype.upgrade=function(){j.push(this),f.upgrade.apply(f,arguments),j.pop()},window.CustomElementRegistry.prototype.get=function(t){var i;return null==(i=this.l.get(t))?void 0:i.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var i=this.j(t);if(void 0!==i)return Promise.resolve(i.g);var e=this.i.get(t);return void 0===e&&((e={}).promise=new Promise((function(t){return e.resolve=t})),this.i.set(t,e)),e.promise},window.CustomElementRegistry.prototype.m=function(t,i,e){var n=this.h.get(i);n||this.h.set(i,n=new Set),e?n.add(t):n.delete(t)},window.HTMLElement=function(){var t=u;if(t)return u=void 0,t;var i=p.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(a,[],i.s),Object.setPrototypeOf(t,this.constructor.prototype),w.set(t,i),t},window.HTMLElement.prototype=a.prototype;var g=function(t){function i(){var i=Reflect.construct(a,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);t:{var e=i.getRootNode();if(!(e===document||e instanceof ShadowRoot)){if((e=j[j.length-1])instanceof CustomElementRegistry){var n=e;break t}(e=e.getRootNode())===document||e instanceof ShadowRoot||(e=(null==(n=b.get(e))?void 0:n.getRootNode())||document)}n=e.customElements}return(e=(n=n||window.customElements).j(t))?$(i,e):m.set(i,n),i}return o.Object.defineProperty(i,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),i.prototype.connectedCallback=function(){var i=w.get(this);i?i.connectedCallback&&i.connectedCallback.apply(this,arguments):m.get(this).m(this,t,!0)},i.prototype.disconnectedCallback=function(){var i=w.get(this);i?i.disconnectedCallback&&i.disconnectedCallback.apply(this,arguments):m.get(this).m(this,t,!1)},i.prototype.adoptedCallback=function(){var t,i;null==(t=w.get(this))||null==(i=t.adoptedCallback)||i.apply(this,arguments)},i.prototype.formAssociatedCallback=function(){var t,i=w.get(this);i&&i.formAssociated&&(null==i||null==(t=i.formAssociatedCallback)||t.apply(this,arguments))},i.prototype.formDisabledCallback=function(){var t,i=w.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formDisabledCallback)||t.apply(this,arguments))},i.prototype.formResetCallback=function(){var t,i=w.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formResetCallback)||t.apply(this,arguments))},i.prototype.formStateRestoreCallback=function(){var t,i=w.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formStateRestoreCallback)||t.apply(this,arguments))},i},y=function(t,i,e){if(0!==i.size&&void 0!==e){var n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,s){if(t=t.toLowerCase(),i.has(t)){var o=this.getAttribute(t);n.call(this,t,s),e.call(this,t,o,s)}else n.call(this,t,s)});var s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),i.has(t)){var n=this.getAttribute(t);s.call(this,t),e.call(this,t,n,null)}else s.call(this,t)})}},S=function(t){var i=Object.getPrototypeOf(t);if(i!==window.HTMLElement)return i===a?Object.setPrototypeOf(t,window.HTMLElement):S(i)},$=function(t,i,e){e=void 0!==e&&e,Object.setPrototypeOf(t,i.g.prototype),w.set(t,i),u=t;try{new i.g}catch(t){S(i.g),new i.g}i.observedAttributes.forEach((function(e){t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},E=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var i=E.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};var j=[document],k=function(t,i,e){var n=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){j.push(this);var t=n.apply(e||this,arguments);return void 0!==t&&b.set(t,this),j.pop(),t}};k(ShadowRoot,"createElement",document),k(ShadowRoot,"importNode",document),k(Element,"insertAdjacentHTML");var O=function(t){var i=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},i,{set:function(t){j.push(this),i.set.call(this,t),j.pop()}}))};if(O(Element),O(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var C=new WeakMap,M=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];return i=M.call.apply(M,[this].concat(e(i))),C.set(i,this),i},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var i=window.ElementInternals.prototype,n=i[t];i[t]=function(t){for(var i=[],s=0;s<arguments.length;++s)i[s]=arguments[s];if(s=C.get(this),!0!==w.get(s).formAssociated)throw new DOMException("Failed to execute "+n+" on 'ElementInternals': The target element is not a form-associated custom element.");null==n||n.call.apply(n,[this].concat(e(i)))}}));var A=function(t){var i=r(Array,[].concat(e(t)),this.constructor);return i.h=t,i},T=A,x=Array;if(T.prototype=n(x.prototype),T.prototype.constructor=T,c)c(T,x);else for(var R in x)if("prototype"!=R)if(Object.defineProperties){var _=Object.getOwnPropertyDescriptor(x,R);_&&Object.defineProperty(T,R,_)}else T[R]=x[R];T.u=x.prototype,o.Object.defineProperty(A.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var z=function(t){var i=this,e=new Map;t.forEach((function(t,n){var s=t.getAttribute("name"),o=e.get(s)||[];i[+n]=t,o.push(t),e.set(s,o)})),this.length=t.length,e.forEach((function(t,e){t&&(i[e]=1===t.length?t[0]:new A(t))}))};z.prototype.namedItem=function(t){return this[t]};var U=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=U.get.call(this,[]),e=[],n=(t=i(t)).next();!n.done;n=t.next()){n=n.value;var s=w.get(n);s&&!0!==s.formAssociated||e.push(n)}return new z(e)}})}}}.call(self);try{window.customElements.define("custom-element",null)}catch(ht){const t=window.customElements.define;window.customElements.define=(i,e,n)=>{try{t.bind(window.customElements)(i,e,n)}catch(t){console.warn(i,e,n,t)}}}
36
47
  /**
37
48
  * @license
38
49
  * Copyright 2021 Google LLC
39
50
  * SPDX-License-Identifier: BSD-3-Clause
40
- */}var st;null===(st=window.HTMLSlotElement)||void 0===st||st.prototype.assignedElements;
51
+ */class ot extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:n}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const s=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return l(s,this.constructor.elementStyles),s}}}(Y)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),z`${t.map((t=>z`<style>${t}</style>`))} ${this.getTemplate()}`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const rt=r`.ft-no-text-select{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}`
52
+ /**
53
+ * @license
54
+ * Copyright 2017 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */,lt=2;
57
+ /**
58
+ * @license
59
+ * Copyright 2017 Google LLC
60
+ * SPDX-License-Identifier: BSD-3-Clause
61
+ */
62
+ class ht extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){if(super(t),this.it=L,t.type!==lt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===L||null==t)return this.vt=void 0,this.it=t;if(t===U)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const i=[t];return i.raw=i,this.vt={_$litType$:this.constructor.resultType,strings:i,values:[]}}}var ct,ut;ht.directiveName="unsafeHTML",ht.resultType=1,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ut=null===(ct=window.safari)||void 0===ct?void 0:ct.pushNotification)||void 0===ut||ut.toString());
41
63
  /**
42
64
  * @license
43
65
  * Copyright 2021 Google LLC
44
66
  * SPDX-LIcense-Identifier: Apache-2.0
45
67
  */
46
- const et=o`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
68
+ const at=r`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:400;font-style:normal;font-size:var(--mdc-icon-size,24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
47
69
  /**
48
70
  * @license
49
71
  * Copyright 2018 Google LLC
50
72
  * SPDX-License-Identifier: Apache-2.0
51
- */;let nt=class extends Q{render(){return z`<span><slot></slot></span>`}};nt.styles=[et],nt=
73
+ */;let dt=class extends Y{render(){return z`<span><slot></slot></span>`}};dt.styles=[at],dt=
52
74
  /*! *****************************************************************************
53
75
  Copyright (c) Microsoft Corporation.
54
76
 
@@ -63,4 +85,4 @@ const et=o`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
63
85
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
64
86
  PERFORMANCE OF THIS SOFTWARE.
65
87
  ***************************************************************************** */
66
- function(t,i,s,e){for(var n,o=arguments.length,r=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(i,s,r):n(i,s))||r);return o>3&&r&&Object.defineProperty(i,s,r),r}([Y("mwc-icon")],nt);var ot=function(t,i,s,e){for(var n,o=arguments.length,r=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(i,s,r):n(i,s))||r);return o>3&&r&&Object.defineProperty(i,s,r),r};class rt extends CustomEvent{constructor(t,i){super("resize",{detail:{width:t,height:i}})}}t.FtResizer=class extends Q{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragHandler=this.doDrag.bind(this),this.stopDragHandler=this.stopDrag.bind(this)}render(){return z`<style>#container{cursor:${this.cursor}}</style><div id="container" @mousedown="${this.initDrag}"><mwc-icon>${this.icon}</mwc-icon></div>`}initDrag(t){this.startX=t.clientX,this.startY=t.clientY,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragHandler,!1),document.addEventListener("mouseup",this.stopDragHandler,!1)}doDrag(t){let i=this.fixedWidth+t.clientX-this.startX,s=this.fixedHeight+t.clientY-this.startY;this.dispatchEvent(new rt(i,s))}stopDrag(){document.removeEventListener("mousemove",this.doDragHandler,!1),document.removeEventListener("mouseup",this.stopDragHandler,!1)}},t.FtResizer.elementDefinitions={"mwc-icon":nt},t.FtResizer.styles=o`:host{display:block}#container{display:flex}mwc-icon{transform:rotate(-45deg);color:var(--ft-color-outline,rgba(0,0,0,.14))}`,ot([it({type:Number})],t.FtResizer.prototype,"initialWidth",void 0),ot([it({type:Number})],t.FtResizer.prototype,"initialHeight",void 0),ot([it()],t.FtResizer.prototype,"icon",void 0),ot([it()],t.FtResizer.prototype,"cursor",void 0),t.FtResizer=ot([Y("ft-resizer")],t.FtResizer),t.ResizeEvent=rt,Object.defineProperty(t,"t",{value:!0})}({});
88
+ function(t,i,e,n){for(var s,o=arguments.length,r=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(o<3?s(r):o>3?s(i,e,r):s(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r}([it("mwc-icon")],dt);var vt=function(t,i,e,n){for(var s,o=arguments.length,r=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(o<3?s(r):o>3?s(i,e,r):s(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};class ft extends CustomEvent{constructor(t,i){super("resize",{detail:{width:t,height:i}})}}t.FtResizer=class extends ot{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}getStyles(){return[rt,r`:host{display:block}.ft-resizer{display:flex;cursor:${o(this.cursor)}}mwc-icon{transform:rotate(-45deg);color:var(--ft-color-outline,rgba(0,0,0,.14))}.ft-resizer--dragging mwc-icon,.ft-resizer:hover mwc-icon{color:var(--ft-color-on-surface-medium,rgba(0,0,0,.6))}`]}getTemplate(){return z`<div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}" @mousedown="${this.initDragFromMouse}" @touchstart="${this.initDragFromTouch}"><mwc-icon>${this.icon}</mwc-icon></div>`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,i){this.dragging=!0,this.startX=t,this.startY=i,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,i){let e=this.fixedWidth+t-this.startX,n=this.fixedHeight+i-this.startY;this.dispatchEvent(new ft(e,n))}},t.FtResizer.elementDefinitions={"mwc-icon":dt},vt([nt({type:Number})],t.FtResizer.prototype,"initialWidth",void 0),vt([nt({type:Number})],t.FtResizer.prototype,"initialHeight",void 0),vt([nt()],t.FtResizer.prototype,"icon",void 0),vt([nt()],t.FtResizer.prototype,"cursor",void 0),vt([function(t){return nt({...t,state:!0})}()],t.FtResizer.prototype,"dragging",void 0),t.FtResizer=vt([it("ft-resizer")],t.FtResizer),t.ResizeEvent=ft,Object.defineProperty(t,"t",{value:!0})}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-resizer",
3
- "version": "0.0.88",
3
+ "version": "0.1.2",
4
4
  "description": "small",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,9 +19,9 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "^0.0.88",
22
+ "@fluid-topics/ft-wc-utils": "^0.1.2",
23
23
  "@material/mwc-icon": "^0.25.3",
24
24
  "lit": "^2.0.2"
25
25
  },
26
- "gitHead": "220e53dba55dfa1de1560abbc30067555f72198c"
26
+ "gitHead": "45bcba88593eeafbe100e92f2ad27ca4d439f351"
27
27
  }