@fluid-topics/ft-reader-toc 0.3.56 → 0.3.58
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-reader-toc.light.js +11 -11
- package/build/ft-reader-toc.min.js +34 -34
- package/package.json +7 -7
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const f=window,c=f.trustedTypes,u=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,
|
|
6
|
+
*/const f=window,c=f.trustedTypes,u=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,g="?"+v,x=`<${g}>`,y=document,b=(t="")=>y.createComment(t),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,z=/>/g,C=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),S=/'/g,N=/"/g,O=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,T=y.createTreeWalker(y,129,null,!1),B=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=w;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,p=0;for(;p<i.length&&(r.lastIndex=p,a=r.exec(i),null!==a);)p=r.lastIndex,r===w?"!--"===a[1]?r=k:void 0!==a[1]?r=z:void 0!==a[2]?(O.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=C):void 0!==a[3]&&(r=C):r===C?">"===a[0]?(r=null!=n?n:w,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?C:'"'===a[3]?N:S):r===N||r===S?r=C:r===k||r===z?r=w:(r=C,n=void 0);const d=r===C&&t[e+1].startsWith("/>")?" ":"";s+=r===w?i+x:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+v+d):i+v+(-2===h?(o.push(void 0),e):d)}const l=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==u?u.createHTML(l):l,o]};class _{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,h]=B(t,e);if(this.el=_.createElement(a,i),T.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=T.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(v)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(v),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?Z:"@"===e[1]?W:U})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(v),e=t.length-1;if(e>0){o.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],b()),T.nextNode(),l.push({type:2,index:++n});o.append(t[e],b())}}}else if(8===o.nodeType)if(o.data===g)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(v,t+1));)l.push({type:7,index:n}),t+=v.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function L(t,e,i=t,o){var n,s,r,l;if(e===I)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=m(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=L(t,a._$AS(t,e.values),a,o)),e}class M{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:y).importNode(i,!0);T.currentNode=n;let s=T.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new F(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new D(s,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=T.nextNode(),r++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class F{constructor(t,e,i,o){var n;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=L(this,t,e),m(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==I&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==j&&m(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=_.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new M(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new _(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new F(this.O(b()),this.O(b()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$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._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class U{constructor(t,e,i,o,n){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=L(this,t,e,0),s=!m(t)||t!==this._$AH&&t!==I,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=L(this,o[i+r],e,r),l===I&&(l=this._$AH[r]),s||(s=!m(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}const P=c?c.emptyScript:"";class Z extends U{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class W extends U{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=L(this,t,e,0))&&void 0!==i?i:j)===I)return;const o=this._$AH,n=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==j&&(o===j||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 D{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){L(this,t)}}const H=f.litHtmlPolyfillSupport;null==H||H(_,F),(null!==(a=f.litHtmlVersions)&&void 0!==a?a:f.litHtmlVersions=[]).push("2.4.0");
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:G}),X=new Map,q=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(s=i[h],n=K(s));)a+=n+e[++h],p=!0;l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=X.get(t))&&(r.raw=r,X.set(t,e=r)),i=l}return t(e,...i)})(A);var Y;!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"}(Y||(Y={}));const J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),
|
|
12
|
+
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:G}),X=new Map,q=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(s=i[h],n=K(s));)a+=n+e[++h],p=!0;l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=X.get(t))&&(r.raw=r,X.set(t,e=r)),i=l}return t(e,...i)})(A);var Y;!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"}(Y||(Y={}));const J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),St=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),At=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),It=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),_t=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit"),Mt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Q),Ft=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),Rt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),Pt=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",tt.lineHeight,"1.33"),Zt=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit"),Wt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Q),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),Ht=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Gt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Kt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"1.6"),Vt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),Xt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Q),qt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Yt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),Jt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Qt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",tt.lineHeight,"1.6"),te=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),ee={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",tt.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},ie=i.css`
|
|
13
13
|
.ft-typography--title {
|
|
14
14
|
font-family: ${et};
|
|
15
15
|
font-size: ${it};
|
|
@@ -31,8 +31,8 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
31
31
|
.ft-typography--subtitle1 {
|
|
32
32
|
font-family: ${ct};
|
|
33
33
|
font-size: ${ut};
|
|
34
|
-
font-weight: ${
|
|
35
|
-
letter-spacing: ${
|
|
34
|
+
font-weight: ${vt};
|
|
35
|
+
letter-spacing: ${gt};
|
|
36
36
|
line-height: ${xt};
|
|
37
37
|
text-transform: ${yt};
|
|
38
38
|
}
|
|
@@ -111,13 +111,13 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
111
111
|
</${V(this.element)}>
|
|
112
112
|
`:q`
|
|
113
113
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
114
|
-
`}}ue.styles=[ie,oe,ne,se,re,le,ae,he,pe,de,fe],ce([r.property()],ue.prototype,"element",void 0),ce([r.property()],ue.prototype,"variant",void 0),e.customElement("ft-typography")(ue);const
|
|
114
|
+
`}}ue.styles=[ie,oe,ne,se,re,le,ae,he,pe,de,fe],ce([r.property()],ue.prototype,"element",void 0),ce([r.property()],ue.prototype,"variant",void 0),e.customElement("ft-typography")(ue);const ve=e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary),ge=i.css`
|
|
115
115
|
:host {
|
|
116
116
|
display: contents;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
a:focus {
|
|
120
|
-
outline-color: ${
|
|
120
|
+
outline-color: ${ve};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.ft-reader-link--remove-style {
|
|
@@ -130,7 +130,7 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
130
130
|
@click=${t=>this.onLinkClick(t)}>
|
|
131
131
|
<slot></slot>
|
|
132
132
|
</a>
|
|
133
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}me.styles=
|
|
133
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}me.styles=ge,be([r.property()],me.prototype,"tocId",void 0),be([r.property()],me.prototype,"section",void 0),be([r.property({type:Number})],me.prototype,"pageNumber",void 0),be([r.property({type:Boolean})],me.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(me),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(xe||(xe={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ye||(ye={})),new Map([...["abw"].map((t=>[t,ye.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,ye.AUDIO])),...["avi"].map((t=>[t,ye.AVI])),...["chm","xhs"].map((t=>[t,ye.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,ye.CODE])),...["csv"].map((t=>[t,ye.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ye.DITA])),...["epub"].map((t=>[t,ye.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ye.EXCEL])),...["flac"].map((t=>[t,ye.FLAC])),...["gif"].map((t=>[t,ye.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ye.GZIP])),...["html","htm","xhtml"].map((t=>[t,ye.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,ye.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ye.JPEG])),...["json"].map((t=>[t,ye.JSON])),...["m4a","m4p"].map((t=>[t,ye.M4A])),...["mov","qt"].map((t=>[t,ye.MOV])),...["mp3"].map((t=>[t,ye.MP3])),...["mp4","m4v"].map((t=>[t,ye.MP4])),...["ogg","oga"].map((t=>[t,ye.OGG])),...["pdf","ps"].map((t=>[t,ye.PDF])),...["png"].map((t=>[t,ye.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ye.POWERPOINT])),...["rar"].map((t=>[t,ye.RAR])),...["stp"].map((t=>[t,ye.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ye.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,ye.VIDEO])),...["wav"].map((t=>[t,ye.WAV])),...["wma"].map((t=>[t,ye.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ye.WORD])),...["xml","xsl","rdf"].map((t=>[t,ye.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ye.YAML])),...["zip"].map((t=>[t,ye.ZIP]))]);const $e={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},we=i.css`
|
|
134
134
|
:host, i.ft-icon {
|
|
135
135
|
display: inline-flex;
|
|
136
136
|
align-items: center;
|
|
@@ -177,12 +177,12 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
177
177
|
.ft-icon--material {
|
|
178
178
|
font-family: ${$e.materialFontFamily}, "Material Icons", sans-serif;
|
|
179
179
|
}
|
|
180
|
-
`;var ke;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ke||(ke={}));var ze=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.
|
|
181
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
180
|
+
`;var ke;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ke||(ke={}));var ze=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:ke.fluid_topics,o="material"!==e||this.value;return i.html`
|
|
181
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
182
182
|
${l.unsafeHTML(this.resolvedIcon)}
|
|
183
|
-
<slot ?hidden=${
|
|
183
|
+
<slot ?hidden=${o}></slot>
|
|
184
184
|
</i>
|
|
185
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case ke.file_format:this.resolvedIcon=null!==(t=ye[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case ke.
|
|
185
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case ke.file_format:this.resolvedIcon=null!==(t=ye[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case ke.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=xe[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ce.elementDefinitions={},Ce.styles=we,ze([r.property()],Ce.prototype,"variant",void 0),ze([r.property()],Ce.prototype,"value",void 0),ze([r.state()],Ce.prototype,"resolvedIcon",void 0),ze([r.query("slot")],Ce.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ce);const Se=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),Ne={color:Se,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",Se),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},Oe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),Ae=Oe,Ie=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Oe),je=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),Ee=je,Te=e.FtCssVariableFactory.extend("--ft-ripple-background-color",je),Be=i.css`
|
|
186
186
|
:host {
|
|
187
187
|
display: contents;
|
|
188
188
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);d(n,a,l);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Oi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -39,7 +39,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright 2021 Google LLC
|
|
41
41
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
-
*/var
|
|
42
|
+
*/var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function h(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,n;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!h(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!h(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(n=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(o=i;0!=o--;){var r=n[o];if(!h(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const c=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function p(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!h(t,e),...null!=e?e:{}})}
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2019 Google LLC
|
|
@@ -55,7 +55,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
57
|
*/
|
|
58
|
-
var R;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:z}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.4.1");const M=window,j=M.trustedTypes,A=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,F="?"+U,L=`<${F}>`,B=document,T=(t="")=>B.createComment(t),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,_=t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,H=/>/g,K=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Z=/'/g,V=/"/g,X=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),G=new WeakMap,Q=B.createTreeWalker(B,129,null,!1),tt=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"<svg>":"",s=D;for(let e=0;e<i;e++){const i=t[e];let a,
|
|
58
|
+
var R;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:z}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.4.1");const M=window,j=M.trustedTypes,A=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,F="?"+U,L=`<${F}>`,B=document,T=(t="")=>B.createComment(t),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,_=t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,H=/>/g,K=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Z=/'/g,V=/"/g,X=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),G=new WeakMap,Q=B.createTreeWalker(B,129,null,!1),tt=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"<svg>":"",s=D;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(s.lastIndex=c,a=s.exec(i),null!==a);)c=s.lastIndex,s===D?"!--"===a[1]?s=W:void 0!==a[1]?s=H:void 0!==a[2]?(X.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=K):void 0!==a[3]&&(s=K):s===K?">"===a[0]?(s=null!=n?n:D,h=-1):void 0===a[1]?h=-2:(h=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?K:'"'===a[3]?V:Z):s===V||s===Z?s=K:s===W||s===H?s=D:(s=K,n=void 0);const p=s===K&&t[e+1].startsWith("/>")?" ":"";r+=s===D?i+L:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+U+p):i+U+(-2===h?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==A?A.createHTML(l):l,o]};class et{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[a,h]=tt(t,e);if(this.el=et.createElement(a,i),Q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Q.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(U)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(U),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?st:"?"===e[1]?at:"@"===e[1]?ht:rt})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(X.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),Q.nextNode(),l.push({type:2,index:++n});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===F)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)l.push({type:7,index:n}),t+=U.length-1}n++}}static createElement(t,e){const i=B.createElement("template");return i.innerHTML=t,i}}function it(t,e,i=t,o){var n,r,s,l;if(e===q)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=I(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(s=(l=i)._$Co)&&void 0!==s?s:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=it(t,a._$AS(t,e.values),a,o)),e}class ot{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:B).importNode(i,!0);Q.currentNode=n;let r=Q.nextNode(),s=0,l=0,a=o[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new nt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ct(r,this,t)),this.u.push(e),a=o[++l]}s!==(null==a?void 0:a.index)&&(r=Q.nextNode(),s++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class nt{constructor(t,e,i,o){var n;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=it(this,t,e),I(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==q&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):_(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Y&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(B.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=et.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new ot(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new et(t)),e}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new nt(this.O(T()),this.O(T()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$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._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class rt{constructor(t,e,i,o,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(void 0===n)t=it(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=it(this,o[i+s],e,s),l===q&&(l=this._$AH[s]),r||(r=!I(l)||l!==this._$AH[s]),l===Y?t=Y:t!==Y&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class st extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}const lt=j?j.emptyScript:"";class at extends rt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Y?this.element.setAttribute(this.name,lt):this.element.removeAttribute(this.name)}}class ht extends rt{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=it(this,t,e,0))&&void 0!==i?i:Y)===q)return;const o=this._$AH,n=t===Y&&o!==Y||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Y&&(o===Y||n);n&&this.element.removeEventListener(this.name,this,o),r&&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 ct{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){it(this,t)}}const pt={P:"$lit$",A:U,M:F,C:1,L:tt,R:ot,D:_,V:it,I:nt,H:rt,N:at,U:ht,B:st,F:ct},dt=M.litHtmlPolyfillSupport;null==dt||dt(et,nt),(null!==(R=M.litHtmlVersions)&&void 0!==R?R:M.litHtmlVersions=[]).push("2.4.0");
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
@@ -66,12 +66,12 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2021 Google LLC
|
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
69
|
-
*/var mt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
69
|
+
*/var mt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class wt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return g(n,this.constructor.elementStyles),n}}}(vt)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),J`
|
|
70
70
|
${t.map((t=>J`
|
|
71
71
|
<style>${t}</style>
|
|
72
72
|
`))}
|
|
73
73
|
${this.getTemplate()}
|
|
74
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).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.exportpartsDebouncer.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 e,i,o,n,r,s;const
|
|
74
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).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.exportpartsDebouncer.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 e,i,o,n,r,s;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=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(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}mt([o()],wt.prototype,"exportpartsPrefix",void 0),mt([p([])],wt.prototype,"exportpartsPrefixes",void 0),mt([o()],wt.prototype,"customStylesheet",void 0);const $t=b`
|
|
75
75
|
.ft-no-text-select {
|
|
76
76
|
-webkit-touch-callout: none;
|
|
77
77
|
-webkit-user-select: none;
|
|
@@ -103,7 +103,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
display: inline-block;
|
|
104
104
|
width: 0;
|
|
105
105
|
}
|
|
106
|
-
`;class St{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:
|
|
106
|
+
`;class St{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:t;return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),n}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):t}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}const kt=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),Ct=(t,e)=>{var i;const o=kt(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!h(t,e),(i,n)=>{var r,s;i.constructor.createProperty(n,{hasChanged:e,attribute:null!==(r=o.attribute)&&void 0!==r&&r});const l=i;l.reduxProperties=l.reduxProperties||new Map;const a=null!==(s=kt(t)?o.selector:t)&&void 0!==s?s:t=>t[n];l.reduxProperties.set(n,{selector:a,store:o.store})}};class Nt extends wt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Et(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Et(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Et(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var zt,Rt,Mt;const jt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Mt=null===(Rt=null===(zt=window.safari)||void 0===zt?void 0:zt.pushNotification)||void 0===Rt?void 0:Rt.toString())&&void 0!==Mt?Mt:""),At=1,Ut=2,Ft=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
107
107
|
/**
|
|
108
108
|
* @license
|
|
109
109
|
* Copyright 2017 Google LLC
|
|
@@ -113,26 +113,26 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
113
113
|
* @license
|
|
114
114
|
* Copyright 2020 Google LLC
|
|
115
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
116
|
-
*/const{I:Bt}=pt,Tt=()=>document.createComment(""),It=(t,e,i)=>{var o;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Tt(),r),o=n.insertBefore(Tt(),r);i=new Bt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,
|
|
116
|
+
*/const{I:Bt}=pt,Tt=()=>document.createComment(""),It=(t,e,i)=>{var o;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Tt(),r),o=n.insertBefore(Tt(),r);i=new Bt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,l=s!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==s._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return i},Pt=(t,e,i=t)=>(t._$AI(e,i),t),_t={},Dt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Wt=(t,e,i)=>{const o=new Map;for(let n=e;n<=i;n++)o.set(t[n],n);return o},Ht=Ft(class extends Lt{constructor(t){if(super(t),t.type!==Ut)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const n=[],r=[];let s=0;for(const e of t)n[s]=o?o(e,s):s,r[s]=i(e,s),s++;return{values:r,keys:n}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var n;const r=(t=>t._$AH)(t),{values:s,keys:l}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=l,s;const a=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let c,p,d=0,f=r.length-1,u=0,v=s.length-1;for(;d<=f&&u<=v;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])h[u]=Pt(r[d],s[u]),d++,u++;else if(a[f]===l[v])h[v]=Pt(r[f],s[v]),f--,v--;else if(a[d]===l[v])h[v]=Pt(r[d],s[v]),It(t,h[v+1],r[d]),d++,v--;else if(a[f]===l[u])h[u]=Pt(r[f],s[u]),It(t,r[d],r[f]),f--,u++;else if(void 0===c&&(c=Wt(l,u,v),p=Wt(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=It(t,r[d]);Pt(e,s[u]),h[u]=e}else h[u]=Pt(i,s[u]),It(t,r[d],i),r[e]=null;u++}else Dt(r[f]),f--;else Dt(r[d]),d++;for(;u<=v;){const e=It(t,h[v+1]);Pt(e,s[u]),h[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&Dt(t)}return this.ut=l,((t,e=_t)=>{t._$AH=e})(t,h),q}}),Kt=Ft(class extends Lt{constructor(t){var e;if(super(t),t.type!==At||"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,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return q}}),Zt=Ft(class extends Lt{constructor(t){var e;if(super(t),t.type!==At||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const o=t[i];return null==o?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const o=e[t];null!=o&&(this.vt.add(t),t.includes("-")?i.setProperty(t,o):i[t]=o)}return q}});
|
|
117
117
|
/**
|
|
118
118
|
* @license
|
|
119
119
|
* Copyright 2017 Google LLC
|
|
120
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
121
|
-
*/var Vt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
121
|
+
*/var Vt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Xt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Jt extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new Xt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Vt([n()],e.prototype,"stateManager",void 0),e}(Nt)){}
|
|
122
122
|
/**
|
|
123
123
|
* @license
|
|
124
124
|
* Copyright 2020 Google LLC
|
|
125
125
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
126
|
-
*/const qt=Symbol.for(""),Yt=t=>{if((null==t?void 0:t.r)===qt)return null==t?void 0:t._$litStatic$},Gt=t=>({_$litStatic$:t,r:qt}),Qt=new Map,te=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],
|
|
126
|
+
*/const qt=Symbol.for(""),Yt=t=>{if((null==t?void 0:t.r)===qt)return null==t?void 0:t._$litStatic$},Gt=t=>({_$litStatic$:t,r:qt}),Qt=new Map,te=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(r=i[h],n=Yt(r));)a+=n+e[++h],c=!0;l.push(r),s.push(a),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=Qt.get(t))&&(s.raw=s,Qt.set(t,e=s)),i=l}return t(e,...i)})(J);var ee;!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"}(ee||(ee={}));const ie=xt.extend("--ft-typography-font-family",gt.titleFont),oe=xt.extend("--ft-typography-font-family",gt.contentFont),ne={fontFamily:oe,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},re=xt.extend("--ft-typography-title-font-family",ie),se=xt.extend("--ft-typography-title-font-size",ne.fontSize,"20px"),le=xt.extend("--ft-typography-title-font-weight",ne.fontWeight,"normal"),ae=xt.extend("--ft-typography-title-letter-spacing",ne.letterSpacing,"0.15px"),he=xt.extend("--ft-typography-title-line-height",ne.lineHeight,"1.2"),ce=xt.extend("--ft-typography-title-text-transform",ne.textTransform,"inherit"),pe=xt.extend("--ft-typography-title-dense-font-family",ie),de=xt.extend("--ft-typography-title-dense-font-size",ne.fontSize,"14px"),fe=xt.extend("--ft-typography-title-dense-font-weight",ne.fontWeight,"normal"),ue=xt.extend("--ft-typography-title-dense-letter-spacing",ne.letterSpacing,"0.105px"),ve=xt.extend("--ft-typography-title-dense-line-height",ne.lineHeight,"1.7"),ye=xt.extend("--ft-typography-title-dense-text-transform",ne.textTransform,"inherit"),xe=xt.extend("--ft-typography-subtitle1-font-family",oe),be=xt.extend("--ft-typography-subtitle1-font-size",ne.fontSize,"16px"),ge=xt.extend("--ft-typography-subtitle1-font-weight",ne.fontWeight,"600"),me=xt.extend("--ft-typography-subtitle1-letter-spacing",ne.letterSpacing,"0.144px"),we=xt.extend("--ft-typography-subtitle1-line-height",ne.lineHeight,"1.5"),$e=xt.extend("--ft-typography-subtitle1-text-transform",ne.textTransform,"inherit"),Oe=xt.extend("--ft-typography-subtitle2-font-family",oe),Se=xt.extend("--ft-typography-subtitle2-font-size",ne.fontSize,"14px"),ke=xt.extend("--ft-typography-subtitle2-font-weight",ne.fontWeight,"normal"),Ce=xt.extend("--ft-typography-subtitle2-letter-spacing",ne.letterSpacing,"0.098px"),Ne=xt.extend("--ft-typography-subtitle2-line-height",ne.lineHeight,"1.7"),Ee=xt.extend("--ft-typography-subtitle2-text-transform",ne.textTransform,"inherit"),ze=xt.extend("--ft-typography-body1-font-family",oe),Re=xt.extend("--ft-typography-body1-font-size",ne.fontSize,"16px"),Me=xt.extend("--ft-typography-body1-font-weight",ne.fontWeight,"normal"),je=xt.extend("--ft-typography-body1-letter-spacing",ne.letterSpacing,"0.496px"),Ae=xt.extend("--ft-typography-body1-line-height",ne.lineHeight,"1.5"),Ue=xt.extend("--ft-typography-body1-text-transform",ne.textTransform,"inherit"),Fe=xt.extend("--ft-typography-body2-font-family",oe),Le=xt.extend("--ft-typography-body2-font-size",ne.fontSize,"14px"),Be=xt.extend("--ft-typography-body2-font-weight",ne.fontWeight,"normal"),Te=xt.extend("--ft-typography-body2-letter-spacing",ne.letterSpacing,"0.252px"),Ie=xt.extend("--ft-typography-body2-line-height",ne.lineHeight,"1.4"),Pe=xt.extend("--ft-typography-body2-text-transform",ne.textTransform,"inherit"),_e=xt.extend("--ft-typography-caption-font-family",oe),De=xt.extend("--ft-typography-caption-font-size",ne.fontSize,"12px"),We=xt.extend("--ft-typography-caption-font-weight",ne.fontWeight,"normal"),He=xt.extend("--ft-typography-caption-letter-spacing",ne.letterSpacing,"0.396px"),Ke=xt.extend("--ft-typography-caption-line-height",ne.lineHeight,"1.33"),Ze=xt.extend("--ft-typography-caption-text-transform",ne.textTransform,"inherit"),Ve=xt.extend("--ft-typography-breadcrumb-font-family",oe),Xe=xt.extend("--ft-typography-breadcrumb-font-size",ne.fontSize,"10px"),Je=xt.extend("--ft-typography-breadcrumb-font-weight",ne.fontWeight,"normal"),qe=xt.extend("--ft-typography-breadcrumb-letter-spacing",ne.letterSpacing,"0.33px"),Ye=xt.extend("--ft-typography-breadcrumb-line-height",ne.lineHeight,"1.6"),Ge=xt.extend("--ft-typography-breadcrumb-text-transform",ne.textTransform,"inherit"),Qe=xt.extend("--ft-typography-overline-font-family",oe),ti=xt.extend("--ft-typography-overline-font-size",ne.fontSize,"10px"),ei=xt.extend("--ft-typography-overline-font-weight",ne.fontWeight,"normal"),ii=xt.extend("--ft-typography-overline-letter-spacing",ne.letterSpacing,"1.5px"),oi=xt.extend("--ft-typography-overline-line-height",ne.lineHeight,"1.6"),ni=xt.extend("--ft-typography-overline-text-transform",ne.textTransform,"uppercase"),ri={fontFamily:xt.extend("--ft-typography-button-font-family",oe),fontSize:xt.extend("--ft-typography-button-font-size",ne.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-button-font-weight",ne.fontWeight,"600"),letterSpacing:xt.extend("--ft-typography-button-letter-spacing",ne.letterSpacing,"1.246px"),lineHeight:xt.extend("--ft-typography-button-line-height",ne.lineHeight,"1.15"),textTransform:xt.extend("--ft-typography-button-text-transform",ne.textTransform,"uppercase")},si=b`
|
|
127
127
|
.ft-typography--title {
|
|
128
128
|
font-family: ${re};
|
|
129
129
|
font-size: ${se};
|
|
130
|
-
font-weight: ${
|
|
131
|
-
letter-spacing: ${
|
|
130
|
+
font-weight: ${le};
|
|
131
|
+
letter-spacing: ${ae};
|
|
132
132
|
line-height: ${he};
|
|
133
133
|
text-transform: ${ce};
|
|
134
134
|
}
|
|
135
|
-
`,
|
|
135
|
+
`,li=b`
|
|
136
136
|
.ft-typography--title-dense {
|
|
137
137
|
font-family: ${pe};
|
|
138
138
|
font-size: ${de};
|
|
@@ -141,7 +141,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
141
141
|
line-height: ${ve};
|
|
142
142
|
text-transform: ${ye};
|
|
143
143
|
}
|
|
144
|
-
`,
|
|
144
|
+
`,ai=b`
|
|
145
145
|
.ft-typography--subtitle1 {
|
|
146
146
|
font-family: ${xe};
|
|
147
147
|
font-size: ${be};
|
|
@@ -218,14 +218,14 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
218
218
|
.ft-typography {
|
|
219
219
|
vertical-align: inherit;
|
|
220
220
|
}
|
|
221
|
-
`;var xi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
221
|
+
`;var xi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class bi extends wt{constructor(){super(...arguments),this.variant=ee.body1}render(){return this.element?te`
|
|
222
222
|
<${Gt(this.element)}
|
|
223
223
|
class="ft-typography ft-typography--${this.variant}">
|
|
224
224
|
<slot></slot>
|
|
225
225
|
</${Gt(this.element)}>
|
|
226
226
|
`:te`
|
|
227
227
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
228
|
-
`}}bi.styles=[si,ai,
|
|
228
|
+
`}}bi.styles=[si,li,ai,hi,ci,pi,di,fi,ui,vi,yi],xi([o()],bi.prototype,"element",void 0),xi([o()],bi.prototype,"variant",void 0),c("ft-typography")(bi);const gi=xt.extend("--ft-reader-internal-link-outline-color",gt.colorPrimary),mi=b`
|
|
229
229
|
:host {
|
|
230
230
|
display: contents;
|
|
231
231
|
}
|
|
@@ -238,13 +238,13 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
238
238
|
text-decoration: none;
|
|
239
239
|
color: inherit;
|
|
240
240
|
}
|
|
241
|
-
`;var wi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
241
|
+
`;var wi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class $i extends Jt{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Kt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return J`
|
|
242
242
|
<a class=${e}
|
|
243
243
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
244
244
|
@click=${t=>this.onLinkClick(t)}>
|
|
245
245
|
<slot></slot>
|
|
246
246
|
</a>
|
|
247
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}$i.styles=mi,wi([o()],$i.prototype,"tocId",void 0),wi([o()],$i.prototype,"section",void 0),wi([o({type:Number})],$i.prototype,"pageNumber",void 0),wi([o({type:Boolean})],$i.prototype,"removeStyle",void 0),
|
|
247
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}$i.styles=mi,wi([o()],$i.prototype,"tocId",void 0),wi([o()],$i.prototype,"section",void 0),wi([o({type:Number})],$i.prototype,"pageNumber",void 0),wi([o({type:Boolean})],$i.prototype,"removeStyle",void 0),c("ft-reader-internal-link")($i);
|
|
248
248
|
/**
|
|
249
249
|
* @license
|
|
250
250
|
* Copyright 2017 Google LLC
|
|
@@ -297,12 +297,12 @@ class Oi extends Lt{constructor(t){if(super(t),this.it=Y,t.type!==Ut)throw Error
|
|
|
297
297
|
.ft-icon--material {
|
|
298
298
|
font-family: ${Ni.materialFontFamily}, "Material Icons", sans-serif;
|
|
299
299
|
}
|
|
300
|
-
`;var zi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(zi||(zi={}));var Ri=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
301
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
300
|
+
`;var zi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(zi||(zi={}));var Ri=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Mi extends wt{constructor(){super(...arguments),this.resolvedIcon=Y}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:zi.fluid_topics,i="material"!==e||this.value;return J`
|
|
301
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
302
302
|
${Si(this.resolvedIcon)}
|
|
303
|
-
<slot ?hidden=${
|
|
303
|
+
<slot ?hidden=${i}></slot>
|
|
304
304
|
</i>
|
|
305
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case zi.file_format:this.resolvedIcon=null!==(t=Ci[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case zi.
|
|
305
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case zi.file_format:this.resolvedIcon=null!==(t=Ci[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case zi.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(e=ki[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Mi.elementDefinitions={},Mi.styles=Ei,Ri([o()],Mi.prototype,"variant",void 0),Ri([o()],Mi.prototype,"value",void 0),Ri([n()],Mi.prototype,"resolvedIcon",void 0),Ri([s("slot")],Mi.prototype,"slottedContent",void 0),c("ft-icon")(Mi);const ji=xt.extend("--ft-ripple-color",gt.colorContent),Ai={color:ji,backgroundColor:xt.extend("--ft-ripple-background-color",ji),opacityContentOnSurfacePressed:xt.external(gt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(gt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(gt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(gt.opacityContentOnSurfaceSelected,"Design system")},Ui=xt.extend("--ft-ripple-color",gt.colorPrimary),Fi=Ui,Li=xt.extend("--ft-ripple-background-color",Ui),Bi=xt.extend("--ft-ripple-color",gt.colorSecondary),Ti=Bi,Ii=xt.extend("--ft-ripple-background-color",Bi),Pi=b`
|
|
306
306
|
:host {
|
|
307
307
|
display: contents;
|
|
308
308
|
}
|
|
@@ -391,7 +391,7 @@ class Oi extends Lt{constructor(t){if(super(t),this.it=Y,t.type!==Ut)throw Error
|
|
|
391
391
|
opacity: ${Ai.opacityContentOnSurfacePressed};
|
|
392
392
|
transform: translate(-50%, -50%) scale(1);
|
|
393
393
|
}
|
|
394
|
-
`;var _i=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
394
|
+
`;var _i=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Di extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return J`
|
|
395
395
|
<style>
|
|
396
396
|
.ft-ripple .ft-ripple--effect,
|
|
397
397
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -408,7 +408,7 @@ class Oi extends Lt{constructor(t){if(super(t),this.it=Y,t.type!==Ut)throw Error
|
|
|
408
408
|
<div class="ft-ripple--background"></div>
|
|
409
409
|
<div class="ft-ripple--effect"></div>
|
|
410
410
|
</div>
|
|
411
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Di.elementDefinitions={},Di.styles=Pi,_i([o({type:Boolean})],Di.prototype,"primary",void 0),_i([o({type:Boolean})],Di.prototype,"secondary",void 0),_i([o({type:Boolean})],Di.prototype,"unbounded",void 0),_i([o({type:Boolean})],Di.prototype,"activated",void 0),_i([o({type:Boolean})],Di.prototype,"selected",void 0),_i([o({type:Boolean})],Di.prototype,"disabled",void 0),_i([n()],Di.prototype,"hovered",void 0),_i([n()],Di.prototype,"focused",void 0),_i([n()],Di.prototype,"pressed",void 0),_i([n()],Di.prototype,"rippling",void 0),_i([n()],Di.prototype,"rippleSize",void 0),_i([n()],Di.prototype,"originX",void 0),_i([n()],Di.prototype,"originY",void 0),_i([s(".ft-ripple")],Di.prototype,"ripple",void 0),_i([s(".ft-ripple--effect")],Di.prototype,"rippleEffect",void 0),
|
|
411
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Di.elementDefinitions={},Di.styles=Pi,_i([o({type:Boolean})],Di.prototype,"primary",void 0),_i([o({type:Boolean})],Di.prototype,"secondary",void 0),_i([o({type:Boolean})],Di.prototype,"unbounded",void 0),_i([o({type:Boolean})],Di.prototype,"activated",void 0),_i([o({type:Boolean})],Di.prototype,"selected",void 0),_i([o({type:Boolean})],Di.prototype,"disabled",void 0),_i([n()],Di.prototype,"hovered",void 0),_i([n()],Di.prototype,"focused",void 0),_i([n()],Di.prototype,"pressed",void 0),_i([n()],Di.prototype,"rippling",void 0),_i([n()],Di.prototype,"rippleSize",void 0),_i([n()],Di.prototype,"originX",void 0),_i([n()],Di.prototype,"originY",void 0),_i([s(".ft-ripple")],Di.prototype,"ripple",void 0),_i([s(".ft-ripple--effect")],Di.prototype,"rippleEffect",void 0),c("ft-ripple")(Di);const Wi=xt.create("--ft-tooltip-distance","SIZE","4px"),Hi=xt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ki=xt.create("--ft-tooltip-background-color","COLOR","#666666"),Zi=xt.create("--ft-tooltip-z-index","NUMBER","1"),Vi=xt.external(gt.borderRadiusS,"Design system"),Xi=xt.create("--ft-tooltip-max-width","SIZE","150px"),Ji=b`
|
|
412
412
|
.ft-tooltip--container {
|
|
413
413
|
display: block;
|
|
414
414
|
position: relative;
|
|
@@ -440,7 +440,7 @@ class Oi extends Lt{constructor(t){if(super(t),this.it=Y,t.type!==Ut)throw Error
|
|
|
440
440
|
position: relative;
|
|
441
441
|
word-break: break-word;
|
|
442
442
|
}
|
|
443
|
-
`;var qi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
443
|
+
`;var qi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Yi extends wt{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 e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return J`
|
|
444
444
|
<div part="container"
|
|
445
445
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
446
446
|
@mouseenter=${this.onHover}
|
|
@@ -464,7 +464,7 @@ class Oi extends Lt{constructor(t){if(super(t),this.it=Y,t.type!==Ut)throw Error
|
|
|
464
464
|
* Copyright 2017 Google LLC
|
|
465
465
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
466
466
|
*/
|
|
467
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?
|
|
467
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?a(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Yi.prototype,"slotNodes",void 0),qi([s(".ft-tooltip--container")],Yi.prototype,"container",void 0),qi([s("slot")],Yi.prototype,"target",void 0),qi([s(".ft-tooltip")],Yi.prototype,"tooltip",void 0),qi([s(".ft-tooltip--content")],Yi.prototype,"tooltipContent",void 0),qi([n()],Yi.prototype,"visible",void 0),c("ft-tooltip")(Yi);const Gi={color:xt.extend("--ft-loader-color",gt.colorPrimary),size:xt.create("--ft-loader-size","SIZE","80px")},Qi=b`
|
|
468
468
|
:host {
|
|
469
469
|
line-height: 0;
|
|
470
470
|
}
|
|
@@ -540,7 +540,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
540
540
|
<div></div>
|
|
541
541
|
<div></div>
|
|
542
542
|
</div>
|
|
543
|
-
`}}to.styles=Qi,
|
|
543
|
+
`}}to.styles=Qi,c("ft-loader")(to);const eo=xt.extend("--ft-button-color",gt.colorPrimary),io={backgroundColor:xt.extend("--ft-button-background-color",gt.colorSurface),borderRadius:xt.extend("--ft-button-border-radius",gt.borderRadiusL),color:eo,fontSize:xt.extend("--ft-button-font-size",ri.fontSize),iconSize:xt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:xt.extend("--ft-button-ripple-color",eo),opacityDisabled:xt.external(gt.colorOpacityDisabled,"Design system")},oo=xt.extend("--ft-button-primary-color",xt.extend("--ft-button-color",gt.colorOnPrimary)),no={backgroundColor:xt.extend("--ft-button-primary-background-color",xt.extend("--ft-button-background-color",gt.colorPrimary)),color:oo,rippleColor:xt.extend("--ft-button-primary-ripple-color",oo)},ro=xt.extend("--ft-button-dense-border-radius",xt.extend("--ft-button-border-radius",gt.borderRadiusM)),so=[$t,b`
|
|
544
544
|
:host {
|
|
545
545
|
display: inline-block;
|
|
546
546
|
max-width: 100%;
|
|
@@ -663,7 +663,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
663
663
|
${bt(Gi.size,io.iconSize)};
|
|
664
664
|
${bt(Gi.color,"var(--ft-button-internal-color)")};
|
|
665
665
|
}
|
|
666
|
-
`];var ao
|
|
666
|
+
`];var lo,ao=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ho extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=zi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(J`
|
|
667
667
|
<button part="button"
|
|
668
668
|
class="${Kt(t)}"
|
|
669
669
|
aria-label="${this.getLabel()}"
|
|
@@ -686,7 +686,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
686
686
|
</ft-tooltip>
|
|
687
687
|
`:t}resolveIcon(){return this.loading?J`
|
|
688
688
|
<ft-loader></ft-loader> `:this.icon?J`
|
|
689
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ho.elementDefinitions={"ft-ripple":Di,"ft-tooltip":Yi,"ft-typography":bi,"ft-icon":Mi,"ft-loader":to},ho.styles=[Ot,so],
|
|
689
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ho.elementDefinitions={"ft-ripple":Di,"ft-tooltip":Yi,"ft-typography":bi,"ft-icon":Mi,"ft-loader":to},ho.styles=[Ot,so],ao([o({type:Boolean})],ho.prototype,"primary",void 0),ao([o({type:Boolean})],ho.prototype,"outlined",void 0),ao([o({type:Boolean})],ho.prototype,"disabled",void 0),ao([o({type:Boolean})],ho.prototype,"dense",void 0),ao([o({type:Boolean})],ho.prototype,"round",void 0),ao([o({type:String})],ho.prototype,"label",void 0),ao([o({type:String})],ho.prototype,"icon",void 0),ao([o({type:String})],ho.prototype,"iconVariant",void 0),ao([o({type:Boolean})],ho.prototype,"trailingIcon",void 0),ao([o({type:Boolean})],ho.prototype,"loading",void 0),ao([o({type:String})],ho.prototype,"tooltipPosition",void 0),ao([o({type:Boolean})],ho.prototype,"hideTooltip",void 0),ao([o({type:Boolean})],ho.prototype,"forceTooltip",void 0),ao([s(".ft-button")],ho.prototype,"button",void 0),ao([s(".ft-button--label slot")],ho.prototype,"slottedContent",void 0),c("ft-button")(ho),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(lo||(lo={}));const co=b`
|
|
690
690
|
.ft-size-watcher--pixel {
|
|
691
691
|
width: 0;
|
|
692
692
|
height: 0;
|
|
@@ -705,11 +705,11 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
705
705
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
706
706
|
width: 100%;
|
|
707
707
|
}
|
|
708
|
-
`;var po=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
708
|
+
`;var po=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class fo extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class uo extends wt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=lo.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return J`
|
|
709
709
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
710
710
|
<div class="ft-size-watcher--watcher"></div>
|
|
711
711
|
</div>
|
|
712
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
712
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=lo.S:this.size<976?this.category=lo.M:this.size<1024?this.category=lo.L:this.size<1440?this.category=lo.XL:this.category=lo.XXL,this.dispatchEvent(new fo(this.size,this.category)))}),this.debounceTimeout)}}uo.elementDefinitions={},uo.styles=co,po([o({type:Number})],uo.prototype,"debounceTimeout",void 0),po([o({type:Boolean})],uo.prototype,"local",void 0),po([o({type:Number,reflect:!0})],uo.prototype,"size",void 0),po([o({type:String,reflect:!0})],uo.prototype,"category",void 0),po([s(".ft-size-watcher--watcher")],uo.prototype,"watcher",void 0),c("ft-size-watcher")(uo);const vo={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"},yo={tabulationSize:xt.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:xt.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:xt.extend("--ft-reader-toc-text-color",gt.colorOnSurface),hoverColor:xt.extend("--ft-reader-toc-hover-color",gt.colorPrimary),highlightedTextColor:xt.extend("--ft-reader-toc-highlighted-text-color",gt.colorPrimary),highlightedFontWeight:xt.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:xt.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:xt.create("--ft-reader-toc-icon-font-size","SIZE","16px")},xo=b`
|
|
713
713
|
.ft-reader-toc {
|
|
714
714
|
color: ${yo.textColor};
|
|
715
715
|
}
|
|
@@ -767,7 +767,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
767
767
|
.ft-reader-toc-expand-collapse-all-justify ft-button {
|
|
768
768
|
flex-grow: 1;
|
|
769
769
|
}
|
|
770
|
-
`;var bo=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,
|
|
770
|
+
`;var bo=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class go extends Jt{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=zi.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.expandCollapseAllIconVariant=zi.fluid_topics,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scope="pages",this.hideIfEmpty=!1,this.empty=!0,this.labels={},this.labelResolver=new St(vo,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=lo.M,this.nodesToExpandExist=!1}get isCurrentPageToc(){return"current-page"===this.scope}update(t){var e,i,o;super.update(t),t.has("toc")&&(this.nodesToExpandExist=(null!==(e=this.toc)&&void 0!==e?e:[]).some((t=>t.children.length>0))),t.has("labels")&&(this.labelResolver=new St(vo,this.labels)),t.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(null!==(i=this.highlightedTocIds)&&void 0!==i?i:[])),this.empty=0===(null!==(o=this.toc)&&void 0!==o?o:[]).length}render(){var t;const e={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===lo.S,"ft-reader-toc-desktop":this.viewportSize!==lo.S,"ft-reader-toc-loaded":null!=this.currentPage,"ft-reader-toc-expanded":this.expanded};return J`
|
|
771
771
|
${this.hideIfEmpty&&this.empty?J`
|
|
772
772
|
<style>
|
|
773
773
|
:host {
|
|
@@ -795,7 +795,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
795
795
|
${this.expandCollapseAllHideLabel?"":this.labelResolver.resolve(this.expandAll?"collapseAll":"expandAll")}
|
|
796
796
|
</ft-button>
|
|
797
797
|
</div>
|
|
798
|
-
`:Y}renderNode(t){var e,i,o;const n=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),s=t.children.length>0,
|
|
798
|
+
`:Y}renderNode(t){var e,i,o;const n=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),s=t.children.length>0,l=this.isCurrentPageToc?(null!==(o=null===(i=this.currentPage)||void 0===i?void 0:i.breadcrumb.length)&&void 0!==o?o:0)+1:0,a=t.depth-1-l,h={"padding-left":`calc( ${yo.tabulationSize} * ${a} + 4px)`};return J`
|
|
799
799
|
<div class="ft-reader-toc--node ${n?"ft-reader-toc--node-highlighted":""}">
|
|
800
800
|
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${Zt(h)}>
|
|
801
801
|
${this.nodesToExpandExist&&!this.expanded?J`
|
|
@@ -804,7 +804,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
804
804
|
<ft-button
|
|
805
805
|
part="expand-collapse-node"
|
|
806
806
|
round hideTooltip
|
|
807
|
-
?dense=${this.viewportSize!==
|
|
807
|
+
?dense=${this.viewportSize!==lo.S}
|
|
808
808
|
label="${this.labelResolver.resolve(r?"collapse":"expand",t.title)}"
|
|
809
809
|
iconVariant="${this.iconVariant}"
|
|
810
810
|
icon="${r?this.collapseIcon||"MINUS":this.expandIcon||"PLUS"}"
|
|
@@ -831,4 +831,4 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
831
831
|
</div>
|
|
832
832
|
`:Y}
|
|
833
833
|
</div>
|
|
834
|
-
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}go.elementDefinitions={"ft-button":ho,"ft-reader-internal-link":$i,"ft-size-watcher":uo,"ft-typography":bi},go.styles=xo,bo([o({type:Boolean})],go.prototype,"expanded",void 0),bo([o()],go.prototype,"iconVariant",void 0),bo([o()],go.prototype,"collapseIcon",void 0),bo([o()],go.prototype,"expandIcon",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAll",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllHideLabel",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllTrailingIcon",void 0),bo([o()],go.prototype,"expandCollapseAllAlignment",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllHideIcon",void 0),bo([o()],go.prototype,"expandCollapseAllIconVariant",void 0),bo([o()],go.prototype,"collapseAllIcon",void 0),bo([o()],go.prototype,"expandAllIcon",void 0),bo([o({type:Boolean})],go.prototype,"autoCollapse",void 0),bo([o()],go.prototype,"scope",void 0),bo([o({type:Boolean})],go.prototype,"hideIfEmpty",void 0),bo([o({type:Boolean,reflect:!0})],go.prototype,"empty",void 0),bo([
|
|
834
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}go.elementDefinitions={"ft-button":ho,"ft-reader-internal-link":$i,"ft-size-watcher":uo,"ft-typography":bi},go.styles=xo,bo([o({type:Boolean})],go.prototype,"expanded",void 0),bo([o()],go.prototype,"iconVariant",void 0),bo([o()],go.prototype,"collapseIcon",void 0),bo([o()],go.prototype,"expandIcon",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAll",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllHideLabel",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllTrailingIcon",void 0),bo([o()],go.prototype,"expandCollapseAllAlignment",void 0),bo([o({type:Boolean})],go.prototype,"expandCollapseAllHideIcon",void 0),bo([o()],go.prototype,"expandCollapseAllIconVariant",void 0),bo([o()],go.prototype,"collapseAllIcon",void 0),bo([o()],go.prototype,"expandAllIcon",void 0),bo([o({type:Boolean})],go.prototype,"autoCollapse",void 0),bo([o()],go.prototype,"scope",void 0),bo([o({type:Boolean})],go.prototype,"hideIfEmpty",void 0),bo([o({type:Boolean,reflect:!0})],go.prototype,"empty",void 0),bo([p({})],go.prototype,"labels",void 0),bo([Ct(((t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)?null===(o=t.currentPage)||void 0===o?void 0:o.toc:void 0:(null===(n=t.paginationConfiguration)||void 0===n?void 0:n.splitCurrentPageToc)?t.pagesToc:t.toc}))],go.prototype,"toc",void 0),bo([Ct((t=>{var e;return null===(e=t.paginationConfiguration)||void 0===e?void 0:e.splitCurrentPageToc}))],go.prototype,"splitToc",void 0),bo([Ct()],go.prototype,"currentPage",void 0),bo([Ct(((t,e)=>{var i,o;return(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)&&!e.isCurrentPageToc?[null===(o=t.currentPage)||void 0===o?void 0:o.rootTocId]:t.visibleTopics}))],go.prototype,"highlightedTocIds",void 0),bo([n({hasChanged:(t,e)=>!h(t,e)})],go.prototype,"automaticallyExpandedNodes",void 0),bo([n({hasChanged:(t,e)=>!h(t,e)})],go.prototype,"manuallyExpandedNodes",void 0),bo([n({hasChanged:(t,e)=>!h(t,e)})],go.prototype,"manuallyCollapsedNodes",void 0),bo([n()],go.prototype,"expandAll",void 0),bo([n()],go.prototype,"viewportSize",void 0),c("ft-reader-toc")(go),t.DEFAULT_LABELS=vo,t.FtReaderToc=go,t.FtReaderTocCssVariables=yo,t.styles=xo,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-toc",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.58",
|
|
4
4
|
"description": "Main table of content for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "0.3.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "0.3.
|
|
24
|
-
"@fluid-topics/ft-size-watcher": "0.3.
|
|
25
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "0.3.58",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "0.3.58",
|
|
24
|
+
"@fluid-topics/ft-size-watcher": "0.3.58",
|
|
25
|
+
"@fluid-topics/ft-typography": "0.3.58",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.58",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c053ee1216238ba6b2c62e5add329343f735c77e"
|
|
30
30
|
}
|