@fluid-topics/ft-input-label 0.1.1 → 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/build/ft-input-label.min.js +12 -12
- package/package.json +4 -4
|
@@ -4,62 +4,62 @@
|
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new Map;class r{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=n.get(this.cssText);return e&&void 0===t&&(n.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,i,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.")})(i)+t[n+1]),t[0]);return new r(n,i)},s=(t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new r("string"==typeof t?t:t+"",i))(e)})(t):t
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/;var l;const h=window.trustedTypes,f=h?h.emptyScript:"",p=window.reactiveElementPolyfillSupport,u={toAttribute(t,
|
|
12
|
+
*/;var l;const h=window.trustedTypes,f=h?h.emptyScript:"",p=window.reactiveElementPolyfillSupport,u={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},c=(t,e)=>e!==t&&(e==e||t==t),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:c};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Eh(i,e);void 0!==n&&(this._$Eu.set(n,i),t.push(n))})),t}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||y}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,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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 e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}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 e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=y){var n,r;const o=this.constructor._$Eh(t,i);if(void 0!==o&&!0===i.reflect){const s=(null!==(r=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:u.toAttribute)(e,i.type);this._$Ei=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Ei=null}}_$AK(t,e){var i,n,r;const o=this.constructor,s=o._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=o.getPropertyOptions(s),a=t.converter,l=null!==(r=null!==(n=null===(i=a)||void 0===i?void 0:i.fromAttribute)&&void 0!==n?n:"function"==typeof a?a:null)&&void 0!==r?r:u.fromAttribute;this._$Ei=s,this[s]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||c)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):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,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.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,e)=>this._$ES(e,this[e],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 d;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:v}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,b=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,w="?"+m,x=`<${w}>`,S=document,$=(t="")=>S.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,
|
|
18
|
+
var d;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:v}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,b=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,w="?"+m,x=`<${w}>`,S=document,$=(t="")=>S.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,k=/>/g,C=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,M=/'/g,A=/"/g,T=/^(?:script|style|textarea|title)$/i,R=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),_=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),L=new WeakMap,H=S.createTreeWalker(S,129,null,!1),N=(t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=E;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,f=0;for(;f<i.length&&(s.lastIndex=f,l=s.exec(i),null!==l);)f=s.lastIndex,s===E?"!--"===l[1]?s=j:void 0!==l[1]?s=k:void 0!==l[2]?(T.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=C):void 0!==l[3]&&(s=C):s===C?">"===l[0]?(s=null!=r?r:E,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?C:'"'===l[3]?A:M):s===A||s===M?s=C:s===j||s===k?s=E:(s=C,r=void 0);const p=s===C&&t[e+1].startsWith("/>")?" ":"";o+=s===E?i+x:h>=0?(n.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+m+p):i+m+(-2===h?(n.push(void 0),e):p)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(a):a,n]};class D{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[l,h]=N(t,e);if(this.el=D.createElement(l,i),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=H.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const i=h[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?B:"?"===e[1]?J:"@"===e[1]?K:W})}else a.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(T.test(n.tagName)){const t=n.textContent.split(m),e=t.length-1;if(e>0){n.textContent=g?g.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],$()),H.nextNode(),a.push({type:2,index:++r});n.append(t[e],$())}}}else if(8===n.nodeType)if(n.data===w)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(m,t+1));)a.push({type:7,index:r}),t+=m.length-1}r++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function F(t,e,i=t,n){var r,o,s,a;if(e===_)return e;let l=void 0!==n?null===(r=i._$Cl)||void 0===r?void 0:r[n]:i._$Cu;const h=O(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,n)),void 0!==n?(null!==(s=(a=i)._$Cl)&&void 0!==s?s:a._$Cl=[])[n]=l:i._$Cu=l),void 0!==l&&(e=F(t,l._$AS(t,e.values),l,n)),e}class I{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:n}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(i,!0);H.currentNode=r;let o=H.nextNode(),s=0,a=0,l=n[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new P(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Z(o,this,t)),this.v.push(e),l=n[++a]}s!==(null==l?void 0:l.index)&&(o=H.nextNode(),s++)}return r}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class P{constructor(t,e,i,n){var r;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cg=null===(r=null==n?void 0:n.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}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=F(this,t,e),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==_&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return z(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.S(S.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=D.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.m(i);else{const t=new I(r,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new D(t)),e}A(t){z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new P(this.M($()),this.M($()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class W{constructor(t,e,i,n,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=F(this,t,e,0),o=!O(t)||t!==this._$AH&&t!==_,o&&(this._$AH=t);else{const n=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=F(this,n[i+s],e,s),a===_&&(a=this._$AH[s]),o||(o=!O(a)||a!==this._$AH[s]),a===U?t=U:t!==U&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}o&&!n&&this.k(t)}k(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class B extends W{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===U?void 0:t}}const V=g?g.emptyScript:"";class J extends W{constructor(){super(...arguments),this.type=4}k(t){t&&t!==U?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class K extends W{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=F(this,t,e,0))&&void 0!==i?i:U)===_)return;const n=this._$AH,r=t===U&&n!==U||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==U&&(n===U||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}}const q=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 G,Q;null==q||q(D,P),(null!==(d=globalThis.litHtmlVersions)&&void 0!==d?d:globalThis.litHtmlVersions=[]).push("2.1.3");class X extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,
|
|
24
|
+
var G,Q;null==q||q(D,P),(null!==(d=globalThis.litHtmlVersions)&&void 0!==d?d:globalThis.litHtmlVersions=[]).push("2.1.3");class X extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new P(e.insertBefore($(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,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 _}}X.finalized=!0,X._$litElement$=!0,null===(G=globalThis.litElementHydrateSupport)||void 0===G||G.call(globalThis,{LitElement:X});const Y=globalThis.litElementPolyfillSupport;null==Y||Y({LitElement:X}),(null!==(Q=globalThis.litElementVersions)&&void 0!==Q?Q: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 tt=(t,
|
|
30
|
+
const tt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function et(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):tt(t,e)
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/}var
|
|
35
|
+
*/}var it;null===(it=window.HTMLSlotElement)||void 0===it||it.prototype.assignedElements;
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
40
|
*/
|
|
41
|
-
const nt=1,rt=2;class ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i
|
|
41
|
+
const nt=1,rt=2;class ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2018 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends ot{constructor(t){var i;if(super(t),t.type!==nt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var e,n;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.et)||void 0===e?void 0:e.has(t))&&this.st.add(t);return this.render(i)}const r=t.element.classList;this.st.forEach((t=>{t in i||(r.remove(t),this.st.delete(t))}));for(const t in i){const e=!!i[t];e===this.st.has(t)||(null===(n=this.et)||void 0===n?void 0:n.has(t))||(e?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return _}});(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 r,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),s=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)r=Object.setPrototypeOf;else{var a;t:{var l={};try{l.__proto__={a:!0},a=l.a;break t}catch(t){}a=!1}r=a?function(t,i){if(t.__proto__=i,t.__proto__!==i)throw new TypeError(t+" is not extensible");return t}:null}var h=r;if(!ShadowRoot.prototype.createElement){var f,p=window.HTMLElement,u=window.customElements.define,c=window.customElements.get,y=window.customElements,v=new WeakMap,d=new WeakMap,g=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,r=new Set(e.observedAttributes||[]);if(w(e,r,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:r},this.l.set(t,n),this.o.set(e,n),(r=c.call(y,t))||(r=m(t),u.call(y,t,r)),this===window.customElements&&(g.set(e,n),n.s=r),r=this.h.get(t)){this.h.delete(t);for(var o=(r=i(r)).next();!o.done;o=r.next())o=o.value,d.delete(o),S(o,n,!0)}return void 0!==(n=this.i.get(t))&&(n.resolve(e),this.i.delete(t)),e},window.CustomElementRegistry.prototype.upgrade=function(){O.push(this),y.upgrade.apply(y,arguments),O.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=f;if(t)return f=void 0,t;var i=g.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(p,[],i.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,i),t},window.HTMLElement.prototype=p.prototype;var m=function(t){function i(){var i=Reflect.construct(p,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);t:{var e=i.getRootNode();if(!(e===document||e instanceof ShadowRoot)){if((e=O[O.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))?S(i,e):d.set(i,n),i}return o.Object.defineProperty(i,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),i.prototype.connectedCallback=function(){var i=v.get(this);i?i.connectedCallback&&i.connectedCallback.apply(this,arguments):d.get(this).m(this,t,!0)},i.prototype.disconnectedCallback=function(){var i=v.get(this);i?i.disconnectedCallback&&i.disconnectedCallback.apply(this,arguments):d.get(this).m(this,t,!1)},i.prototype.adoptedCallback=function(){var t,i;null==(t=v.get(this))||null==(i=t.adoptedCallback)||i.apply(this,arguments)},i.prototype.formAssociatedCallback=function(){var t,i=v.get(this);i&&i.formAssociated&&(null==i||null==(t=i.formAssociatedCallback)||t.apply(this,arguments))},i.prototype.formDisabledCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formDisabledCallback)||t.apply(this,arguments))},i.prototype.formResetCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formResetCallback)||t.apply(this,arguments))},i.prototype.formStateRestoreCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formStateRestoreCallback)||t.apply(this,arguments))},i},w=function(t,i,e){if(0!==i.size&&void 0!==e){var n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){if(t=t.toLowerCase(),i.has(t)){var o=this.getAttribute(t);n.call(this,t,r),e.call(this,t,o,r)}else n.call(this,t,r)});var r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),i.has(t)){var n=this.getAttribute(t);r.call(this,t),e.call(this,t,n,null)}else r.call(this,t)})}},x=function(t){var i=Object.getPrototypeOf(t);if(i!==window.HTMLElement)return i===p?Object.setPrototypeOf(t,window.HTMLElement):x(i)},S=function(t,i,e){e=void 0!==e&&e,Object.setPrototypeOf(t,i.g.prototype),v.set(t,i),f=t;try{new i.g}catch(t){x(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)},$=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var i=$.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};var O=[document],z=function(t,i,e){var n=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){O.push(this);var t=n.apply(e||this,arguments);return void 0!==t&&b.set(t,this),O.pop(),t}};z(ShadowRoot,"createElement",document),z(ShadowRoot,"importNode",document),z(Element,"insertAdjacentHTML");var E=function(t){var i=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},i,{set:function(t){O.push(this),i.set.call(this,t),O.pop()}}))};if(E(Element),E(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var j=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];return i=C.call.apply(C,[this].concat(e(i))),j.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=[],r=0;r<arguments.length;++r)i[r]=arguments[r];if(r=j.get(this),!0!==v.get(r).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 M=function(t){var i=s(Array,[].concat(e(t)),this.constructor);return i.h=t,i},A=M,k=Array;if(A.prototype=n(k.prototype),A.prototype.constructor=A,h)h(A,k);else for(var T in k)if("prototype"!=T)if(Object.defineProperties){var R=Object.getOwnPropertyDescriptor(k,T);R&&Object.defineProperty(A,T,R)}else A[T]=k[T];A.u=k.prototype,o.Object.defineProperty(M.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 _=function(t){var i=this,e=new Map;t.forEach((function(t,n){var r=t.getAttribute("name"),o=e.get(r)||[];i[+n]=t,o.push(t),e.set(r,o)})),this.length=t.length,e.forEach((function(t,e){t&&(i[e]=1===t.length?t[0]:new M(t))}))};_.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 r=v.get(n);r&&!0!==r.formAssociated||e.push(n)}return new _(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)}}}const at=t=>i=>{window.customElements.get(t)||window.customElements.define(t,i)}
|
|
46
|
+
*/const st=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ot{constructor(t){var e;if(super(t),t.type!==nt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,n;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const r=t.element.classList;this.st.forEach((t=>{t in e||(r.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(n=this.et)||void 0===n?void 0:n.has(t))||(i?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return _}});(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,n=[];!(i=t.next()).done;)n.push(i.value);t=n}return t}var n="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var r,o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),s=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(e,i,n){return e=t(e,i),n&&Reflect.setPrototypeOf(e,n.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=n(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)r=Object.setPrototypeOf;else{var a;t:{var l={};try{l.__proto__={a:!0},a=l.a;break t}catch(t){}a=!1}r=a?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var h=r;if(!ShadowRoot.prototype.createElement){var f,p=window.HTMLElement,u=window.customElements.define,c=window.customElements.get,y=window.customElements,v=new WeakMap,d=new WeakMap,g=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,i){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(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var n=i.prototype.attributeChangedCallback,r=new Set(i.observedAttributes||[]);if(w(i,r,n),n={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:n,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:r},this.l.set(t,n),this.o.set(i,n),(r=c.call(y,t))||(r=m(t),u.call(y,t,r)),this===window.customElements&&(g.set(i,n),n.s=r),r=this.h.get(t)){this.h.delete(t);for(var o=(r=e(r)).next();!o.done;o=r.next())o=o.value,d.delete(o),S(o,n,!0)}return void 0!==(n=this.i.get(t))&&(n.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){O.push(this),y.upgrade.apply(y,arguments),O.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var n=this.h.get(e);n||this.h.set(e,n=new Set),i?n.add(t):n.delete(t)},window.HTMLElement=function(){var t=f;if(t)return f=void 0,t;var e=g.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(p,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,e),t},window.HTMLElement.prototype=p.prototype;var m=function(t){function e(){var e=Reflect.construct(p,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=O[O.length-1])instanceof CustomElementRegistry){var n=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(n=b.get(i))?void 0:n.getRootNode())||document)}n=i.customElements}return(i=(n=n||window.customElements).j(t))?S(e,i):d.set(e,n),e}return o.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=v.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):d.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=v.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):d.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=v.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=v.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=v.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},w=function(t,e,i){if(0!==e.size&&void 0!==i){var n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){if(t=t.toLowerCase(),e.has(t)){var o=this.getAttribute(t);n.call(this,t,r),i.call(this,t,o,r)}else n.call(this,t,r)});var r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var n=this.getAttribute(t);r.call(this,t),i.call(this,t,n,null)}else r.call(this,t)})}},x=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===p?Object.setPrototypeOf(t,window.HTMLElement):x(e)},S=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),v.set(t,e),f=t;try{new e.g}catch(t){x(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},$=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=$.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var O=[document],z=function(t,e,i){var n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){O.push(this);var t=n.apply(i||this,arguments);return void 0!==t&&b.set(t,this),O.pop(),t}};z(ShadowRoot,"createElement",document),z(ShadowRoot,"importNode",document),z(Element,"insertAdjacentHTML");var E=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){O.push(this),e.set.call(this,t),O.pop()}}))};if(E(Element),E(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var j=new WeakMap,k=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],n=0;n<arguments.length;++n)e[n]=arguments[n];return e=k.call.apply(k,[this].concat(i(e))),j.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,n=e[t];e[t]=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];if(r=j.get(this),!0!==v.get(r).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(i(e)))}}));var C=function(t){var e=s(Array,[].concat(i(t)),this.constructor);return e.h=t,e},M=C,A=Array;if(M.prototype=n(A.prototype),M.prototype.constructor=M,h)h(M,A);else for(var T in A)if("prototype"!=T)if(Object.defineProperties){var R=Object.getOwnPropertyDescriptor(A,T);R&&Object.defineProperty(M,T,R)}else M[T]=A[T];M.u=A.prototype,o.Object.defineProperty(C.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 _=function(t){var e=this,i=new Map;t.forEach((function(t,n){var r=t.getAttribute("name"),o=i.get(r)||[];e[+n]=t,o.push(t),i.set(r,o)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new C(t))}))};_.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,[]),i=[],n=(t=e(t)).next();!n.done;n=t.next()){n=n.value;var r=v.get(n);r&&!0!==r.formAssociated||i.push(n)}return new _(i)}})}}}).call(self);try{window.customElements.define("custom-element",null)}catch(ht){const t=window.customElements.define;window.customElements.define=(e,i,n)=>{try{t.bind(window.customElements)(e,i,n)}catch(t){console.warn(e,i,n,t)}}}const at=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2021 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/;class lt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:
|
|
51
|
+
*/;class lt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return s(r,this.constructor.elementStyles),r}}}(X)){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]),R`${t.map((t=>R`<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){}}o`.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
52
|
/**
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2017 Google LLC
|
|
55
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
56
|
-
|
|
56
|
+
*/;class ht extends ot{constructor(t){if(super(t),this.it=U,t.type!==rt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===U||null==t)return this.vt=void 0,this.it=t;if(t===_)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 e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}var ft,pt;ht.directiveName="unsafeHTML",ht.resultType=1,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(pt=null===(ft=window.safari)||void 0===ft?void 0:ft.pushNotification)||void 0===pt||pt.toString());
|
|
57
57
|
/**
|
|
58
58
|
* @license
|
|
59
59
|
* Copyright 2020 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
61
|
*/
|
|
62
|
-
const ut=t=>({_$litStatic$:t}),ct=new Map,yt=(t=>(i
|
|
62
|
+
const ut=t=>({_$litStatic$:t}),ct=new Map,yt=(t=>(e,...i)=>{var n;const r=i.length;let o,s;const a=[],l=[];let h,f=0,p=!1;for(;f<r;){for(h=e[f];f<r&&void 0!==(s=i[f],o=null===(n=s)||void 0===n?void 0:n._$litStatic$);)h+=o+e[++f],p=!0;l.push(s),a.push(h),f++}if(f===r&&a.push(e[r]),p){const t=a.join("$$lit$$");void 0===(e=ct.get(t))&&(a.raw=a,ct.set(t,e=a)),i=l}return t(e,...i)})(R);var vt,dt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(vt||(vt={}));const gt=o`
|
|
63
63
|
.ft-typography--title {
|
|
64
64
|
font-family: var(--ft-typography-title-font-family, var(--ft-typography-font-family, var(--ft-title-font, Ubuntu))), system-ui, sans-serif;
|
|
65
65
|
font-size: var(--ft-typography-title-font-size, var(--ft-typography-font-size, 20px));
|
|
@@ -157,4 +157,4 @@ const ut=t=>({_$litStatic$:t}),ct=new Map,yt=(t=>(i,...e)=>{var n;const r=e.leng
|
|
|
157
157
|
</${ut(this.element)}>
|
|
158
158
|
`:yt`
|
|
159
159
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
160
|
-
`}};dt([
|
|
160
|
+
`}};dt([et()],jt.prototype,"element",void 0),dt([et()],jt.prototype,"variant",void 0),jt=dt([at("ft-typography")],jt);var kt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};t.FtInputLabel=class extends lt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[$t,o`.ft-input-label{position:absolute;inset:0;display:flex}.ft-input-label{border-color:var(--ft-input-label-border-color,var(--ft-color-outline,rgba(0,0,0,.14)))}.ft-input-label:after,.ft-input-label:before{content:"";display:flex;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit}.ft-input-label:before{width:var(--ft-input-label-horizontal-spacing,12px);flex-shrink:0}.ft-input-label:after{flex-grow:1;flex-shrink:1}.ft-input-label--text{display:flex;flex-shrink:1;position:relative;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit;padding:0 4px;color:var(--ft-input-label-text-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)));transition:font-size 250ms,line-height 250ms,color 250ms;--ft-typography-font-size:var(--ft-input-label-font-size, 14px);--ft-typography-line-height:var(--ft-input-label-font-size, 14px)}.ft-input-label--disabled .ft-input-label--text{color:var(--ft-input-label-text-color,var(--ft-color-on-surface-disabled,rgba(0,0,0,.38)))}.ft-input-label--hidden-text{opacity:0}.ft-input-label--floating-text{position:absolute;top:calc(50% - var(--ft-typography-line-height)/ 2);transition:top 250ms;width:calc(100% - 8px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--ft-input-label-vertical-spacing,4px) 0;margin:calc(var(--ft-input-label-vertical-spacing,4px) * -1) 0}.ft-input-label--raised .ft-input-label--text{--ft-typography-font-size:var(--ft-input-label-raised-font-size, 11px);--ft-typography-line-height:var(--ft-input-label-raised-font-size, 11px)}.ft-input-label--raised .ft-input-label--floating-text{top:var(--ft-input-label-vertical-spacing,4px)}.ft-input-label--outlined .ft-input-label--text,.ft-input-label--outlined:after,.ft-input-label--outlined:before{border-top-width:1px;border-top-style:solid}.ft-input-label--outlined:before{border-left-width:1px;border-left-style:solid;border-radius:var(--ft-border-radius-S,4px) 0 0 var(--ft-border-radius-S,4px)}.ft-input-label--outlined:after{border-right-width:1px;border-right-style:solid;border-radius:0 var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text{top:calc(var(--ft-typography-line-height)/ -2)}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text{border-top:none}`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return R`<div class="${st(t)}">${this.text?R`<div class="ft-input-label--text ft-typography--caption"><span class="ft-input-label--floating-text">${this.text}</span> <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span></div>`:null}</div>`}},t.FtInputLabel.elementDefinitions={},kt([et({type:String})],t.FtInputLabel.prototype,"text",void 0),kt([et({type:Boolean})],t.FtInputLabel.prototype,"raised",void 0),kt([et({type:Boolean})],t.FtInputLabel.prototype,"outlined",void 0),kt([et({type:Boolean})],t.FtInputLabel.prototype,"disabled",void 0),t.FtInputLabel=kt([at("ft-input-label")],t.FtInputLabel),Object.defineProperty(t,"t",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-input-label",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Dynamic label with outline",
|
|
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-typography": "^0.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "^0.1.
|
|
22
|
+
"@fluid-topics/ft-typography": "^0.1.2",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "^0.1.2",
|
|
24
24
|
"lit": "^2.0.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "45bcba88593eeafbe100e92f2ad27ca4d439f351"
|
|
27
27
|
}
|