@fluid-topics/ft-search-bar 0.1.3 → 0.1.7
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-bar.css.d.ts +24 -0
- package/build/ft-search-bar.css.js +384 -0
- package/build/ft-search-bar.d.ts +29 -29
- package/build/ft-search-bar.js +321 -558
- package/build/ft-search-bar.light.js +2400 -0
- package/build/ft-search-bar.min.js +1610 -59
- package/package.json +13 -13
|
@@ -15,13 +15,13 @@ const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad
|
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:b}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,
|
|
18
|
+
var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:b}),(null!==(l=globalThis.reactiveElementVersions)&&void 0!==l?l:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,x=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,y=`lit$${(Math.random()+"").slice(9)}$`,k="?"+y,w=`<${k}>`,$=document,_=(t="")=>$.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,z=t=>{var e;return O(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,R=/>/g,B=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,F=/'/g,T=/"/g,N=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),M=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),L=new WeakMap,D=$.createTreeWalker($,129,null,!1),I=(t,e)=>{const i=t.length-1,r=[];let o,n=2===e?"<svg>":"",a=C;for(let e=0;e<i;e++){const i=t[e];let c,s,l=-1,d=0;for(;d<i.length&&(a.lastIndex=d,s=a.exec(i),null!==s);)d=a.lastIndex,a===C?"!--"===s[1]?a=E:void 0!==s[1]?a=R:void 0!==s[2]?(N.test(s[2])&&(o=RegExp("</"+s[2],"g")),a=B):void 0!==s[3]&&(a=B):a===B?">"===s[0]?(a=null!=o?o:C,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,c=s[1],a=void 0===s[3]?B:'"'===s[3]?T:F):a===T||a===F?a=B:a===E||a===R?a=C:(a=B,o=void 0);const p=a===B&&t[e+1].startsWith("/>")?" ":"";n+=a===C?i+w:l>=0?(r.push(c),i.slice(0,l)+"$lit$"+i.slice(l)+y+p):i+y+(-2===l?(r.push(void 0),e):p)}const c=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(c):c,r]};class U{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,n=0;const a=t.length-1,c=this.parts,[s,l]=I(t,e);if(this.el=U.createElement(s,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=D.nextNode())&&c.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(y)){const i=l[n++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(y),e=/([.?@])?(.*)/.exec(i);c.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?W:"?"===e[1]?q:"@"===e[1]?G:Z})}else c.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(N.test(r.tagName)){const t=r.textContent.split(y),e=t.length-1;if(e>0){r.textContent=g?g.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],_()),D.nextNode(),c.push({type:2,index:++o});r.append(t[e],_())}}}else if(8===r.nodeType)if(r.data===k)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(y,t+1));)c.push({type:7,index:o}),t+=y.length-1}o++}}static createElement(t,e){const i=$.createElement("template");return i.innerHTML=t,i}}function P(t,e,i=t,r){var o,n,a,c;if(e===M)return e;let s=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const l=S(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null===(n=null==s?void 0:s._$AO)||void 0===n||n.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,i,r)),void 0!==r?(null!==(a=(c=i)._$Cl)&&void 0!==a?a:c._$Cl=[])[r]=s:i._$Cu=s),void 0!==s&&(e=P(t,s._$AS(t,e.values),s,r)),e}class H{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:$).importNode(i,!0);D.currentNode=o;let n=D.nextNode(),a=0,c=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new V(n,n.nextSibling,this,t):1===s.type?e=new s.ctor(n,s.name,s.strings,this,t):6===s.type&&(e=new X(n,this,t)),this.v.push(e),s=r[++c]}a!==(null==s?void 0:s.index)&&(n=D.nextNode(),a++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class V{constructor(t,e,i,r){var o;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.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._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),S(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==M&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):z(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&S(this._$AH)?this._$AA.nextSibling.data=t:this.S($.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=U.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new H(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new U(t)),e}A(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new V(this.M(_()),this.M(_()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,i,r,o){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,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,r){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,e,0),n=!S(t)||t!==this._$AH&&t!==M,n&&(this._$AH=t);else{const r=t;let a,c;for(t=o[0],a=0;a<o.length-1;a++)c=P(this,r[i+a],e,a),c===M&&(c=this._$AH[a]),n||(n=!S(c)||c!==this._$AH[a]),c===j?t=j:t!==j&&(t+=(null!=c?c:"")+o[a+1]),this._$AH[a]=c}n&&!r&&this.k(t)}k(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends Z{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===j?void 0:t}}const K=g?g.emptyScript:"";class q extends Z{constructor(){super(...arguments),this.type=4}k(t){t&&t!==j?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class G extends Z{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=P(this,t,e,0))&&void 0!==i?i:j)===M)return;const r=this._$AH,o=t===j&&r!==j||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==j&&(r===j||o);o&&this.element.removeEventListener(this.name,this,r),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 X{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){P(this,t)}}const J={P:"$lit$",V:y,L:k,I:1,N:I,R:H,D:z,j:P,H:V,O:Z,F:q,B:G,W,Z:X},Y=window.litHtmlPolyfillSupport;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var Q,tt;null==Y||Y(U,V),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.1.3");class et extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var r,o;const n=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let a=n._$litPart$;if(void 0===a){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;n._$litPart$=a=new V(e.insertBefore(_(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return
|
|
24
|
+
var Q,tt;null==Y||Y(U,V),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.1.3");class et extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var r,o;const n=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let a=n._$litPart$;if(void 0===a){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;n._$litPart$=a=new V(e.insertBefore(_(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return M}}et.finalized=!0,et._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:et});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:et}),(null!==(tt=globalThis.litElementVersions)&&void 0!==tt?tt:globalThis.litElementVersions=[]).push("3.1.2");
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
@@ -84,23 +84,60 @@ function ft(t,e,i){let r,o=t;return"object"==typeof t?(o=t.slot,r=t):r={flatten:
|
|
|
84
84
|
* @license
|
|
85
85
|
* Copyright 2020 Google LLC
|
|
86
86
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
|
-
*/const{H:gt}=J,
|
|
87
|
+
*/const{H:gt}=J,xt=()=>document.createComment(""),yt=(t,e,i)=>{var r;const o=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(xt(),n),r=o.insertBefore(xt(),n);i=new gt(e,r,t,t.options)}else{const e=i._$AB.nextSibling,a=i._$AM,c=a!==t;if(c){let e;null===(r=i._$AQ)||void 0===r||r.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==a._$AU&&i._$AP(e)}if(e!==n||c){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,n),t=e}}}return i},kt=(t,e,i=t)=>(t._$AI(e,i),t),wt={},$t=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const r=t._$AB.nextSibling;for(;i!==r;){const t=i.nextSibling;i.remove(),i=t}},_t=(t,e,i)=>{const r=new Map;for(let o=e;o<=i;o++)r.set(t[o],o);return r},St=bt(class extends vt{constructor(t){if(super(t),t.type!==mt)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let r;void 0===i?i=e:void 0!==e&&(r=e);const o=[],n=[];let a=0;for(const e of t)o[a]=r?r(e,a):a,n[a]=i(e,a),a++;return{values:n,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,r]){var o;const n=(t=>t._$AH)(t),{values:a,keys:c}=this.dt(e,i,r);if(!Array.isArray(n))return this.at=c,a;const s=null!==(o=this.at)&&void 0!==o?o:this.at=[],l=[];let d,p,h=0,f=n.length-1,u=0,m=a.length-1;for(;h<=f&&u<=m;)if(null===n[h])h++;else if(null===n[f])f--;else if(s[h]===c[u])l[u]=kt(n[h],a[u]),h++,u++;else if(s[f]===c[m])l[m]=kt(n[f],a[m]),f--,m--;else if(s[h]===c[m])l[m]=kt(n[h],a[m]),yt(t,l[m+1],n[h]),h++,m--;else if(s[f]===c[u])l[u]=kt(n[f],a[u]),yt(t,n[h],n[f]),f--,u++;else if(void 0===d&&(d=_t(c,u,m),p=_t(s,h,f)),d.has(s[h]))if(d.has(s[f])){const e=p.get(c[u]),i=void 0!==e?n[e]:null;if(null===i){const e=yt(t,n[h]);kt(e,a[u]),l[u]=e}else l[u]=kt(i,a[u]),yt(t,n[h],i),n[e]=null;u++}else $t(n[f]),f--;else $t(n[h]),h++;for(;u<=m;){const e=yt(t,l[m+1]);kt(e,a[u]),l[u++]=e}for(;h<=f;){const t=n[h++];null!==t&&$t(t)}return this.at=c,((t,e=wt)=>{t._$AH=e})(t,l),M}}),Ot=bt(class extends vt{constructor(t){var e;if(super(t),t.type!==ut||"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,r;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const o=t.element.classList;this.st.forEach((t=>{t in e||(o.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(r=this.et)||void 0===r?void 0:r.has(t))||(i?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return M}});
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2017 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,r=[];!(i=t.next()).done;)r.push(i.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var o,n=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),a=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,i,r){return e=t(e,i),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=r(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var c;t:{var s={};try{s.__proto__={a:!0},c=s.a;break t}catch(t){}c=!1}o=c?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var l=o;if(!ShadowRoot.prototype.createElement){var d,p=window.HTMLElement,h=window.customElements.define,f=window.customElements.get,u=window.customElements,m=new WeakMap,b=new WeakMap,v=new WeakMap,g=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,i){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=i.prototype.attributeChangedCallback,o=new Set(i.observedAttributes||[]);if(x(i,o,r),r={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,r),this.o.set(i,r),(o=f.call(u,t))||(o=y(t),h.call(u,t,o)),this===window.customElements&&(v.set(i,r),r.s=o),o=this.h.get(t)){this.h.delete(t);for(var n=(o=e(o)).next();!n.done;n=o.next())n=n.value,b.delete(n),w(n,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){_.push(this),u.upgrade.apply(u,arguments),_.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var r=this.h.get(e);r||this.h.set(e,r=new Set),i?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=d;if(t)return d=void 0,t;var e=v.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(p,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),m.set(t,e),t},window.HTMLElement.prototype=p.prototype;var y=function(t){function e(){var e=Reflect.construct(p,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=_[_.length-1])instanceof CustomElementRegistry){var r=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(r=g.get(i))?void 0:r.getRootNode())||document)}r=i.customElements}return(i=(r=r||window.customElements).j(t))?w(e,i):b.set(e,r),e}return n.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=m.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=m.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=m.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=m.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},x=function(t,e,i){if(0!==e.size&&void 0!==i){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),e.has(t)){var n=this.getAttribute(t);r.call(this,t,o),i.call(this,t,n,o)}else r.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);o.call(this,t),i.call(this,t,r,null)}else o.call(this,t)})}},k=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===p?Object.setPrototypeOf(t,window.HTMLElement):k(e)},w=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),m.set(t,e),d=t;try{new e.g}catch(t){k(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},$=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=$.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var _=[document],S=function(t,e,i){var r=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){_.push(this);var t=r.apply(i||this,arguments);return void 0!==t&&g.set(t,this),_.pop(),t}};S(ShadowRoot,"createElement",document),S(ShadowRoot,"importNode",document),S(Element,"insertAdjacentHTML");var O=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){_.push(this),e.set.call(this,t),_.pop()}}))};if(O(Element),O(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var z=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=C.call.apply(C,[this].concat(i(e))),z.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],o=0;o<arguments.length;++o)e[o]=arguments[o];if(o=z.get(this),!0!==m.get(o).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(i(e)))}}));var E=function(t){var e=a(Array,[].concat(i(t)),this.constructor);return e.h=t,e},R=E,B=Array;if(R.prototype=r(B.prototype),R.prototype.constructor=R,l)l(R,B);else for(var F in B)if("prototype"!=F)if(Object.defineProperties){var T=Object.getOwnPropertyDescriptor(B,F);T&&Object.defineProperty(R,F,T)}else R[F]=B[F];R.u=B.prototype,n.Object.defineProperty(E.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var A=function(t){var e=this,i=new Map;t.forEach((function(t,r){var o=t.getAttribute("name"),n=i.get(o)||[];e[+r]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new E(t))}))};A.prototype.namedItem=function(t){return this[t]};var N=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=N.get.call(this,[]),i=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var o=m.get(r);o&&!0!==o.formAssociated||i.push(r)}return new A(i)}})}}}).call(self);try{window.customElements.define("custom-element",null)}catch(Ar){const t=window.customElements.define;window.customElements.define=(e,i,r)=>{try{t.bind(window.customElements)(e,i,r)}catch(t){console.warn(e,i,r,t)}}}class zt{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}const Ct=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Et(t,e){const i=()=>JSON.parse(JSON.stringify(t));return nt({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}class Rt{constructor(t,e,i,r,o){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=r,this.context=o,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new Rt(t,e,void 0,i)}static extend(t,e,i){return new Rt(t,e.category,e,i)}static external(t,e){return new Rt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return a`var(${n(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):n(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function Bt(t,e){return n(`${t.name}: ${e}`)}const Ft={colorPrimary:Rt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Rt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Rt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Rt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Rt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Rt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Rt.create("--ft-color-error","COLOR","#B00020"),colorOutline:Rt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Rt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Rt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Rt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Rt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Rt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Rt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Rt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Rt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Rt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Rt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Rt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Rt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Rt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Rt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Rt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Rt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Rt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Rt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Rt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Rt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Rt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Rt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Rt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Rt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Rt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Rt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Rt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Rt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Rt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Rt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Rt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Rt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Rt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Rt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Rt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Rt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Rt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Rt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Rt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Rt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Rt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Rt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Rt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Rt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Rt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Rt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Rt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Rt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Rt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Rt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Rt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Rt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Rt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Rt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
92
|
+
*/(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}function i(t){if(!(t instanceof Array)){t=e(t);for(var i,r=[];!(i=t.next()).done;)r.push(i.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var o,n=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var i=t[e];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this),a=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,i,r){return e=t(e,i),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,i){return void 0===i&&(i=t),i=r(i.prototype||Object.prototype),Function.prototype.apply.call(t,i,e)||i}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var c;t:{var s={};try{s.__proto__={a:!0},c=s.a;break t}catch(t){}c=!1}o=c?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var l=o;if(!ShadowRoot.prototype.createElement){var d,p=window.HTMLElement,h=window.customElements.define,f=window.customElements.get,u=window.customElements,m=new WeakMap,b=new WeakMap,v=new WeakMap,g=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,i){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=i.prototype.attributeChangedCallback,o=new Set(i.observedAttributes||[]);if(y(i,o,r),r={g:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,r),this.o.set(i,r),(o=f.call(u,t))||(o=x(t),h.call(u,t,o)),this===window.customElements&&(v.set(i,r),r.s=o),o=this.h.get(t)){this.h.delete(t);for(var n=(o=e(o)).next();!n.done;n=o.next())n=n.value,b.delete(n),w(n,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(i),this.i.delete(t)),i},window.CustomElementRegistry.prototype.upgrade=function(){_.push(this),u.upgrade.apply(u,arguments),_.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var i=this.i.get(t);return void 0===i&&((i={}).promise=new Promise((function(t){return i.resolve=t})),this.i.set(t,i)),i.promise},window.CustomElementRegistry.prototype.m=function(t,e,i){var r=this.h.get(e);r||this.h.set(e,r=new Set),i?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=d;if(t)return d=void 0,t;var e=v.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(p,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),m.set(t,e),t},window.HTMLElement.prototype=p.prototype;var x=function(t){function e(){var e=Reflect.construct(p,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var i=e.getRootNode();if(!(i===document||i instanceof ShadowRoot)){if((i=_[_.length-1])instanceof CustomElementRegistry){var r=i;break t}(i=i.getRootNode())===document||i instanceof ShadowRoot||(i=(null==(r=g.get(i))?void 0:r.getRootNode())||document)}r=i.customElements}return(i=(r=r||window.customElements).j(t))?w(e,i):b.set(e,r),e}return n.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=m.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=m.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=m.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=m.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=m.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},y=function(t,e,i){if(0!==e.size&&void 0!==i){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),e.has(t)){var n=this.getAttribute(t);r.call(this,t,o),i.call(this,t,n,o)}else r.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);o.call(this,t),i.call(this,t,r,null)}else o.call(this,t)})}},k=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===p?Object.setPrototypeOf(t,window.HTMLElement):k(e)},w=function(t,e,i){i=void 0!==i&&i,Object.setPrototypeOf(t,e.g.prototype),m.set(t,e),d=t;try{new e.g}catch(t){k(e.g),new e.g}e.observedAttributes.forEach((function(i){t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},$=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=$.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var _=[document],S=function(t,e,i){var r=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){_.push(this);var t=r.apply(i||this,arguments);return void 0!==t&&g.set(t,this),_.pop(),t}};S(ShadowRoot,"createElement",document),S(ShadowRoot,"importNode",document),S(Element,"insertAdjacentHTML");var O=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){_.push(this),e.set.call(this,t),_.pop()}}))};if(O(Element),O(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var z=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=C.call.apply(C,[this].concat(i(e))),z.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],o=0;o<arguments.length;++o)e[o]=arguments[o];if(o=z.get(this),!0!==m.get(o).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(i(e)))}}));var E=function(t){var e=a(Array,[].concat(i(t)),this.constructor);return e.h=t,e},R=E,B=Array;if(R.prototype=r(B.prototype),R.prototype.constructor=R,l)l(R,B);else for(var F in B)if("prototype"!=F)if(Object.defineProperties){var T=Object.getOwnPropertyDescriptor(B,F);T&&Object.defineProperty(R,F,T)}else R[F]=B[F];R.u=B.prototype,n.Object.defineProperty(E.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var N=function(t){var e=this,i=new Map;t.forEach((function(t,r){var o=t.getAttribute("name"),n=i.get(o)||[];e[+r]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach((function(t,i){t&&(e[i]=1===t.length?t[0]:new E(t))}))};N.prototype.namedItem=function(t){return this[t]};var A=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=A.get.call(this,[]),i=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var o=m.get(r);o&&!0!==o.formAssociated||i.push(r)}return new N(i)}})}}}).call(self);try{window.customElements.define("custom-element",null)}catch(Nr){const t=window.customElements.define;window.customElements.define=(e,i,r)=>{try{t.bind(window.customElements)(e,i,r)}catch(t){console.warn(e,i,r,t)}}}class zt{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}const Ct=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Et(t,e){const i=()=>JSON.parse(JSON.stringify(t));return nt({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}class Rt{constructor(t,e,i,r,o){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=r,this.context=o,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,i){return new Rt(t,e,void 0,i)}static extend(t,e,i){return new Rt(t,e.category,e,i)}static external(t,e){return new Rt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return a`var(${n(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):n(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}function Bt(t,e){return n(`${t.name}: ${e}`)}const Ft={colorPrimary:Rt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Rt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Rt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Rt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Rt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Rt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Rt.create("--ft-color-error","COLOR","#B00020"),colorOutline:Rt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Rt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Rt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Rt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Rt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Rt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Rt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Rt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Rt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Rt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Rt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Rt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Rt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Rt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Rt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Rt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Rt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Rt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Rt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Rt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Rt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Rt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Rt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Rt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Rt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Rt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Rt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Rt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Rt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Rt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Rt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Rt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Rt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Rt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Rt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Rt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Rt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Rt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Rt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Rt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Rt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Rt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Rt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Rt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Rt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Rt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Rt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Rt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Rt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Rt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Rt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Rt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Rt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Rt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Rt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2021 Google LLC
|
|
96
96
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
97
|
-
*/class Tt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return c(o,this.constructor.elementStyles),o}}}(et)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),
|
|
97
|
+
*/class Tt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return c(o,this.constructor.elementStyles),o}}}(et)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),A`
|
|
98
|
+
${t.map((t=>A`
|
|
99
|
+
<style>${t}</style>
|
|
100
|
+
`))}
|
|
101
|
+
${this.getTemplate()}
|
|
102
|
+
`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const Nt=a`
|
|
103
|
+
.ft-no-text-select {
|
|
104
|
+
-webkit-touch-callout: none;
|
|
105
|
+
-webkit-user-select: none;
|
|
106
|
+
-khtml-user-select: none;
|
|
107
|
+
-moz-user-select: none;
|
|
108
|
+
-ms-user-select: none;
|
|
109
|
+
user-select: none;
|
|
110
|
+
}
|
|
111
|
+
`;class At{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,r;let o=null!==(r=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>o=o.replace(new RegExp(`\\{${e}\\}`,"g"),t))),o}}var Mt,jt,Lt;const Dt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Lt=null===(jt=null===(Mt=window.safari)||void 0===Mt?void 0:Mt.pushNotification)||void 0===jt?void 0:jt.toString())&&void 0!==Lt?Lt:"");var It,Ut=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(It||(It={}));class Pt extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}let Ht=class extends Tt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=It.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new zt}getStyles(){return a`
|
|
112
|
+
.ft-size-watcher--pixel {
|
|
113
|
+
width: 0;
|
|
114
|
+
height: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ft-size-watcher--watcher {
|
|
123
|
+
height: 1px;
|
|
124
|
+
width: 100vw;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
130
|
+
`}getTemplate(){return A`
|
|
131
|
+
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
132
|
+
<div class="ft-size-watcher--watcher"></div>
|
|
133
|
+
</div>
|
|
134
|
+
`}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=It.S:this.size<976?this.category=It.M:this.size<1024?this.category=It.L:this.size<1440?this.category=It.XL:this.category=It.XXL,this.dispatchEvent(new Pt(this.size,this.category)))}),this.debounceTimeout)}};Ht.elementDefinitions={},Ut([nt({type:Number})],Ht.prototype,"debounceTimeout",void 0),Ut([nt({type:Boolean})],Ht.prototype,"local",void 0),Ut([nt({type:Number,reflect:!0})],Ht.prototype,"size",void 0),Ut([nt({type:String,reflect:!0})],Ht.prototype,"category",void 0),Ut([lt(".ft-size-watcher--watcher")],Ht.prototype,"watcher",void 0),Ht=Ut([Ct("ft-size-watcher")],Ht);
|
|
98
135
|
/**
|
|
99
136
|
* @license
|
|
100
137
|
* Copyright 2020 Google LLC
|
|
101
138
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
139
|
*/
|
|
103
|
-
const Vt=t=>({_$litStatic$:t}),Zt=new Map,Wt=(t=>(e,...i)=>{var r;const o=i.length;let n,a;const c=[],s=[];let l,d=0,p=!1;for(;d<o;){for(l=e[d];d<o&&void 0!==(a=i[d],n=null===(r=a)||void 0===r?void 0:r._$litStatic$);)l+=n+e[++d],p=!0;s.push(a),c.push(l),d++}if(d===o&&c.push(e[o]),p){const t=c.join("$$lit$$");void 0===(e=Zt.get(t))&&(c.raw=c,Zt.set(t,e=c)),i=s}return t(e,...i)})(
|
|
140
|
+
const Vt=t=>({_$litStatic$:t}),Zt=new Map,Wt=(t=>(e,...i)=>{var r;const o=i.length;let n,a;const c=[],s=[];let l,d=0,p=!1;for(;d<o;){for(l=e[d];d<o&&void 0!==(a=i[d],n=null===(r=a)||void 0===r?void 0:r._$litStatic$);)l+=n+e[++d],p=!0;s.push(a),c.push(l),d++}if(d===o&&c.push(e[o]),p){const t=c.join("$$lit$$");void 0===(e=Zt.get(t))&&(c.raw=c,Zt.set(t,e=c)),i=s}return t(e,...i)})(A);var Kt,qt=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};!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"}(Kt||(Kt={}));const Gt=Rt.extend("--ft-typography-font-family",Ft.titleFont),Xt=Rt.extend("--ft-typography-font-family",Ft.contentFont),Jt={fontFamily:Xt,fontSize:Rt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:Rt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:Rt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:Rt.create("--ft-typography-line-height","SIZE","24px"),textTransform:Rt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Yt=Rt.extend("--ft-typography-title-font-family",Gt),Qt=Rt.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),te=Rt.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),ee=Rt.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),ie=Rt.extend("--ft-typography-title-line-height",Jt.lineHeight,"24px"),re=Rt.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),oe=Rt.extend("--ft-typography-title-dense-font-family",Gt),ne=Rt.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),ae=Rt.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ce=Rt.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),se=Rt.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"24px"),le=Rt.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),de=Rt.extend("--ft-typography-subtitle1-font-family",Xt),pe=Rt.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=Rt.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),fe=Rt.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),ue=Rt.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"24px"),me=Rt.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),be=Rt.extend("--ft-typography-subtitle2-font-family",Xt),ve=Rt.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ge=Rt.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),xe=Rt.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),ye=Rt.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"24px"),ke=Rt.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),we={fontFamily:Rt.extend("--ft-typography-body1-font-family",Xt),fontSize:Rt.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),fontWeight:Rt.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),letterSpacing:Rt.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),lineHeight:Rt.extend("--ft-typography-body1-line-height",Jt.lineHeight,"24px"),textTransform:Rt.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit")},$e={fontFamily:Rt.extend("--ft-typography-body2-font-family",Xt),fontSize:Rt.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),fontWeight:Rt.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),letterSpacing:Rt.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),lineHeight:Rt.extend("--ft-typography-body2-line-height",Jt.lineHeight,"20px"),textTransform:Rt.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit")},_e={fontFamily:Rt.extend("--ft-typography-caption-font-family",Xt),fontSize:Rt.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),fontWeight:Rt.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),letterSpacing:Rt.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),lineHeight:Rt.extend("--ft-typography-caption-line-height",Jt.lineHeight,"16px"),textTransform:Rt.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit")},Se=Rt.extend("--ft-typography-breadcrumb-font-family",Xt),Oe=Rt.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),ze=Rt.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),Ce=Rt.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),Ee=Rt.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"16px"),Re=Rt.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Be=Rt.extend("--ft-typography-overline-font-family",Xt),Fe=Rt.extend("--ft-typography-overline-font-size",Jt.fontSize,"10px"),Te=Rt.extend("--ft-typography-overline-font-weight",Jt.fontWeight,"normal"),Ne=Rt.extend("--ft-typography-overline-letter-spacing",Jt.letterSpacing,"1.5px"),Ae=Rt.extend("--ft-typography-overline-line-height",Jt.lineHeight,"16px"),Me=Rt.extend("--ft-typography-overline-text-transform",Jt.textTransform,"uppercase"),je={fontFamily:Rt.extend("--ft-typography-button-font-family",Xt),fontSize:Rt.extend("--ft-typography-button-font-size",Jt.fontSize,"14px"),fontWeight:Rt.extend("--ft-typography-button-font-weight",Jt.fontWeight,"600"),letterSpacing:Rt.extend("--ft-typography-button-letter-spacing",Jt.letterSpacing,"1.246px"),lineHeight:Rt.extend("--ft-typography-button-line-height",Jt.lineHeight,"16px"),textTransform:Rt.extend("--ft-typography-button-text-transform",Jt.textTransform,"uppercase")},Le=a`
|
|
104
141
|
.ft-typography--title {
|
|
105
142
|
font-family: ${Yt};
|
|
106
143
|
font-size: ${Qt};
|
|
@@ -132,8 +169,8 @@ const Vt=t=>({_$litStatic$:t}),Zt=new Map,Wt=(t=>(e,...i)=>{var r;const o=i.leng
|
|
|
132
169
|
font-family: ${be};
|
|
133
170
|
font-size: ${ve};
|
|
134
171
|
font-weight: ${ge};
|
|
135
|
-
letter-spacing: ${
|
|
136
|
-
line-height: ${
|
|
172
|
+
letter-spacing: ${xe};
|
|
173
|
+
line-height: ${ye};
|
|
137
174
|
text-transform: ${ke};
|
|
138
175
|
}
|
|
139
176
|
|
|
@@ -178,18 +215,18 @@ const Vt=t=>({_$litStatic$:t}),Zt=new Map,Wt=(t=>(e,...i)=>{var r;const o=i.leng
|
|
|
178
215
|
font-family: ${Be};
|
|
179
216
|
font-size: ${Fe};
|
|
180
217
|
font-weight: ${Te};
|
|
181
|
-
letter-spacing: ${
|
|
182
|
-
line-height: ${
|
|
183
|
-
text-transform: ${
|
|
218
|
+
letter-spacing: ${Ne};
|
|
219
|
+
line-height: ${Ae};
|
|
220
|
+
text-transform: ${Me};
|
|
184
221
|
}
|
|
185
222
|
`,Ke=a`
|
|
186
223
|
.ft-typography--button {
|
|
187
|
-
font-family: ${
|
|
188
|
-
font-size: ${
|
|
189
|
-
font-weight: ${
|
|
190
|
-
letter-spacing: ${
|
|
191
|
-
line-height: ${
|
|
192
|
-
text-transform: ${
|
|
224
|
+
font-family: ${je.fontFamily};
|
|
225
|
+
font-size: ${je.fontSize};
|
|
226
|
+
font-weight: ${je.fontWeight};
|
|
227
|
+
letter-spacing: ${je.letterSpacing};
|
|
228
|
+
line-height: ${je.lineHeight};
|
|
229
|
+
text-transform: ${je.textTransform};
|
|
193
230
|
}
|
|
194
231
|
`;let qe=class extends Tt{constructor(){super(...arguments),this.variant=Kt.body1}getStyles(){return[Le,De,Ie,Ue,Pe,He,Ve,Ze,We,Ke]}getTemplate(){return this.element?Wt`
|
|
195
232
|
<${Vt(this.element)}
|
|
@@ -313,7 +350,7 @@ var pi=["touchstart","pointerdown","mousedown","keydown"],hi=["touchend","pointe
|
|
|
313
350
|
* Copyright 2018 Google LLC
|
|
314
351
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
315
352
|
*/
|
|
316
|
-
const bi=bt(class extends vt{constructor(t){var e;if(super(t),t.type!==ut||"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 r=t[i];return null==r?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?i.setProperty(t,r):i[t]=r)}return
|
|
353
|
+
const bi=bt(class extends vt{constructor(t){var e;if(super(t),t.type!==ut||"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 r=t[i];return null==r?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?i.setProperty(t,r):i[t]=r)}return M}});
|
|
317
354
|
/**
|
|
318
355
|
* @license
|
|
319
356
|
* Copyright 2018 Google LLC
|
|
@@ -323,18 +360,20 @@ const bi=bt(class extends vt{constructor(t){var e;if(super(t),t.type!==ut||"styl
|
|
|
323
360
|
* @license
|
|
324
361
|
* Copyright 2018 Google LLC
|
|
325
362
|
* SPDX-License-Identifier: Apache-2.0
|
|
326
|
-
*/}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return
|
|
363
|
+
*/}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return A`
|
|
364
|
+
<div class="mdc-ripple-surface mdc-ripple-upgraded ${Ot(i)}"
|
|
365
|
+
style="${bi({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}ii([lt(".mdc-ripple-surface")],vi.prototype,"mdcRoot",void 0),ii([nt({type:Boolean})],vi.prototype,"primary",void 0),ii([nt({type:Boolean})],vi.prototype,"accent",void 0),ii([nt({type:Boolean})],vi.prototype,"unbounded",void 0),ii([nt({type:Boolean})],vi.prototype,"disabled",void 0),ii([nt({type:Boolean})],vi.prototype,"activated",void 0),ii([nt({type:Boolean})],vi.prototype,"selected",void 0),ii([nt({type:Boolean})],vi.prototype,"internalUseStateLayerCustomProperties",void 0),ii([at()],vi.prototype,"hovering",void 0),ii([at()],vi.prototype,"bgFocused",void 0),ii([at()],vi.prototype,"fgActivation",void 0),ii([at()],vi.prototype,"fgDeactivation",void 0),ii([at()],vi.prototype,"fgScale",void 0),ii([at()],vi.prototype,"fgSize",void 0),ii([at()],vi.prototype,"translateStart",void 0),ii([at()],vi.prototype,"translateEnd",void 0),ii([at()],vi.prototype,"leftPos",void 0),ii([at()],vi.prototype,"topPos",void 0);
|
|
327
366
|
/**
|
|
328
367
|
* @license
|
|
329
368
|
* Copyright 2021 Google LLC
|
|
330
369
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
331
370
|
*/
|
|
332
|
-
const gi=a`.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::after,.mdc-ripple-surface--primary::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--primary--activated::after,.mdc-ripple-surface--primary--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--primary--selected::after,.mdc-ripple-surface--primary--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::after,.mdc-ripple-surface--accent::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--accent--activated::after,.mdc-ripple-surface--accent--activated::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--accent--selected::after,.mdc-ripple-surface--accent--selected::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::after,.mdc-ripple-surface--internal-use-state-layer-custom-properties::before{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color,#000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-state-layer-opacity,.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
371
|
+
const gi=a`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
333
372
|
/**
|
|
334
373
|
* @license
|
|
335
374
|
* Copyright 2018 Google LLC
|
|
336
375
|
* SPDX-License-Identifier: Apache-2.0
|
|
337
|
-
*/;let
|
|
376
|
+
*/;let xi=class extends vi{};function yi(t,e,i){if(void 0!==e)
|
|
338
377
|
/**
|
|
339
378
|
* @license
|
|
340
379
|
* Copyright 2021 Google LLC
|
|
@@ -345,7 +384,7 @@ return function(t,e,i){const r=t.constructor;if(!i){const t=`__${e}`;if(!(i=r.ge
|
|
|
345
384
|
* @license
|
|
346
385
|
* Copyright 2018 Google LLC
|
|
347
386
|
* SPDX-License-Identifier: Apache-2.0
|
|
348
|
-
*/var ki,wi;
|
|
387
|
+
*/var ki,wi;xi.styles=[gi],xi=ii([rt("mwc-ripple")],xi);const $i=null!==(wi=null===(ki=window.ShadyDOM)||void 0===ki?void 0:ki.inUse)&&void 0!==wi&&wi;class _i extends ai{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||$i)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}_i.shadowRootOptions={mode:"open",delegatesFocus:!0},ii([nt({type:Boolean})],_i.prototype,"disabled",void 0);
|
|
349
388
|
/**
|
|
350
389
|
* @license
|
|
351
390
|
* Copyright 2020 Google LLC
|
|
@@ -356,34 +395,371 @@ class Si{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))}
|
|
|
356
395
|
* @license
|
|
357
396
|
* Copyright 2018 Google LLC
|
|
358
397
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
359
|
-
*/const Oi=t=>null!=t?t:
|
|
398
|
+
*/const Oi=t=>null!=t?t:j
|
|
360
399
|
/**
|
|
361
400
|
* @license
|
|
362
401
|
* Copyright 2019 Google LLC
|
|
363
402
|
* SPDX-License-Identifier: Apache-2.0
|
|
364
|
-
*/;class zi extends _i{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new Si((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>this.rippleElement=t)),this.ripple)))}createAdapter(){return{}}update(t){const e=t.get("indeterminate"),i=t.get("checked"),r=t.get("disabled");if(void 0!==e||void 0!==i||void 0!==r){const t=this.calculateAnimationStateName(!!i,!!e,!!r),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${t}-${o}`}super.update(t)}calculateAnimationStateName(t,e,i){return i?"disabled":e?"indeterminate":t?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return
|
|
403
|
+
*/;class zi extends _i{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new Si((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>this.rippleElement=t)),this.ripple)))}createAdapter(){return{}}update(t){const e=t.get("indeterminate"),i=t.get("checked"),r=t.get("disabled");if(void 0!==e||void 0!==i||void 0!==r){const t=this.calculateAnimationStateName(!!i,!!e,!!r),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${t}-${o}`}super.update(t)}calculateAnimationStateName(t,e,i){return i?"disabled":e?"indeterminate":t?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return A`<mwc-ripple
|
|
404
|
+
.disabled="${this.disabled}"
|
|
405
|
+
unbounded></mwc-ripple>`}render(){const t=this.indeterminate||this.checked,e={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":t,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},i=this.indeterminate?"mixed":void 0;return A`
|
|
406
|
+
<div class="mdc-checkbox mdc-checkbox--upgraded ${Ot(e)}">
|
|
407
|
+
<input type="checkbox"
|
|
408
|
+
class="mdc-checkbox__native-control"
|
|
409
|
+
name="${Oi(this.name)}"
|
|
410
|
+
aria-checked="${Oi(i)}"
|
|
411
|
+
aria-label="${Oi(this.ariaLabel)}"
|
|
412
|
+
aria-labelledby="${Oi(this.ariaLabelledBy)}"
|
|
413
|
+
aria-describedby="${Oi(this.ariaDescribedBy)}"
|
|
414
|
+
data-indeterminate="${this.indeterminate?"true":"false"}"
|
|
415
|
+
?disabled="${this.disabled}"
|
|
416
|
+
.indeterminate="${this.indeterminate}"
|
|
417
|
+
.checked="${this.checked}"
|
|
418
|
+
.value="${this.value}"
|
|
419
|
+
@change="${this.handleChange}"
|
|
420
|
+
@focus="${this.handleFocus}"
|
|
421
|
+
@blur="${this.handleBlur}"
|
|
422
|
+
@mousedown="${this.handleRippleMouseDown}"
|
|
423
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
|
424
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
|
425
|
+
@touchstart="${this.handleRippleTouchStart}"
|
|
426
|
+
@touchend="${this.handleRippleDeactivate}"
|
|
427
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
|
428
|
+
<div class="mdc-checkbox__background"
|
|
429
|
+
@animationend="${this.resetAnimationClass}">
|
|
430
|
+
<svg class="mdc-checkbox__checkmark"
|
|
431
|
+
viewBox="0 0 24 24">
|
|
432
|
+
<path class="mdc-checkbox__checkmark-path"
|
|
433
|
+
fill="none"
|
|
434
|
+
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
435
|
+
</svg>
|
|
436
|
+
<div class="mdc-checkbox__mixedmark"></div>
|
|
437
|
+
</div>
|
|
438
|
+
${this.renderRipple()}
|
|
439
|
+
</div>`}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}}ii([lt(".mdc-checkbox")],zi.prototype,"mdcRoot",void 0),ii([lt("input")],zi.prototype,"formElement",void 0),ii([nt({type:Boolean,reflect:!0})],zi.prototype,"checked",void 0),ii([nt({type:Boolean})],zi.prototype,"indeterminate",void 0),ii([nt({type:Boolean,reflect:!0})],zi.prototype,"disabled",void 0),ii([nt({type:String,reflect:!0})],zi.prototype,"name",void 0),ii([nt({type:String})],zi.prototype,"value",void 0),ii([yi,nt({type:String,attribute:"aria-label"})],zi.prototype,"ariaLabel",void 0),ii([yi,nt({type:String,attribute:"aria-labelledby"})],zi.prototype,"ariaLabelledBy",void 0),ii([yi,nt({type:String,attribute:"aria-describedby"})],zi.prototype,"ariaDescribedBy",void 0),ii([nt({type:Boolean})],zi.prototype,"reducedTouchTarget",void 0),ii([at()],zi.prototype,"animationClass",void 0),ii([at()],zi.prototype,"shouldRenderRipple",void 0),ii([at()],zi.prototype,"focused",void 0),ii([dt("mwc-ripple")],zi.prototype,"ripple",void 0),ii([st({passive:!0})],zi.prototype,"handleRippleTouchStart",null);
|
|
365
440
|
/**
|
|
366
441
|
* @license
|
|
367
442
|
* Copyright 2021 Google LLC
|
|
368
443
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
369
444
|
*/
|
|
370
|
-
const Ci=a`.mdc-checkbox{padding:calc((40px - 18px)/ 2);padding:calc((var(--mdc-checkbox-ripple-size,40px) - 18px)/ 2);margin:calc((40px - 40px)/ 2);margin:calc((var(--mdc-checkbox-touch-target-size,40px) - 40px)/ 2)}.mdc-checkbox .mdc-checkbox__ripple::after,.mdc-checkbox .mdc-checkbox__ripple::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before,.mdc-checkbox:hover .mdc-checkbox__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px)/ 2);top:calc((var(--mdc-checkbox-ripple-size,40px) - 18px)/ 2);left:calc((40px - 18px)/ 2);left:calc((var(--mdc-checkbox-ripple-size,40px) - 18px)/ 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px)/ 2);top:calc((40px - var(--mdc-checkbox-touch-target-size,40px))/ 2);right:calc((40px - 40px)/ 2);right:calc((40px - var(--mdc-checkbox-touch-target-size,40px))/ 2);left:calc((40px - 40px)/ 2);left:calc((40px - var(--mdc-checkbox-touch-target-size,40px))/ 2);width:40px;width:var(--mdc-checkbox-touch-target-size,40px);height:40px;height:var(--mdc-checkbox-touch-target-size,40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0,0,0,.54);border-color:var(--mdc-checkbox-unchecked-color,rgba(0,0,0,.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0,0,0,.54);border-color:var(--mdc-checkbox-unchecked-color,rgba(0,0,0,.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color,var(--mdc-theme-secondary,#018786))}100%{border-color:rgba(0,0,0,.54);border-color:var(--mdc-checkbox-unchecked-color,rgba(0,0,0,.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0,0,0,.38);border-color:var(--mdc-checkbox-disabled-color,rgba(0,0,0,.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0,0,0,.38);background-color:var(--mdc-checkbox-disabled-color,rgba(0,0,0,.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color,#fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color,#fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color,#fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color,#fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0,0,.2,1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,1);transform:rotate(0);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);transform:rotate(0);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}100%,32.8%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color,GrayText);background-color:transparent}.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color,transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color,GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color,GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0s cubic-bezier(.4,0,.6,1),border-color 90ms 0s cubic-bezier(.4,0,.6,1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0s cubic-bezier(.4,0,.6,1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0s cubic-bezier(.4,0,.6,1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0s cubic-bezier(.4,0,.6,1),transform 90ms 0s cubic-bezier(.4,0,.6,1)}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark .5s linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark .5s linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark .3s linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0s cubic-bezier(0,0,.2,1),background-color 90ms 0s cubic-bezier(0,0,.2,1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px)/ 2);margin:calc((var(--mdc-checkbox-state-layer-size,48px) - var(--mdc-checkbox-state-layer-size,40px))/ 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px)/ 2);top:calc((var(--mdc-checkbox-state-layer-size,40px) - var(--mdc-checkbox-state-layer-size,48px))/ 2);right:calc((40px - 48px)/ 2);right:calc((var(--mdc-checkbox-state-layer-size,40px) - var(--mdc-checkbox-state-layer-size,48px))/ 2);left:calc((40px - 48px)/ 2);left:calc((var(--mdc-checkbox-state-layer-size,40px) - var(--mdc-checkbox-state-layer-size,48px))/ 2);width:48px;width:var(--mdc-checkbox-state-layer-size,48px);height:48px;height:var(--mdc-checkbox-state-layer-size,48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0s cubic-bezier(0,0,.2,1),transform 180ms 0s cubic-bezier(0,0,.2,1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0s cubic-bezier(.4,0,.6,1),transform 90ms 0s cubic-bezier(.4,0,.6,1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:0;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`
|
|
445
|
+
const Ci=a`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color, GrayText);background-color:transparent}.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color, transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`
|
|
371
446
|
/**
|
|
372
447
|
* @license
|
|
373
448
|
* Copyright 2018 Google LLC
|
|
374
449
|
* SPDX-License-Identifier: Apache-2.0
|
|
375
|
-
*/;let Ei=class extends zi{};Ei.styles=[Ci],Ei=ii([rt("mwc-checkbox")],Ei);var Ri=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Bi={color:Rt.extend("--ft-ripple-color",Ft.colorContent),primaryColor:Rt.extend("--ft-ripple-primary-color",Rt.extend("--ft-ripple-color",Ft.colorPrimary)),secondaryColor:Rt.extend("--ft-ripple-secondary-color",Rt.extend("--ft-ripple-color",Ft.colorSecondary)),opacityContentOnSurfacePressed:Rt.external(Ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Rt.external(Ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Rt.external(Ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Rt.external(Ft.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:Rt.external(Ft.opacityContentOnSurfaceDragged,"Design system")};let Fi=class extends Tt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a
|
|
450
|
+
*/;let Ei=class extends zi{};Ei.styles=[Ci],Ei=ii([rt("mwc-checkbox")],Ei);var Ri=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Bi={color:Rt.extend("--ft-ripple-color",Ft.colorContent),primaryColor:Rt.extend("--ft-ripple-primary-color",Rt.extend("--ft-ripple-color",Ft.colorPrimary)),secondaryColor:Rt.extend("--ft-ripple-secondary-color",Rt.extend("--ft-ripple-color",Ft.colorSecondary)),opacityContentOnSurfacePressed:Rt.external(Ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Rt.external(Ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Rt.external(Ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Rt.external(Ft.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:Rt.external(Ft.opacityContentOnSurfaceDragged,"Design system")};let Fi=class extends Tt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a`
|
|
451
|
+
:host {
|
|
452
|
+
display: contents;
|
|
453
|
+
|
|
454
|
+
--mdc-ripple-color: ${Bi.color};
|
|
455
|
+
--mdc-ripple-press-opacity: ${Bi.opacityContentOnSurfacePressed};
|
|
456
|
+
--mdc-ripple-hover-opacity: ${Bi.opacityContentOnSurfaceHover};
|
|
457
|
+
--mdc-ripple-focus-opacity: ${Bi.opacityContentOnSurfaceFocused};
|
|
458
|
+
--mdc-ripple-selected-opacity: ${Bi.opacityContentOnSurfaceSelected};
|
|
459
|
+
--mdc-ripple-activated-opacity: ${Bi.opacityContentOnSurfaceDragged};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
mwc-ripple.ft-ripple--secondary {
|
|
463
|
+
--mdc-ripple-color: ${Bi.secondaryColor};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
mwc-ripple.ft-ripple--primary {
|
|
467
|
+
--mdc-ripple-color: ${Bi.primaryColor};
|
|
468
|
+
}
|
|
469
|
+
`}getTemplate(){return A`
|
|
470
|
+
<mwc-ripple
|
|
471
|
+
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
472
|
+
?unbounded=${this.unbounded}
|
|
473
|
+
?activated=${this.activated}
|
|
474
|
+
?selected=${this.selected}
|
|
475
|
+
?disabled=${this.disabled}
|
|
476
|
+
></mwc-ripple>
|
|
477
|
+
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Si((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",n),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",n),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Fi.elementDefinitions={"mwc-ripple":xi},Ri([nt({type:Boolean})],Fi.prototype,"primary",void 0),Ri([nt({type:Boolean})],Fi.prototype,"secondary",void 0),Ri([nt({type:Boolean})],Fi.prototype,"unbounded",void 0),Ri([nt({type:Boolean})],Fi.prototype,"activated",void 0),Ri([nt({type:Boolean})],Fi.prototype,"selected",void 0),Ri([nt({type:Boolean})],Fi.prototype,"disabled",void 0),Ri([lt("mwc-ripple")],Fi.prototype,"mwcRipple",void 0),Fi=Ri([Ct("ft-ripple")],Fi);
|
|
376
478
|
/**
|
|
377
479
|
* @license
|
|
378
480
|
* Copyright 2021 Google LLC
|
|
379
481
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
380
482
|
*/
|
|
381
|
-
const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
483
|
+
const Ti=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
382
484
|
/**
|
|
383
485
|
* @license
|
|
384
486
|
* Copyright 2018 Google LLC
|
|
385
487
|
* SPDX-License-Identifier: Apache-2.0
|
|
386
|
-
*/;let Ai=class extends et{render(){return N`<span><slot></slot></span>`}};Ai.styles=[Ti],Ai=ii([rt("mwc-icon")],Ai);var Ni=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ji=Rt.create("--ft-tooltip-distance","SIZE","4px"),Mi=Rt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Li=Rt.create("--ft-tooltip-background-color","COLOR","#666666"),Di=Rt.create("--ft-tooltip-z-index","NUMBER","1"),Ii=Rt.external(Ft.borderRadiusS,"Design system");let Ui=class extends Tt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new zt,this.revealDebouncer=new zt}getStyles(){return a`.ft-tooltip--container{display:block;position:relative}.ft-tooltip--inline{display:inline-block;max-width:100%}.ft-tooltip{position:absolute;box-sizing:border-box;overflow:hidden;width:max-content;max-width:150px;text-align:center;padding:${ji};z-index:${Di}}.ft-tooltip--content{padding:4px 8px;border-radius:${Ii};background-color:${Li};color:${Mi};top:-500px;left:-500px;position:relative;word-break:break-word}`}getTemplate(){return N`<div part="container" class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}" @mouseenter="${this.onHover}" @mouseleave="${this.onOut}" @focusin="${this.onHover}" @focusout="${this.onOut}" @touchstart="${this.onTouch}"><div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden="${!this.visible}"><div part="tooltip-content" class="ft-tooltip--content"><ft-typography variant="caption">${this.text}</ft-typography></div></div><slot></slot></div>`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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.position){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=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,r=(e.width-this.tooltip.clientWidth)/2,o=this.tooltip.style;switch(this.position){case"top":o.top=-this.tooltip.clientHeight+"px",o.left=r+"px";break;case"bottom":o.top=e.height+"px",o.left=r+"px";break;case"left":o.top=i+"px",o.left=-this.tooltip.clientWidth+"px";break;case"right":o.top=i+"px",o.left=e.width+"px"}o.maxWidth=Math.max(e.width,150)+"px"}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())}};Ui.elementDefinitions={"ft-typography":qe},Ni([nt()],Ui.prototype,"text",void 0),Ni([nt({type:Boolean})],Ui.prototype,"manual",void 0),Ni([nt({type:Boolean})],Ui.prototype,"inline",void 0),Ni([nt({type:Number})],Ui.prototype,"delay",void 0),Ni([nt()],Ui.prototype,"position",void 0),Ni([ft("",!0)],Ui.prototype,"slotNodes",void 0),Ni([lt(".ft-tooltip--container")],Ui.prototype,"container",void 0),Ni([lt("slot")],Ui.prototype,"target",void 0),Ni([lt(".ft-tooltip")],Ui.prototype,"tooltip",void 0),Ni([lt(".ft-tooltip--content")],Ui.prototype,"tooltipContent",void 0),Ni([at()],Ui.prototype,"visible",void 0),Ui=Ni([Ct("ft-tooltip")],Ui);var Pi=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Hi={color:Rt.extend("--ft-loader-color",Ft.colorPrimary),size:Rt.create("--ft-loader-size","SIZE","80px")};let Vi=class extends Tt{getStyles(){return a`:host{line-height:0}.ft-loader{display:inline-block;position:relative;width:${Hi.size};height:${Hi.size}}.ft-loader div{position:absolute;top:37.5%;width:25%;height:25%;border-radius:50%;background:${Hi.color};animation-timing-function:cubic-bezier(0,1,1,0)}.ft-loader div:nth-child(1){left:2.5%;animation:appear .6s infinite}.ft-loader div:nth-child(2){left:2.5%;animation:move .6s infinite}.ft-loader div:nth-child(3){left:37.5%;animation:move .6s infinite}.ft-loader div:nth-child(4){left:72.5%;animation:disappear .6s infinite}@keyframes appear{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes disappear{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes move{0%{transform:translate(0,0)}100%{transform:translate(calc(.35 * ${Hi.size}),0)}}`}getTemplate(){return N`<div class="ft-loader"><div></div><div></div><div></div><div></div></div>`}};Vi=Pi([Ct("ft-loader")],Vi);var Zi=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Wi=Rt.extend("--ft-button-color",Ft.colorPrimary),Ki={backgroundColor:Rt.extend("--ft-button-background-color",Ft.colorSurface),borderRadius:Rt.extend("--ft-button-border-radius",Ft.borderRadiusL),color:Wi,fontSize:Rt.extend("--ft-button-font-size",Me.fontSize),iconSize:Rt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:Rt.extend("--ft-button-ripple-color",Wi),opacityDisabled:Rt.external(Ft.colorOpacityDisabled,"Design system")},qi=Rt.extend("--ft-button-primary-color",Rt.extend("--ft-button-color",Ft.colorOnPrimary)),Gi=Rt.extend("--ft-button-primary-background-color",Rt.extend("--ft-button-background-color",Ft.colorPrimary)),Xi=qi,Ji=(Rt.extend("--ft-button-primary-ripple-color",qi),Rt.extend("--ft-button-dense-border-radius",Rt.extend("--ft-button-border-radius",Ft.borderRadiusM)));let Yi=class extends Tt{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.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}getStyles(){return[At,a`:host{display:inline-block;max-width:100%}button{box-shadow:0 0 0 transparent;border:0 solid transparent;text-shadow:0 0 0 transparent}button:hover{box-shadow:0 0 0 transparent;border:0 solid transparent;text-shadow:0 0 0 transparent}button:active{outline:0;border:none}button:focus{outline:0}.ft-button{position:relative;display:flex;justify-content:center;align-items:center;width:100%;overflow:hidden;box-sizing:border-box;border:none;--ft-button-internal-font-size:${Ki.fontSize}--ft-button-internal-line-height:calc(var(--ft-button-internal-font-size) + 2px);--ft-button-internal-color:${Ki.color}--mdc-icon-size:${Ki.iconSize}--ft-button-internal-vertical-padding:6px;--ft-button-internal-horizontal-padding:8px;${Bt(Bi.color,Ki.rippleColor)}--ft-button-internal-content-height:max(var(--ft-button-internal-line-height), var(--mdc-icon-size));border-radius:${Ki.borderRadius};padding:var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);background-color:${Ki.backgroundColor};color:var(--ft-button-internal-color);-webkit-mask-image:radial-gradient(white,#000)}.ft-button:not([disabled]):hover{cursor:pointer}.ft-button--dense{--ft-button-internal-vertical-padding:2px;--ft-button-internal-horizontal-padding:4px;border-radius:${Ji}}.ft-button--round{border-radius:calc(var(--ft-button-internal-content-height)/ 2 + var(--ft-button-internal-vertical-padding))}.ft-button[disabled]{filter:grayscale(1);opacity:${Ki.opacityDisabled}}.ft-button.ft-button--primary{background-color:${Gi};--ft-button-internal-color:${Xi}}.ft-button.ft-button--outlined{border:1px solid var(--ft-button-internal-color);padding:calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px)}.ft-button:focus{outline:0}.ft-button--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;margin:0 var(--ft-button-internal-horizontal-padding);${Bt(Me.fontSize,"var(--ft-button-internal-font-size)")}${Bt(Me.lineHeight,"var(--ft-button-internal-content-height)")}}.ft-button--safari-fix .ft-button--label{margin-right:0}.ft-button--safari-fix .ft-button--label:after{content:"\\0000a0";display:inline-block;width:0}.ft-button--label[hidden]{display:none}mwc-icon{flex-shrink:0;width:var(--mdc-icon-size)}.ft-button--label[hidden]+mwc-icon{margin:0 calc(var(--ft-button-internal-horizontal-padding) * -1);padding:0 var(--ft-button-internal-vertical-padding)}.ft-button:not(.ft-button--trailing-icon) ft-loader,.ft-button:not(.ft-button--trailing-icon) mwc-icon{order:-1}ft-loader{${Bt(Hi.size,Ki.iconSize)}${Bt(Hi.color,"var(--ft-button-internal-color)")}}`]}getTemplate(){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-button--safari-fix":Dt,"ft-no-text-select":!0};return this.addTooltip(N`<button class="${Ot(t)}" aria-label="${this.getLabel()}" ?disabled="${this.isDisabled()}"><ft-ripple ?disabled="${this.isDisabled()}"></ft-ripple><ft-typography variant="button" class="ft-button--label" ?hidden="${!this.hasTextContent()}"><slot @slotchange="${this.onSlotchange}"></slot></ft-typography>${this.resolveIcon()}</button>`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:N`<ft-tooltip text="${this.getLabel()}" position="${this.tooltipPosition}">${t}</ft-tooltip>`}resolveIcon(){return this.loading?N`<ft-loader></ft-loader>`:this.icon?N`<mwc-icon>${this.icon}</mwc-icon>`:M}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};Yi.elementDefinitions={"ft-ripple":Fi,"ft-tooltip":Ui,"ft-typography":qe,"mwc-icon":Ai,"ft-loader":Vi},Zi([nt({type:Boolean})],Yi.prototype,"primary",void 0),Zi([nt({type:Boolean})],Yi.prototype,"outlined",void 0),Zi([nt({type:Boolean})],Yi.prototype,"disabled",void 0),Zi([nt({type:Boolean})],Yi.prototype,"dense",void 0),Zi([nt({type:Boolean})],Yi.prototype,"round",void 0),Zi([nt({type:String})],Yi.prototype,"label",void 0),Zi([nt({type:String})],Yi.prototype,"icon",void 0),Zi([nt({type:Boolean})],Yi.prototype,"trailingIcon",void 0),Zi([nt({type:Boolean})],Yi.prototype,"loading",void 0),Zi([nt({type:String})],Yi.prototype,"tooltipPosition",void 0),Zi([lt(".ft-button")],Yi.prototype,"button",void 0),Zi([lt(".ft-button--label slot")],Yi.prototype,"slottedContent",void 0),Yi=Zi([Ct("ft-button")],Yi);
|
|
488
|
+
*/;let Ni=class extends et{render(){return A`<span><slot></slot></span>`}};Ni.styles=[Ti],Ni=ii([rt("mwc-icon")],Ni);var Ai=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Mi=Rt.create("--ft-tooltip-distance","SIZE","4px"),ji=Rt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Li=Rt.create("--ft-tooltip-background-color","COLOR","#666666"),Di=Rt.create("--ft-tooltip-z-index","NUMBER","1"),Ii=Rt.external(Ft.borderRadiusS,"Design system");let Ui=class extends Tt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new zt,this.revealDebouncer=new zt}getStyles(){return a`
|
|
489
|
+
.ft-tooltip--container {
|
|
490
|
+
display: block;
|
|
491
|
+
position: relative;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.ft-tooltip--inline {
|
|
495
|
+
display: inline-block;
|
|
496
|
+
max-width: 100%;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.ft-tooltip {
|
|
500
|
+
position: absolute;
|
|
501
|
+
box-sizing: border-box;
|
|
502
|
+
overflow: hidden;
|
|
503
|
+
width: max-content;
|
|
504
|
+
max-width: 150px;
|
|
505
|
+
text-align: center;
|
|
506
|
+
padding: ${Mi};
|
|
507
|
+
z-index: ${Di};
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.ft-tooltip--content {
|
|
511
|
+
padding: 4px 8px;
|
|
512
|
+
border-radius: ${Ii};
|
|
513
|
+
background-color: ${Li};
|
|
514
|
+
color: ${ji};
|
|
515
|
+
top: -500px;
|
|
516
|
+
left: -500px;
|
|
517
|
+
position: relative;
|
|
518
|
+
word-break: break-word;
|
|
519
|
+
}
|
|
520
|
+
`}getTemplate(){return A`
|
|
521
|
+
<div part="container"
|
|
522
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
523
|
+
@mouseenter=${this.onHover}
|
|
524
|
+
@mouseleave=${this.onOut}
|
|
525
|
+
@focusin=${this.onHover}
|
|
526
|
+
@focusout=${this.onOut}
|
|
527
|
+
@touchstart=${this.onTouch}>
|
|
528
|
+
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
529
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
530
|
+
<ft-typography variant="caption">${this.text}</ft-typography>
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
<slot></slot>
|
|
534
|
+
</div>
|
|
535
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&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.position){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=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,r=(e.width-this.tooltip.clientWidth)/2,o=this.tooltip.style;switch(this.position){case"top":o.top=-this.tooltip.clientHeight+"px",o.left=r+"px";break;case"bottom":o.top=e.height+"px",o.left=r+"px";break;case"left":o.top=i+"px",o.left=-this.tooltip.clientWidth+"px";break;case"right":o.top=i+"px",o.left=e.width+"px"}o.maxWidth=Math.max(e.width,150)+"px"}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())}};Ui.elementDefinitions={"ft-typography":qe},Ai([nt()],Ui.prototype,"text",void 0),Ai([nt({type:Boolean})],Ui.prototype,"manual",void 0),Ai([nt({type:Boolean})],Ui.prototype,"inline",void 0),Ai([nt({type:Number})],Ui.prototype,"delay",void 0),Ai([nt()],Ui.prototype,"position",void 0),Ai([ft("",!0)],Ui.prototype,"slotNodes",void 0),Ai([lt(".ft-tooltip--container")],Ui.prototype,"container",void 0),Ai([lt("slot")],Ui.prototype,"target",void 0),Ai([lt(".ft-tooltip")],Ui.prototype,"tooltip",void 0),Ai([lt(".ft-tooltip--content")],Ui.prototype,"tooltipContent",void 0),Ai([at()],Ui.prototype,"visible",void 0),Ui=Ai([Ct("ft-tooltip")],Ui);var Pi=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Hi={color:Rt.extend("--ft-loader-color",Ft.colorPrimary),size:Rt.create("--ft-loader-size","SIZE","80px")};let Vi=class extends Tt{getStyles(){return a`
|
|
536
|
+
:host {
|
|
537
|
+
line-height: 0;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.ft-loader {
|
|
541
|
+
display: inline-block;
|
|
542
|
+
position: relative;
|
|
543
|
+
|
|
544
|
+
width: ${Hi.size};
|
|
545
|
+
height: ${Hi.size};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.ft-loader div {
|
|
549
|
+
position: absolute;
|
|
550
|
+
top: 37.5%;
|
|
551
|
+
width: 25%;
|
|
552
|
+
height: 25%;
|
|
553
|
+
border-radius: 50%;
|
|
554
|
+
background: ${Hi.color};
|
|
555
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.ft-loader div:nth-child(1) {
|
|
559
|
+
left: 2.5%;
|
|
560
|
+
animation: appear 0.6s infinite;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.ft-loader div:nth-child(2) {
|
|
564
|
+
left: 2.5%;
|
|
565
|
+
animation: move 0.6s infinite;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ft-loader div:nth-child(3) {
|
|
569
|
+
left: 37.5%;
|
|
570
|
+
animation: move 0.6s infinite;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.ft-loader div:nth-child(4) {
|
|
574
|
+
left: 72.5%;
|
|
575
|
+
animation: disappear 0.6s infinite;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
@keyframes appear {
|
|
579
|
+
0% {
|
|
580
|
+
transform: scale(0);
|
|
581
|
+
}
|
|
582
|
+
100% {
|
|
583
|
+
transform: scale(1);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@keyframes disappear {
|
|
588
|
+
0% {
|
|
589
|
+
transform: scale(1);
|
|
590
|
+
}
|
|
591
|
+
100% {
|
|
592
|
+
transform: scale(0);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@keyframes move {
|
|
597
|
+
0% {
|
|
598
|
+
transform: translate(0, 0);
|
|
599
|
+
}
|
|
600
|
+
100% {
|
|
601
|
+
transform: translate(calc(0.35 * ${Hi.size}), 0);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
`}getTemplate(){return A`
|
|
605
|
+
<div class="ft-loader">
|
|
606
|
+
<div></div>
|
|
607
|
+
<div></div>
|
|
608
|
+
<div></div>
|
|
609
|
+
<div></div>
|
|
610
|
+
</div>
|
|
611
|
+
`}};Vi=Pi([Ct("ft-loader")],Vi);var Zi=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Wi=Rt.extend("--ft-button-color",Ft.colorPrimary),Ki={backgroundColor:Rt.extend("--ft-button-background-color",Ft.colorSurface),borderRadius:Rt.extend("--ft-button-border-radius",Ft.borderRadiusL),color:Wi,fontSize:Rt.extend("--ft-button-font-size",je.fontSize),iconSize:Rt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:Rt.extend("--ft-button-ripple-color",Wi),opacityDisabled:Rt.external(Ft.colorOpacityDisabled,"Design system")},qi=Rt.extend("--ft-button-primary-color",Rt.extend("--ft-button-color",Ft.colorOnPrimary)),Gi=Rt.extend("--ft-button-primary-background-color",Rt.extend("--ft-button-background-color",Ft.colorPrimary)),Xi=qi,Ji=(Rt.extend("--ft-button-primary-ripple-color",qi),Rt.extend("--ft-button-dense-border-radius",Rt.extend("--ft-button-border-radius",Ft.borderRadiusM)));let Yi=class extends Tt{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.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}getStyles(){return[Nt,a`
|
|
612
|
+
:host {
|
|
613
|
+
display: inline-block;
|
|
614
|
+
max-width: 100%;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
button {
|
|
618
|
+
box-shadow: 0px 0px 0px transparent;
|
|
619
|
+
border: 0px solid transparent;
|
|
620
|
+
text-shadow: 0px 0px 0px transparent;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
button:hover {
|
|
624
|
+
box-shadow: 0px 0px 0px transparent;
|
|
625
|
+
border: 0px solid transparent;
|
|
626
|
+
text-shadow: 0px 0px 0px transparent;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
button:active {
|
|
630
|
+
outline: none;
|
|
631
|
+
border: none;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
button:focus {
|
|
635
|
+
outline: 0;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ft-button {
|
|
639
|
+
position: relative;
|
|
640
|
+
display: flex;
|
|
641
|
+
justify-content: center;
|
|
642
|
+
align-items: center;
|
|
643
|
+
width: 100%;
|
|
644
|
+
overflow: hidden;
|
|
645
|
+
box-sizing: border-box;
|
|
646
|
+
border: none;
|
|
647
|
+
|
|
648
|
+
--ft-button-internal-font-size: ${Ki.fontSize};
|
|
649
|
+
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
650
|
+
--ft-button-internal-color: ${Ki.color};
|
|
651
|
+
--mdc-icon-size: ${Ki.iconSize};
|
|
652
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
653
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
654
|
+
${Bt(Bi.color,Ki.rippleColor)};
|
|
655
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), var(--mdc-icon-size));
|
|
656
|
+
|
|
657
|
+
border-radius: ${Ki.borderRadius};
|
|
658
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
659
|
+
background-color: ${Ki.backgroundColor};
|
|
660
|
+
color: var(--ft-button-internal-color);
|
|
661
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ft-button:not([disabled]):hover {
|
|
665
|
+
cursor: pointer;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.ft-button--dense {
|
|
669
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
670
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
671
|
+
border-radius: ${Ji};
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.ft-button--round {
|
|
675
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.ft-button[disabled] {
|
|
679
|
+
filter: grayscale(1);
|
|
680
|
+
opacity: ${Ki.opacityDisabled};
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.ft-button.ft-button--primary {
|
|
684
|
+
background-color: ${Gi};
|
|
685
|
+
--ft-button-internal-color: ${Xi};
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.ft-button.ft-button--outlined {
|
|
689
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
690
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.ft-button:focus {
|
|
694
|
+
outline: none;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.ft-button--label {
|
|
698
|
+
overflow: hidden;
|
|
699
|
+
white-space: nowrap;
|
|
700
|
+
text-overflow: ellipsis;
|
|
701
|
+
display: block;
|
|
702
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
703
|
+
${Bt(je.fontSize,"var(--ft-button-internal-font-size)")};
|
|
704
|
+
${Bt(je.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.ft-button--safari-fix .ft-button--label {
|
|
708
|
+
margin-right: 0;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
712
|
+
content: "\\0000a0";
|
|
713
|
+
display: inline-block;
|
|
714
|
+
width: 0;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.ft-button--label[hidden] {
|
|
718
|
+
display: none;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
mwc-icon {
|
|
722
|
+
flex-shrink: 0;
|
|
723
|
+
width: var(--mdc-icon-size);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.ft-button--label[hidden] + mwc-icon {
|
|
727
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
728
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.ft-button:not(.ft-button--trailing-icon) mwc-icon,
|
|
732
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
733
|
+
order: -1;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
ft-loader {
|
|
737
|
+
${Bt(Hi.size,Ki.iconSize)};
|
|
738
|
+
${Bt(Hi.color,"var(--ft-button-internal-color)")};
|
|
739
|
+
}
|
|
740
|
+
`]}getTemplate(){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-button--safari-fix":Dt,"ft-no-text-select":!0};return this.addTooltip(A`
|
|
741
|
+
<button part="button"
|
|
742
|
+
class="${Ot(t)}"
|
|
743
|
+
aria-label="${this.getLabel()}"
|
|
744
|
+
?disabled=${this.isDisabled()}>
|
|
745
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
746
|
+
<ft-typography part="label"
|
|
747
|
+
variant="button"
|
|
748
|
+
class="ft-button--label"
|
|
749
|
+
?hidden=${!this.hasTextContent()}>
|
|
750
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
751
|
+
</ft-typography>
|
|
752
|
+
${this.resolveIcon()}
|
|
753
|
+
</button>
|
|
754
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:A`
|
|
755
|
+
<ft-tooltip part="tooltip"
|
|
756
|
+
text="${this.getLabel()}"
|
|
757
|
+
position="${this.tooltipPosition}">
|
|
758
|
+
${t}
|
|
759
|
+
</ft-tooltip>
|
|
760
|
+
`}resolveIcon(){return this.loading?A`
|
|
761
|
+
<ft-loader></ft-loader> `:this.icon?A`
|
|
762
|
+
<mwc-icon>${this.icon}</mwc-icon> `:j}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};Yi.elementDefinitions={"ft-ripple":Fi,"ft-tooltip":Ui,"ft-typography":qe,"mwc-icon":Ni,"ft-loader":Vi},Zi([nt({type:Boolean})],Yi.prototype,"primary",void 0),Zi([nt({type:Boolean})],Yi.prototype,"outlined",void 0),Zi([nt({type:Boolean})],Yi.prototype,"disabled",void 0),Zi([nt({type:Boolean})],Yi.prototype,"dense",void 0),Zi([nt({type:Boolean})],Yi.prototype,"round",void 0),Zi([nt({type:String})],Yi.prototype,"label",void 0),Zi([nt({type:String})],Yi.prototype,"icon",void 0),Zi([nt({type:Boolean})],Yi.prototype,"trailingIcon",void 0),Zi([nt({type:Boolean})],Yi.prototype,"loading",void 0),Zi([nt({type:String})],Yi.prototype,"tooltipPosition",void 0),Zi([lt(".ft-button")],Yi.prototype,"button",void 0),Zi([lt(".ft-button--label slot")],Yi.prototype,"slottedContent",void 0),Yi=Zi([Ct("ft-button")],Yi);
|
|
387
763
|
/**
|
|
388
764
|
* @license
|
|
389
765
|
* Copyright 2017 Google Inc.
|
|
@@ -417,13 +793,18 @@ const ir=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert
|
|
|
417
793
|
* @license
|
|
418
794
|
* Copyright 2018 Google LLC
|
|
419
795
|
* SPDX-License-Identifier: Apache-2.0
|
|
420
|
-
*/;class rr extends ai{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=er}createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof _i){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof _i){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return
|
|
796
|
+
*/;class rr extends ai{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=er}createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof _i){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof _i){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return A`
|
|
797
|
+
<div class="mdc-form-field ${Ot(t)}">
|
|
798
|
+
<slot></slot>
|
|
799
|
+
<label class="mdc-label"
|
|
800
|
+
@click="${this._labelClick}">${this.label}</label>
|
|
801
|
+
</div>`}click(){this._labelClick()}_labelClick(){const t=this.input;t&&(t.focus(),t.click())}}ii([nt({type:Boolean})],rr.prototype,"alignEnd",void 0),ii([nt({type:Boolean})],rr.prototype,"spaceBetween",void 0),ii([nt({type:Boolean})],rr.prototype,"nowrap",void 0),ii([nt({type:String}),ir((async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)}))],rr.prototype,"label",void 0),ii([lt(".mdc-form-field")],rr.prototype,"mdcRoot",void 0),ii([ft("",!0,"*")],rr.prototype,"slottedInputs",void 0),ii([lt("label")],rr.prototype,"labelEl",void 0);
|
|
421
802
|
/**
|
|
422
803
|
* @license
|
|
423
804
|
* Copyright 2021 Google LLC
|
|
424
805
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
425
806
|
*/
|
|
426
|
-
const or=a`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family,var(--mdc-typography-font-family,Roboto,sans-serif));font-size
|
|
807
|
+
const or=a`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`
|
|
427
808
|
/**
|
|
428
809
|
* @license
|
|
429
810
|
* Copyright 2018 Google LLC
|
|
@@ -462,18 +843,337 @@ const ar=Symbol("selection controller");class cr{constructor(){this.selected=nul
|
|
|
462
843
|
* Copyright 2018 Google LLC
|
|
463
844
|
* SPDX-License-Identifier: Apache-2.0
|
|
464
845
|
*/
|
|
465
|
-
class hr extends _i{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=pr,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new Si((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>{this.rippleElement=t})),this.ripple)))}get checked(){return this._checked}set checked(t){var e,i;const r=this._checked;t!==r&&(this._checked=t,this.formElement&&(this.formElement.checked=t),null===(e=this._selectionController)||void 0===e||e.update(this),!1===t&&(null===(i=this.formElement)||void 0===i||i.blur()),this.requestUpdate("checked",r),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(t){this.formElement.value=t}renderRipple(){return this.shouldRenderRipple?
|
|
846
|
+
class hr extends _i{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=pr,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new Si((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>{this.rippleElement=t})),this.ripple)))}get checked(){return this._checked}set checked(t){var e,i;const r=this._checked;t!==r&&(this._checked=t,this.formElement&&(this.formElement.checked=t),null===(e=this._selectionController)||void 0===e||e.update(this),!1===t&&(null===(i=this.formElement)||void 0===i||i.blur()),this.requestUpdate("checked",r),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(t){this.formElement.value=t}renderRipple(){return this.shouldRenderRipple?A`<mwc-ripple unbounded accent
|
|
847
|
+
.internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"
|
|
848
|
+
.disabled="${this.disabled}"></mwc-ripple>`:""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}connectedCallback(){super.connectedCallback(),this._selectionController=sr.getController(this),this._selectionController.register(this),this._selectionController.update(this)}disconnectedCallback(){this._selectionController.unregister(this),this._selectionController=void 0}focus(){this.formElement.focus()}createAdapter(){return Object.assign(Object.assign({},(t=this.mdcRoot,{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)})),{setNativeControlDisabled:t=>{this.formElement.disabled=t}});var t}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleClick(){this.formElement.focus()}handleBlur(){this.focused=!1,this.formElement.blur(),this.rippleHandlers.endFocus()}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}render(){const t={"mdc-radio--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-radio--disabled":this.disabled};return A`
|
|
849
|
+
<div class="mdc-radio ${Ot(t)}">
|
|
850
|
+
<input
|
|
851
|
+
tabindex="${this.formElementTabIndex}"
|
|
852
|
+
class="mdc-radio__native-control"
|
|
853
|
+
type="radio"
|
|
854
|
+
name="${this.name}"
|
|
855
|
+
aria-label="${Oi(this.ariaLabel)}"
|
|
856
|
+
aria-labelledby="${Oi(this.ariaLabelledBy)}"
|
|
857
|
+
.checked="${this.checked}"
|
|
858
|
+
.value="${this.value}"
|
|
859
|
+
?disabled="${this.disabled}"
|
|
860
|
+
@change="${this.changeHandler}"
|
|
861
|
+
@focus="${this.handleFocus}"
|
|
862
|
+
@click="${this.handleClick}"
|
|
863
|
+
@blur="${this.handleBlur}"
|
|
864
|
+
@mousedown="${this.handleRippleMouseDown}"
|
|
865
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
|
866
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
|
867
|
+
@touchstart="${this.handleRippleTouchStart}"
|
|
868
|
+
@touchend="${this.handleRippleDeactivate}"
|
|
869
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
|
870
|
+
<div class="mdc-radio__background">
|
|
871
|
+
<div class="mdc-radio__outer-circle"></div>
|
|
872
|
+
<div class="mdc-radio__inner-circle"></div>
|
|
873
|
+
</div>
|
|
874
|
+
${this.renderRipple()}
|
|
875
|
+
</div>`}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}changeHandler(){this.checked=this.formElement.checked}}ii([lt(".mdc-radio")],hr.prototype,"mdcRoot",void 0),ii([lt("input")],hr.prototype,"formElement",void 0),ii([at()],hr.prototype,"useStateLayerCustomProperties",void 0),ii([nt({type:Boolean})],hr.prototype,"global",void 0),ii([nt({type:Boolean,reflect:!0})],hr.prototype,"checked",null),ii([nt({type:Boolean}),ir((function(t){this.mdcFoundation.setDisabled(t)}))],hr.prototype,"disabled",void 0),ii([nt({type:String}),ir((function(t){this._handleUpdatedValue(t)}))],hr.prototype,"value",void 0),ii([nt({type:String})],hr.prototype,"name",void 0),ii([nt({type:Boolean})],hr.prototype,"reducedTouchTarget",void 0),ii([nt({type:Number})],hr.prototype,"formElementTabIndex",void 0),ii([at()],hr.prototype,"focused",void 0),ii([at()],hr.prototype,"shouldRenderRipple",void 0),ii([dt("mwc-ripple")],hr.prototype,"ripple",void 0),ii([yi,nt({attribute:"aria-label"})],hr.prototype,"ariaLabel",void 0),ii([yi,nt({attribute:"aria-labelledby"})],hr.prototype,"ariaLabelledBy",void 0),ii([st({passive:!0})],hr.prototype,"handleRippleTouchStart",null);
|
|
466
876
|
/**
|
|
467
877
|
* @license
|
|
468
878
|
* Copyright 2021 Google LLC
|
|
469
879
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
470
880
|
*/
|
|
471
|
-
const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40px - 20px)/ 2)}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0
|
|
881
|
+
const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40px - 20px) / 2)}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54)}.mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio .mdc-radio__background::before{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);right:calc((40px - 40px) / 2);left:calc((40px - 40px) / 2);width:40px;height:40px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host{display:inline-block;outline:none}.mdc-radio{vertical-align:bottom}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unchecked-color, rgba(0, 0, 0, 0.54))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}`
|
|
472
882
|
/**
|
|
473
883
|
* @license
|
|
474
884
|
* Copyright 2018 Google LLC
|
|
475
885
|
* SPDX-License-Identifier: Apache-2.0
|
|
476
|
-
*/;let ur=class extends hr{};ur.styles=[fr],ur=ii([rt("mwc-radio")],ur);var mr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const br={borderRadiusM:Rt.external(Ft.borderRadiusM,"Design system"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),colorOnSurface:Rt.external(Ft.colorOnSurface,"Design system"),colorOnSurfaceMedium:Rt.external(Ft.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:Rt.external(Ft.colorOnSurfaceDisabled,"Design system"),colorPrimary:Rt.external(Ft.colorPrimary,"Design system"),colorOnPrimary:Rt.external(Ft.colorOnPrimary,"Design system"),fontFamily:Rt.external($e.fontFamily,"Body2 typography"),fontSize:Rt.external($e.fontSize,"Body2 typography"),fontWeight:Rt.external($e.fontWeight,"Body2 typography"),letterSpacing:Rt.external($e.letterSpacing,"Body2 typography"),lineHeight:Rt.external($e.lineHeight,"Body2 typography"),textTransform:Rt.external($e.textTransform,"Body2 typography")};let vr=class extends Tt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}getStyles(){return[a`.ft-filter-level--container{display:flex;flex-direction:column}.ft-filter-level--container>*{padding:0 10px}.ft-filter-level--go-back{flex-shrink:0;text-decoration:none;position:relative;border-radius:${br.borderRadiusM};overflow:hidden;display:flex;align-items:center;padding:4px 4px;gap:4px;cursor:pointer;color:${br.colorOnSurface}}.ft-filter-level--go-back:focus{outline:0}.ft-filter-level--go-back mwc-icon{flex-shrink:0}.ft-filter-level--go-back ft-typography{display:block;flex-grow:1;flex-shrink:0}.ft-filter-level--option{display:flex;align-items:center;max-width:100%}.ft-filter-level--option ft-button{margin-right:-10px;flex-shrink:0}ft-button{${Bt(Ki.color,br.colorOnSurface)}}mwc-formfield{flex-shrink:1;flex-grow:1;display:block;max-width:calc(100% + 10px);margin-left:-10px;word-break:break-word;--mdc-theme-secondary:${br.colorPrimary}--mdc-radio-unchecked-color:${br.colorOnSurfaceMedium}--mdc-checkbox-unchecked-color:${br.colorOnSurfaceMedium}--mdc-checkbox-ink-color:${br.colorOnPrimary}--mdc-radio-disabled-color:${br.colorOnSurfaceDisabled}--mdc-checkbox-disabled-color:${br.colorOnSurfaceDisabled}--mdc-theme-on-surface:${br.colorPrimary}--mdc-typography-body2-font-family:${br.fontFamily}--mdc-typography-body2-font-size:${br.fontSize}--mdc-typography-body2-font-weight:${br.fontWeight}--mdc-typography-body2-letter-spacing:${br.letterSpacing}--mdc-typography-body2-line-height:${br.lineHeight}--mdc-typography-body2-text-transform:${br.textTransform}--mdc-theme-text-primary-on-background:${br.colorOnSurface}}.ft-filter--disabled{--mdc-theme-text-primary-on-background:${br.colorOnSurfaceDisabled}}`]}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}getTemplate(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return N`<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">${null==this.parent?null:N`<div tabindex="0" class="ft-filter-level--go-back" ?disabled="${this.disabled}" @keyup="${this.goBackOnKeyPress}" @click="${this.goBackOnClick}"><ft-ripple></ft-ripple><mwc-icon>chevron_left</mwc-icon><ft-typography variant="body2">${this.parent.label}</ft-typography></div>`} ${St(e,(t=>t.value),(t=>{var e;return N`<div class="ft-filter-level--option" part="options">${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)} ${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?M:N`<ft-button icon="chevron_right" label="${t.label}" ?disabled="${this.disabled}" tooltipPosition="left" @click="${()=>this.displayLevel(t)}"></ft-button>`}</div>`}))} ${e.length<t.length?N`<ft-button class="ft-filter-level--display-more" icon="expand_more" dense trailingIcon @click="${this.displayMore}">${this.moreValuesButtonLabel}</ft-button>`:M}</div>`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return N`<mwc-formfield label="${t.label}"><mwc-checkbox reducedTouchTarget ?checked="${t.selected}" ?disabled="${this.disabled}" ?indeterminate="${Ge(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}" @change="${e=>this.toggleMultiValuedOption(e,t)}"></mwc-checkbox></mwc-formfield>`}toggleMultiValuedOption(t,e){var i;Ge(null!==(i=e.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).forEach((t=>t.selected=!1)),this.optionsChanged(t,e)}buildMonoValuedOption(t){return N`<mwc-formfield label="${t.label}"><mwc-radio reducedTouchTarget name="${this.id}" ?checked="${t.selected}" ?disabled="${this.disabled}" @click="${e=>this.toggleMonoValuedOption(e,t)}"></mwc-radio></mwc-formfield>`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vr.elementDefinitions={"ft-button":Yi,"ft-ripple":Fi,"ft-typography":qe,"mwc-checkbox":Ei,"mwc-formfield":nr,"mwc-icon":Ai,"mwc-radio":ur},mr([nt({type:String})],vr.prototype,"id",void 0),mr([nt({type:Object})],vr.prototype,"parent",void 0),mr([nt({type:Array})],vr.prototype,"options",void 0),mr([nt({type:Boolean})],vr.prototype,"multivalued",void 0),mr([nt({type:Boolean})],vr.prototype,"disabled",void 0),mr([nt({type:Boolean})],vr.prototype,"hideSelectedOptions",void 0),mr([nt({type:Boolean})],vr.prototype,"preventNavigation",void 0),mr([nt({type:String})],vr.prototype,"filter",void 0),mr([nt({type:String})],vr.prototype,"moreValuesButtonLabel",void 0),mr([nt({type:Number})],vr.prototype,"displayedValuesLimit",void 0),mr([lt(".ft-filter-level--container")],vr.prototype,"container",void 0),mr([at()],vr.prototype,"displayedPages",void 0),vr=mr([Ct("ft-filter-level")],vr);var gr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const yr={buttonsColor:Rt.extend("--ft-snap-scroll-buttons-color",Ft.colorPrimary),buttonsZIndex:Rt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:Rt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:Rt.external(Ft.colorSurface,"Design system")};class xr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let kr=class extends Tt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new zt(200),this.updateScrollDebouncer=new zt(100)}getStyles(){return a`.ft-snap-scroll{box-sizing:border-box;position:relative;display:flex;--ft-snap-scroll-transparent-color:transparent}.ft-snap-scroll.ft-snap-scroll--safari-fix{--ft-snap-scroll-transparent-color:rgba(255, 255, 255, 0)}.ft-snap-scroll,.ft-snap-scroll--content{overflow:hidden}.ft-snap-scroll--limit-size,.ft-snap-scroll--limit-size .ft-snap-scroll--content{width:100%;height:100%}.ft-snap-scroll--content{flex-grow:1;flex-shrink:1;box-sizing:border-box;scroll-snap-align:start;display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:${yr.gap}}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar{display:none}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content{-ms-overflow-style:none;scrollbar-width:none}.ft-snap-scroll--content::slotted(*){flex-shrink:0;flex-grow:1;max-height:100%;max-width:100%}.ft-snap-scroll--horizontal,.ft-snap-scroll--horizontal .ft-snap-scroll--content{width:100%}.ft-snap-scroll--vertical,.ft-snap-scroll--vertical .ft-snap-scroll--content{height:100%}.ft-snap-scroll--horizontal .ft-snap-scroll--content{flex-direction:row;overflow-x:auto}.ft-snap-scroll--vertical .ft-snap-scroll--content{flex-direction:column;overflow-y:auto}.ft-snap-scroll--next,.ft-snap-scroll--previous{position:absolute;display:flex;z-index:${yr.buttonsZIndex};opacity:1;transition:background-color .5s ease-in-out,opacity .5s ease-in-out,z-index .5s ease-in-out;${Bt(Ki.backgroundColor,"transparent")}${Bt(Ki.color,yr.buttonsColor)}}.ft-snap-scroll--next[hidden],.ft-snap-scroll--previous[hidden]{z-index:-1;opacity:0}.ft-snap-scroll--horizontal .ft-snap-scroll--previous{top:0;left:-1px;bottom:0;background:linear-gradient(to right,${yr.colorSurface} 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--previous{top:-1px;left:0;right:0;background:linear-gradient(to bottom,${yr.colorSurface} 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next{top:0;right:-1px;bottom:0;background:linear-gradient(to left,${yr.colorSurface} 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--next{left:0;right:0;bottom:-1px;background:linear-gradient(to top,${yr.colorSurface} 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,.ft-snap-scroll--vertical .ft-snap-scroll--next:hover,.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover{background-color:${yr.colorSurface}}`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}getTemplate(){const t=Ot({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Dt}),e=this.controls&&this.withScroll;return N`<div part="container" class="${t}"><ft-button class="ft-snap-scroll--previous" part="controls" primary icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}" ?hidden="${!e||this.startReached}" ?disabled="${!e||this.startReached}" @click="${this.previous}"></ft-button><slot class="ft-snap-scroll--content" part="content" @slotchange="${this.onSlotChange}"></slot><ft-button class="ft-snap-scroll--next" part="controls" primary icon="${this.horizontal?"arrow_forward_ios":"expand_more"}" ?hidden="${!e||this.endReached}" ?disabled="${!e||this.endReached}" @click="${this.next}"></ft-button></div>`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new xr(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};kr.elementDefinitions={"ft-button":Yi},gr([nt({type:Boolean})],kr.prototype,"horizontal",void 0),gr([nt({type:Boolean})],kr.prototype,"hideScrollbar",void 0),gr([nt({type:Boolean})],kr.prototype,"controls",void 0),gr([nt({type:Boolean})],kr.prototype,"limitSize",void 0),gr([at()],kr.prototype,"elements",void 0),gr([at()],kr.prototype,"currentElement",void 0),gr([at()],kr.prototype,"withScroll",void 0),gr([at()],kr.prototype,"startReached",void 0),gr([at()],kr.prototype,"endReached",void 0),gr([lt(".ft-snap-scroll--content")],kr.prototype,"contentSlot",void 0),kr=gr([Ct("ft-snap-scroll")],kr);var wr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let $r=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return N`<slot @slotchange="${this.updateSubOptionsFromSlot}"></slot>`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};$r.elementDefinitions={},wr([nt({type:String})],$r.prototype,"label",void 0),wr([nt({type:Object,converter:t=>t})],$r.prototype,"value",void 0),wr([nt({type:Boolean,reflect:!0})],$r.prototype,"selected",void 0),wr([nt({type:Object})],$r.prototype,"subOptions",void 0),$r=wr([Ct("ft-filter-option")],$r);var _r=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Sr=Rt.external(Ft.colorOutline,"Design system"),Or=Rt.external(Ft.colorOnSurface,"Design system"),zr=Rt.external(Ft.colorOnSurfaceMedium,"Design system"),Cr=Rt.external(Ft.colorPrimary,"Design system"),Er=Rt.external(Ft.colorSurface,"Design system"),Rr=Rt.external(Ft.transitionDuration,"Design system"),Br=Rt.external(Ft.transitionTimingFunction,"Design system");class Fr extends CustomEvent{constructor(t){super("change",{detail:t})}}let Tr=class extends Tt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new zt(300)}getStyles(){return[Ve,a`
|
|
886
|
+
*/;let ur=class extends hr{};ur.styles=[fr],ur=ii([rt("mwc-radio")],ur);var mr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const br={borderRadiusM:Rt.external(Ft.borderRadiusM,"Design system"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),colorOnSurface:Rt.external(Ft.colorOnSurface,"Design system"),colorOnSurfaceMedium:Rt.external(Ft.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:Rt.external(Ft.colorOnSurfaceDisabled,"Design system"),colorPrimary:Rt.external(Ft.colorPrimary,"Design system"),colorOnPrimary:Rt.external(Ft.colorOnPrimary,"Design system"),fontFamily:Rt.external($e.fontFamily,"Body2 typography"),fontSize:Rt.external($e.fontSize,"Body2 typography"),fontWeight:Rt.external($e.fontWeight,"Body2 typography"),letterSpacing:Rt.external($e.letterSpacing,"Body2 typography"),lineHeight:Rt.external($e.lineHeight,"Body2 typography"),textTransform:Rt.external($e.textTransform,"Body2 typography")};let vr=class extends Tt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}getStyles(){return[a`
|
|
887
|
+
.ft-filter-level--container {
|
|
888
|
+
display: flex;
|
|
889
|
+
flex-direction: column;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.ft-filter-level--container > * {
|
|
893
|
+
padding: 0 10px;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.ft-filter-level--go-back {
|
|
897
|
+
flex-shrink: 0;
|
|
898
|
+
text-decoration: none;
|
|
899
|
+
position: relative;
|
|
900
|
+
border-radius: ${br.borderRadiusM};
|
|
901
|
+
overflow: hidden;
|
|
902
|
+
display: flex;
|
|
903
|
+
align-items: center;
|
|
904
|
+
padding: 4px 4px;
|
|
905
|
+
gap: 4px;
|
|
906
|
+
cursor: pointer;
|
|
907
|
+
color: ${br.colorOnSurface};
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.ft-filter-level--go-back:focus {
|
|
911
|
+
outline: none;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.ft-filter-level--go-back mwc-icon {
|
|
915
|
+
flex-shrink: 0;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.ft-filter-level--go-back ft-typography {
|
|
919
|
+
display: block;
|
|
920
|
+
flex-grow: 1;
|
|
921
|
+
flex-shrink: 0;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.ft-filter-level--option {
|
|
925
|
+
display: flex;
|
|
926
|
+
align-items: center;
|
|
927
|
+
max-width: 100%;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ft-filter-level--option ft-button {
|
|
931
|
+
margin-right: -10px;
|
|
932
|
+
flex-shrink: 0;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
ft-button {
|
|
936
|
+
${Bt(Ki.color,br.colorOnSurface)};
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
mwc-formfield {
|
|
940
|
+
flex-shrink: 1;
|
|
941
|
+
flex-grow: 1;
|
|
942
|
+
display: block;
|
|
943
|
+
max-width: calc(100% + 10px);
|
|
944
|
+
margin-left: -10px;
|
|
945
|
+
word-break: break-word;
|
|
946
|
+
|
|
947
|
+
--mdc-theme-secondary: ${br.colorPrimary};
|
|
948
|
+
|
|
949
|
+
--mdc-radio-unchecked-color: ${br.colorOnSurfaceMedium};
|
|
950
|
+
--mdc-checkbox-unchecked-color: ${br.colorOnSurfaceMedium};
|
|
951
|
+
--mdc-checkbox-ink-color: ${br.colorOnPrimary};
|
|
952
|
+
|
|
953
|
+
--mdc-radio-disabled-color: ${br.colorOnSurfaceDisabled};
|
|
954
|
+
--mdc-checkbox-disabled-color: ${br.colorOnSurfaceDisabled};
|
|
955
|
+
|
|
956
|
+
--mdc-theme-on-surface: ${br.colorPrimary};
|
|
957
|
+
|
|
958
|
+
--mdc-typography-body2-font-family: ${br.fontFamily};
|
|
959
|
+
--mdc-typography-body2-font-size: ${br.fontSize};
|
|
960
|
+
--mdc-typography-body2-font-weight: ${br.fontWeight};
|
|
961
|
+
--mdc-typography-body2-letter-spacing: ${br.letterSpacing};
|
|
962
|
+
--mdc-typography-body2-line-height: ${br.lineHeight};
|
|
963
|
+
--mdc-typography-body2-text-transform: ${br.textTransform};
|
|
964
|
+
--mdc-theme-text-primary-on-background: ${br.colorOnSurface};
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.ft-filter--disabled {
|
|
968
|
+
--mdc-theme-text-primary-on-background: ${br.colorOnSurfaceDisabled};
|
|
969
|
+
}
|
|
970
|
+
`]}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}getTemplate(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return A`
|
|
971
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
972
|
+
${null==this.parent?null:A`
|
|
973
|
+
<div tabindex="0"
|
|
974
|
+
class="ft-filter-level--go-back"
|
|
975
|
+
?disabled=${this.disabled}
|
|
976
|
+
@keyup=${this.goBackOnKeyPress}
|
|
977
|
+
@click=${this.goBackOnClick}>
|
|
978
|
+
<ft-ripple></ft-ripple>
|
|
979
|
+
<mwc-icon>chevron_left</mwc-icon>
|
|
980
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
981
|
+
</div>
|
|
982
|
+
`}
|
|
983
|
+
${St(e,(t=>t.value),(t=>{var e;return A`
|
|
984
|
+
<div class="ft-filter-level--option" part="options">
|
|
985
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
986
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?j:A`
|
|
987
|
+
<ft-button icon="chevron_right"
|
|
988
|
+
label="${t.label}"
|
|
989
|
+
?disabled=${this.disabled}
|
|
990
|
+
tooltipPosition="left"
|
|
991
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
992
|
+
`}
|
|
993
|
+
</div>
|
|
994
|
+
`}))}
|
|
995
|
+
${e.length<t.length?A`
|
|
996
|
+
<ft-button
|
|
997
|
+
class="ft-filter-level--display-more"
|
|
998
|
+
icon="expand_more"
|
|
999
|
+
dense trailingIcon
|
|
1000
|
+
@click=${this.displayMore}>
|
|
1001
|
+
${this.moreValuesButtonLabel}
|
|
1002
|
+
</ft-button>
|
|
1003
|
+
`:j}
|
|
1004
|
+
</div>
|
|
1005
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return A`
|
|
1006
|
+
<mwc-formfield label="${t.label}">
|
|
1007
|
+
<mwc-checkbox
|
|
1008
|
+
reducedTouchTarget
|
|
1009
|
+
?checked=${t.selected}
|
|
1010
|
+
?disabled=${this.disabled}
|
|
1011
|
+
?indeterminate=${Ge(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1012
|
+
@change=${e=>this.toggleMultiValuedOption(e,t)}
|
|
1013
|
+
></mwc-checkbox>
|
|
1014
|
+
</mwc-formfield>
|
|
1015
|
+
`}toggleMultiValuedOption(t,e){var i;Ge(null!==(i=e.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).forEach((t=>t.selected=!1)),this.optionsChanged(t,e)}buildMonoValuedOption(t){return A`
|
|
1016
|
+
<mwc-formfield label="${t.label}">
|
|
1017
|
+
<mwc-radio
|
|
1018
|
+
reducedTouchTarget
|
|
1019
|
+
name="${this.id}"
|
|
1020
|
+
?checked=${t.selected}
|
|
1021
|
+
?disabled=${this.disabled}
|
|
1022
|
+
@click=${e=>this.toggleMonoValuedOption(e,t)}
|
|
1023
|
+
></mwc-radio>
|
|
1024
|
+
</mwc-formfield>
|
|
1025
|
+
`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vr.elementDefinitions={"ft-button":Yi,"ft-ripple":Fi,"ft-typography":qe,"mwc-checkbox":Ei,"mwc-formfield":nr,"mwc-icon":Ni,"mwc-radio":ur},mr([nt({type:String})],vr.prototype,"id",void 0),mr([nt({type:Object})],vr.prototype,"parent",void 0),mr([nt({type:Array})],vr.prototype,"options",void 0),mr([nt({type:Boolean})],vr.prototype,"multivalued",void 0),mr([nt({type:Boolean})],vr.prototype,"disabled",void 0),mr([nt({type:Boolean})],vr.prototype,"hideSelectedOptions",void 0),mr([nt({type:Boolean})],vr.prototype,"preventNavigation",void 0),mr([nt({type:String})],vr.prototype,"filter",void 0),mr([nt({type:String})],vr.prototype,"moreValuesButtonLabel",void 0),mr([nt({type:Number})],vr.prototype,"displayedValuesLimit",void 0),mr([lt(".ft-filter-level--container")],vr.prototype,"container",void 0),mr([at()],vr.prototype,"displayedPages",void 0),vr=mr([Ct("ft-filter-level")],vr);var gr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const xr={buttonsColor:Rt.extend("--ft-snap-scroll-buttons-color",Ft.colorPrimary),buttonsZIndex:Rt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:Rt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:Rt.external(Ft.colorSurface,"Design system")};class yr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let kr=class extends Tt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new zt(200),this.updateScrollDebouncer=new zt(100)}getStyles(){return a`
|
|
1026
|
+
.ft-snap-scroll {
|
|
1027
|
+
box-sizing: border-box;
|
|
1028
|
+
position: relative;
|
|
1029
|
+
display: flex;
|
|
1030
|
+
|
|
1031
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1035
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1036
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1037
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.ft-snap-scroll,
|
|
1041
|
+
.ft-snap-scroll--content {
|
|
1042
|
+
overflow: hidden;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.ft-snap-scroll--limit-size,
|
|
1046
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1047
|
+
width: 100%;
|
|
1048
|
+
height: 100%;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.ft-snap-scroll--content {
|
|
1052
|
+
flex-grow: 1;
|
|
1053
|
+
flex-shrink: 1;
|
|
1054
|
+
box-sizing: border-box;
|
|
1055
|
+
scroll-snap-align: start;
|
|
1056
|
+
display: flex;
|
|
1057
|
+
flex-wrap: nowrap;
|
|
1058
|
+
align-items: flex-start;
|
|
1059
|
+
justify-content: flex-start;
|
|
1060
|
+
gap: ${xr.gap};
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1064
|
+
display: none;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1068
|
+
-ms-overflow-style: none;
|
|
1069
|
+
scrollbar-width: none;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1073
|
+
flex-shrink: 0;
|
|
1074
|
+
flex-grow: 1;
|
|
1075
|
+
max-height: 100%;
|
|
1076
|
+
max-width: 100%;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.ft-snap-scroll--horizontal,
|
|
1080
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1081
|
+
width: 100%;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.ft-snap-scroll--vertical,
|
|
1085
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1086
|
+
height: 100%;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1090
|
+
flex-direction: row;
|
|
1091
|
+
overflow-x: auto;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1095
|
+
flex-direction: column;
|
|
1096
|
+
overflow-y: auto;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.ft-snap-scroll--previous,
|
|
1100
|
+
.ft-snap-scroll--next {
|
|
1101
|
+
position: absolute;
|
|
1102
|
+
display: flex;
|
|
1103
|
+
z-index: ${xr.buttonsZIndex};
|
|
1104
|
+
opacity: 1;
|
|
1105
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1106
|
+
${Bt(Ki.backgroundColor,"transparent")};
|
|
1107
|
+
${Bt(Ki.color,xr.buttonsColor)};
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.ft-snap-scroll--previous[hidden],
|
|
1111
|
+
.ft-snap-scroll--next[hidden] {
|
|
1112
|
+
z-index: -1;
|
|
1113
|
+
opacity: 0;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1117
|
+
top: 0;
|
|
1118
|
+
left: -1px;
|
|
1119
|
+
bottom: 0;
|
|
1120
|
+
background: linear-gradient(to right, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1124
|
+
top: -1px;
|
|
1125
|
+
left: 0;
|
|
1126
|
+
right: 0;
|
|
1127
|
+
background: linear-gradient(to bottom, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1131
|
+
top: 0;
|
|
1132
|
+
right: -1px;
|
|
1133
|
+
bottom: 0;
|
|
1134
|
+
background: linear-gradient(to left, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1138
|
+
left: 0;
|
|
1139
|
+
right: 0;
|
|
1140
|
+
bottom: -1px;
|
|
1141
|
+
background: linear-gradient(to top, ${xr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1145
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1146
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1147
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1148
|
+
background-color: ${xr.colorSurface};
|
|
1149
|
+
}
|
|
1150
|
+
`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}getTemplate(){const t=Ot({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Dt}),e=this.controls&&this.withScroll;return A`
|
|
1151
|
+
<div part="container" class="${t}">
|
|
1152
|
+
<ft-button
|
|
1153
|
+
class="ft-snap-scroll--previous"
|
|
1154
|
+
part="controls"
|
|
1155
|
+
primary
|
|
1156
|
+
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
1157
|
+
?hidden=${!e||this.startReached}
|
|
1158
|
+
?disabled=${!e||this.startReached}
|
|
1159
|
+
@click=${this.previous}
|
|
1160
|
+
></ft-button>
|
|
1161
|
+
<slot class="ft-snap-scroll--content"
|
|
1162
|
+
part="content"
|
|
1163
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
1164
|
+
<ft-button
|
|
1165
|
+
class="ft-snap-scroll--next"
|
|
1166
|
+
part="controls"
|
|
1167
|
+
primary
|
|
1168
|
+
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
1169
|
+
?hidden=${!e||this.endReached}
|
|
1170
|
+
?disabled=${!e||this.endReached}
|
|
1171
|
+
@click=${this.next}
|
|
1172
|
+
></ft-button>
|
|
1173
|
+
</div>
|
|
1174
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new yr(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};kr.elementDefinitions={"ft-button":Yi},gr([nt({type:Boolean})],kr.prototype,"horizontal",void 0),gr([nt({type:Boolean})],kr.prototype,"hideScrollbar",void 0),gr([nt({type:Boolean})],kr.prototype,"controls",void 0),gr([nt({type:Boolean})],kr.prototype,"limitSize",void 0),gr([at()],kr.prototype,"elements",void 0),gr([at()],kr.prototype,"currentElement",void 0),gr([at()],kr.prototype,"withScroll",void 0),gr([at()],kr.prototype,"startReached",void 0),gr([at()],kr.prototype,"endReached",void 0),gr([lt(".ft-snap-scroll--content")],kr.prototype,"contentSlot",void 0),kr=gr([Ct("ft-snap-scroll")],kr);var wr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let $r=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return A`
|
|
1175
|
+
<slot @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1176
|
+
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};$r.elementDefinitions={},wr([nt({type:String})],$r.prototype,"label",void 0),wr([nt({type:Object,converter:t=>t})],$r.prototype,"value",void 0),wr([nt({type:Boolean,reflect:!0})],$r.prototype,"selected",void 0),wr([nt({type:Object})],$r.prototype,"subOptions",void 0),$r=wr([Ct("ft-filter-option")],$r);var _r=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Sr=Rt.external(Ft.colorOutline,"Design system"),Or=Rt.external(Ft.colorOnSurface,"Design system"),zr=Rt.external(Ft.colorOnSurfaceMedium,"Design system"),Cr=Rt.external(Ft.colorPrimary,"Design system"),Er=Rt.external(Ft.colorSurface,"Design system"),Rr=Rt.external(Ft.transitionDuration,"Design system"),Br=Rt.external(Ft.transitionTimingFunction,"Design system");class Fr extends CustomEvent{constructor(t){super("change",{detail:t})}}let Tr=class extends Tt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new zt(300)}getStyles(){return[Ve,a`
|
|
477
1177
|
:host {
|
|
478
1178
|
display: flex;
|
|
479
1179
|
max-height: 100%;
|
|
@@ -578,14 +1278,14 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
578
1278
|
slot {
|
|
579
1279
|
display: none;
|
|
580
1280
|
}
|
|
581
|
-
`]}get flatOptions(){return Ge(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}getTemplate(){var t,e;const i=this.flatOptions.some((t=>t.selected));let r=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return
|
|
1281
|
+
`]}get flatOptions(){return Ge(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}getTemplate(){var t,e;const i=this.flatOptions.some((t=>t.selected));let r=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return A`
|
|
582
1282
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
583
1283
|
part="container">
|
|
584
|
-
${this.label||i?
|
|
1284
|
+
${this.label||i?A`
|
|
585
1285
|
<div class="ft-filter--header" part="header">
|
|
586
1286
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
587
1287
|
</ft-typography>
|
|
588
|
-
${i?
|
|
1288
|
+
${i?A`
|
|
589
1289
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
590
1290
|
${this.clearButtonLabel}
|
|
591
1291
|
</ft-button>
|
|
@@ -605,8 +1305,8 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
605
1305
|
</div>
|
|
606
1306
|
<slot @slotchange=${this.updateOptionsFromSlot}></slot>
|
|
607
1307
|
</div>
|
|
608
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return
|
|
609
|
-
${this.raiseSelectedOptions&&e.length>0?
|
|
1308
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return A`
|
|
1309
|
+
${this.raiseSelectedOptions&&e.length>0?A`
|
|
610
1310
|
<ft-filter-level
|
|
611
1311
|
id="${this.id}"
|
|
612
1312
|
?multivalued=${this.multivalued}
|
|
@@ -624,7 +1324,7 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
624
1324
|
${this.renderLevel(r,this.options)}
|
|
625
1325
|
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var r;const o=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(o,null!==(r=null==t?void 0:t.subOptions)&&void 0!==r?r:[],t)}))}
|
|
626
1326
|
</ft-snap-scroll>
|
|
627
|
-
`}renderLevel(t,e,i){return
|
|
1327
|
+
`}renderLevel(t,e,i){return A`
|
|
628
1328
|
<ft-filter-level
|
|
629
1329
|
class="${t}"
|
|
630
1330
|
id="${this.id}"
|
|
@@ -647,7 +1347,7 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
647
1347
|
* Copyright 2017 Google LLC
|
|
648
1348
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
649
1349
|
*/
|
|
650
|
-
class
|
|
1350
|
+
class Nr extends vt{constructor(t){if(super(t),this.it=j,t.type!==mt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===j||null==t)return this.vt=void 0,this.it=t;if(t===M)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Nr.directiveName="unsafeHTML",Nr.resultType=1;const Ar=bt(Nr);var Mr,jr;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}(Mr||(Mr={})),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=""}(jr||(jr={}));const Lr=new Map([...["abw"].map((t=>[t,jr.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,jr.AUDIO])),...["avi"].map((t=>[t,jr.AVI])),...["chm","xhs"].map((t=>[t,jr.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,jr.CODE])),...["csv"].map((t=>[t,jr.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,jr.DITA])),...["epub"].map((t=>[t,jr.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,jr.EXCEL])),...["flac"].map((t=>[t,jr.FLAC])),...["gif"].map((t=>[t,jr.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,jr.GZIP])),...["html","htm","xhtml"].map((t=>[t,jr.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,jr.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,jr.JPEG])),...["json"].map((t=>[t,jr.JSON])),...["m4a","m4p"].map((t=>[t,jr.M4A])),...["mov","qt"].map((t=>[t,jr.MOV])),...["mp3"].map((t=>[t,jr.MP3])),...["mp4","m4v"].map((t=>[t,jr.MP4])),...["ogg","oga"].map((t=>[t,jr.OGG])),...["pdf","ps"].map((t=>[t,jr.PDF])),...["png"].map((t=>[t,jr.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,jr.POWERPOINT])),...["rar"].map((t=>[t,jr.RAR])),...["stp"].map((t=>[t,jr.STP])),...["txt","rtf","md","mdown"].map((t=>[t,jr.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,jr.VIDEO])),...["wav"].map((t=>[t,jr.WAV])),...["wma"].map((t=>[t,jr.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,jr.WORD])),...["xml","xsl","rdf"].map((t=>[t,jr.XML])),...["yaml","yml","x-yaml"].map((t=>[t,jr.YAML])),...["zip"].map((t=>[t,jr.ZIP]))]),Dr=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var Ir,Ur=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format"}(Ir||(Ir={}));const Pr=Rt.create("--ft-icon-font-size","SIZE","24px"),Hr=Rt.extend("--ft-icon-fluid-topics-font-family",Rt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Vr=Rt.extend("--ft-icon-file-format-font-family",Rt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Zr=a`
|
|
651
1351
|
.ft-icon--fluid-topics {
|
|
652
1352
|
font-family: ${Hr}, ft-icons, fticons, sans-serif;
|
|
653
1353
|
font-size: ${Pr};
|
|
@@ -684,10 +1384,221 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
684
1384
|
height: ${Pr};
|
|
685
1385
|
text-align: center;
|
|
686
1386
|
}
|
|
687
|
-
`]}getTemplate(){return
|
|
1387
|
+
`]}getTemplate(){return A`
|
|
688
1388
|
<slot @slotchange=${()=>this.requestUpdate()} hidden></slot>
|
|
689
|
-
<i class="ft-icon ${"ft-icon--"+this.variant}">${
|
|
690
|
-
`}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:""}getIcon(){var t,e;return this.variant===Ir.file_format?null!==(t=Mr[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=jr[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}};Kr.elementDefinitions={},Ur([nt()],Kr.prototype,"variant",void 0),Ur([lt("slot")],Kr.prototype,"slottedContent",void 0),Kr=Ur([Ct("ft-icon")],Kr);var qr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Gr=Rt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),Xr=Rt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Jr=Rt.external(Ft.colorOutline,"Design system");let Yr=class extends Tt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}getStyles(){return a`.ft-accordion-item{display:flex;flex-direction:column}.ft-accordion-item--toggle{flex-shrink:0;flex-grow:0;position:relative;display:flex;align-items:center;cursor:pointer;padding:${Xr};${Gr}gap:calc(${Gr} / 2);outline:0}.ft-accordion-item--label{flex-grow:1;flex-shrink:1;display:block}.ft-accordion-item--content{box-sizing:border-box;flex-shrink:1;flex-grow:1;overflow:hidden;height:0}.ft-accordion-item--active .ft-accordion-item--content{height:initial;overflow:visible;padding:${Xr};${Gr}}.ft-accordion-item--separator{border-bottom:1px solid ${Jr}}`}getTemplate(){return N`<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}"><div class="ft-accordion-item--toggle" part="toggle" @click="${()=>this.active=!this.active}" @keydown="${this.onToggleKeyDown}" tabindex="0"><ft-ripple part="toggle-ripple"></ft-ripple>${this.icon?N`<mwc-icon>${this.icon}</mwc-icon>`:null} ${this.label?N`<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}</ft-typography>`:N`<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>`}<mwc-icon>${this.active?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-accordion-item--content" part="content" @focusin="${()=>this.active=!0}"><slot></slot></div><div class="ft-accordion-item--separator" part="separator"></div></div>`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}};Yr.elementDefinitions={"ft-ripple":Fi,"ft-typography":qe,"mwc-icon":Ai},qr([nt({type:String})],Yr.prototype,"icon",void 0),qr([nt({type:String})],Yr.prototype,"label",void 0),qr([nt({type:Boolean,reflect:!0})],Yr.prototype,"active",void 0),Yr=qr([Ct("ft-accordion-item")],Yr);var Qr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let to=class extends Tt{constructor(){super(...arguments),this.multi=!1}getStyles(){return a`.ft-accordion{box-sizing:border-box}`}getTemplate(){return N`<div class="ft-accordion"><slot @activated="${this.onChange}"></slot></div>`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}};to.elementDefinitions={},Qr([nt({type:Boolean})],to.prototype,"multi",void 0),Qr([lt("slot")],to.prototype,"content",void 0),to=Qr([Ct("ft-accordion")],to);var eo=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const io=Rt.extend("--ft-chip-color",Ft.colorOnSurface),ro={backgroundColor:Rt.extend("--ft-chip-background-color",Ft.colorSurface),color:io,fontSize:Rt.extend("--ft-chip-font-size",$e.fontSize),iconSize:Rt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:Rt.extend("--ft-chip-ripple-color",io),horizontalPadding:Rt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:Rt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),opacityDisabled:Rt.external(Ft.colorOpacityDisabled,"Design system")},oo=Rt.extend("--ft-chip-highlighted-color",Rt.extend("--ft-chip-color",Ft.colorOnPrimary)),no={backgroundColor:Rt.extend("--ft-chip-highlighted-background-color",Rt.extend("--ft-chip-background-color",Ft.colorPrimary)),color:oo,rippleColor:Rt.extend("--ft-chip-highlighted-ripple-color",oo)},ao=Rt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),co=Rt.create("--ft-chip-dense-vertical-padding","SIZE","4px");class so extends CustomEvent{constructor(){super("icon-click")}}let lo=class extends Tt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return[At,a`:host{display:inline-block;max-width:100%}.ft-chip{position:relative;display:flex;justify-content:center;align-items:center;width:100%;overflow:hidden;box-sizing:border-box;--ft-chip-internal-font-size:${ro.fontSize}--ft-chip-internal-line-height:max(20px, calc(var(--ft-chip-internal-font-size) + 2px));--mdc-icon-size:${ro.iconSize}--ft-chip-internal-vertical-padding:${ro.verticalPadding}--ft-chip-internal-horizontal-padding:${ro.horizontalPadding}--ft-chip-internal-icon-padding:3px;--ft-chip-internal-content-height:max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));border:1px solid ${ro.colorOutline};color:${ro.color};${Bt(Bi.color,ro.rippleColor)}border-radius:calc(var(--ft-chip-internal-content-height)/ 2 + var(--ft-chip-internal-vertical-padding));padding:calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);background-color:${ro.backgroundColor};line-height:var(--ft-chip-internal-content-height)}.ft-chip--dense{--ft-chip-internal-icon-padding:3px;--ft-chip-internal-vertical-padding:${co}--ft-chip-internal-horizontal-padding:${ao}--ft-chip-internal-line-height:max(16px, calc(var(--ft-chip-internal-font-size) + 2px))}.ft-chip--no-content{--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding))}.ft-chip--disabled{cursor:default;pointer-events:none;filter:grayscale(1);opacity:${ro.opacityDisabled}}.ft-chip--highlighted{border:none;padding:var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);background-color:${no.backgroundColor};${Bt(Bi.color,no.rippleColor)}color:${no.color}}.ft-chip--clickable{cursor:pointer;-webkit-mask-image:radial-gradient(white,#000)}.ft-chip:focus{outline:0}.ft-chip--icon-container{display:inline-flex;position:relative;overflow:hidden;border-radius:100%;justify-content:center;align-items:center;flex-shrink:0;padding:var(--ft-chip-internal-icon-padding);margin:calc((-1) * var(--ft-chip-internal-icon-padding))}.ft-chip--label{display:block;margin:0 var(--ft-chip-internal-horizontal-padding);${Bt($e.lineHeight,"var(--ft-chip-internal-content-height)")}}.ft-chip--safari-fix .ft-chip--label{margin-right:0}.ft-chip:not(.ft-chip--multi-line) .ft-chip--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after{content:"\\0000a0";display:inline-block;width:0}.ft-chip--no-content .ft-chip--label{display:none}.ft-chip--no-content .ft-chip--label+.ft-chip--icon-container{width:var(--ft-chip-internal-content-height);height:var(--ft-chip-internal-content-height)}.ft-chip--icon-container:focus{outline:0}.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container{order:-1}`]}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Dt};return N`<div class="${Ot(t)}" aria-label="${this.getLabel()}" tabindex="${this.interactionsOnChip?0:-1}" @keyup="${this.onKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnChip}"></ft-ripple><ft-typography variant="body2" element="span" class="ft-chip--label"><slot @slotchange="${this.onSlotchange}"></slot></ft-typography>${this.internalIcon?this.renderIcon():null}</div>`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return N`<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}" tabindex="${this.interactionsOnIcon?0:-1}" @click="${this.onIconClick}" @keyup="${this.onIconKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnIcon}"></ft-ripple><mwc-icon>${this.internalIcon}</mwc-icon></div>`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new so))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new so))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}};lo.elementDefinitions={"ft-ripple":Fi,"ft-typography":qe,"mwc-icon":Ai},eo([nt({type:Boolean})],lo.prototype,"highlighted",void 0),eo([nt({type:Boolean})],lo.prototype,"removable",void 0),eo([nt({type:Boolean})],lo.prototype,"disabled",void 0),eo([nt({type:Boolean})],lo.prototype,"clickable",void 0),eo([nt({type:Boolean})],lo.prototype,"iconClickable",void 0),eo([nt({type:Boolean})],lo.prototype,"dense",void 0),eo([nt({type:Boolean})],lo.prototype,"multiLine",void 0),eo([nt({type:String})],lo.prototype,"label",void 0),eo([nt({type:String})],lo.prototype,"icon",void 0),eo([nt({type:Boolean})],lo.prototype,"trailingIcon",void 0),eo([lt("ft-typography slot")],lo.prototype,"slottedContent",void 0),lo=eo([Ct("ft-chip")],lo);var po=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ho={fontSize:Rt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:Rt.create("--ft-input-label-raised-font-size","SIZE","11px"),verticalSpacing:Rt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:Rt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:Rt.extend("--ft-input-label-border-color",Ft.colorOutline),textColor:Rt.extend("--ft-input-label-text-color",Ft.colorOnSurfaceMedium),disabledTextColor:Rt.extend("--ft-input-label-disabled-text-color",Ft.colorOnSurfaceDisabled),borderRadiusS:Rt.external(Ft.borderRadiusS,"Design system")};let fo=class extends Tt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Ve,a`
|
|
1389
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">${Ar(this.getIcon())}</i>
|
|
1390
|
+
`}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:""}getIcon(){var t,e;return this.variant===Ir.file_format?null!==(t=jr[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=Mr[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}};Kr.elementDefinitions={},Ur([nt()],Kr.prototype,"variant",void 0),Ur([lt("slot")],Kr.prototype,"slottedContent",void 0),Kr=Ur([Ct("ft-icon")],Kr);var qr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Gr=Rt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),Xr=Rt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Jr=Rt.external(Ft.colorOutline,"Design system");let Yr=class extends Tt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}getStyles(){return a`
|
|
1391
|
+
.ft-accordion-item {
|
|
1392
|
+
display: flex;
|
|
1393
|
+
flex-direction: column;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.ft-accordion-item--toggle {
|
|
1397
|
+
flex-shrink: 0;
|
|
1398
|
+
flex-grow: 0;
|
|
1399
|
+
position: relative;
|
|
1400
|
+
display: flex;
|
|
1401
|
+
align-items: center;
|
|
1402
|
+
cursor: pointer;
|
|
1403
|
+
padding: ${Xr} ${Gr};
|
|
1404
|
+
gap: calc(${Gr} / 2);
|
|
1405
|
+
outline: none;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
.ft-accordion-item--label {
|
|
1409
|
+
flex-grow: 1;
|
|
1410
|
+
flex-shrink: 1;
|
|
1411
|
+
display: block;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
.ft-accordion-item--content {
|
|
1415
|
+
box-sizing: border-box;
|
|
1416
|
+
flex-shrink: 1;
|
|
1417
|
+
flex-grow: 1;
|
|
1418
|
+
overflow: hidden;
|
|
1419
|
+
height: 0;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1423
|
+
height: initial;
|
|
1424
|
+
overflow: visible;
|
|
1425
|
+
padding: ${Xr} ${Gr};
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.ft-accordion-item--separator {
|
|
1429
|
+
border-bottom: 1px solid ${Jr};
|
|
1430
|
+
}
|
|
1431
|
+
`}getTemplate(){return A`
|
|
1432
|
+
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1433
|
+
<div class="ft-accordion-item--toggle"
|
|
1434
|
+
part="toggle"
|
|
1435
|
+
@click=${()=>this.active=!this.active}
|
|
1436
|
+
@keydown=${this.onToggleKeyDown}
|
|
1437
|
+
tabindex="0">
|
|
1438
|
+
<ft-ripple part="toggle-ripple"></ft-ripple>
|
|
1439
|
+
${this.icon?A`
|
|
1440
|
+
<mwc-icon>${this.icon}</mwc-icon>
|
|
1441
|
+
`:null}
|
|
1442
|
+
${this.label?A`
|
|
1443
|
+
<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
|
|
1444
|
+
</ft-typography>
|
|
1445
|
+
`:A`
|
|
1446
|
+
<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
|
|
1447
|
+
`}
|
|
1448
|
+
<mwc-icon>${this.active?"expand_less":"expand_more"}</mwc-icon>
|
|
1449
|
+
</div>
|
|
1450
|
+
<div class="ft-accordion-item--content" part="content" @focusin=${()=>this.active=!0}>
|
|
1451
|
+
<slot></slot>
|
|
1452
|
+
</div>
|
|
1453
|
+
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1454
|
+
</div>
|
|
1455
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}};Yr.elementDefinitions={"ft-ripple":Fi,"ft-typography":qe,"mwc-icon":Ni},qr([nt({type:String})],Yr.prototype,"icon",void 0),qr([nt({type:String})],Yr.prototype,"label",void 0),qr([nt({type:Boolean,reflect:!0})],Yr.prototype,"active",void 0),Yr=qr([Ct("ft-accordion-item")],Yr);var Qr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let to=class extends Tt{constructor(){super(...arguments),this.multi=!1}getStyles(){return a`
|
|
1456
|
+
.ft-accordion {
|
|
1457
|
+
box-sizing: border-box;
|
|
1458
|
+
}
|
|
1459
|
+
`}getTemplate(){return A`
|
|
1460
|
+
<div class="ft-accordion">
|
|
1461
|
+
<slot @activated=${this.onChange}></slot>
|
|
1462
|
+
</div>
|
|
1463
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}};to.elementDefinitions={},Qr([nt({type:Boolean})],to.prototype,"multi",void 0),Qr([lt("slot")],to.prototype,"content",void 0),to=Qr([Ct("ft-accordion")],to);var eo=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const io=Rt.extend("--ft-chip-color",Ft.colorOnSurface),ro={backgroundColor:Rt.extend("--ft-chip-background-color",Ft.colorSurface),color:io,fontSize:Rt.extend("--ft-chip-font-size",$e.fontSize),iconSize:Rt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:Rt.extend("--ft-chip-ripple-color",io),horizontalPadding:Rt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:Rt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),opacityDisabled:Rt.external(Ft.colorOpacityDisabled,"Design system")},oo=Rt.extend("--ft-chip-highlighted-color",Rt.extend("--ft-chip-color",Ft.colorOnPrimary)),no={backgroundColor:Rt.extend("--ft-chip-highlighted-background-color",Rt.extend("--ft-chip-background-color",Ft.colorPrimary)),color:oo,rippleColor:Rt.extend("--ft-chip-highlighted-ripple-color",oo)},ao=Rt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),co=Rt.create("--ft-chip-dense-vertical-padding","SIZE","4px");class so extends CustomEvent{constructor(){super("icon-click")}}let lo=class extends Tt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return[Nt,a`
|
|
1464
|
+
:host {
|
|
1465
|
+
display: inline-block;
|
|
1466
|
+
max-width: 100%;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.ft-chip {
|
|
1470
|
+
position: relative;
|
|
1471
|
+
display: flex;
|
|
1472
|
+
justify-content: center;
|
|
1473
|
+
align-items: center;
|
|
1474
|
+
width: 100%;
|
|
1475
|
+
overflow: hidden;
|
|
1476
|
+
box-sizing: border-box;
|
|
1477
|
+
|
|
1478
|
+
--ft-chip-internal-font-size: ${ro.fontSize};
|
|
1479
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1480
|
+
--mdc-icon-size: ${ro.iconSize};
|
|
1481
|
+
--ft-chip-internal-vertical-padding: ${ro.verticalPadding};
|
|
1482
|
+
--ft-chip-internal-horizontal-padding: ${ro.horizontalPadding};
|
|
1483
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
1484
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));
|
|
1485
|
+
|
|
1486
|
+
border: 1px solid ${ro.colorOutline};
|
|
1487
|
+
color: ${ro.color};
|
|
1488
|
+
${Bt(Bi.color,ro.rippleColor)};
|
|
1489
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1490
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1491
|
+
background-color: ${ro.backgroundColor};
|
|
1492
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.ft-chip--dense {
|
|
1496
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
1497
|
+
--ft-chip-internal-vertical-padding: ${co};
|
|
1498
|
+
--ft-chip-internal-horizontal-padding: ${ao};
|
|
1499
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
.ft-chip--no-content {
|
|
1503
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.ft-chip--disabled {
|
|
1507
|
+
cursor: default;
|
|
1508
|
+
pointer-events: none;
|
|
1509
|
+
filter: grayscale(1);
|
|
1510
|
+
opacity: ${ro.opacityDisabled};
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
.ft-chip--highlighted {
|
|
1514
|
+
border: none;
|
|
1515
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1516
|
+
background-color: ${no.backgroundColor};
|
|
1517
|
+
${Bt(Bi.color,no.rippleColor)};
|
|
1518
|
+
color: ${no.color};
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.ft-chip--clickable {
|
|
1522
|
+
cursor: pointer;
|
|
1523
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
.ft-chip:focus {
|
|
1527
|
+
outline: none;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.ft-chip--icon-container {
|
|
1531
|
+
display: inline-flex;
|
|
1532
|
+
position: relative;
|
|
1533
|
+
overflow: hidden;
|
|
1534
|
+
border-radius: 100%;
|
|
1535
|
+
justify-content: center;
|
|
1536
|
+
align-items: center;
|
|
1537
|
+
flex-shrink: 0;
|
|
1538
|
+
|
|
1539
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
1540
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
.ft-chip--label {
|
|
1544
|
+
display: block;
|
|
1545
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1546
|
+
${Bt($e.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1547
|
+
${Bt($e.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
1551
|
+
margin-right: 0;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
1555
|
+
overflow: hidden;
|
|
1556
|
+
white-space: nowrap;
|
|
1557
|
+
text-overflow: ellipsis;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
1561
|
+
content: "\\0000a0";
|
|
1562
|
+
display: inline-block;
|
|
1563
|
+
width: 0;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
.ft-chip--no-content .ft-chip--label {
|
|
1567
|
+
display: none;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
1571
|
+
width: var(--ft-chip-internal-content-height);
|
|
1572
|
+
height: var(--ft-chip-internal-content-height);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
.ft-chip--icon-container:focus {
|
|
1576
|
+
outline: none;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
1580
|
+
order: -1;
|
|
1581
|
+
}
|
|
1582
|
+
`]}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Dt};return A`
|
|
1583
|
+
<div class="${Ot(t)}"
|
|
1584
|
+
aria-label="${this.getLabel()}"
|
|
1585
|
+
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1586
|
+
@keyup=${this.onKeyUp}>
|
|
1587
|
+
<ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
|
|
1588
|
+
<ft-typography variant="body2" element="span" class="ft-chip--label">
|
|
1589
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1590
|
+
</ft-typography>
|
|
1591
|
+
${this.internalIcon?this.renderIcon():null}
|
|
1592
|
+
</div>
|
|
1593
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return A`
|
|
1594
|
+
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
1595
|
+
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
1596
|
+
@click=${this.onIconClick}
|
|
1597
|
+
@keyup=${this.onIconKeyUp}>
|
|
1598
|
+
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1599
|
+
<mwc-icon>${this.internalIcon}</mwc-icon>
|
|
1600
|
+
</div>
|
|
1601
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new so))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new so))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}};lo.elementDefinitions={"ft-ripple":Fi,"ft-typography":qe,"mwc-icon":Ni},eo([nt({type:Boolean})],lo.prototype,"highlighted",void 0),eo([nt({type:Boolean})],lo.prototype,"removable",void 0),eo([nt({type:Boolean})],lo.prototype,"disabled",void 0),eo([nt({type:Boolean})],lo.prototype,"clickable",void 0),eo([nt({type:Boolean})],lo.prototype,"iconClickable",void 0),eo([nt({type:Boolean})],lo.prototype,"dense",void 0),eo([nt({type:Boolean})],lo.prototype,"multiLine",void 0),eo([nt({type:String})],lo.prototype,"label",void 0),eo([nt({type:String})],lo.prototype,"icon",void 0),eo([nt({type:Boolean})],lo.prototype,"trailingIcon",void 0),eo([lt("ft-typography slot")],lo.prototype,"slottedContent",void 0),lo=eo([Ct("ft-chip")],lo);var po=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ho={fontSize:Rt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:Rt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:Rt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:Rt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:Rt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:Rt.extend("--ft-input-label-border-color",Ft.colorOutline),textColor:Rt.extend("--ft-input-label-text-color",Ft.colorOnSurfaceMedium),disabledTextColor:Rt.extend("--ft-input-label-disabled-text-color",Ft.colorOnSurfaceDisabled),colorSurface:Rt.external(Ft.colorSurface,"Design system"),borderRadiusS:Rt.external(Ft.borderRadiusS,"Design system")};let fo=class extends Tt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Ve,a`
|
|
691
1602
|
.ft-input-label {
|
|
692
1603
|
position: absolute;
|
|
693
1604
|
inset: 0;
|
|
@@ -724,7 +1635,6 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
724
1635
|
border-bottom-width: 1px;
|
|
725
1636
|
border-bottom-style: solid;
|
|
726
1637
|
border-color: inherit;
|
|
727
|
-
padding: 0 4px;
|
|
728
1638
|
color: ${ho.textColor};
|
|
729
1639
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
730
1640
|
${Bt(_e.fontSize,ho.fontSize)};
|
|
@@ -736,6 +1646,7 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
736
1646
|
}
|
|
737
1647
|
|
|
738
1648
|
.ft-input-label--hidden-text {
|
|
1649
|
+
padding: 0 4px;
|
|
739
1650
|
opacity: 0;
|
|
740
1651
|
}
|
|
741
1652
|
|
|
@@ -747,7 +1658,7 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
747
1658
|
overflow: hidden;
|
|
748
1659
|
white-space: nowrap;
|
|
749
1660
|
text-overflow: ellipsis;
|
|
750
|
-
padding: ${ho.verticalSpacing}
|
|
1661
|
+
padding: ${ho.verticalSpacing} 4px;
|
|
751
1662
|
margin: calc(${ho.verticalSpacing} * -1) 0;
|
|
752
1663
|
}
|
|
753
1664
|
|
|
@@ -780,22 +1691,26 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
780
1691
|
}
|
|
781
1692
|
|
|
782
1693
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1694
|
+
padding: 4px;
|
|
1695
|
+
z-index: ${ho.raisedZIndex};
|
|
1696
|
+
background-color: ${ho.colorSurface};
|
|
1697
|
+
border-radius: ${ho.borderRadiusS};
|
|
783
1698
|
top: calc(var(--ft-typography-caption-line-height) / -2);
|
|
784
1699
|
}
|
|
785
1700
|
|
|
786
1701
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
787
1702
|
border-top: none;
|
|
788
1703
|
}
|
|
789
|
-
`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return
|
|
1704
|
+
`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return A`
|
|
790
1705
|
<div class="${Ot(t)}">
|
|
791
|
-
${this.text?
|
|
1706
|
+
${this.text?A`
|
|
792
1707
|
<div class="ft-input-label--text ft-typography--caption">
|
|
793
1708
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
794
1709
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
795
1710
|
</div>
|
|
796
1711
|
`:null}
|
|
797
1712
|
</div>
|
|
798
|
-
`}};fo.elementDefinitions={},po([nt({type:String})],fo.prototype,"text",void 0),po([nt({type:Boolean})],fo.prototype,"raised",void 0),po([nt({type:Boolean})],fo.prototype,"outlined",void 0),po([nt({type:Boolean})],fo.prototype,"disabled",void 0),fo=po([Ct("ft-input-label")],fo);var uo=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let mo=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return
|
|
1713
|
+
`}};fo.elementDefinitions={},po([nt({type:String})],fo.prototype,"text",void 0),po([nt({type:Boolean})],fo.prototype,"raised",void 0),po([nt({type:Boolean})],fo.prototype,"outlined",void 0),po([nt({type:Boolean})],fo.prototype,"disabled",void 0),fo=po([Ct("ft-input-label")],fo);var uo=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let mo=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return A``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};mo.elementDefinitions={},uo([nt({type:String})],mo.prototype,"label",void 0),uo([nt({type:Object,converter:t=>t})],mo.prototype,"value",void 0),uo([nt({type:Boolean,reflect:!0})],mo.prototype,"selected",void 0),mo=uo([Ct("ft-select-option")],mo);const bo={labelSize:Rt.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:Rt.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:Rt.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:Rt.extend("--ft-select-selected-option-color",Ft.colorOnSurface),helperColor:Rt.extend("--ft-select-helper-color",Ft.colorOnSurfaceMedium),optionsColor:Rt.extend("--ft-select-options-color",Ft.colorOnSurface),optionsZIndex:Rt.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:Rt.external(Ft.colorSurface,"Design system"),colorOnSurfaceDisabled:Rt.external(Ft.colorOnSurfaceDisabled,"Design system"),colorPrimary:Rt.external(Ft.colorPrimary,"Design system"),borderRadiusS:Rt.external(Ft.borderRadiusS,"Design system"),elevation02:Rt.external(Ft.elevation02,"Design system")};let vo=class extends Tt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}getStyles(){return[He,Ve,a`
|
|
799
1714
|
*:focus {
|
|
800
1715
|
outline: none;
|
|
801
1716
|
}
|
|
@@ -821,13 +1736,14 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
821
1736
|
padding-left: 16px;
|
|
822
1737
|
padding-right: 8px;
|
|
823
1738
|
gap: 8px;
|
|
1739
|
+
color: ${bo.selectedOptionColor};
|
|
1740
|
+
${Bt(Bi.color,bo.selectedOptionColor)};
|
|
824
1741
|
}
|
|
825
1742
|
|
|
826
1743
|
.ft-select--input-panel,
|
|
827
1744
|
.ft-select--option {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
--ft-opacity-color-content-on-surface-dragged: 0.04;
|
|
1745
|
+
${Bt(Bi.opacityContentOnSurfaceHover,"0.08")};
|
|
1746
|
+
${Bt(Bi.opacityContentOnSurfaceDragged,"0.04")};
|
|
831
1747
|
}
|
|
832
1748
|
|
|
833
1749
|
.ft-select--disabled .ft-select--input-panel,
|
|
@@ -892,6 +1808,7 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
892
1808
|
top: 100%;
|
|
893
1809
|
left: 0;
|
|
894
1810
|
right: 0;
|
|
1811
|
+
color: ${bo.optionsColor};
|
|
895
1812
|
background: ${bo.colorSurface};
|
|
896
1813
|
z-index: ${bo.optionsZIndex};
|
|
897
1814
|
box-shadow: ${bo.elevation02};
|
|
@@ -913,7 +1830,7 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
913
1830
|
padding: 0 12px 0 16px;
|
|
914
1831
|
color: ${bo.helperColor};
|
|
915
1832
|
}
|
|
916
|
-
`]}getTemplate(){var t,e,i,r,o;let n=!this.disabled&&this.optionsDisplayed&&this.hasOptions,a=this.disabled||!this.hasOptions;const c={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return
|
|
1833
|
+
`]}getTemplate(){var t,e,i,r,o;let n=!this.disabled&&this.optionsDisplayed&&this.hasOptions,a=this.disabled||!this.hasOptions;const c={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return A`
|
|
917
1834
|
<div class="${Ot(c)}" part="container">
|
|
918
1835
|
<div class="ft-select--main-panel" part="main-panel">
|
|
919
1836
|
<ft-input-label text="${this.label}"
|
|
@@ -925,14 +1842,12 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
925
1842
|
<div class="ft-select--input-panel"
|
|
926
1843
|
part="selected-value"
|
|
927
1844
|
tabindex="${a?"-1":"0"}"
|
|
928
|
-
@click=${()=>this.optionsDisplayed=!this.optionsDisplayed}
|
|
1845
|
+
@click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
|
|
929
1846
|
@keydown=${this.onMainPanelKeyDown}
|
|
930
1847
|
aria-label="${this.label}"
|
|
931
1848
|
aria-haspopup="listbox"
|
|
932
1849
|
aria-expanded="${n}">
|
|
933
|
-
|
|
934
|
-
<ft-ripple ?disabled=${a} activated></ft-ripple>
|
|
935
|
-
`}
|
|
1850
|
+
<ft-ripple ?disabled=${a} ?activated=${!this.outlined}></ft-ripple>
|
|
936
1851
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
937
1852
|
${null!=(null===(i=this.selectedOption)||void 0===i?void 0:i.value)&&null!==(o=null===(r=this.selectedOption)||void 0===r?void 0:r.label)&&void 0!==o?o:""}
|
|
938
1853
|
</ft-typography>
|
|
@@ -945,14 +1860,14 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
945
1860
|
${St(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
946
1861
|
</div>
|
|
947
1862
|
</div>
|
|
948
|
-
${this.helper?
|
|
1863
|
+
${this.helper?A`
|
|
949
1864
|
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
950
1865
|
</ft-typography>`:void 0}
|
|
951
1866
|
</div>
|
|
952
1867
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
953
1868
|
@option-change=${this.updateOptionsFromSlot}
|
|
954
1869
|
></slot>
|
|
955
|
-
`}renderOption(t){let e=this.selectedOption===t;return
|
|
1870
|
+
`}renderOption(t){let e=this.selectedOption===t;return A`
|
|
956
1871
|
<div class="${Ot({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
957
1872
|
part="option"
|
|
958
1873
|
tabindex="0"
|
|
@@ -961,4 +1876,640 @@ class Ar extends vt{constructor(t){if(super(t),this.it=M,t.type!==mt)throw Error
|
|
|
961
1876
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
962
1877
|
${t.label}
|
|
963
1878
|
</div>
|
|
964
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};vo.elementDefinitions={"ft-input-label":fo,"ft-typography":qe,"ft-ripple":Fi,"mwc-icon":Ai},uo([nt({type:String})],vo.prototype,"label",void 0),uo([nt({type:String})],vo.prototype,"helper",void 0),uo([nt({type:Boolean})],vo.prototype,"outlined",void 0),uo([nt({type:Boolean})],vo.prototype,"disabled",void 0),uo([nt({type:Array})],vo.prototype,"options",void 0),uo([at()],vo.prototype,"selectedOption",void 0),uo([at()],vo.prototype,"optionsDisplayed",void 0),uo([at()],vo.prototype,"focusOptions",void 0),uo([lt(".ft-select")],vo.prototype,"container",void 0),uo([lt(".ft-select--input-panel")],vo.prototype,"mainPanel",void 0),uo([lt(".ft-select--option:first-child")],vo.prototype,"firstOption",void 0),uo([lt(".ft-select--option:focus")],vo.prototype,"focusedOption",void 0),uo([lt(".ft-select--option.ft-select--option-selected")],vo.prototype,"selectedOptionElement",void 0),uo([lt(".ft-select--option:last-child")],vo.prototype,"lastOption",void 0),uo([lt("slot")],vo.prototype,"optionsSlot",void 0),vo=uo([Ct("ft-select")],vo);var go=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const yo={filtersButton:"Filters",oneFilterEnabled:"1 filter enabled",nFiltersEnabled:"{0} filter(s) enabled",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",removeRecentSearch:"Remove",back:"Back"},xo={height:Rt.create("--ft-search-bar-height","SIZE","38px"),borderRadius:Rt.extend("--ft-search-bar-border-radius",Ft.borderRadiusS),mobileOpenPosition:Rt.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:Rt.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:Rt.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:Rt.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:Rt.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:Rt.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:Rt.external(Ft.colorSurface,"Design system"),colorOnSurface:Rt.external(Ft.colorOnSurface,"Design system"),colorOnSurfaceMedium:Rt.external(Ft.colorOnSurfaceMedium,"Design system"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),colorPrimary:Rt.external(Ft.colorPrimary,"Design system"),elevation02:Rt.external(Ft.elevation02,"Design system"),buttonColor:Rt.external(Ki.color,"Button"),buttonRippleColor:Rt.external(Ki.rippleColor,"Button")};class ko extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class wo extends CustomEvent{constructor(t){super("change",{detail:t})}}t.FtSearchBar=class extends Tt{constructor(){super(...arguments),this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new Nt(yo,{}),this.displayedFilters=[],this.searchRequestSerializer=t=>function(t,e){var i;const r=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t}/search/all?${r.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new zt(500),this.suggestDebouncer=new zt(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.sizeCategory!==It.S&&(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))}}getStyles(){return[He,a`*{box-sizing:border-box}.ft-search-bar--container{display:flex;flex-direction:column;gap:8px;background:${xo.colorSurface};outline:0;--ft-search-bar-border-radius--internal:${xo.borderRadius}}.ft-search-bar--mobile-menu-open{position:${xo.mobileOpenPosition};top:${xo.mobileOpenTop};bottom:${xo.mobileOpenBottom};left:${xo.mobileOpenLeft};right:${xo.mobileOpenRight};z-index:${xo.floatingZIndex};padding:16px}.ft-search-bar{flex-shrink:0;position:relative;display:flex;flex-direction:row;align-items:center;height:${xo.height};background:${xo.colorSurface};border:1px solid ${xo.colorOutline};border-radius:var(--ft-search-bar-border-radius--internal)}.ft-search-bar--floating-panel-open .ft-search-bar{border-radius:var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal) 0 0}.ft-search-bar--input-container{flex-grow:1;flex-shrink:1;align-self:stretch;position:relative}.ft-search-bar--input{border:none;background-color:transparent;padding:0 8px;height:100%;width:100%}.ft-search-bar--input:focus-within{outline-color:${xo.colorPrimary}}.ft-search-bar--mobile .ft-search-bar--suggestions{flex-grow:1;flex-shrink:1;overflow-y:auto;height:0}.ft-search-bar--mobile-open .ft-search-bar--suggestions{height:initial}.ft-search-bar--desktop .ft-search-bar--suggestions,.ft-search-bar--floating-panel{position:absolute;z-index:var(--ft-search-bar-floating-components-z-index,1);top:100%;left:-1px;right:-1px;display:none;background:${xo.colorSurface};border:1px solid ${xo.colorOutline};border-radius:0 0 var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal);box-shadow:${xo.elevation02};outline:0}.ft-search-bar--desktop .ft-search-bar--suggestions{top:calc(100% + 1px)}.ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty{display:block}.ft-search-bar--no-suggestions{text-align:center;padding:8px;color:${xo.colorOnSurface}}.ft-search-bar--suggestion{text-decoration:none;position:relative;display:flex;align-items:center;padding:8px;gap:8px;cursor:pointer;color:${xo.colorOnSurface};min-height:52px}.ft-search-bar--desktop .ft-search-bar--suggestion{min-height:44px}.ft-search-bar--suggestion:focus{outline:0}.ft-search-bar--mobile .ft-search-bar--suggestion:first-child,.ft-search-bar--recent-search+.ft-search-bar--suggestion:not(.ft-search-bar--recent-search){border-top:1px solid ${xo.colorOutline}}.ft-search-bar--suggestion ft-typography{display:block;flex-grow:1;flex-shrink:1}.ft-search-bar>ft-button{flex-shrink:0}.ft-search-bar--left-action{${Bt(Ki.borderRadius,"calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px)")}border-right:1px solid ${xo.colorOutline}}.ft-search-bar--floating-panel-open .ft-search-bar--left-action{${Bt(Ki.borderRadius,"calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 0")}}.ft-search-bar--clear-query,.ft-search-bar--launch-search{margin:0 4px}.ft-search-bar--separator{height:20px;border-right:1px solid ${xo.colorOutline}}.ft-search-bar--floating-panel{padding:16px}.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel{display:block}.ft-search-bar--desktop .ft-search-bar--facets-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 10px;margin-bottom:16px}.ft-search-bar--mobile .ft-search-bar--facets-actions{flex-shrink:0;flex-grow:0;display:flex;gap:16px;justify-content:space-evenly}.ft-search-bar--mobile .ft-search-bar--facets-actions>*{flex-grow:1;flex-basis:0}.ft-search-bar>.ft-search-bar--content-locale,.ft-search-bar>.ft-search-bar--content-locale::part(container),.ft-search-bar>.ft-search-bar--content-locale::part(main-panel){height:100%}.ft-search-bar>.ft-search-bar--content-locale::part(options){top:calc(100% + 1px);right:unset;width:max-content;min-width:100%}.ft-search-bar>.ft-search-bar--content-locale::part(selected-value){${Bt(ro.color,xo.buttonColor)}${Bt(ro.rippleColor,xo.buttonRippleColor)}border-radius:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px)}.ft-search-bar>.ft-search-bar--content-locale::part(label){${Bt(ho.borderColor,"transparent")}${Bt(Bi.color,xo.buttonRippleColor)}}.ft-search-bar--floating-panel .ft-search-bar--content-locale{margin-right:auto;min-width:250px;${Bt(bo.optionsZIndex,"2")}}.ft-search-bar--mobile .ft-search-bar--content-locale::part(clear-button){display:none}.ft-search-bar--floating-panel .ft-search-bar--filters-container{display:block;height:400px;--ft-snap-scroll-gap:16px}.ft-search-bar--floating-panel ft-filter{display:flex;flex-grow:0;max-height:100%;max-width:250px}.ft-search-bar--hierarchical-filter{width:250px}.ft-search-bar--mobile .ft-search-bar--filters-container{flex-grow:1;flex-shrink:1;overflow-y:auto;margin:0 -16px;padding:0 16px}.ft-search-bar--mobile .ft-search-bar--filters-container ft-filter{display:flex;max-height:60vh}.ft-search-bar--mobile ft-filter::part(container){flex-grow:1}.ft-search-bar--filter-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.ft-search-bar--filter-label>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ft-search-bar--filter-label>:first-child{flex-shrink:0}.ft-search-bar--filter-label>:last-child{flex-shrink:1;color:${xo.colorOnSurfaceMedium}}ft-accordion-item::part(toggle){margin-left:-16px;margin-right:-16px}ft-accordion-item::part(label){overflow:hidden}ft-accordion-item::part(content){padding-left:0;padding-right:0}.ft-search-bar--selected-filters{flex-shrink:0;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}.ft-search-bar--selected-filters *{max-width:100%}`]}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.displayedFilters.map((t=>({id:t}))),filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get hasFacets(){return this.facets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}getTemplate(){const t={"ft-search-bar--container":!0,"ft-search-bar--mobile":this.sizeCategory===It.S,"ft-search-bar--desktop":this.sizeCategory!==It.S,"ft-search-bar--floating-panel-open":this.sizeCategory!==It.S&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return N`<ft-size-watcher @change="${this.updateSize}"></ft-size-watcher><div class="${Ot(t)}" part="container" tabindex="-1">${this.sizeCategory===It.S?this.renderMobileSearchBar():this.renderDesktopSearchBar()}</div>`}renderDesktopSearchBar(){return N`<div class="ft-search-bar" part="search-bar">${this.renderSearchBarLeftAction()}<div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keydown="${this.onSearchBarKeyDown}" @keyup="${this.onSearchBarKeyUp}"> ${this.renderSuggestions()}</div>${this.renderDesktopSearchBarButtons()}<div class="ft-search-bar--floating-panel" @keyup="${this.onFloatingContainerKeyUp}" tabindex="-1">${this.renderDesktopFacetsActions()} ${this.renderDesktopFacets()}</div></div>${this.renderSelectedFacets()}`}renderSearchBarLeftAction(){return this.hasFacets?N`<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action" part="filters-opener" trailingIcon icon="${this.displayFacets?"expand_less":"expand_more"}" @click="${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}" @focusin="${t=>t.stopPropagation()}">${this.labelResolver.resolve("filtersButton")}</ft-button>`:this.hasLocaleSelector?N`<ft-select class="ft-search-bar--content-locale ft-search-bar--left-action" part="content-locale" @change="${t=>this.contentLocale=t.detail}">${St(this.availableContentLocales,(t=>t.lang),(t=>N`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:M}renderDesktopSearchBarButtons(){return N`${this.query?N`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round dense label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>this.setQuery("")}"></ft-button><div class="ft-search-bar--separator"></div>`:null}<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round dense label="${this.labelResolver.resolve("searchButton")}" @click="${this.launchSearch}"></ft-button>`}renderMobileSearchBar(){return N`<div class="ft-search-bar"><div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keyup="${this.onSearchBarKeyUp}" @focus="${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}"></div>${this.renderMobileSearchBarButtons()}</div>${this.mobileMenuOpen?this.renderMobileFacetsActions():this.renderSelectedFacets()} ${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?N`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}"></ft-button>`:N`<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round label="${this.labelResolver.resolve("searchButton")}" @click="${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}"></ft-button>`}renderMobileFacetsActions(){if(!this.hasLocaleSelector&&0===this.displayedFilters.length)return null;if(this.displayFacets)return N`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" icon="arrow_back" label="${this.labelResolver.resolve("back")}" @click="${()=>this.displayFacets=!1}">${this.labelResolver.resolve("back")}</ft-button>${this.searchFilters.length>0?N`<ft-button part="facets-actions" @click="${this.clearFilters}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}</div>`;let t=this.searchFilters.length>0?this.searchFilters.length>1?this.labelResolver.resolve("nFiltersEnabled",this.searchFilters.length):this.labelResolver.resolve("oneFilterEnabled"):this.labelResolver.resolve("filtersButton");return N`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" @click="${()=>this.displayFacets=!0}">${t}</ft-button></div>`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop(),i=this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale,options:[]})));return N`<ft-accordion class="ft-search-bar--filters-container">${this.hasLocaleSelector?N`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}</ft-typography><ft-typography variant="body2">${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}</ft-typography></div><ft-filter part="filters" class="ft-search-bar--content-locale" id="content-locale" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" raiseSelectedOptions .options="${i}" @change="${t=>this.contentLocale=t.detail[0]}"></ft-filter></ft-accordion-item>`:null} ${St(this.facets,(t=>t.key),(t=>{const e=Ye(t);return N`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${t.label}</ft-typography><ft-typography variant="body2">${function(t){return Ge(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}</ft-typography></div><ft-filter part="filters" id="${e.id}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter></ft-accordion-item>`}))}</ft-accordion>`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return N`<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}" @keydown="${this.onSuggestKeyDown}">${St(t.slice(0,5),(t=>t),(t=>N`<a href="${this.searchRequestSerializer({...this.request,query:t})}" part="suggestions" class="ft-search-bar--suggestion ft-search-bar--recent-search" @keyup="${e=>this.onSuggestKeyUp(e,t)}" @click="${e=>this.onSuggestClick(e,t)}"><ft-ripple></ft-ripple><mwc-icon part="suggestion-icon">history</mwc-icon><ft-typography variant="body1">${t}</ft-typography><ft-button icon="close" round part="remove-suggestion" ?dense="${this.sizeCategory!==It.S}" label="${this.labelResolver.resolve("removeRecentSearch")}" @click="${e=>this.removeRecentSearch(e,t)}"></ft-button></a>`))} ${St(this.suggestions,(t=>t.value),(t=>N`<a href="${this.searchRequestSerializer({...this.request,query:t.value})}" part="suggestions" class="ft-search-bar--suggestion" @keyup="${e=>this.onSuggestKeyUp(e,t.value)}" @click="${e=>this.onSuggestClick(e,t.value)}"><ft-ripple></ft-ripple>${this.getIcon(t)}<ft-typography variant="body1">${t.value}</ft-typography></a>`))} ${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?N`<ft-typography class="ft-search-bar--no-suggestions" element="p" variant="body2">${this.labelResolver.resolve("noSuggestions")}</ft-typography>`:null}</div>`}getIcon(t){const e="DOCUMENT"===t.type?Ir.file_format:Ir.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?jr.BOOK:jr.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,r,o,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[a,c]=((null!==(i=Dr.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(o=null!==(r=Lr.get(c))&&void 0!==r?r:Lr.get(e))&&void 0!==o?o:Lr.get(a))&&void 0!==n?n:Mr.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=jr.TOPICS}return N`<ft-icon variant="${e}" part="suggestion-icon">${i}</ft-icon>`}renderDesktopFacetsActions(){return N`<div class="ft-search-bar--facets-actions">${this.hasLocaleSelector?N`<ft-select class="ft-search-bar--content-locale" part="content-locale" label="${this.labelResolver.resolve("contentLocaleSelector")}" outlined @change="${t=>this.contentLocale=t.detail}">${St(this.availableContentLocales,(t=>t.lang),(t=>N`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:null} ${this.searchFilters.length>0?N`<ft-button part="facets-actions" @click="${this.clearFilters}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}<slot name="facets-actions"></slot></div>`}renderDesktopFacets(){return this.hasFacets?N`<ft-snap-scroll horizontal limitSize controls class="ft-search-bar--filters-container" part="filters-container">${St(this.facets,(t=>t.key),(t=>{const e=Ye(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return N`<ft-filter class="${i?"ft-search-bar--hierarchical-filter":""}" part="filters" id="${e.id}" label="${e.label}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter>`}))}</ft-snap-scroll>`:null}renderSelectedFacets(){return this.hasLocaleSelector||0!==this.searchFilters.length?N`<div class="ft-search-bar--selected-filters" part="selected-filters-container">${this.hasLocaleSelector&&(this.hasFacets||this.sizeCategory===It.S)?N`<ft-chip part="selected-filters">${this.getLocaleLabel(this.contentLocale)}</ft-chip>`:null} ${St(this.searchFilters,(t=>t.key),(t=>St(t.values,(e=>{let i=t.label+": "+function(t){return Xe(t).split("|").join(" > ")}(e);return N`<ft-tooltip inline text="${i}"><ft-chip part="selected-filters" removable label="${i}" @icon-click="${()=>this.setFilter(t.key,t.label,t.values.filter((t=>t!==e)))}">${function(t){return Xe(t).split("|").pop()}(e)}</ft-chip></ft-tooltip>`}))))}</div>`:null}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i;t.has("labels")&&(this.labelResolver=new Nt(yo,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&this.sizeCategory!==It.S),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0&&(this.availableContentLocales.some((t=>t.lang===this.contentLocale))||(this.contentLocale=null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)),t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new wo(this.request))}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded&&(null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet))),this.scrollToFacet=void 0)}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){this.displayedFilters.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.focus(),this.dispatchEvent(new ko(this.request))}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e,i){let r=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((e=>{e.key===t&&Ge(e.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=i.includes(t.value)))})),i.length&&r.push({key:t,label:e,negative:!1,values:i}),this.searchFilters=r,this.scrollToFacet=t}clearFilters(){this.facets.forEach((t=>Ge(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,r,o,n;t.preventDefault(),t.stopPropagation();const a=null!==(n=null!==(r=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.input;null==a||a.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,r,o,n,a;switch(t.key){case"ArrowUp":null===(r=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(a=null!==(n=null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===a||a.focus(),t.preventDefault(),t.stopPropagation()}}},t.FtSearchBar.elementDefinitions={"ft-accordion":to,"ft-accordion-item":Yr,"ft-button":Yi,"ft-chip":lo,"ft-filter":Tr,"ft-filter-option":$r,"ft-icon":Kr,"ft-ripple":Fi,"ft-select":vo,"ft-select-option":mo,"ft-size-watcher":Ht,"ft-snap-scroll":kr,"ft-tooltip":Ui,"ft-typography":qe,"mwc-icon":Ai},go([nt({type:String})],t.FtSearchBar.prototype,"baseUrl",void 0),go([nt({type:String})],t.FtSearchBar.prototype,"apiIntegrationIdentifier",void 0),go([nt({type:String})],t.FtSearchBar.prototype,"contentLocale",void 0),go([at()],t.FtSearchBar.prototype,"availableContentLocales",void 0),go([nt({type:String})],t.FtSearchBar.prototype,"uiLocale",void 0),go([Et({})],t.FtSearchBar.prototype,"labels",void 0),go([Et([])],t.FtSearchBar.prototype,"displayedFilters",void 0),go([nt()],t.FtSearchBar.prototype,"searchRequestSerializer",void 0),go([at()],t.FtSearchBar.prototype,"searchFilters",void 0),go([at()],t.FtSearchBar.prototype,"sizeCategory",void 0),go([at()],t.FtSearchBar.prototype,"displayFacets",void 0),go([at()],t.FtSearchBar.prototype,"mobileMenuOpen",void 0),go([at()],t.FtSearchBar.prototype,"facets",void 0),go([lt(".ft-search-bar--container")],t.FtSearchBar.prototype,"container",void 0),go([lt(".ft-search-bar--filters-opener")],t.FtSearchBar.prototype,"filtersOpener",void 0),go([lt(".ft-search-bar--floating-panel")],t.FtSearchBar.prototype,"floatingContainer",void 0),go([lt("ft-snap-scroll.ft-search-bar--filters-container")],t.FtSearchBar.prototype,"scrollingFiltersContainer",void 0),go([lt(".ft-search-bar--input")],t.FtSearchBar.prototype,"input",void 0),go([at()],t.FtSearchBar.prototype,"query",void 0),go([at()],t.FtSearchBar.prototype,"suggestions",void 0),go([at()],t.FtSearchBar.prototype,"suggestionsLoaded",void 0),go([at()],t.FtSearchBar.prototype,"recentSearches",void 0),go([at()],t.FtSearchBar.prototype,"scrollToFacet",void 0),go([lt(".ft-search-bar--suggestion:first-child")],t.FtSearchBar.prototype,"firstSuggestion",void 0),go([lt(".ft-search-bar--suggestion:focus-within")],t.FtSearchBar.prototype,"focusedSuggestion",void 0),go([lt(".ft-search-bar--suggestion:last-child")],t.FtSearchBar.prototype,"lastSuggestion",void 0),go([at()],t.FtSearchBar.prototype,"api",void 0),t.FtSearchBar=go([Ct("ft-search-bar")],t.FtSearchBar),t.DEFAULT_LABELS=yo,t.FtSearchBarCssVariables=xo,t.LaunchSearchEvent=ko,t.SearchStateChangeEvent=wo,Object.defineProperty(t,"t",{value:!0})}({});
|
|
1879
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};vo.elementDefinitions={"ft-input-label":fo,"ft-typography":qe,"ft-ripple":Fi,"mwc-icon":Ni},uo([nt({type:String})],vo.prototype,"label",void 0),uo([nt({type:String})],vo.prototype,"helper",void 0),uo([nt({type:Boolean})],vo.prototype,"outlined",void 0),uo([nt({type:Boolean})],vo.prototype,"disabled",void 0),uo([nt({type:Array})],vo.prototype,"options",void 0),uo([at()],vo.prototype,"selectedOption",void 0),uo([at()],vo.prototype,"optionsDisplayed",void 0),uo([at()],vo.prototype,"focusOptions",void 0),uo([lt(".ft-select")],vo.prototype,"container",void 0),uo([lt(".ft-select--input-panel")],vo.prototype,"mainPanel",void 0),uo([lt(".ft-select--option:first-child")],vo.prototype,"firstOption",void 0),uo([lt(".ft-select--option:focus")],vo.prototype,"focusedOption",void 0),uo([lt(".ft-select--option.ft-select--option-selected")],vo.prototype,"selectedOptionElement",void 0),uo([lt(".ft-select--option:last-child")],vo.prototype,"lastOption",void 0),uo([lt("slot")],vo.prototype,"optionsSlot",void 0),vo=uo([Ct("ft-select")],vo);const go={height:Rt.create("--ft-search-bar-height","SIZE","38px"),borderRadius:Rt.extend("--ft-search-bar-border-radius",Ft.borderRadiusS),mobileOpenPosition:Rt.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:Rt.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:Rt.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:Rt.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:Rt.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:Rt.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:Rt.external(Ft.colorSurface,"Design system"),colorOnSurface:Rt.external(Ft.colorOnSurface,"Design system"),colorOnSurfaceMedium:Rt.external(Ft.colorOnSurfaceMedium,"Design system"),colorOutline:Rt.external(Ft.colorOutline,"Design system"),colorPrimary:Rt.external(Ft.colorPrimary,"Design system"),elevation02:Rt.external(Ft.elevation02,"Design system"),buttonColor:Rt.external(Ki.color,"Button"),buttonRippleColor:Rt.external(Ki.rippleColor,"Button")},xo=a`
|
|
1880
|
+
* {
|
|
1881
|
+
box-sizing: border-box;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
.ft-search-bar--container {
|
|
1885
|
+
display: flex;
|
|
1886
|
+
flex-direction: column;
|
|
1887
|
+
gap: 8px;
|
|
1888
|
+
color: ${go.colorOnSurface};
|
|
1889
|
+
background: ${go.colorSurface};
|
|
1890
|
+
outline: none;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.ft-search-bar--mobile-menu-open {
|
|
1894
|
+
position: ${go.mobileOpenPosition};
|
|
1895
|
+
top: ${go.mobileOpenTop};
|
|
1896
|
+
bottom: ${go.mobileOpenBottom};
|
|
1897
|
+
left: ${go.mobileOpenLeft};
|
|
1898
|
+
right: ${go.mobileOpenRight};
|
|
1899
|
+
z-index: ${go.floatingZIndex};
|
|
1900
|
+
padding: 16px;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
.ft-search-bar {
|
|
1904
|
+
flex-shrink: 0;
|
|
1905
|
+
position: relative;
|
|
1906
|
+
display: flex;
|
|
1907
|
+
flex-direction: row;
|
|
1908
|
+
align-items: center;
|
|
1909
|
+
height: ${go.height};
|
|
1910
|
+
|
|
1911
|
+
background: ${go.colorSurface};
|
|
1912
|
+
border: 1px solid ${go.colorOutline};
|
|
1913
|
+
border-radius: ${go.borderRadius};
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1917
|
+
border-radius: ${go.borderRadius} ${go.borderRadius} 0 0;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
.ft-search-bar--input-container {
|
|
1921
|
+
flex-grow: 1;
|
|
1922
|
+
flex-shrink: 1;
|
|
1923
|
+
position: relative;
|
|
1924
|
+
height: calc(100% - 2px);
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
.ft-search-bar--input-outline {
|
|
1928
|
+
flex-grow: 1;
|
|
1929
|
+
flex-shrink: 1;
|
|
1930
|
+
height: 100%;
|
|
1931
|
+
width: 100%;
|
|
1932
|
+
align-self: stretch;
|
|
1933
|
+
display: grid;
|
|
1934
|
+
padding: 0 8px;
|
|
1935
|
+
border-radius: ${go.borderRadius};
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
1939
|
+
grid-template-columns: auto minmax(200px, 1fr);
|
|
1940
|
+
gap: 8px;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1944
|
+
outline: 2px solid ${go.colorPrimary};
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
.ft-search-bar--input {
|
|
1948
|
+
height: 100%;
|
|
1949
|
+
flex-grow: 1;
|
|
1950
|
+
border: none;
|
|
1951
|
+
background-color: transparent;
|
|
1952
|
+
outline: none;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.ft-search-bar--desktop .ft-search-bar--input {
|
|
1956
|
+
flex-shrink: 0;
|
|
1957
|
+
min-width: 250px;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
.ft-search-bar > ft-button {
|
|
1961
|
+
flex-shrink: 0;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.ft-search-bar--left-action {
|
|
1965
|
+
${Bt(Ki.borderRadius,a`calc(${go.borderRadius} - 1px) 0 0 calc(${go.borderRadius} - 1px)`)};
|
|
1966
|
+
border-right: 1px solid ${go.colorOutline};
|
|
1967
|
+
height: 100%;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
.ft-search-bar--left-action::part(button) {
|
|
1971
|
+
height : 100%;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1975
|
+
${Bt(Ki.borderRadius,a`calc(${go.borderRadius} - 1px) 0 0 0`)};
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
.ft-search-bar--launch-search,
|
|
1979
|
+
.ft-search-bar--clear-query {
|
|
1980
|
+
margin: 0 4px;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
.ft-search-bar--separator {
|
|
1984
|
+
height: 20px;
|
|
1985
|
+
border-right: 1px solid ${go.colorOutline};
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1989
|
+
${Bt(ho.borderColor,"transparent")};
|
|
1990
|
+
${Bt(ho.borderRadiusS,a`calc(${go.borderRadius} - 1px)`)};
|
|
1991
|
+
${Bt(bo.selectedOptionColor,go.buttonColor)};
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
1995
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(container),
|
|
1996
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(main-panel) {
|
|
1997
|
+
height: 100%;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(options) {
|
|
2001
|
+
top: calc(100% + 1px);
|
|
2002
|
+
right: unset;
|
|
2003
|
+
width: max-content;
|
|
2004
|
+
min-width: 100%;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
2008
|
+
border-radius: calc(${go.borderRadius} - 1px) 0 0 calc(${go.borderRadius} - 1px);
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
`,yo=a`
|
|
2012
|
+
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
2013
|
+
margin-right: auto;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
2017
|
+
min-width: 250px;
|
|
2018
|
+
${Bt(bo.optionsZIndex,"2")};
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
.ft-search-bar--floating-panel {
|
|
2022
|
+
padding: 16px;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
|
|
2026
|
+
display: block;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
.ft-search-bar--desktop .ft-search-bar--facets-actions {
|
|
2030
|
+
display: flex;
|
|
2031
|
+
align-items: center;
|
|
2032
|
+
justify-content: flex-end;
|
|
2033
|
+
gap: 8px;
|
|
2034
|
+
padding: 0 10px;
|
|
2035
|
+
margin-bottom: 16px;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
.ft-search-bar--mobile .ft-search-bar--facets-actions {
|
|
2039
|
+
flex-shrink: 0;
|
|
2040
|
+
flex-grow: 0;
|
|
2041
|
+
display: flex;
|
|
2042
|
+
gap: 16px;
|
|
2043
|
+
align-items: center;
|
|
2044
|
+
justify-content: space-evenly;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.ft-search-bar--mobile .ft-search-bar--facets-actions > * {
|
|
2048
|
+
flex-grow: 1;
|
|
2049
|
+
flex-basis: 0;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
.ft-search-bar--content-locale::part(clear-button) {
|
|
2053
|
+
display: none;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.ft-search-bar--floating-panel .ft-search-bar--filters-container {
|
|
2057
|
+
display: block;
|
|
2058
|
+
height: 350px;
|
|
2059
|
+
--ft-snap-scroll-gap: 16px;
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
.ft-search-bar--floating-panel ft-filter {
|
|
2063
|
+
display: flex;
|
|
2064
|
+
flex-grow: 0;
|
|
2065
|
+
max-height: 100%;
|
|
2066
|
+
max-width: 250px;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.ft-search-bar--hierarchical-filter {
|
|
2070
|
+
width: 250px;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
.ft-search-bar--mobile .ft-search-bar--filters-container {
|
|
2074
|
+
flex-grow: 1;
|
|
2075
|
+
flex-shrink: 1;
|
|
2076
|
+
overflow-y: auto;
|
|
2077
|
+
margin: 0 -16px;
|
|
2078
|
+
padding: 0 16px;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
.ft-search-bar--mobile .ft-search-bar--filters-container ft-filter {
|
|
2082
|
+
display: flex;
|
|
2083
|
+
max-height: 60vh;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
.ft-search-bar--mobile ft-filter::part(container) {
|
|
2087
|
+
flex-grow: 1;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
.ft-search-bar--filter-label {
|
|
2091
|
+
display: flex;
|
|
2092
|
+
justify-content: space-between;
|
|
2093
|
+
align-items: baseline;
|
|
2094
|
+
gap: 8px;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
.ft-search-bar--filter-label > * {
|
|
2098
|
+
white-space: nowrap;
|
|
2099
|
+
overflow: hidden;
|
|
2100
|
+
text-overflow: ellipsis;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
.ft-search-bar--filter-label > :first-child {
|
|
2104
|
+
flex-shrink: 0;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.ft-search-bar--filter-label > :last-child {
|
|
2108
|
+
flex-shrink: 1;
|
|
2109
|
+
color: ${go.colorOnSurfaceMedium};
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
ft-accordion-item::part(toggle) {
|
|
2113
|
+
margin-left: -16px;
|
|
2114
|
+
margin-right: -16px;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
ft-accordion-item::part(label) {
|
|
2118
|
+
overflow: hidden;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
ft-accordion-item::part(content) {
|
|
2122
|
+
padding-left: 0;
|
|
2123
|
+
padding-right: 0;
|
|
2124
|
+
}
|
|
2125
|
+
`,ko=a`
|
|
2126
|
+
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2127
|
+
flex-shrink: 0;
|
|
2128
|
+
display: flex;
|
|
2129
|
+
flex-direction: row;
|
|
2130
|
+
flex-wrap: wrap;
|
|
2131
|
+
gap: 8px;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2135
|
+
overflow: hidden;
|
|
2136
|
+
${Bt(xr.gap,"4px")};
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
2140
|
+
align-items: center;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2144
|
+
${Bt(ro.iconSize,"17px")};
|
|
2145
|
+
${Bt(ro.fontSize,"12px")};
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
.ft-search-bar--selected-filters * {
|
|
2149
|
+
max-width: 100%;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.ft-search-bar--selected-filters ft-chip {
|
|
2153
|
+
flex-grow: 0;
|
|
2154
|
+
}
|
|
2155
|
+
`,wo=a`
|
|
2156
|
+
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2157
|
+
flex-grow: 1;
|
|
2158
|
+
flex-shrink: 1;
|
|
2159
|
+
overflow-y: auto;
|
|
2160
|
+
height: 0;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2164
|
+
border-top: 1px solid ${go.colorOutline};
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2168
|
+
height: initial;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
.ft-search-bar--floating-panel,
|
|
2172
|
+
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2173
|
+
position: absolute;
|
|
2174
|
+
z-index: var(--ft-search-bar-floating-components-z-index, 1);
|
|
2175
|
+
top: 100%;
|
|
2176
|
+
left: -1px;
|
|
2177
|
+
right: -1px;
|
|
2178
|
+
display: none;
|
|
2179
|
+
background: ${go.colorSurface};
|
|
2180
|
+
border: 1px solid ${go.colorOutline};
|
|
2181
|
+
border-radius: 0 0 ${go.borderRadius} ${go.borderRadius};
|
|
2182
|
+
box-shadow: ${go.elevation02};
|
|
2183
|
+
outline: none;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2187
|
+
top: calc(100% + 2px);
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
.ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty {
|
|
2191
|
+
display: block;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
.ft-search-bar--no-suggestions {
|
|
2195
|
+
text-align: center;
|
|
2196
|
+
padding: 8px;
|
|
2197
|
+
color: ${go.colorOnSurface};
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
.ft-search-bar--suggestion {
|
|
2201
|
+
text-decoration: none;
|
|
2202
|
+
position: relative;
|
|
2203
|
+
display: flex;
|
|
2204
|
+
align-items: center;
|
|
2205
|
+
padding: 8px;
|
|
2206
|
+
gap: 8px;
|
|
2207
|
+
cursor: pointer;
|
|
2208
|
+
color: ${go.colorOnSurface};
|
|
2209
|
+
min-height: 52px;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
.ft-search-bar--desktop .ft-search-bar--suggestion {
|
|
2213
|
+
min-height: 44px;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.ft-search-bar--suggestion:focus {
|
|
2217
|
+
outline: none;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2221
|
+
border-top: 1px solid ${go.colorOutline};
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
.ft-search-bar--suggestion ft-typography {
|
|
2225
|
+
display: block;
|
|
2226
|
+
flex-grow: 1;
|
|
2227
|
+
flex-shrink: 1;
|
|
2228
|
+
}
|
|
2229
|
+
`;var $o=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const _o={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class So extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Oo extends CustomEvent{constructor(t){super("change",{detail:t})}}t.FtSearchBar=class extends Tt{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new At(_o,{}),this.displayedFilters=[],this.presets=[],this.searchRequestSerializer=t=>function(t,e){var i;const r=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t}/search/all?${r.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new zt(500),this.suggestDebouncer=new zt(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}getStyles(){return[He,xo,yo,ko,wo]}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){return this.sizeCategory===It.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}getTemplate(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return A`
|
|
2230
|
+
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2231
|
+
<div class="${Ot(t)}" part="container" tabindex="-1">
|
|
2232
|
+
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2233
|
+
</div>
|
|
2234
|
+
`}renderMobileSearchBar(){return A`
|
|
2235
|
+
<div class="ft-search-bar">
|
|
2236
|
+
<div class="ft-search-bar--input-container" part="input-container">
|
|
2237
|
+
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2238
|
+
<input class="ft-search-bar--input ft-typography--body2"
|
|
2239
|
+
part="input"
|
|
2240
|
+
type="text"
|
|
2241
|
+
placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
|
|
2242
|
+
value="${this.query}"
|
|
2243
|
+
@keyup=${this.onSearchBarKeyUp}
|
|
2244
|
+
@focus=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}>
|
|
2245
|
+
</div>
|
|
2246
|
+
</div>
|
|
2247
|
+
${this.renderMobileSearchBarButtons()}
|
|
2248
|
+
</div>
|
|
2249
|
+
${this.displayFacets?this.renderFacetsActions():this.renderSelectedFacets()}
|
|
2250
|
+
${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
|
|
2251
|
+
`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?A`
|
|
2252
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2253
|
+
part="search-bar-actions"
|
|
2254
|
+
icon="close"
|
|
2255
|
+
round
|
|
2256
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2257
|
+
@click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
|
|
2258
|
+
></ft-button>
|
|
2259
|
+
`:A`
|
|
2260
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2261
|
+
part="search-bar-actions"
|
|
2262
|
+
icon="search"
|
|
2263
|
+
round
|
|
2264
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2265
|
+
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2266
|
+
></ft-button>
|
|
2267
|
+
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return A`
|
|
2268
|
+
<ft-accordion class="ft-search-bar--filters-container">
|
|
2269
|
+
${this.hasLocaleSelector?A`
|
|
2270
|
+
<ft-accordion-item data-facet-key="ft:contentLocale">
|
|
2271
|
+
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2272
|
+
<ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}
|
|
2273
|
+
</ft-typography>
|
|
2274
|
+
<ft-typography variant="body2">
|
|
2275
|
+
${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}
|
|
2276
|
+
</ft-typography>
|
|
2277
|
+
</div>
|
|
2278
|
+
<ft-filter
|
|
2279
|
+
part="filters"
|
|
2280
|
+
class="ft-search-bar--content-locale"
|
|
2281
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2282
|
+
.options=${this.contentLocalesAsFilterOptions()}
|
|
2283
|
+
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2284
|
+
></ft-filter>
|
|
2285
|
+
</ft-accordion-item>
|
|
2286
|
+
`:null}
|
|
2287
|
+
${St(this.facets,(t=>t.key),(t=>{const e=Ye(t);return A`
|
|
2288
|
+
<ft-accordion-item data-facet-key="${t.key}">
|
|
2289
|
+
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2290
|
+
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2291
|
+
<ft-typography variant="body2">
|
|
2292
|
+
${function(t){return Ge(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2293
|
+
</ft-typography>
|
|
2294
|
+
</div>
|
|
2295
|
+
<ft-filter
|
|
2296
|
+
part="filters"
|
|
2297
|
+
id="${e.id}"
|
|
2298
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2299
|
+
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2300
|
+
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2301
|
+
?multivalued=${e.multivalued}
|
|
2302
|
+
raiseSelectedOptions
|
|
2303
|
+
.options=${e.options}
|
|
2304
|
+
.displayedValuesLimit=${10}
|
|
2305
|
+
@change=${t=>this.setFilter(e.id,e.label,t.detail)}
|
|
2306
|
+
></ft-filter>
|
|
2307
|
+
</ft-accordion-item>
|
|
2308
|
+
`}))}
|
|
2309
|
+
</ft-accordion>
|
|
2310
|
+
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return A`
|
|
2311
|
+
<div class="ft-search-bar" part="search-bar">
|
|
2312
|
+
${this.renderSearchBarLeftAction()}
|
|
2313
|
+
<div class="ft-search-bar--input-container" part="input-container">
|
|
2314
|
+
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2315
|
+
${this.dense?this.renderSelectedFacets():j}
|
|
2316
|
+
<input class="ft-search-bar--input ft-typography--body2"
|
|
2317
|
+
part="input"
|
|
2318
|
+
type="text"
|
|
2319
|
+
placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
|
|
2320
|
+
value="${this.query}"
|
|
2321
|
+
@keydown=${this.onSearchBarKeyDown}
|
|
2322
|
+
@keyup=${this.onSearchBarKeyUp}>
|
|
2323
|
+
</div>
|
|
2324
|
+
${this.renderSuggestions()}
|
|
2325
|
+
</div>
|
|
2326
|
+
${this.renderDesktopSearchBarButtons()}
|
|
2327
|
+
<div class="ft-search-bar--floating-panel" @keyup=${this.onFloatingContainerKeyUp} tabindex="-1">
|
|
2328
|
+
${this.renderFacetsActions()}
|
|
2329
|
+
${this.renderDesktopFacets()}
|
|
2330
|
+
|
|
2331
|
+
</div>
|
|
2332
|
+
</div>
|
|
2333
|
+
${this.dense?j:this.renderSelectedFacets()}
|
|
2334
|
+
`}renderSearchBarLeftAction(){return this.hasFacets?A`
|
|
2335
|
+
<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
|
|
2336
|
+
part="filters-opener"
|
|
2337
|
+
trailingIcon
|
|
2338
|
+
icon="${this.displayFacets?"expand_less":"expand_more"}"
|
|
2339
|
+
@click=${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}
|
|
2340
|
+
@focusin=${t=>t.stopPropagation()}>
|
|
2341
|
+
${this.labelResolver.resolve("filtersButton")}
|
|
2342
|
+
</ft-button>
|
|
2343
|
+
`:this.hasLocaleSelector?A`
|
|
2344
|
+
<ft-select outlined
|
|
2345
|
+
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2346
|
+
part="content-locale"
|
|
2347
|
+
@change=${t=>this.contentLocale=t.detail}>
|
|
2348
|
+
${St(this.availableContentLocales,(t=>t.lang),(t=>A`
|
|
2349
|
+
<ft-select-option value="${t.lang}"
|
|
2350
|
+
label="${t.label}"
|
|
2351
|
+
?selected=${t.lang===this.contentLocale}>
|
|
2352
|
+
</ft-select-option>
|
|
2353
|
+
`))}
|
|
2354
|
+
</ft-select>
|
|
2355
|
+
`:j}renderDesktopSearchBarButtons(){return A`
|
|
2356
|
+
${this.query?A`
|
|
2357
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2358
|
+
part="search-bar-actions"
|
|
2359
|
+
icon="close"
|
|
2360
|
+
round dense
|
|
2361
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2362
|
+
@click=${()=>this.setQuery("")}
|
|
2363
|
+
></ft-button>
|
|
2364
|
+
<div class="ft-search-bar--separator"></div>
|
|
2365
|
+
`:null}
|
|
2366
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2367
|
+
part="search-bar-actions"
|
|
2368
|
+
icon="search"
|
|
2369
|
+
round dense
|
|
2370
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2371
|
+
@click=${this.launchSearch}
|
|
2372
|
+
></ft-button>
|
|
2373
|
+
`}renderFacetsActions(){return A`
|
|
2374
|
+
<div class="ft-search-bar--facets-actions">
|
|
2375
|
+
${this.hasPresets?A`
|
|
2376
|
+
<ft-select
|
|
2377
|
+
class="ft-search-bar--presets"
|
|
2378
|
+
part="presets"
|
|
2379
|
+
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2380
|
+
outlined
|
|
2381
|
+
@change=${t=>this.selectedPreset=t.detail}>
|
|
2382
|
+
${St(this.presets,(t=>t.name),(t=>A`
|
|
2383
|
+
<ft-select-option value="${t.name}"
|
|
2384
|
+
label="${t.name}"
|
|
2385
|
+
?selected=${t.name===this.selectedPreset}>
|
|
2386
|
+
</ft-select-option>
|
|
2387
|
+
`))}
|
|
2388
|
+
</ft-select>
|
|
2389
|
+
`:j}
|
|
2390
|
+
${this.searchFilters.length>0?A`
|
|
2391
|
+
<ft-button part="facets-actions"
|
|
2392
|
+
@click=${this.clearFilters}>
|
|
2393
|
+
${this.labelResolver.resolve("clearFilters")}
|
|
2394
|
+
</ft-button>
|
|
2395
|
+
`:j}
|
|
2396
|
+
<slot name="facets-actions"></slot>
|
|
2397
|
+
</div>
|
|
2398
|
+
`}renderDesktopFacets(){return this.hasFacets?A`
|
|
2399
|
+
<ft-snap-scroll horizontal limitSize controls
|
|
2400
|
+
class="ft-search-bar--filters-container"
|
|
2401
|
+
part="filters-container">
|
|
2402
|
+
${this.hasLocaleSelector?A`
|
|
2403
|
+
<ft-filter part="filters"
|
|
2404
|
+
class="ft-search-bar--content-locale"
|
|
2405
|
+
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
2406
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2407
|
+
.options=${this.contentLocalesAsFilterOptions()}
|
|
2408
|
+
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2409
|
+
></ft-filter>
|
|
2410
|
+
`:j}
|
|
2411
|
+
${St(this.facets,(t=>t.key),(t=>{const e=Ye(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return A`
|
|
2412
|
+
<ft-filter
|
|
2413
|
+
class="${i?"ft-search-bar--hierarchical-filter":""}"
|
|
2414
|
+
part="filters"
|
|
2415
|
+
id="${e.id}"
|
|
2416
|
+
label="${e.label}"
|
|
2417
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
|
|
2418
|
+
clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
|
|
2419
|
+
moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
|
|
2420
|
+
?multivalued=${e.multivalued}
|
|
2421
|
+
raiseSelectedOptions
|
|
2422
|
+
.options=${e.options}
|
|
2423
|
+
.displayedValuesLimit=${10}
|
|
2424
|
+
@change=${t=>this.setFilter(e.id,e.label,t.detail)}
|
|
2425
|
+
></ft-filter>
|
|
2426
|
+
`}))}
|
|
2427
|
+
</ft-snap-scroll>
|
|
2428
|
+
`:j}renderSelectedFacets(){if(!this.hasLocaleSelector&&0===this.searchFilters.length)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.mobileMenuOpen,e=A`
|
|
2429
|
+
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?A`
|
|
2430
|
+
<ft-chip part="selected-filters"
|
|
2431
|
+
?dense=${this.dense&&!this.isMobile}
|
|
2432
|
+
?clickable=${this.isMobile}
|
|
2433
|
+
@click=${()=>this.openMobileFilters("ft:contentLocale")}>
|
|
2434
|
+
${this.getLocaleLabel(this.contentLocale)}
|
|
2435
|
+
</ft-chip>
|
|
2436
|
+
`:null}
|
|
2437
|
+
${St(this.searchFilters,(t=>t.key),(e=>St(e.values,(i=>{let r=e.label+": "+function(t){return Xe(t).split("|").join(" > ")}(i);const o=A`
|
|
2438
|
+
<ft-chip
|
|
2439
|
+
part="selected-filters"
|
|
2440
|
+
?dense=${this.dense&&!this.isMobile}
|
|
2441
|
+
?clickable=${this.isMobile}
|
|
2442
|
+
?removable=${!this.isMobile}
|
|
2443
|
+
icon=${this.isMobile?j:"close"}
|
|
2444
|
+
label="${r}"
|
|
2445
|
+
title=${t?r:j}
|
|
2446
|
+
@click=${()=>this.openMobileFilters(e.key)}
|
|
2447
|
+
@icon-click=${()=>this.setFilter(e.key,e.label,e.values.filter((t=>t!==i)))}>
|
|
2448
|
+
${function(t){return Xe(t).split("|").pop()}(i)}
|
|
2449
|
+
</ft-chip>
|
|
2450
|
+
`;return t?o:A`
|
|
2451
|
+
<ft-tooltip inline text="${r}">
|
|
2452
|
+
${o}
|
|
2453
|
+
</ft-tooltip>
|
|
2454
|
+
`}))))}
|
|
2455
|
+
${this.isMobile?A`
|
|
2456
|
+
<ft-chip part="selected-filters"
|
|
2457
|
+
icon="add"
|
|
2458
|
+
clickable
|
|
2459
|
+
@click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
|
|
2460
|
+
${this.labelResolver.resolve("filtersButton")}
|
|
2461
|
+
</ft-chip>
|
|
2462
|
+
`:j}
|
|
2463
|
+
`;return t?A`
|
|
2464
|
+
<ft-snap-scroll horizontal controls hideScrollbar limitSize
|
|
2465
|
+
class="ft-search-bar--selected-filters"
|
|
2466
|
+
part="selected-filters-container">
|
|
2467
|
+
${e}
|
|
2468
|
+
</ft-snap-scroll>
|
|
2469
|
+
`:A`
|
|
2470
|
+
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2471
|
+
${e}
|
|
2472
|
+
</div>
|
|
2473
|
+
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return A`
|
|
2474
|
+
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2475
|
+
@keydown=${this.onSuggestKeyDown}>
|
|
2476
|
+
${St(t.slice(0,5),(t=>t),(t=>A`
|
|
2477
|
+
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2478
|
+
part="suggestions"
|
|
2479
|
+
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
2480
|
+
@keyup=${e=>this.onSuggestKeyUp(e,t)}
|
|
2481
|
+
@click=${e=>this.onSuggestClick(e,t)}>
|
|
2482
|
+
<ft-ripple></ft-ripple>
|
|
2483
|
+
<mwc-icon part="suggestion-icon">history</mwc-icon>
|
|
2484
|
+
<ft-typography variant="body1">${t}</ft-typography>
|
|
2485
|
+
<ft-button icon="close"
|
|
2486
|
+
round
|
|
2487
|
+
part="remove-suggestion"
|
|
2488
|
+
?dense=${!this.isMobile}
|
|
2489
|
+
label="${this.labelResolver.resolve("removeRecentSearch")}"
|
|
2490
|
+
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2491
|
+
</a>
|
|
2492
|
+
`))}
|
|
2493
|
+
${St(this.suggestions,(t=>t.value),(t=>A`
|
|
2494
|
+
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2495
|
+
part="suggestions"
|
|
2496
|
+
class="ft-search-bar--suggestion"
|
|
2497
|
+
@keyup=${e=>this.onSuggestKeyUp(e,t.value)}
|
|
2498
|
+
@click=${e=>this.onSuggestClick(e,t.value)}>
|
|
2499
|
+
<ft-ripple></ft-ripple>
|
|
2500
|
+
${this.getIcon(t)}
|
|
2501
|
+
<ft-typography variant="body1">${t.value}</ft-typography>
|
|
2502
|
+
</a>
|
|
2503
|
+
`))}
|
|
2504
|
+
${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?A`
|
|
2505
|
+
<ft-typography class="ft-search-bar--no-suggestions" element="p"
|
|
2506
|
+
variant="body2">
|
|
2507
|
+
${this.labelResolver.resolve("noSuggestions")}
|
|
2508
|
+
</ft-typography>
|
|
2509
|
+
`:null}
|
|
2510
|
+
</div>
|
|
2511
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?Ir.file_format:Ir.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?Mr.BOOK:Mr.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,r,o,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[a,c]=((null!==(i=Dr.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(o=null!==(r=Lr.get(c))&&void 0!==r?r:Lr.get(e))&&void 0!==o?o:Lr.get(a))&&void 0!==n?n:jr.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=Mr.TOPICS}return A`
|
|
2512
|
+
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2513
|
+
${i}
|
|
2514
|
+
</ft-icon>
|
|
2515
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,r;if(t.has("labels")&&(this.labelResolver=new At(_o,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Oo(this.request))}contentAvailableCallback(t){var e,i,r;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new So(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e,i){let r=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((e=>{e.key===t&&Ge(e.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=i.includes(t.value)))})),i.length&&r.push({key:t,label:e,negative:!1,values:i}),this.searchFilters=r,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters.map((t=>{var e;return{...t,label:null!==(e=this.knownFacetLabels[t.key])&&void 0!==e?e:t.key}})))}clearFilters(){this.facets.forEach((t=>Ge(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,r,o,n;t.preventDefault(),t.stopPropagation();const a=null!==(n=null!==(r=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.input;null==a||a.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,r,o,n,a;switch(t.key){case"ArrowUp":null===(r=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(a=null!==(n=null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===a||a.focus(),t.preventDefault(),t.stopPropagation()}}},t.FtSearchBar.elementDefinitions={"ft-accordion":to,"ft-accordion-item":Yr,"ft-button":Yi,"ft-chip":lo,"ft-filter":Tr,"ft-filter-option":$r,"ft-icon":Kr,"ft-ripple":Fi,"ft-select":vo,"ft-select-option":mo,"ft-size-watcher":Ht,"ft-snap-scroll":kr,"ft-tooltip":Ui,"ft-typography":qe,"mwc-icon":Ni},$o([nt({type:Boolean})],t.FtSearchBar.prototype,"dense",void 0),$o([nt({type:String})],t.FtSearchBar.prototype,"baseUrl",void 0),$o([nt({type:String})],t.FtSearchBar.prototype,"apiIntegrationIdentifier",void 0),$o([nt({type:String})],t.FtSearchBar.prototype,"contentLocale",void 0),$o([at()],t.FtSearchBar.prototype,"availableContentLocales",void 0),$o([nt({type:String})],t.FtSearchBar.prototype,"uiLocale",void 0),$o([Et({})],t.FtSearchBar.prototype,"labels",void 0),$o([Et([])],t.FtSearchBar.prototype,"displayedFilters",void 0),$o([Et([])],t.FtSearchBar.prototype,"presets",void 0),$o([nt({type:String,reflect:!0})],t.FtSearchBar.prototype,"selectedPreset",void 0),$o([nt()],t.FtSearchBar.prototype,"searchRequestSerializer",void 0),$o([at()],t.FtSearchBar.prototype,"searchFilters",void 0),$o([at()],t.FtSearchBar.prototype,"sizeCategory",void 0),$o([at()],t.FtSearchBar.prototype,"displayFacets",void 0),$o([at()],t.FtSearchBar.prototype,"mobileMenuOpen",void 0),$o([at()],t.FtSearchBar.prototype,"facets",void 0),$o([lt(".ft-search-bar--container")],t.FtSearchBar.prototype,"container",void 0),$o([lt(".ft-search-bar--filters-opener")],t.FtSearchBar.prototype,"filtersOpener",void 0),$o([lt(".ft-search-bar--floating-panel")],t.FtSearchBar.prototype,"floatingContainer",void 0),$o([lt("ft-snap-scroll.ft-search-bar--filters-container")],t.FtSearchBar.prototype,"scrollingFiltersContainer",void 0),$o([lt(".ft-search-bar--input")],t.FtSearchBar.prototype,"input",void 0),$o([at()],t.FtSearchBar.prototype,"query",void 0),$o([at()],t.FtSearchBar.prototype,"suggestions",void 0),$o([at()],t.FtSearchBar.prototype,"suggestionsLoaded",void 0),$o([at()],t.FtSearchBar.prototype,"recentSearches",void 0),$o([at()],t.FtSearchBar.prototype,"scrollToFacet",void 0),$o([lt(".ft-search-bar--suggestion:first-child")],t.FtSearchBar.prototype,"firstSuggestion",void 0),$o([lt(".ft-search-bar--suggestion:focus-within")],t.FtSearchBar.prototype,"focusedSuggestion",void 0),$o([lt(".ft-search-bar--suggestion:last-child")],t.FtSearchBar.prototype,"lastSuggestion",void 0),$o([at()],t.FtSearchBar.prototype,"api",void 0),t.FtSearchBar=$o([Ct("ft-search-bar")],t.FtSearchBar),t.DEFAULT_LABELS=_o,t.FtSearchBarCssVariables=go,t.LaunchSearchEvent=So,t.SearchStateChangeEvent=Oo,Object.defineProperty(t,"t",{value:!0})}({});
|