@fluid-topics/ft-tooltip 1.0.52 → 1.0.53
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-tooltip.css.js +1 -1
- package/build/ft-tooltip.d.ts +1 -1
- package/build/ft-tooltip.js +21 -12
- package/build/ft-tooltip.light.js +28 -28
- package/build/ft-tooltip.min.js +10 -10
- package/package.json +4 -4
package/build/ft-tooltip.css.js
CHANGED
|
@@ -4,7 +4,7 @@ export const FtTooltipCssVariables = {
|
|
|
4
4
|
distance: FtCssVariableFactory.create("--ft-tooltip-distance", "SIZE", "4px"),
|
|
5
5
|
color: FtCssVariableFactory.create("--ft-tooltip-color", "COLOR", "#FFFFFF"),
|
|
6
6
|
backgroundColor: FtCssVariableFactory.create("--ft-tooltip-background-color", "COLOR", "#666666"),
|
|
7
|
-
zIndex: FtCssVariableFactory.create("--ft-tooltip-z-index", "NUMBER", "
|
|
7
|
+
zIndex: FtCssVariableFactory.create("--ft-tooltip-z-index", "NUMBER", "100"),
|
|
8
8
|
borderRadiusS: FtCssVariableFactory.external(designSystemVariables.borderRadiusS, "Design system"),
|
|
9
9
|
maxWidth: FtCssVariableFactory.create("--ft-tooltip-max-width", "SIZE", "150px"),
|
|
10
10
|
};
|
package/build/ft-tooltip.d.ts
CHANGED
package/build/ft-tooltip.js
CHANGED
|
@@ -108,27 +108,36 @@ class FtTooltip extends FtLitElement {
|
|
|
108
108
|
const horizontalCenter = (target.offsetWidth - tooltipWidth) / 2;
|
|
109
109
|
let left = 0;
|
|
110
110
|
let top = 0;
|
|
111
|
+
this.tooltip.style.top = "0";
|
|
112
|
+
this.tooltip.style.left = "0";
|
|
111
113
|
switch (this.validPosition) {
|
|
112
114
|
case "top":
|
|
113
|
-
top = target.offsetTop - tooltipHeight;
|
|
114
|
-
left = target.offsetLeft + horizontalCenter;
|
|
115
|
+
top = target.offsetTop - tooltipHeight - this.tooltip.offsetTop;
|
|
116
|
+
left = target.offsetLeft + horizontalCenter - this.tooltip.offsetLeft;
|
|
115
117
|
break;
|
|
116
118
|
case "bottom":
|
|
117
|
-
top = target.offsetTop + target.offsetHeight;
|
|
118
|
-
left = target.offsetLeft + horizontalCenter;
|
|
119
|
+
top = target.offsetTop + target.offsetHeight - this.tooltip.offsetTop;
|
|
120
|
+
left = target.offsetLeft + horizontalCenter - this.tooltip.offsetLeft;
|
|
119
121
|
break;
|
|
120
122
|
case "left":
|
|
121
|
-
top = target.offsetTop + verticalCenter;
|
|
122
|
-
left = target.offsetLeft - tooltipWidth;
|
|
123
|
+
top = target.offsetTop + verticalCenter - this.tooltip.offsetTop;
|
|
124
|
+
left = target.offsetLeft - tooltipWidth - this.tooltip.offsetLeft;
|
|
123
125
|
break;
|
|
124
126
|
case "right":
|
|
125
|
-
top = target.offsetTop + verticalCenter;
|
|
126
|
-
left = target.offsetLeft + target.offsetWidth;
|
|
127
|
+
top = target.offsetTop + verticalCenter - this.tooltip.offsetTop;
|
|
128
|
+
left = target.offsetLeft + target.offsetWidth - this.tooltip.offsetLeft;
|
|
127
129
|
break;
|
|
128
130
|
}
|
|
129
131
|
const style = this.tooltip.style;
|
|
130
|
-
style.left =
|
|
131
|
-
style.top =
|
|
132
|
+
style.left = left + "px";
|
|
133
|
+
style.top = top + "px";
|
|
134
|
+
const boundingClientRect = this.tooltip.getBoundingClientRect();
|
|
135
|
+
let leftOutOfWindowPixels = -boundingClientRect.x;
|
|
136
|
+
let rightOutOfWindowPixels = (boundingClientRect.x + boundingClientRect.width) - window.innerWidth;
|
|
137
|
+
style.left = (left + Math.round(this.correctOutOfWindowPixels(leftOutOfWindowPixels, rightOutOfWindowPixels))) + "px";
|
|
138
|
+
let topOutOfWindowPixels = -boundingClientRect.y;
|
|
139
|
+
let bottomOutOfWindowPixels = (boundingClientRect.y + boundingClientRect.height) - window.innerHeight;
|
|
140
|
+
style.top = (top + Math.round(this.correctOutOfWindowPixels(topOutOfWindowPixels, bottomOutOfWindowPixels))) + "px";
|
|
132
141
|
style.maxWidth = `max(${target.offsetWidth}px, ${FtTooltipCssVariables.maxWidth})`;
|
|
133
142
|
}
|
|
134
143
|
this.revealDebouncer.run(() => {
|
|
@@ -161,8 +170,8 @@ class FtTooltip extends FtLitElement {
|
|
|
161
170
|
this.hide();
|
|
162
171
|
}
|
|
163
172
|
}
|
|
164
|
-
|
|
165
|
-
return Math.max(
|
|
173
|
+
correctOutOfWindowPixels(leftOrTopOutOfWindowPixels, rightOrBottomOutOfWindowPixels) {
|
|
174
|
+
return Math.max(leftOrTopOutOfWindowPixels, Math.min(0, -rightOrBottomOutOfWindowPixels));
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
177
|
FtTooltip.elementDefinitions = {
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var s;const n=window,
|
|
7
|
+
var s;const n=window,h=n.trustedTypes,r=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,l="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,p="?"+a,f=`<${p}>`,y=document,g=()=>y.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,u="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,b=/>/g,m=RegExp(`>|${u}(?:([^\\s"'>=/]+)(${u}*=${u}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),x=/'/g,w=/"/g,z=/^(?:script|style|textarea|title)$/i,k=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),A=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),_=new WeakMap,S=y.createTreeWalker(y,129,null,!1),O=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",h=v;for(let i=0;i<o;i++){const o=t[i];let r,p,y=-1,g=0;for(;g<o.length&&(h.lastIndex=g,p=h.exec(o),null!==p);)g=h.lastIndex,h===v?"!--"===p[1]?h=$:void 0!==p[1]?h=b:void 0!==p[2]?(z.test(p[2])&&(s=RegExp("</"+p[2],"g")),h=m):void 0!==p[3]&&(h=m):h===m?">"===p[0]?(h=null!=s?s:v,y=-1):void 0===p[1]?y=-2:(y=h.lastIndex-p[2].length,r=p[1],h=void 0===p[3]?m:'"'===p[3]?w:x):h===w||h===x?h=m:h===$||h===b?h=v:(h=m,s=void 0);const c=h===m&&t[i+1].startsWith("/>")?" ":"";n+=h===v?o+f:y>=0?(e.push(r),o.slice(0,y)+l+o.slice(y)+a+c):o+a+(-2===y?(e.push(void 0),i):c)}const p=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==r?r.createHTML(p):p,e]};class E{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,n=0;const r=t.length-1,f=this.parts,[y,c]=O(t,i);if(this.el=E.createElement(y,o),S.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=S.nextNode())&&f.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith(l)||i.startsWith(a)){const o=c[n++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+l).split(a),i=/([.?@])?(.*)/.exec(o);f.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?j:"?"===i[1]?U:"@"===i[1]?F:I})}else f.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(z.test(e.tagName)){const t=e.textContent.split(a),i=t.length-1;if(i>0){e.textContent=h?h.emptyScript:"";for(let o=0;o<i;o++)e.append(t[o],g()),S.nextNode(),f.push({type:2,index:++s});e.append(t[i],g())}}}else if(8===e.nodeType)if(e.data===p)f.push({type:2,index:s});else{let t=-1;for(;-1!==(t=e.data.indexOf(a,t+1));)f.push({type:7,index:s}),t+=a.length-1}s++}}static createElement(t,i){const o=y.createElement("template");return o.innerHTML=t,o}}function M(t,i,o=t,e){var s,n,h,r;if(i===A)return i;let l=void 0!==e?null===(s=o._$Co)||void 0===s?void 0:s[e]:o._$Cl;const a=c(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,o,e)),void 0!==e?(null!==(h=(r=o)._$Co)&&void 0!==h?h:r._$Co=[])[e]=l:o._$Cl=l),void 0!==l&&(i=M(t,l._$AS(t,i.values),l,e)),i}class T{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:o},parts:e}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:y).importNode(o,!0);S.currentNode=s;let n=S.nextNode(),h=0,r=0,l=e[0];for(;void 0!==l;){if(h===l.index){let i;2===l.type?i=new C(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new W(n,this,t)),this._$AV.push(i),l=e[++r]}h!==(null==l?void 0:l.index)&&(n=S.nextNode(),h++)}return s}v(t){let i=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class C{constructor(t,i,o,e){var s;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=e,this._$Cp=null===(s=null==e?void 0:e.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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),c(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==A&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>d(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==N&&c(this._$AH)?this._$AA.nextSibling.data=t:this.$(y.createTextNode(t)),this._$AH=t}g(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(o);else{const t=new T(s,this),i=t.u(this.options);t.v(o),this.$(i),this._$AH=t}}_$AC(t){let i=_.get(t.strings);return void 0===i&&_.set(t.strings,i=new E(t)),i}T(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,e=0;for(const s of t)e===i.length?i.push(o=new C(this.k(g()),this.k(g()),this,this.options)):o=i[e],o._$AI(s),e++;e<i.length&&(this._$AR(o&&o._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class I{constructor(t,i,o,e,s){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,e){const s=this.strings;let n=!1;if(void 0===s)t=M(this,t,i,0),n=!c(t)||t!==this._$AH&&t!==A,n&&(this._$AH=t);else{const e=t;let h,r;for(t=s[0],h=0;h<s.length-1;h++)r=M(this,e[o+h],i,h),r===A&&(r=this._$AH[h]),n||(n=!c(r)||r!==this._$AH[h]),r===N?t=N:t!==N&&(t+=(null!=r?r:"")+s[h+1]),this._$AH[h]=r}n&&!e&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class j extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}}const R=h?h.emptyScript:"";class U extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==N?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class F extends I{constructor(t,i,o,e,s){super(t,i,o,e,s),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=M(this,t,i,0))&&void 0!==o?o:N)===A)return;const e=this._$AH,s=t===N&&e!==N||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==N&&(e===N||s);s&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const Z=n.litHtmlPolyfillSupport;null==Z||Z(E,C),(null!==(s=n.litHtmlVersions)&&void 0!==s?s:n.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const B=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===B)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:B}),L=new Map,K=(t=>(i,...o)=>{const e=o.length;let s,n;const h=[],r=[];let l,a=0,p=!1;for(;a<e;){for(l=i[a];a<e&&void 0!==(n=o[a],s=G(n));)l+=s+i[++a],p=!0;a!==e&&r.push(n),h.push(l),a++}if(a===e&&h.push(i[e]),p){const t=h.join("$$lit$$");void 0===(i=L.get(t))&&(h.raw=h,L.set(t,i=h)),o=r}return t(i,...o)})(k);var P;!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"}(P||(P={}));const D=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),J={fontFamily:q,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",D),V=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),X=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),Y=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),it=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",D),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),lt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),xt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),St=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),Et=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),Ct=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),jt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),Dt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Qt=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),Vt=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),Xt=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),Yt=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),ti=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),ii=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase"),oi=o.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
15
|
+
font-family: ${Q};
|
|
16
|
+
font-size: ${V};
|
|
17
17
|
font-weight: ${X};
|
|
18
18
|
letter-spacing: ${Y};
|
|
19
19
|
line-height: ${tt};
|
|
@@ -25,8 +25,8 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
25
25
|
font-size: ${et};
|
|
26
26
|
font-weight: ${st};
|
|
27
27
|
letter-spacing: ${nt};
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
28
|
+
line-height: ${ht};
|
|
29
|
+
text-transform: ${rt};
|
|
30
30
|
}
|
|
31
31
|
`,si=o.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
@@ -47,7 +47,7 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
47
47
|
text-transform: ${bt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,hi=o.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${mt};
|
|
53
53
|
font-size: ${xt};
|
|
@@ -56,30 +56,30 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
56
56
|
line-height: ${kt};
|
|
57
57
|
text-transform: ${At};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ri=o.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
61
|
font-family: ${Nt};
|
|
62
62
|
font-size: ${_t};
|
|
63
63
|
font-weight: ${St};
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
64
|
+
letter-spacing: ${Ot};
|
|
65
|
+
line-height: ${Et};
|
|
66
|
+
text-transform: ${Mt};
|
|
67
67
|
}
|
|
68
68
|
`,li=o.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
70
|
+
font-family: ${Tt};
|
|
71
|
+
font-size: ${Ct};
|
|
72
|
+
font-weight: ${It};
|
|
73
|
+
letter-spacing: ${jt};
|
|
74
74
|
line-height: ${Rt};
|
|
75
75
|
text-transform: ${Ut};
|
|
76
76
|
}
|
|
77
77
|
`,ai=o.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
79
|
font-family: ${Ft};
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
80
|
+
font-size: ${Wt};
|
|
81
|
+
font-weight: ${Zt};
|
|
82
|
+
letter-spacing: ${Bt};
|
|
83
83
|
line-height: ${Gt};
|
|
84
84
|
text-transform: ${Ht};
|
|
85
85
|
}
|
|
@@ -87,15 +87,15 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${Lt};
|
|
89
89
|
font-size: ${Kt};
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
90
|
+
font-weight: ${Pt};
|
|
91
|
+
letter-spacing: ${Dt};
|
|
92
|
+
line-height: ${qt};
|
|
93
|
+
text-transform: ${Jt};
|
|
94
94
|
}
|
|
95
95
|
`,fi=o.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
97
|
+
font-family: ${Qt};
|
|
98
|
+
font-size: ${Vt};
|
|
99
99
|
font-weight: ${Xt};
|
|
100
100
|
letter-spacing: ${Yt};
|
|
101
101
|
line-height: ${ti};
|
|
@@ -105,14 +105,14 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var gi=function(t,i,o,e){for(var s,n=arguments.length,
|
|
108
|
+
`;var gi=function(t,i,o,e){for(var s,n=arguments.length,h=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,r=t.length-1;r>=0;r--)(s=t[r])&&(h=(n<3?s(h):n>3?s(i,o,h):s(i,o))||h);return n>3&&h&&Object.defineProperty(i,o,h),h};class ci extends i.FtLitElement{constructor(){super(...arguments),this.variant=P.body1}render(){return this.element?K`
|
|
109
109
|
<${H(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
112
|
</${H(this.element)}>
|
|
113
113
|
`:K`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}ci.styles=[oi,ei,si,ni,ri,
|
|
115
|
+
`}}ci.styles=[oi,ei,si,ni,hi,ri,li,ai,pi,fi,yi],gi([e.property()],ci.prototype,"element",void 0),gi([e.property()],ci.prototype,"variant",void 0),i.customElement("ft-typography")(ci);const di={distance:i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),color:i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),maxWidth:i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px")},ui=o.css`
|
|
116
116
|
.ft-tooltip--container {
|
|
117
117
|
display: block;
|
|
118
118
|
}
|
|
@@ -141,7 +141,7 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
141
141
|
position: relative;
|
|
142
142
|
word-break: break-word;
|
|
143
143
|
}
|
|
144
|
-
`;var vi=function(t,i,o,e){for(var s,n=arguments.length,
|
|
144
|
+
`;var vi=function(t,i,o,e){for(var s,n=arguments.length,h=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,r=t.length-1;r>=0;r--)(s=t[r])&&(h=(n<3?s(h):n>3?s(i,o,h):s(i,o))||h);return n>3&&h&&Object.defineProperty(i,o,h),h};class $i extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return o.html`
|
|
145
145
|
<div part="container"
|
|
146
146
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
147
147
|
@mouseenter=${this.onHover}
|
|
@@ -159,4 +159,4 @@ const W=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
159
159
|
</div>
|
|
160
160
|
</div>
|
|
161
161
|
</div>
|
|
162
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,e=(t.offsetHeight-o)/2,s=(t.offsetWidth-i)/2;let n=0,
|
|
162
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,e=(t.offsetHeight-o)/2,s=(t.offsetWidth-i)/2;let n=0,h=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":h=t.offsetTop-o-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"bottom":h=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"left":h=t.offsetTop+e-this.tooltip.offsetTop,n=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":h=t.offsetTop+e-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const r=this.tooltip.style;r.left=n+"px",r.top=h+"px";const l=this.tooltip.getBoundingClientRect();let a=-l.x,p=l.x+l.width-window.innerWidth;r.left=n+Math.round(this.correctOutOfWindowPixels(a,p))+"px";let f=-l.y,y=l.y+l.height-window.innerHeight;r.top=h+Math.round(this.correctOutOfWindowPixels(f,y))+"px",r.maxWidth=`max(${t.offsetWidth}px, ${di.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}$i.elementDefinitions={"ft-typography":ci},$i.styles=ui,vi([e.property()],$i.prototype,"text",void 0),vi([e.property({type:Boolean})],$i.prototype,"manual",void 0),vi([e.property({type:Boolean})],$i.prototype,"inline",void 0),vi([e.property({type:Number})],$i.prototype,"delay",void 0),vi([e.property()],$i.prototype,"position",void 0),vi([e.queryAssignedNodes("",!0)],$i.prototype,"slotNodes",void 0),vi([e.query(".ft-tooltip--container")],$i.prototype,"container",void 0),vi([e.query(".ft-tooltip")],$i.prototype,"tooltip",void 0),vi([e.query(".ft-tooltip--content")],$i.prototype,"tooltipContent",void 0),vi([e.state()],$i.prototype,"visible",void 0),i.customElement("ft-tooltip")($i),t.FtTooltip=$i,t.FtTooltipCssVariables=di,t.styles=ui}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
package/build/ft-tooltip.min.js
CHANGED
|
@@ -51,19 +51,19 @@ const c=window,p=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
|
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/;var m;const x=window,w=x.trustedTypes
|
|
54
|
+
*/;var m;const x=window,w=x.trustedTypes,O=w?w.emptyScript:"",$=x.reactiveElementPolyfillSupport,S={toAttribute(t,i){switch(i){case Boolean:t=t?O: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}},N=(t,i)=>i!==t&&(i==i||t==t),C={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:N};let E=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const o=this._$Ep(e,i);void 0!==o&&(this._$Ev.set(o,e),t.push(o))})),t}static createProperty(t,i=C){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,o=this.getPropertyDescriptor(t,e,i);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(o){const n=this[t];this[i]=o,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=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(b(t))}else void 0!==t&&i.push(b(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).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._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.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 g(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||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._$ES)||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)}_$EO(t,i,e=C){var o;const n=this.constructor._$Ep(t,e);if(void 0!==n&&!0===e.reflect){const r=(void 0!==(null===(o=e.converter)||void 0===o?void 0:o.toAttribute)?e.converter:S).toAttribute(i,e.type);this._$El=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,i){var e;const o=this.constructor,n=o._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=o.getPropertyOptions(n),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(e=t.converter)||void 0===e?void 0:e.fromAttribute)?t.converter:S;this._$El=n,this[n]=r.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,e){let o=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||N)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}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._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||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._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||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)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null
|
|
60
|
+
var R;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==$||$({ReactiveElement:E}),(null!==(m=x.reactiveElementVersions)&&void 0!==m?m:x.reactiveElementVersions=[]).push("1.6.1");const M=window,k=M.trustedTypes,U=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,F="$lit$",j=`lit$${(Math.random()+"").slice(9)}$`,L="?"+j,A=`<${L}>`,P=document,z=()=>P.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,_="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,H=/>/g,K=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),I=/'/g,Z=/"/g,V=/^(?:script|style|textarea|title)$/i,J=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),q=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),G=new WeakMap,Q=P.createTreeWalker(P,129,null,!1),Y=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=W;for(let i=0;i<e;i++){const e=t[i];let a,l,h=-1,c=0;for(;c<e.length&&(s.lastIndex=c,l=s.exec(e),null!==l);)c=s.lastIndex,s===W?"!--"===l[1]?s=D:void 0!==l[1]?s=H:void 0!==l[2]?(V.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=K):void 0!==l[3]&&(s=K):s===K?">"===l[0]?(s=null!=n?n:W,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?K:'"'===l[3]?Z:I):s===Z||s===I?s=K:s===D||s===H?s=W:(s=K,n=void 0);const p=s===K&&t[i+1].startsWith("/>")?" ":"";r+=s===W?e+A:h>=0?(o.push(a),e.slice(0,h)+F+e.slice(h)+j+p):e+j+(-2===h?(o.push(void 0),i):p)}const a=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(a):a,o]};class tt{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,a=this.parts,[l,h]=Y(t,i);if(this.el=tt.createElement(l,e),Q.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Q.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(F)||i.startsWith(j)){const e=h[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+F).split(j),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?rt:"?"===i[1]?at:"@"===i[1]?lt:nt})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(V.test(o.tagName)){const t=o.textContent.split(j),i=t.length-1;if(i>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],z()),Q.nextNode(),a.push({type:2,index:++n});o.append(t[i],z())}}}else if(8===o.nodeType)if(o.data===L)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(j,t+1));)a.push({type:7,index:n}),t+=j.length-1}n++}}static createElement(t,i){const e=P.createElement("template");return e.innerHTML=t,e}}function it(t,i,e=t,o){var n,r,s,a;if(i===q)return i;let l=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const h=B(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(s=(a=e)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=it(t,l._$AS(t,i.values),l,o)),i}class et{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:P).importNode(e,!0);Q.currentNode=n;let r=Q.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let i;2===l.type?i=new ot(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new ht(r,this,t)),this._$AV.push(i),l=o[++a]}s!==(null==l?void 0:l.index)&&(r=Q.nextNode(),s++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class ot{constructor(t,i,e,o){var n;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(n=null==o?void 0:o.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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=it(this,t,i),B(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==X&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=tt.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new et(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=G.get(t.strings);return void 0===i&&G.set(t.strings,i=new tt(t)),i}T(t){T(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new ot(this.k(z()),this.k(z()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class nt{constructor(t,i,e,o,n){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=it(this,t,i,0),r=!B(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const o=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=it(this,o[e+s],i,s),a===q&&(a=this._$AH[s]),r||(r=!B(a)||a!==this._$AH[s]),a===X?t=X:t!==X&&(t+=(null!=a?a:"")+n[s+1]),this._$AH[s]=a}r&&!o&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const st=k?k.emptyScript:"";class at extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class lt extends nt{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=it(this,t,i,0))&&void 0!==e?e:X)===q)return;const o=this._$AH,n=t===X&&o!==X||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==X&&(o===X||n);n&&this.element.removeEventListener(this.name,this,o),r&&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 ht{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){it(this,t)}}const ct=M.litHtmlPolyfillSupport;null==ct||ct(tt,ot),(null!==(R=M.litHtmlVersions)&&void 0!==R?R:M.litHtmlVersions=[]).push("2.7.3");
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
65
|
*/
|
|
66
|
-
var pt,ft;let ut=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=((t,i,e)=>{var o,n;const r=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:i;let s=r._$litPart$;if(void 0===s){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;r._$litPart$=s=new ot(i.insertBefore(z(),t),t,void 0,null!=e?e:{})}return s._$AI(t),s})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};ut.finalized=!0,ut._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:ut});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ut}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.3.2");class yt{static create(t,i,e){let o=t=>y(null!=t?t:e),n=v`var(${y(t)}, ${o(e)})`;return n.name=t,n.category=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>v`var(${y(t)}, ${o(i)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>e,n}static extend(t,i,e){let o=t=>i.get(null!=t?t:e),n=v`var(${y(t)}, ${o(e)})`;return n.name=t,n.category=i.category,n.fallbackVariable=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>v`var(${y(t)}, ${o(i)})`,n.breadcrumb=()=>[i.name,...i.breadcrumb()],n.lastResortDefaultValue=()=>e,n}static external(t,i){let e=i=>t.fallbackVariable?t.fallbackVariable.get(null!=i?i:t.defaultValue):y(null!=i?i:t.defaultValue),o=v`var(${y(t.name)}, ${e(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=i,o.defaultCssValue=e,o.get=i=>v`var(${y(t.name)}, ${e(i)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var i,e;return null!==(i=t.defaultValue)&&void 0!==i?i:null===(e=t.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()},o}}const vt={colorPrimary:yt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:yt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:yt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:yt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:yt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:yt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:yt.create("--ft-color-error","COLOR","#B00020"),colorOutline:yt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:yt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:yt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:yt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:yt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:yt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:yt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:yt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:yt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:yt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:yt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:yt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:yt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:yt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:yt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:yt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:yt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:yt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:yt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:yt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:yt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:yt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:yt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:yt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:yt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:yt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:yt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:yt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:yt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:yt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:yt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:yt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:yt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:yt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:yt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:yt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:yt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:yt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:yt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:yt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:yt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:yt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:yt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:yt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:yt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:yt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:yt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:yt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:yt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:yt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:yt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:yt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:yt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:yt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:yt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};class gt extends ut{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([i,e])=>t.registry.define(i,e))));const i={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(i);return g(e,t.elementStyles),e}}var bt,mt=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};const xt=Symbol("constructorPrototype"),wt=Symbol("constructorName"),$t=Symbol("exportpartsDebouncer");class Ot extends gt{constructor(){super(),this[bt]=new i(5),this[wt]=this.constructor.name,this[xt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wt]&&Object.setPrototypeOf(this,this[xt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var i,e;if((null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[$t].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var i,e,o,n,r,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const i=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(s=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...i,...e).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var St,Nt;bt=$t,mt([o()],Ot.prototype,"exportpartsPrefix",void 0),mt([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,i)=>!l(t,i),...null!=i?i:{}})}([])],Ot.prototype,"exportpartsPrefixes",void 0),mt([o()],Ot.prototype,"customStylesheet",void 0),v`
|
|
66
|
+
var pt,ft;let ut=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=((t,i,e)=>{var o,n;const r=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:i;let s=r._$litPart$;if(void 0===s){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;r._$litPart$=s=new ot(i.insertBefore(z(),t),t,void 0,null!=e?e:{})}return s._$AI(t),s})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};ut.finalized=!0,ut._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:ut});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ut}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.3.2");class yt{static create(t,i,e){let o=t=>y(null!=t?t:e),n=v`var(${y(t)}, ${o(e)})`;return n.name=t,n.category=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>v`var(${y(t)}, ${o(i)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>e,n}static extend(t,i,e){let o=t=>i.get(null!=t?t:e),n=v`var(${y(t)}, ${o(e)})`;return n.name=t,n.category=i.category,n.fallbackVariable=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>v`var(${y(t)}, ${o(i)})`,n.breadcrumb=()=>[i.name,...i.breadcrumb()],n.lastResortDefaultValue=()=>e,n}static external(t,i){let e=i=>t.fallbackVariable?t.fallbackVariable.get(null!=i?i:t.defaultValue):y(null!=i?i:t.defaultValue),o=v`var(${y(t.name)}, ${e(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=i,o.defaultCssValue=e,o.get=i=>v`var(${y(t.name)}, ${e(i)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var i,e;return null!==(i=t.defaultValue)&&void 0!==i?i:null===(e=t.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()},o}}const vt={colorPrimary:yt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:yt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:yt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:yt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:yt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:yt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:yt.create("--ft-color-error","COLOR","#B00020"),colorOutline:yt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:yt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:yt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:yt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:yt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:yt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:yt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:yt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:yt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:yt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:yt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:yt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:yt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:yt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:yt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:yt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:yt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:yt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:yt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:yt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:yt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:yt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:yt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:yt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:yt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:yt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:yt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:yt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:yt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:yt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:yt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:yt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:yt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:yt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:yt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:yt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:yt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:yt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:yt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:yt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:yt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:yt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:yt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:yt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:yt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:yt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:yt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:yt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:yt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:yt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:yt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:yt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:yt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:yt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:yt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};class gt extends ut{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([i,e])=>t.registry.define(i,e))));const i={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(i);return g(e,t.elementStyles),e}}var bt,mt=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};const xt=Symbol("constructorPrototype"),wt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class $t extends gt{constructor(){super(),this[bt]=new i(5),this[wt]=this.constructor.name,this[xt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wt]&&Object.setPrototypeOf(this,this[xt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var i,e;if((null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ot].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var i,e,o,n,r,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const i=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(s=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...i,...e).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var St,Nt;bt=Ot,mt([o()],$t.prototype,"exportpartsPrefix",void 0),mt([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,i)=>!l(t,i),...null!=i?i:{}})}([])],$t.prototype,"exportpartsPrefixes",void 0),mt([o()],$t.prototype,"customStylesheet",void 0),v`
|
|
67
67
|
.ft-no-text-select {
|
|
68
68
|
-webkit-touch-callout: none;
|
|
69
69
|
-webkit-user-select: none;
|
|
@@ -101,7 +101,7 @@ var pt,ft;let ut=class extends E{constructor(){super(...arguments),this.renderOp
|
|
|
101
101
|
* Copyright 2020 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
103
|
*/
|
|
104
|
-
const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void 0:t._$litStatic$},Rt=t=>({_$litStatic$:t,r:Ct}),Mt=new Map,kt=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(r=e[h],n=Et(r));)l+=n+i[++h],c=!0;h!==o&&a.push(r),s.push(l),h++}if(h===o&&s.push(i[o]),c){const t=s.join("$$lit$$");void 0===(i=Mt.get(t))&&(s.raw=s,Mt.set(t,i=s)),e=a}return t(i,...e)})(J);var Ut;!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"}(Ut||(Ut={}));const Ft=yt.extend("--ft-typography-font-family",vt.titleFont),jt=yt.extend("--ft-typography-font-family",vt.contentFont),Lt={fontFamily:jt,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},At=yt.extend("--ft-typography-title-font-family",Ft),Pt=yt.extend("--ft-typography-title-font-size",Lt.fontSize,"20px"),zt=yt.extend("--ft-typography-title-font-weight",Lt.fontWeight,"normal"),Bt=yt.extend("--ft-typography-title-letter-spacing",Lt.letterSpacing,"0.15px"),Tt=yt.extend("--ft-typography-title-line-height",Lt.lineHeight,"1.2"),_t=yt.extend("--ft-typography-title-text-transform",Lt.textTransform,"inherit"),Wt=yt.extend("--ft-typography-title-dense-font-family",Ft),Dt=yt.extend("--ft-typography-title-dense-font-size",Lt.fontSize,"14px"),Ht=yt.extend("--ft-typography-title-dense-font-weight",Lt.fontWeight,"normal"),Kt=yt.extend("--ft-typography-title-dense-letter-spacing",Lt.letterSpacing,"0.105px"),It=yt.extend("--ft-typography-title-dense-line-height",Lt.lineHeight,"1.7"),Zt=yt.extend("--ft-typography-title-dense-text-transform",Lt.textTransform,"inherit"),Vt=yt.extend("--ft-typography-subtitle1-font-family",jt),Jt=yt.extend("--ft-typography-subtitle1-font-size",Lt.fontSize,"16px"),qt=yt.extend("--ft-typography-subtitle1-font-weight",Lt.fontWeight,"600"),Xt=yt.extend("--ft-typography-subtitle1-letter-spacing",Lt.letterSpacing,"0.144px"),Gt=yt.extend("--ft-typography-subtitle1-line-height",Lt.lineHeight,"1.5"),Qt=yt.extend("--ft-typography-subtitle1-text-transform",Lt.textTransform,"inherit"),Yt=yt.extend("--ft-typography-subtitle2-font-family",jt),ti=yt.extend("--ft-typography-subtitle2-font-size",Lt.fontSize,"14px"),ii=yt.extend("--ft-typography-subtitle2-font-weight",Lt.fontWeight,"normal"),ei=yt.extend("--ft-typography-subtitle2-letter-spacing",Lt.letterSpacing,"0.098px"),oi=yt.extend("--ft-typography-subtitle2-line-height",Lt.lineHeight,"1.7"),ni=yt.extend("--ft-typography-subtitle2-text-transform",Lt.textTransform,"inherit"),ri=yt.extend("--ft-typography-body1-font-family",jt),si=yt.extend("--ft-typography-body1-font-size",Lt.fontSize,"16px"),ai=yt.extend("--ft-typography-body1-font-weight",Lt.fontWeight,"normal"),li=yt.extend("--ft-typography-body1-letter-spacing",Lt.letterSpacing,"0.496px"),hi=yt.extend("--ft-typography-body1-line-height",Lt.lineHeight,"1.5"),ci=yt.extend("--ft-typography-body1-text-transform",Lt.textTransform,"inherit"),pi=yt.extend("--ft-typography-body2-font-family",jt),fi=yt.extend("--ft-typography-body2-font-size",Lt.fontSize,"14px"),ui=yt.extend("--ft-typography-body2-font-weight",Lt.fontWeight,"normal"),di=yt.extend("--ft-typography-body2-letter-spacing",Lt.letterSpacing,"0.252px"),yi=yt.extend("--ft-typography-body2-line-height",Lt.lineHeight,"1.4"),vi=yt.extend("--ft-typography-body2-text-transform",Lt.textTransform,"inherit"),gi=yt.extend("--ft-typography-caption-font-family",jt),bi=yt.extend("--ft-typography-caption-font-size",Lt.fontSize,"12px"),mi=yt.extend("--ft-typography-caption-font-weight",Lt.fontWeight,"normal"),xi=yt.extend("--ft-typography-caption-letter-spacing",Lt.letterSpacing,"0.396px"),wi=yt.extend("--ft-typography-caption-line-height",Lt.lineHeight,"1.33")
|
|
104
|
+
const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void 0:t._$litStatic$},Rt=t=>({_$litStatic$:t,r:Ct}),Mt=new Map,kt=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(r=e[h],n=Et(r));)l+=n+i[++h],c=!0;h!==o&&a.push(r),s.push(l),h++}if(h===o&&s.push(i[o]),c){const t=s.join("$$lit$$");void 0===(i=Mt.get(t))&&(s.raw=s,Mt.set(t,i=s)),e=a}return t(i,...e)})(J);var Ut;!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"}(Ut||(Ut={}));const Ft=yt.extend("--ft-typography-font-family",vt.titleFont),jt=yt.extend("--ft-typography-font-family",vt.contentFont),Lt={fontFamily:jt,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},At=yt.extend("--ft-typography-title-font-family",Ft),Pt=yt.extend("--ft-typography-title-font-size",Lt.fontSize,"20px"),zt=yt.extend("--ft-typography-title-font-weight",Lt.fontWeight,"normal"),Bt=yt.extend("--ft-typography-title-letter-spacing",Lt.letterSpacing,"0.15px"),Tt=yt.extend("--ft-typography-title-line-height",Lt.lineHeight,"1.2"),_t=yt.extend("--ft-typography-title-text-transform",Lt.textTransform,"inherit"),Wt=yt.extend("--ft-typography-title-dense-font-family",Ft),Dt=yt.extend("--ft-typography-title-dense-font-size",Lt.fontSize,"14px"),Ht=yt.extend("--ft-typography-title-dense-font-weight",Lt.fontWeight,"normal"),Kt=yt.extend("--ft-typography-title-dense-letter-spacing",Lt.letterSpacing,"0.105px"),It=yt.extend("--ft-typography-title-dense-line-height",Lt.lineHeight,"1.7"),Zt=yt.extend("--ft-typography-title-dense-text-transform",Lt.textTransform,"inherit"),Vt=yt.extend("--ft-typography-subtitle1-font-family",jt),Jt=yt.extend("--ft-typography-subtitle1-font-size",Lt.fontSize,"16px"),qt=yt.extend("--ft-typography-subtitle1-font-weight",Lt.fontWeight,"600"),Xt=yt.extend("--ft-typography-subtitle1-letter-spacing",Lt.letterSpacing,"0.144px"),Gt=yt.extend("--ft-typography-subtitle1-line-height",Lt.lineHeight,"1.5"),Qt=yt.extend("--ft-typography-subtitle1-text-transform",Lt.textTransform,"inherit"),Yt=yt.extend("--ft-typography-subtitle2-font-family",jt),ti=yt.extend("--ft-typography-subtitle2-font-size",Lt.fontSize,"14px"),ii=yt.extend("--ft-typography-subtitle2-font-weight",Lt.fontWeight,"normal"),ei=yt.extend("--ft-typography-subtitle2-letter-spacing",Lt.letterSpacing,"0.098px"),oi=yt.extend("--ft-typography-subtitle2-line-height",Lt.lineHeight,"1.7"),ni=yt.extend("--ft-typography-subtitle2-text-transform",Lt.textTransform,"inherit"),ri=yt.extend("--ft-typography-body1-font-family",jt),si=yt.extend("--ft-typography-body1-font-size",Lt.fontSize,"16px"),ai=yt.extend("--ft-typography-body1-font-weight",Lt.fontWeight,"normal"),li=yt.extend("--ft-typography-body1-letter-spacing",Lt.letterSpacing,"0.496px"),hi=yt.extend("--ft-typography-body1-line-height",Lt.lineHeight,"1.5"),ci=yt.extend("--ft-typography-body1-text-transform",Lt.textTransform,"inherit"),pi=yt.extend("--ft-typography-body2-font-family",jt),fi=yt.extend("--ft-typography-body2-font-size",Lt.fontSize,"14px"),ui=yt.extend("--ft-typography-body2-font-weight",Lt.fontWeight,"normal"),di=yt.extend("--ft-typography-body2-letter-spacing",Lt.letterSpacing,"0.252px"),yi=yt.extend("--ft-typography-body2-line-height",Lt.lineHeight,"1.4"),vi=yt.extend("--ft-typography-body2-text-transform",Lt.textTransform,"inherit"),gi=yt.extend("--ft-typography-caption-font-family",jt),bi=yt.extend("--ft-typography-caption-font-size",Lt.fontSize,"12px"),mi=yt.extend("--ft-typography-caption-font-weight",Lt.fontWeight,"normal"),xi=yt.extend("--ft-typography-caption-letter-spacing",Lt.letterSpacing,"0.396px"),wi=yt.extend("--ft-typography-caption-line-height",Lt.lineHeight,"1.33"),Oi=yt.extend("--ft-typography-caption-text-transform",Lt.textTransform,"inherit"),$i=yt.extend("--ft-typography-breadcrumb-font-family",jt),Si=yt.extend("--ft-typography-breadcrumb-font-size",Lt.fontSize,"10px"),Ni=yt.extend("--ft-typography-breadcrumb-font-weight",Lt.fontWeight,"normal"),Ci=yt.extend("--ft-typography-breadcrumb-letter-spacing",Lt.letterSpacing,"0.33px"),Ei=yt.extend("--ft-typography-breadcrumb-line-height",Lt.lineHeight,"1.6"),Ri=yt.extend("--ft-typography-breadcrumb-text-transform",Lt.textTransform,"inherit"),Mi=yt.extend("--ft-typography-overline-font-family",jt),ki=yt.extend("--ft-typography-overline-font-size",Lt.fontSize,"10px"),Ui=yt.extend("--ft-typography-overline-font-weight",Lt.fontWeight,"normal"),Fi=yt.extend("--ft-typography-overline-letter-spacing",Lt.letterSpacing,"1.5px"),ji=yt.extend("--ft-typography-overline-line-height",Lt.lineHeight,"1.6"),Li=yt.extend("--ft-typography-overline-text-transform",Lt.textTransform,"uppercase"),Ai=yt.extend("--ft-typography-button-font-family",jt),Pi=yt.extend("--ft-typography-button-font-size",Lt.fontSize,"14px"),zi=yt.extend("--ft-typography-button-font-weight",Lt.fontWeight,"600"),Bi=yt.extend("--ft-typography-button-letter-spacing",Lt.letterSpacing,"1.246px"),Ti=yt.extend("--ft-typography-button-line-height",Lt.lineHeight,"1.15"),_i=yt.extend("--ft-typography-button-text-transform",Lt.textTransform,"uppercase"),Wi=v`
|
|
105
105
|
.ft-typography--title {
|
|
106
106
|
font-family: ${At};
|
|
107
107
|
font-size: ${Pt};
|
|
@@ -163,11 +163,11 @@ const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void
|
|
|
163
163
|
font-weight: ${mi};
|
|
164
164
|
letter-spacing: ${xi};
|
|
165
165
|
line-height: ${wi};
|
|
166
|
-
text-transform: ${
|
|
166
|
+
text-transform: ${Oi};
|
|
167
167
|
}
|
|
168
168
|
`,Ji=v`
|
|
169
169
|
.ft-typography--breadcrumb {
|
|
170
|
-
font-family: ${
|
|
170
|
+
font-family: ${$i};
|
|
171
171
|
font-size: ${Si};
|
|
172
172
|
font-weight: ${Ni};
|
|
173
173
|
letter-spacing: ${Ci};
|
|
@@ -196,14 +196,14 @@ const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void
|
|
|
196
196
|
.ft-typography {
|
|
197
197
|
vertical-align: inherit;
|
|
198
198
|
}
|
|
199
|
-
`;var Qi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Yi extends
|
|
199
|
+
`;var Qi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Yi extends $t{constructor(){super(...arguments),this.variant=Ut.body1}render(){return this.element?kt`
|
|
200
200
|
<${Rt(this.element)}
|
|
201
201
|
class="ft-typography ft-typography--${this.variant}">
|
|
202
202
|
<slot></slot>
|
|
203
203
|
</${Rt(this.element)}>
|
|
204
204
|
`:kt`
|
|
205
205
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
206
|
-
`}}Yi.styles=[Wi,Di,Hi,Ki,Ii,Zi,Vi,Ji,qi,Xi,Gi],Qi([o()],Yi.prototype,"element",void 0),Qi([o()],Yi.prototype,"variant",void 0),h("ft-typography")(Yi);const te={distance:yt.create("--ft-tooltip-distance","SIZE","4px"),color:yt.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:yt.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:yt.create("--ft-tooltip-z-index","NUMBER","
|
|
206
|
+
`}}Yi.styles=[Wi,Di,Hi,Ki,Ii,Zi,Vi,Ji,qi,Xi,Gi],Qi([o()],Yi.prototype,"element",void 0),Qi([o()],Yi.prototype,"variant",void 0),h("ft-typography")(Yi);const te={distance:yt.create("--ft-tooltip-distance","SIZE","4px"),color:yt.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:yt.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:yt.create("--ft-tooltip-z-index","NUMBER","100"),borderRadiusS:yt.external(vt.borderRadiusS,"Design system"),maxWidth:yt.create("--ft-tooltip-max-width","SIZE","150px")},ie=v`
|
|
207
207
|
.ft-tooltip--container {
|
|
208
208
|
display: block;
|
|
209
209
|
}
|
|
@@ -232,7 +232,7 @@ const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void
|
|
|
232
232
|
position: relative;
|
|
233
233
|
word-break: break-word;
|
|
234
234
|
}
|
|
235
|
-
`;var ee=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class oe extends
|
|
235
|
+
`;var ee=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class oe extends $t{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i,this.revealDebouncer=new i}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return J`
|
|
236
236
|
<div part="container"
|
|
237
237
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
238
238
|
@mouseenter=${this.onHover}
|
|
@@ -250,7 +250,7 @@ const Ct=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===Ct)return null==t?void
|
|
|
250
250
|
</div>
|
|
251
251
|
</div>
|
|
252
252
|
</div>
|
|
253
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let r=0,s=0;switch(this.validPosition){case"top":s=t.offsetTop-e,r=t.offsetLeft+n;break;case"bottom":s=t.offsetTop+t.offsetHeight,r=t.offsetLeft+n;break;case"left":s=t.offsetTop+o,r=t.offsetLeft-i;break;case"right":s=t.offsetTop+o,r=t.offsetLeft+t.offsetWidth}const a=this.tooltip.style;a.left=this.
|
|
253
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-e-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":s=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=r+"px",a.top=s+"px";const l=this.tooltip.getBoundingClientRect();let h=-l.x,c=l.x+l.width-window.innerWidth;a.left=r+Math.round(this.correctOutOfWindowPixels(h,c))+"px";let p=-l.y,f=l.y+l.height-window.innerHeight;a.top=s+Math.round(this.correctOutOfWindowPixels(p,f))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${te.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}oe.elementDefinitions={"ft-typography":Yi},oe.styles=ie,ee([o()],oe.prototype,"text",void 0),ee([o({type:Boolean})],oe.prototype,"manual",void 0),ee([o({type:Boolean})],oe.prototype,"inline",void 0),ee([o({type:Number})],oe.prototype,"delay",void 0),ee([o()],oe.prototype,"position",void 0),ee([
|
|
254
254
|
/**
|
|
255
255
|
* @license
|
|
256
256
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-tooltip",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.53",
|
|
4
4
|
"description": "A simple tooltip component",
|
|
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": "1.0.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-typography": "1.0.53",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.0.53",
|
|
24
24
|
"lit": "2.7.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "adfef35652b764d792d22aeef90c706676636803"
|
|
27
27
|
}
|