@fluid-topics/ft-search-facet 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-facet.light.js +33 -33
- package/build/ft-search-facet.min.js +258 -258
- package/package.json +8 -8
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2017 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/;var a;const h=window,c=h.trustedTypes,p=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,d="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,u="?"+f,v=`<${u}>`,b=document,g=()=>b.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,m="[ \t\n\f\r]",$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,I=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),E=new WeakMap,M=b.createTreeWalker(b,129,null,!1),L=(t,e)=>{const i=t.length-1,s=[];let o,n=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===$?"!--"===a[1]?r=w:void 0!==a[1]?r=k:void 0!==a[2]?(C.test(a[2])&&(o=RegExp("</"+a[2],"g")),r=S):void 0!==a[3]&&(r=S):r===S?">"===a[0]?(r=null!=o?o:$,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?S:'"'===a[3]?O:z):r===O||r===z?r=S:r===w||r===k?r=$:(r=S,o=void 0);const p=r===S&&t[e+1].startsWith("/>")?" ":"";n+=r===$?i+v:h>=0?(s.push(l),i.slice(0,h)+d+i.slice(h)+f+p):i+f+(-2===h?(s.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const r=t.length-1,l=this.parts,[a,h]=L(t,e);if(this.el=N.createElement(a,i),M.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=M.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(d)||e.startsWith(f)){const i=h[n++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+d).split(f),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?P:"@"===e[1]?_:R})}else l.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(C.test(s.tagName)){const t=s.textContent.split(f),e=t.length-1;if(e>0){s.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],g()),M.nextNode(),l.push({type:2,index:++o});s.append(t[e],g())}}}else if(8===s.nodeType)if(s.data===u)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(f,t+1));)l.push({type:7,index:o}),t+=f.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}}function A(t,e,i=t,s){var o,n,r,l;if(e===j)return e;let a=void 0!==s?null===(o=i._$Co)||void 0===o?void 0:o[s]:i._$Cl;const h=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,s)),void 0!==s?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=A(t,a._$AS(t,e.values),a,s)),e}class T{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:b).importNode(i,!0);M.currentNode=o;let n=M.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new F(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new
|
|
7
|
+
*/;var a;const h=window,c=h.trustedTypes,p=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,d="$lit$",f=`lit$${(Math.random()+"").slice(9)}$`,u="?"+f,v=`<${u}>`,b=document,g=()=>b.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,m="[ \t\n\f\r]",$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,I=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),E=new WeakMap,M=b.createTreeWalker(b,129,null,!1),L=(t,e)=>{const i=t.length-1,s=[];let o,n=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===$?"!--"===a[1]?r=w:void 0!==a[1]?r=k:void 0!==a[2]?(C.test(a[2])&&(o=RegExp("</"+a[2],"g")),r=S):void 0!==a[3]&&(r=S):r===S?">"===a[0]?(r=null!=o?o:$,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?S:'"'===a[3]?O:z):r===O||r===z?r=S:r===w||r===k?r=$:(r=S,o=void 0);const p=r===S&&t[e+1].startsWith("/>")?" ":"";n+=r===$?i+v:h>=0?(s.push(l),i.slice(0,h)+d+i.slice(h)+f+p):i+f+(-2===h?(s.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const r=t.length-1,l=this.parts,[a,h]=L(t,e);if(this.el=N.createElement(a,i),M.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=M.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(d)||e.startsWith(f)){const i=h[n++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+d).split(f),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?P:"@"===e[1]?_:R})}else l.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(C.test(s.tagName)){const t=s.textContent.split(f),e=t.length-1;if(e>0){s.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],g()),M.nextNode(),l.push({type:2,index:++o});s.append(t[e],g())}}}else if(8===s.nodeType)if(s.data===u)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(f,t+1));)l.push({type:7,index:o}),t+=f.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}}function A(t,e,i=t,s){var o,n,r,l;if(e===j)return e;let a=void 0!==s?null===(o=i._$Co)||void 0===o?void 0:o[s]:i._$Cl;const h=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,s)),void 0!==s?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=A(t,a._$AS(t,e.values),a,s)),e}class T{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:b).importNode(i,!0);M.currentNode=o;let n=M.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new F(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new H(n,this,t)),this._$AV.push(e),a=s[++l]}r!==(null==a?void 0:a.index)&&(n=M.nextNode(),r++)}return o}v(t){let e=0;for(const i of this._$AV)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,s){var o;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=A(this,t,e),x(t)?t===B||null==t||""===t?(this._$AH!==B&&this._$AR(),this._$AH=B):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>y(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==B&&x(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(i);else{const t=new T(o,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new N(t)),e}T(t){y(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new F(this.k(g()),this.k(g()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class R{constructor(t,e,i,s,o){this.type=1,this._$AH=B,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let n=!1;if(void 0===o)t=A(this,t,e,0),n=!x(t)||t!==this._$AH&&t!==j,n&&(this._$AH=t);else{const s=t;let r,l;for(t=o[0],r=0;r<o.length-1;r++)l=A(this,s[i+r],e,r),l===j&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===B?t=B:t!==B&&(t+=(null!=l?l:"")+o[r+1]),this._$AH[r]=l}n&&!s&&this.j(t)}j(t){t===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===B?void 0:t}}const U=c?c.emptyScript:"";class P extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==B?this.element.setAttribute(this.name,U):this.element.removeAttribute(this.name)}}class _ extends R{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=A(this,t,e,0))&&void 0!==i?i:B)===j)return;const s=this._$AH,o=t===B&&s!==B||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==B&&(s===B||o);o&&this.element.removeEventListener(this.name,this,s),n&&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 H{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){A(this,t)}}const V=h.litHtmlPolyfillSupport;null==V||V(N,F),(null!==(a=h.litHtmlVersions)&&void 0!==a?a:h.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const W=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},Z=t=>({_$litStatic$:t,r:W}),K=new Map,G=(t=>(e,...i)=>{const s=i.length;let o,n;const r=[],l=[];let a,h=0,c=!1;for(;h<s;){for(a=e[h];h<s&&void 0!==(n=i[h],o=q(n));)a+=o+e[++h],c=!0;h!==s&&l.push(n),r.push(a),h++}if(h===s&&r.push(e[s]),c){const t=r.join("$$lit$$");void 0===(e=K.get(t))&&(r.raw=r,K.set(t,e=r)),i=l}return t(e,...i)})(I);var Q;!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"}(Q||(Q={}));const X=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),J={fontFamily:Y,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")},tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),st=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),ct=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),St=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),zt=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),It=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),jt=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit"),Bt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit")},Et=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),Mt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),Lt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),Nt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),At=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),Tt=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),Rt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),Ut=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Pt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),_t=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Ht=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Vt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Wt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),qt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Kt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Gt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase")},Qt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${tt};
|
|
16
16
|
font-size: ${et};
|
|
@@ -19,7 +19,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
19
19
|
line-height: ${ot};
|
|
20
20
|
text-transform: ${nt};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Xt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${rt};
|
|
25
25
|
font-size: ${lt};
|
|
@@ -28,7 +28,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
28
28
|
line-height: ${ct};
|
|
29
29
|
text-transform: ${pt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Yt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${dt};
|
|
34
34
|
font-size: ${ft};
|
|
@@ -37,7 +37,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
37
37
|
line-height: ${bt};
|
|
38
38
|
text-transform: ${gt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Jt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${xt};
|
|
43
43
|
font-size: ${yt};
|
|
@@ -85,10 +85,10 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
85
85
|
}
|
|
86
86
|
`,oe=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
88
|
+
font-family: ${Ht};
|
|
89
|
+
font-size: ${Vt};
|
|
90
|
+
font-weight: ${Wt};
|
|
91
|
+
letter-spacing: ${qt};
|
|
92
92
|
line-height: ${Zt};
|
|
93
93
|
text-transform: ${Kt};
|
|
94
94
|
}
|
|
@@ -112,7 +112,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
112
112
|
</${Z(this.element)}>
|
|
113
113
|
`:G`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}ae.styles=[Qt,
|
|
115
|
+
`}}ae.styles=[Qt,Xt,Yt,Jt,te,ee,ie,se,oe,ne,re],le([s.property()],ae.prototype,"element",void 0),le([s.property()],ae.prototype,"variant",void 0),e.customElement("ft-typography")(ae);const he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ce={color:he,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),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"),borderRadius:e.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},pe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),de=pe,fe=e.FtCssVariableFactory.extend("--ft-ripple-background-color",pe),ue=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ve=ue,be=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ue),ge=i.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -219,7 +219,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
219
219
|
<div class="ft-ripple--background"></div>
|
|
220
220
|
<div class="ft-ripple--effect"></div>
|
|
221
221
|
</div>
|
|
222
|
-
`}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((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),s=e("touchend","touchcancel"),o=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",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),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",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),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 s,o;return null!=e.x?({x:s,y:o}=e):null!=i.touches&&(s=i.touches[0].clientX,o=i.touches[0].clientY),{x:s,y:o}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}ye.elementDefinitions={},ye.styles=ge,xe([s.property({type:Boolean})],ye.prototype,"primary",void 0),xe([s.property({type:Boolean})],ye.prototype,"secondary",void 0),xe([s.property({type:Boolean})],ye.prototype,"unbounded",void 0),xe([s.property({type:Boolean})],ye.prototype,"activated",void 0),xe([s.property({type:Boolean})],ye.prototype,"selected",void 0),xe([s.property({type:Boolean})],ye.prototype,"disabled",void 0),xe([s.state()],ye.prototype,"hovered",void 0),xe([s.state()],ye.prototype,"focused",void 0),xe([s.state()],ye.prototype,"pressed",void 0),xe([s.state()],ye.prototype,"rippling",void 0),xe([s.state()],ye.prototype,"rippleSize",void 0),xe([s.state()],ye.prototype,"originX",void 0),xe([s.state()],ye.prototype,"originY",void 0),xe([s.query(".ft-ripple")],ye.prototype,"ripple",void 0),xe([s.query(".ft-ripple--effect")],ye.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ye);const me=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),$e=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),we=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ke=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","
|
|
222
|
+
`}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((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),s=e("touchend","touchcancel"),o=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",s),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),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",s),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),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 s,o;return null!=e.x?({x:s,y:o}=e):null!=i.touches&&(s=i.touches[0].clientX,o=i.touches[0].clientY),{x:s,y:o}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}ye.elementDefinitions={},ye.styles=ge,xe([s.property({type:Boolean})],ye.prototype,"primary",void 0),xe([s.property({type:Boolean})],ye.prototype,"secondary",void 0),xe([s.property({type:Boolean})],ye.prototype,"unbounded",void 0),xe([s.property({type:Boolean})],ye.prototype,"activated",void 0),xe([s.property({type:Boolean})],ye.prototype,"selected",void 0),xe([s.property({type:Boolean})],ye.prototype,"disabled",void 0),xe([s.state()],ye.prototype,"hovered",void 0),xe([s.state()],ye.prototype,"focused",void 0),xe([s.state()],ye.prototype,"pressed",void 0),xe([s.state()],ye.prototype,"rippling",void 0),xe([s.state()],ye.prototype,"rippleSize",void 0),xe([s.state()],ye.prototype,"originX",void 0),xe([s.state()],ye.prototype,"originY",void 0),xe([s.query(".ft-ripple")],ye.prototype,"ripple",void 0),xe([s.query(".ft-ripple--effect")],ye.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ye);const me=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),$e=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),we=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ke=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),Se=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),ze=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Oe=i.css`
|
|
223
223
|
.ft-tooltip--container {
|
|
224
224
|
display: block;
|
|
225
225
|
}
|
|
@@ -266,7 +266,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
266
266
|
</div>
|
|
267
267
|
</div>
|
|
268
268
|
</div>
|
|
269
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,s=(t.offsetHeight-i)/2,o=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.validPosition){case"top":r=t.offsetTop-i,n=t.offsetLeft+o;break;case"bottom":r=t.offsetTop+t.offsetHeight,n=t.offsetLeft+o;break;case"left":r=t.offsetTop+s,n=t.offsetLeft-e;break;case"right":r=t.offsetTop+s,n=t.offsetLeft+t.offsetWidth}const l=this.tooltip.style;l.left=this.
|
|
269
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,s=(t.offsetHeight-i)/2,o=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,n=t.offsetLeft+o-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+o-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+s-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+s-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=n+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let h=-a.x,c=a.x+a.width-window.innerWidth;l.left=n+Math.round(this.correctOutOfWindowPixels(h,c))+"px";let p=-a.y,d=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(p,d))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${ze})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Ie.elementDefinitions={"ft-typography":ae},Ie.styles=Oe,Ce([s.property()],Ie.prototype,"text",void 0),Ce([s.property({type:Boolean})],Ie.prototype,"manual",void 0),Ce([s.property({type:Boolean})],Ie.prototype,"inline",void 0),Ce([s.property({type:Number})],Ie.prototype,"delay",void 0),Ce([s.property()],Ie.prototype,"position",void 0),Ce([s.queryAssignedNodes("",!0)],Ie.prototype,"slotNodes",void 0),Ce([s.query(".ft-tooltip--container")],Ie.prototype,"container",void 0),Ce([s.query(".ft-tooltip")],Ie.prototype,"tooltip",void 0),Ce([s.query(".ft-tooltip--content")],Ie.prototype,"tooltipContent",void 0),Ce([s.state()],Ie.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ie);const je={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Be=i.css`
|
|
270
270
|
:host {
|
|
271
271
|
line-height: 0;
|
|
272
272
|
}
|
|
@@ -395,7 +395,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
395
395
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
396
396
|
<slot ?hidden=${e}></slot>
|
|
397
397
|
</i>
|
|
398
|
-
`}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 s=this.value||this.textContent;switch(this.variant){case Te.file_format:this.resolvedIcon=null!==(t=Le[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case Te.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=Me[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Re.elementDefinitions={},Re.styles=Ae,Fe([s.property()],Re.prototype,"variant",void 0),Fe([s.property()],Re.prototype,"value",void 0),Fe([s.state()],Re.prototype,"resolvedIcon",void 0),Fe([s.query("slot")],Re.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Re);const De=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ue={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:De,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Gt.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",De),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Pe=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),_e={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Pe,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Pe)},
|
|
398
|
+
`}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 s=this.value||this.textContent;switch(this.variant){case Te.file_format:this.resolvedIcon=null!==(t=Le[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case Te.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=Me[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Re.elementDefinitions={},Re.styles=Ae,Fe([s.property()],Re.prototype,"variant",void 0),Fe([s.property()],Re.prototype,"value",void 0),Fe([s.state()],Re.prototype,"resolvedIcon",void 0),Fe([s.query("slot")],Re.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Re);const De=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ue={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:De,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Gt.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",De),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Pe=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),_e={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Pe,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Pe)},He=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),Ve=e.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),We=e.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),qe=e.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Ze=[i.css`
|
|
399
399
|
:host {
|
|
400
400
|
display: inline-block;
|
|
401
401
|
max-width: 100%;
|
|
@@ -453,13 +453,13 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
.ft-button.ft-button--dense {
|
|
456
|
-
padding: ${
|
|
457
|
-
border-radius: ${
|
|
458
|
-
gap: ${
|
|
456
|
+
padding: ${Ve} ${We};
|
|
457
|
+
border-radius: ${He};
|
|
458
|
+
gap: ${qe};
|
|
459
459
|
}
|
|
460
460
|
|
|
461
461
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
462
|
-
padding: calc(${
|
|
462
|
+
padding: calc(${Ve} - 1px) calc(${We} - 1px);
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
.ft-button:not([disabled]):hover {
|
|
@@ -471,7 +471,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
.ft-button--round.ft-button--dense {
|
|
474
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
474
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ve});
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
.ft-button[disabled] {
|
|
@@ -501,7 +501,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
.ft-button--dense .ft-button--label {
|
|
504
|
-
margin: 0 ${
|
|
504
|
+
margin: 0 ${qe};
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
.ft-button--label[hidden] {
|
|
@@ -519,8 +519,8 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
522
|
-
margin: 0 calc(${
|
|
523
|
-
padding: 0 ${
|
|
522
|
+
margin: 0 calc(${We} * -1);
|
|
523
|
+
padding: 0 ${Ve};
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -555,7 +555,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
555
555
|
</ft-tooltip>
|
|
556
556
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
557
557
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?i.html`
|
|
558
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.nothing}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}}Ge.elementDefinitions={"ft-ripple":ye,"ft-tooltip":Ie,"ft-typography":ae,"ft-icon":Re,"ft-loader":Ee},Ge.styles=[e.safariEllipsisFix,Ze],Ke([s.property({type:String,reflect:!0})],Ge.prototype,"role",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"primary",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"outlined",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"disabled",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"dense",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"round",void 0),Ke([s.property()],Ge.prototype,"label",void 0),Ke([s.property()],Ge.prototype,"icon",void 0),Ke([s.property()],Ge.prototype,"iconVariant",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"trailingIcon",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"loading",void 0),Ke([s.property()],Ge.prototype,"tooltipPosition",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"hideTooltip",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"forceTooltip",void 0),Ke([s.query(".ft-button")],Ge.prototype,"button",void 0),Ke([s.query(".ft-button--label slot")],Ge.prototype,"slottedContent",void 0),e.customElement("ft-button")(Ge);const Qe=e.FtCssVariableFactory.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),
|
|
558
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.nothing}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}}Ge.elementDefinitions={"ft-ripple":ye,"ft-tooltip":Ie,"ft-typography":ae,"ft-icon":Re,"ft-loader":Ee},Ge.styles=[e.safariEllipsisFix,Ze],Ke([s.property({type:String,reflect:!0})],Ge.prototype,"role",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"primary",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"outlined",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"disabled",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"dense",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"round",void 0),Ke([s.property()],Ge.prototype,"label",void 0),Ke([s.property()],Ge.prototype,"icon",void 0),Ke([s.property()],Ge.prototype,"iconVariant",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"trailingIcon",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"loading",void 0),Ke([s.property()],Ge.prototype,"tooltipPosition",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"hideTooltip",void 0),Ke([s.property({type:Boolean})],Ge.prototype,"forceTooltip",void 0),Ke([s.query(".ft-button")],Ge.prototype,"button",void 0),Ke([s.query(".ft-button--label slot")],Ge.prototype,"slottedContent",void 0),e.customElement("ft-button")(Ge);const Qe=e.FtCssVariableFactory.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),Xe=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Ye=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),Je=e.FtCssVariableFactory.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),ti=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),ei=i.css`
|
|
559
559
|
* {
|
|
560
560
|
box-sizing: border-box;
|
|
561
561
|
}
|
|
@@ -594,20 +594,20 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
594
594
|
|
|
595
595
|
.ft-checkbox--box {
|
|
596
596
|
display: flex;
|
|
597
|
-
border: 2px solid ${
|
|
597
|
+
border: 2px solid ${Je};
|
|
598
598
|
border-radius: 2px;
|
|
599
599
|
|
|
600
600
|
width: 18px;
|
|
601
601
|
height: 18px;
|
|
602
602
|
|
|
603
|
-
color: ${
|
|
603
|
+
color: ${Ye};
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
|
|
607
607
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
608
608
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
609
|
-
border-color: ${
|
|
610
|
-
background-color: ${
|
|
609
|
+
border-color: ${Xe};
|
|
610
|
+
background-color: ${Xe};
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
@@ -1073,7 +1073,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
1073
1073
|
flex-shrink: 0;
|
|
1074
1074
|
padding: 0 10px;
|
|
1075
1075
|
margin-bottom: 8px;
|
|
1076
|
-
${e.setVariable(
|
|
1076
|
+
${e.setVariable(J.fontSize,"14px")};
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
.ft-filter--header ft-button {
|
|
@@ -1087,8 +1087,8 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
1087
1087
|
flex-shrink: 1;
|
|
1088
1088
|
flex-grow: 1;
|
|
1089
1089
|
word-break: break-word;
|
|
1090
|
-
${e.setVariable(
|
|
1091
|
-
${e.setVariable(
|
|
1090
|
+
${e.setVariable(J.lineHeight,"22px")};
|
|
1091
|
+
${e.setVariable(J.fontWeight,"bold")};
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
1094
|
.ft-filter--filter {
|
|
@@ -1237,14 +1237,14 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
|
|
|
1237
1237
|
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const s=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(s)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(s):this.options.forEach(s),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;e.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new Li(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Ni.elementDefinitions={"ft-button":Ge,"ft-filter-level":xi,"ft-snap-scroll":ki,"ft-typography":ae},Ni.styles=Ei,Mi([s.property({type:String})],Ni.prototype,"id",void 0),Mi([s.property({type:String})],Ni.prototype,"label",void 0),Mi([s.property({type:String})],Ni.prototype,"filterPlaceHolder",void 0),Mi([s.property({type:String})],Ni.prototype,"clearButtonLabel",void 0),Mi([s.property({type:String})],Ni.prototype,"moreValuesButtonLabel",void 0),Mi([s.property({type:String})],Ni.prototype,"noValuesLabel",void 0),Mi([e.jsonProperty([])],Ni.prototype,"options",void 0),Mi([s.property({type:Boolean})],Ni.prototype,"multivalued",void 0),Mi([s.property({type:Boolean})],Ni.prototype,"disabled",void 0),Mi([s.property({type:Boolean})],Ni.prototype,"raiseSelectedOptions",void 0),Mi([s.property({type:Number})],Ni.prototype,"displayedValuesLimit",void 0),Mi([s.property({type:Boolean})],Ni.prototype,"hideClearButton",void 0),Mi([s.query(".ft-filter--slot")],Ni.prototype,"slotElement",void 0),Mi([s.query(".ft-filter--container")],Ni.prototype,"container",void 0),Mi([s.query(".ft-filter--values")],Ni.prototype,"valuesContainer",void 0),Mi([s.query(".ft-filter--levels")],Ni.prototype,"levelsContainer",void 0),Mi([s.state()],Ni.prototype,"lastLevelHasHiddenvalues",void 0),Mi([s.query(".ft-filter--filter input")],Ni.prototype,"filterInput",void 0),Mi([s.queryAll(".ft-filter--levels ft-filter-level")],Ni.prototype,"levels",void 0),Mi([s.state()],Ni.prototype,"withScroll",void 0),Mi([s.state()],Ni.prototype,"filter",void 0),Mi([s.state()],Ni.prototype,"slideIn",void 0),Mi([s.state()],Ni.prototype,"slideOut",void 0);var Ai=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ti extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return i.html`
|
|
1238
1238
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1239
1239
|
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ti.elementDefinitions={},Ai([s.property({type:String})],Ti.prototype,"label",void 0),Ai([s.property({type:Object,converter:t=>t})],Ti.prototype,"value",void 0),Ai([s.property({type:Boolean,reflect:!0})],Ti.prototype,"selected",void 0),Ai([s.property({type:Object})],Ti.prototype,"subOptions",void 0),Ai([e.jsonProperty({})],Ti.prototype,"renderOption",void 0),Ai([s.query(".ft-filter-option--slot")],Ti.prototype,"slotElement",void 0),e.customElement("ft-filter")(Ni),e.customElement("ft-filter-option")(Ti);const Fi={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},Ri=i.css`
|
|
1240
|
-
`,Di=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ui{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Di.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?Ui.build(t):null!==(e=Ui.API)&&void 0!==e?e:Ui.API=Ui.build()}static await(t){return new Promise((e=>{let i=Ui.get(t);if(i)e(i);else{const s=Di.subscribe((()=>{i=Ui.get(t),i&&(s(),e(i))}))}}))}}var Pi;const _i=Symbol("clearAfterUnitTest");class
|
|
1240
|
+
`,Di=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ui{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Di.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?Ui.build(t):null!==(e=Ui.API)&&void 0!==e?e:Ui.API=Ui.build()}static await(t){return new Promise((e=>{let i=Ui.get(t);if(i)e(i);else{const s=Di.subscribe((()=>{i=Ui.get(t),i&&(s(),e(i))}))}}))}}var Pi;const _i=Symbol("clearAfterUnitTest");class Hi{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[Pi]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=Di.getState().uiLocale,Di.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Di.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,r;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},l).resolve(i,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}Pi=_i,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Hi((async(t,e)=>(await Ui.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Hi((async(t,e)=>(await Ui.await()).getCustomMessageContext(t,e))));const Vi=window.FluidTopicsI18nService,Wi=window.FluidTopicsCustomI18nService;var qi=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Zi extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ui.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
|
|
1241
1241
|
<slot></slot>
|
|
1242
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&Di.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Di.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Di.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Di.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Di.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Di.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Di.actions.setSession(this.session),t.has("availableUiLocales")&&Di.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>
|
|
1243
|
-
`;var os=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ns=Symbol("i18nProperties"),rs=Symbol("i18nUnsubs");function ls(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?
|
|
1242
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Di.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Di.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Di.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Di.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Di.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Di.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Di.actions.setSession(this.session),t.has("availableUiLocales")&&Di.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Vi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Zi.elementDefinitions={},Zi.styles=Ri,qi([s.property()],Zi.prototype,"baseUrl",void 0),qi([s.property()],Zi.prototype,"apiIntegrationIdentifier",void 0),qi([s.property()],Zi.prototype,"uiLocale",void 0),qi([e.jsonProperty([])],Zi.prototype,"availableUiLocales",void 0),qi([s.property({type:Boolean})],Zi.prototype,"editorMode",void 0),qi([s.property({type:Boolean})],Zi.prototype,"noCustom",void 0),qi([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Zi.prototype,"noCustomComponent",void 0),qi([s.property({type:Boolean})],Zi.prototype,"withManualResources",void 0),qi([e.jsonProperty([])],Zi.prototype,"messageContexts",void 0),qi([e.jsonProperty(void 0)],Zi.prototype,"session",void 0),qi([s.property({type:Object})],Zi.prototype,"apiProvider",void 0),e.customElement("ft-app-context")(Zi);class Ki{static async build(){return new Ki(await Ui.await())}constructor(t){this.api=t,this.cache=new e.CacheRegistry,this.cache.registerFinal("available-locales",(()=>this.api.getAvailableSearchLocales()))}async launchSearch(t){return this.api.search(t)}async launchSuggest(t){return this.api.getSuggestions(t)}async getAvailableSearchLocales(){return this.cache.get("available-locales")}}class Gi extends Event{constructor(){super(Gi.eventName)}}Gi.eventName="search-context-clear-all-filters";class Qi{static build(t){return new Qi((t=>e.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Fi}))(t.trim()||"context"),Ki.build)}constructor(t,i){this.store=t,this.serviceProvider=i,this.searchDebouncer=new e.Debouncer(100),this.suggestDebouncer=new e.Debouncer(300)}async initService(){return this.service=await this.serviceProvider(),this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales),this.launchSearch()}async awaitService(){for(;null==this.service;)await e.delay(5);return this.service}setQuery(t){this.store.actions.setRequestQuery(t),this.store.actions.setLiveQuery(t),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(t){let e=this.store.getState().locales,i=this.store.getState().request.contentLocale;if(t!=i){if(e){const s=t=>e.some((e=>e.lang==t));s(t)||(t=s(i)?i:e[0].lang)}this.store.actions.setRequestContentLocale(t),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return t}setPageSize(t){this.store.actions.setPageSize(t),this.launchSearch()}setPageNumber(t){this.store.actions.setPageNumber(t),this.launchSearch()}setSort(t){this.store.actions.setRequestSort(t),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(t){const e=t.filter((t=>t.values.length>0));this.store.actions.setRequestFilters(e),this.store.actions.setPageNumber(1),e.forEach((t=>{this.facetIds.includes(t.key)||(this.facetIds=[...this.facetIds,t.key])})),this.launchSearch()}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Gi)}addFacet(t){this.facetIds=[...this.facetIds,t],this.launchSearch()}replaceFacet(t,e){let i=this.facetIds.filter((e=>e!=t));e&&i.push(e),this.facetIds=i,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map((t=>t.id))}set facetIds(t){let e=[...new Set(t)].map((t=>({id:t})));this.store.actions.setRequestFacets(e)}setFilter(t,e){let i=this.store.getState().request.filters,s={key:t,values:e,negative:!1},o=[...i.filter((e=>e.key!==t)),s];this.setFilters(o)}setLiveQuery(t){this.store.actions.setLiveQuery(t),this.launchSuggest()}setRequest(t){this.store.actions.setRequest(t),this.store.actions.setLiveQuery(t.query),this.store.actions.setPageNumber(1),this.launchSearch()}async launchSearch(){return await this.awaitService(),this.searchDebouncer.run((()=>this.fetchSearchData()))}async launchSuggest(){await this.awaitService(),this.suggestDebouncer.run((()=>this.fetchSuggestData()))}async fetchSearchData(){var t,i;try{null===(t=this.cancelableSearch)||void 0===t||t.cancel(),this.cancelableSearch=e.cancelable(this.service.launchSearch(this.store.getState().request));const s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.setResults(s.results),this.store.actions.setFacets(s.facets),this.store.actions.setSpellcheck(s.spellcheck);else{let t=(null!==(i=this.store.getState().results)&&void 0!==i?i:[]).concat(s.results);this.store.actions.setResults(t)}this.store.actions.setPaging(s.paging)}catch(t){t instanceof e.CanceledPromiseError||!this.errorHandler||this.errorHandler(t)}}async fetchSuggestData(){var t;try{let i={input:this.store.getState().liveQuery,filters:this.store.getState().request.filters,sort:this.store.getState().request.sort,contentLocale:this.store.getState().request.contentLocale};null===(t=this.cancelableSuggest)||void 0===t||t.cancel(),this.cancelableSuggest=e.cancelable(this.service.launchSuggest(i));let s=await this.cancelableSuggest;this.store.actions.setSuggestResults(s.suggestions)}catch(t){t instanceof e.CanceledPromiseError||!this.errorHandler||this.errorHandler(t)}}}var Xi=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Yi extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const Ji=Symbol("registerInterval");class ts extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ji]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Ji]):this.dispatchEvent(new Yi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ji,Xi([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}function es(t){return t.rootNodes.map((t=>is(t)))}function is(t){return{label:t.label,value:t.value,selected:t.selected,subOptions:t.childNodes.map((t=>is(t)))}}const ss=i.css`
|
|
1243
|
+
`;var os=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ns=Symbol("i18nProperties"),rs=Symbol("i18nUnsubs");function ls(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Wi:Vi}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[ns])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[ns])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ns]&&new Set([...this[ns].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[rs].has(t)||this[rs].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[rs].forEach((t=>t())),this[rs].clear()}}return e=rs,os([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class as extends(ls(e.FtLitElement)){}class hs extends(ls(e.FtLitElementRedux)){}var cs=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ps extends hs{constructor(){super(),this.editorMode=!1,this.addStore(Di)}render(){return this.key&&this.context?i.html`
|
|
1244
1244
|
<span class="ft-i18n">
|
|
1245
1245
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1246
1246
|
</span>
|
|
1247
|
-
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}ps.elementDefinitions={},ps.styles=ss,cs([e.redux()],ps.prototype,"editorMode",void 0),cs([s.property()],ps.prototype,"context",void 0),cs([s.property()],ps.prototype,"key",void 0),cs([e.jsonProperty([])],ps.prototype,"args",void 0),cs([s.property()],ps.prototype,"defaultMessage",void 0);class ds{static build(t){return new ds(t)}static fromGwt(t){return new ds(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>
|
|
1247
|
+
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}ps.elementDefinitions={},ps.styles=ss,cs([e.redux()],ps.prototype,"editorMode",void 0),cs([s.property()],ps.prototype,"context",void 0),cs([s.property()],ps.prototype,"key",void 0),cs([e.jsonProperty([])],ps.prototype,"args",void 0),cs([s.property()],ps.prototype,"defaultMessage",void 0);class ds{static build(t){return new ds(t)}static fromGwt(t){return new ds(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>Vi.resolveMessage(this.name,e,...t)})}}e.customElement("ft-i18n")(ps);const fs=ds.build("designedSearchFacet"),us=i.css`
|
|
1248
1248
|
`;class vs{async listMySearches(){var t;return(null===(t=Di.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Ui.await()).listMySearches(Di.getState().session.profile.userId):[]}}const bs=e.FtReduxStore.get({name:"ft-user-assets",reducers:{setSavedSearches:(t,e)=>{t.savedSearches=e.payload}},initialState:{savedSearches:void 0}});const gs=new class{clear(){this.clearMySearches()}clearMySearches(){bs.actions.setSavedSearches(void 0)}async reloadMySearches(){const t=new vs,e=await t.listMySearches();bs.actions.setSavedSearches(e)}};var xs=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ys extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class ms extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class $s extends CustomEvent{constructor(t,e,i){super("ft-search-results-change",{detail:{request:t,paging:e,spellcheck:i}})}}class ws extends e.FtLitElementRedux{get stateManager(){return null==this._stateManager&&(this._stateManager=Qi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")),this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.filters=[],this.sort=[],this.addStore(Di)}render(){return i.html`
|
|
1249
1249
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
1250
1250
|
`}updated(t){super.updated(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("session")&&this.session&&(this.stateManager.initService(),this.session.sessionAuthenticated||gs.clear()),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new ms(this.request)),t.has("paging")&&void 0!==this.paging&&this.dispatchEvent(new $s(this.request,this.paging,this.autocorrect))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setSearchStateManager(this.stateManager)}handleLoadError(t){this.dispatchEvent(new ys(t))}reloadSavedSearches(){gs.clearMySearches()}}ws.elementDefinitions={},ws.styles=us,xs([s.property()],ws.prototype,"query",void 0),xs([s.property()],ws.prototype,"contentLocale",void 0),xs([s.property({type:Number})],ws.prototype,"pageSize",void 0),xs([e.jsonProperty([])],ws.prototype,"filters",void 0),xs([e.jsonProperty([])],ws.prototype,"sort",void 0),xs([e.redux({store:"search"})],ws.prototype,"request",void 0),xs([e.redux({store:"search"})],ws.prototype,"paging",void 0),xs([e.redux({store:"search",selector:t=>t.spellcheck})],ws.prototype,"autocorrect",void 0),xs([e.redux({store:Di.name})],ws.prototype,"session",void 0),e.customElement("ft-search-context")(ws);var ks=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ss extends(ls(ts)){constructor(){super(...arguments),this.facetId="",this.maxValues=7,this.raiseSelectedOptions=!1}setSearchStateManager(t){super.setSearchStateManager(t),this.facetId&&t.addFacet(this.facetId),this.addI18nContext(fs),this.addStore(Di)}render(){var t;let e=null===(t=this.facets)||void 0===t?void 0:t.find((t=>t.key==this.facetId));return e?i.html`
|