@fluid-topics/ft-search-bar 0.2.16 → 0.2.19

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.
@@ -1,2595 +0,0 @@
1
- !function(){
2
- /**
3
- * @license
4
- * Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
5
- * This code may only be used under the BSD style license found at
6
- * http://polymer.github.io/LICENSE.txt
7
- * The complete set of authors may be found at
8
- * http://polymer.github.io/AUTHORS.txt
9
- * The complete set of contributors may be found at
10
- * http://polymer.github.io/CONTRIBUTORS.txt
11
- * Code distributed by Google as part of the polymer project is also
12
- * subject to an additional IP rights grant found at
13
- * http://polymer.github.io/PATENTS.txt
14
- *
15
- * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
16
- */
17
- if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const c={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(s,c);let h=i.call(o,t);h||(h=p(t),e.call(o,t,h)),this===window.customElements&&(r.set(s,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,c,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(vi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class t{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=[]}}
18
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const e=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function i(t){return(i,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,i,o):e(t,i)
23
- /**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */}function o(t){return i({...t,state:!0})}
28
- /**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */const s=({finisher:t,descriptor:e})=>(i,o)=>{var s;if(void 0===o){const o=null!==(s=i.originalKey)&&void 0!==s?s:i.key,n=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(n.finisher=function(e){t(e,o)}),n}{const s=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(s,o)}}
33
- /**
34
- * @license
35
- * Copyright 2017 Google LLC
36
- * SPDX-License-Identifier: BSD-3-Clause
37
- */;function n(t,e){return s({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
38
- /**
39
- * @license
40
- * Copyright 2017 Google LLC
41
- * SPDX-License-Identifier: BSD-3-Clause
42
- */
43
- /**
44
- * @license
45
- * Copyright 2021 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function a(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(s),r=null!=n?l(n,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}
49
- /**
50
- * @license
51
- * Copyright 2017 Google LLC
52
- * SPDX-License-Identifier: BSD-3-Clause
53
- */const c=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function h(t,e){const o=()=>JSON.parse(JSON.stringify(t));return i({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}
54
- /**
55
- * @license
56
- * Copyright 2019 Google LLC
57
- * SPDX-License-Identifier: BSD-3-Clause
58
- */const p=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),f=new Map;class u{constructor(t,e){if(this._$cssResult$=!0,e!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=f.get(this.cssText);return p&&void 0===t&&(f.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const b=t=>new u("string"==typeof t?t:t+"",d),v=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new u(i,d)},g=(t,e)=>{p?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},x=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return b(e)})(t):t
59
- /**
60
- * @license
61
- * Copyright 2017 Google LLC
62
- * SPDX-License-Identifier: BSD-3-Clause
63
- */;var y;const m=window.trustedTypes,$=m?m.emptyScript:"",w=window.reactiveElementPolyfillSupport,k={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},S=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:S};class C extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=O){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||O}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return g(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=O){var o,s;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const r=(null!==(s=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==s?s:k.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,e){var i,o,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==s?s:k.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
64
- /**
65
- * @license
66
- * Copyright 2017 Google LLC
67
- * SPDX-License-Identifier: BSD-3-Clause
68
- */
69
- var z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.3.2");const E=globalThis.trustedTypes,B=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,M=`lit$${(Math.random()+"").slice(9)}$`,N="?"+M,R=`<${N}>`,F=document,L=(t="")=>F.createComment(t),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j=t=>{var e;return I(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,T=/>/g,A=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,K=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),q=new WeakMap,J=F.createTreeWalker(F,129,null,!1),X=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=U;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===U?"!--"===a[1]?r=P:void 0!==a[1]?r=T:void 0!==a[2]?(Z.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=A):void 0!==a[3]&&(r=A):r===A?">"===a[0]?(r=null!=s?s:U,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?A:'"'===a[3]?H:_):r===H||r===_?r=A:r===P||r===T?r=U:(r=A,s=void 0);const p=r===A&&t[e+1].startsWith("/>")?" ":"";n+=r===U?i+R:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+M+p):i+M+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==B?B.createHTML(l):l,o]};class Y{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=X(t,e);if(this.el=Y.createElement(a,i),J.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=J.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(M)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(M),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?it:"?"===e[1]?st:"@"===e[1]?nt:et})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Z.test(o.tagName)){const t=o.textContent.split(M),e=t.length-1;if(e>0){o.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),J.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===N)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(M,t+1));)l.push({type:7,index:s}),t+=M.length-1}s++}}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var s,n,r,l;if(e===W)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=D(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=Q(t,a._$AS(t,e.values),a,o)),e}class G{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:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(i,!0);J.currentNode=s;let n=J.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new tt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new rt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=J.nextNode(),r++)}return s}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 tt{constructor(t,e,i,o){var s;this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}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=Q(this,t,e),D(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):j(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==V&&D(this._$AH)?this._$AA.nextSibling.data=t:this.k(F.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Y.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new G(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Y(t)),e}S(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new tt(this.M(L()),this.M(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,i,o,s){this.type=1,this._$AH=V,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Q(this,t,e,0),n=!D(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Q(this,o[i+r],e,r),l===W&&(l=this._$AH[r]),n||(n=!D(l)||l!==this._$AH[r]),l===V?t=V:t!==V&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends et{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===V?void 0:t}}const ot=E?E.emptyScript:"";class st extends et{constructor(){super(...arguments),this.type=4}C(t){t&&t!==V?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends et{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:V)===W)return;const o=this._$AH,s=t===V&&o!==V||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==V&&(o===V||s);s&&this.element.removeEventListener(this.name,this,o),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 rt{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){Q(this,t)}}const lt={L:"$lit$",P:M,V:N,I:1,N:X,R:G,j,D:Q,H:tt,F:et,O:st,W:nt,B:it,Z:rt},at=window.litHtmlPolyfillSupport;
70
- /**
71
- * @license
72
- * Copyright 2017 Google LLC
73
- * SPDX-License-Identifier: BSD-3-Clause
74
- */
75
- var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?z:globalThis.litHtmlVersions=[]).push("2.2.4");class pt extends C{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 o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new tt(e.insertBefore(L(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(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 W}}pt.finalized=!0,pt._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:pt});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:pt}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.2.0");class ft{constructor(t,e,i,o,s){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=s,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 ft(t,e,void 0,i)}static extend(t,e,i){return new ft(t,e.category,e,i)}static external(t,e){return new ft(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return v`var(${b(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):b(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 ut(t,e){return b(`${t.name}: ${e}`)}const bt={colorPrimary:ft.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ft.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ft.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ft.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ft.create("--ft-color-error","COLOR","#B00020"),colorOutline:ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ft.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ft.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.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:ft.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ft.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ft.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ft.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ft.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
76
- /**
77
- * @license
78
- * Copyright 2021 Google LLC
79
- * SPDX-License-Identifier: BSD-3-Clause
80
- */class vt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return g(s,this.constructor.elementStyles),s}}}(pt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),K`
81
- ${t.map((t=>K`
82
- <style>${t}</style>
83
- `))}
84
- ${this.getTemplate()}
85
- `}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const gt=v`
86
- .ft-no-text-select {
87
- -webkit-touch-callout: none;
88
- -webkit-user-select: none;
89
- -khtml-user-select: none;
90
- -moz-user-select: none;
91
- -ms-user-select: none;
92
- user-select: none;
93
- }
94
- `;class xt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}\\}`,"g"),t))),s}}var yt,mt,$t;const wt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==($t=null===(mt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===mt?void 0:mt.toString())&&void 0!==$t?$t:""),kt=1,St=2,Ot=t=>(...e)=>({_$litDirective$:t,values:e});
95
- /**
96
- * @license
97
- * Copyright 2017 Google LLC
98
- * SPDX-License-Identifier: BSD-3-Clause
99
- */class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
100
- /**
101
- * @license
102
- * Copyright 2020 Google LLC
103
- * SPDX-License-Identifier: BSD-3-Clause
104
- */const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Mt=(t,e,i=t)=>(t._$AI(e,i),t),Nt={},Rt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Ft=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Lt=Ot(class extends Ct{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Mt(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Mt(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Mt(n[d],r[b]),Bt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Mt(n[f],r[u]),Bt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Ft(l,u,b),p=Ft(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Bt(t,n[d]);Mt(e,r[u]),c[u]=e}else c[u]=Mt(i,r[u]),Bt(t,n[d],i),n[e]=null;u++}else Rt(n[f]),f--;else Rt(n[d]),d++;for(;u<=b;){const e=Bt(t,c[b+1]);Mt(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Rt(t)}return this.ut=l,((t,e=Nt)=>{t._$AH=e})(t,c),W}}),Dt=Ot(class extends Ct{constructor(t){var e;if(super(t),t.type!==kt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return W}});
105
- /**
106
- * @license
107
- * Copyright 2017 Google LLC
108
- * SPDX-License-Identifier: BSD-3-Clause
109
- */var It,jt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(It||(It={}));class Ut extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class Pt extends vt{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 t}render(){return K`
110
- <div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
111
- <div class="ft-size-watcher--watcher"></div>
112
- </div>
113
- `}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 Ut(this.size,this.category)))}),this.debounceTimeout)}}Pt.elementDefinitions={},Pt.styles=v`
114
- .ft-size-watcher--pixel {
115
- width: 0;
116
- height: 0;
117
- overflow: hidden;
118
- }
119
-
120
- .ft-size-watcher--pixel.ft-size-watcher--local {
121
- width: 100%;
122
- }
123
-
124
- .ft-size-watcher--watcher {
125
- height: 1px;
126
- width: 100vw;
127
- }
128
-
129
- .ft-size-watcher--local .ft-size-watcher--watcher {
130
- width: 100%;
131
- }
132
- `,jt([i({type:Number})],Pt.prototype,"debounceTimeout",void 0),jt([i({type:Boolean})],Pt.prototype,"local",void 0),jt([i({type:Number,reflect:!0})],Pt.prototype,"size",void 0),jt([i({type:String,reflect:!0})],Pt.prototype,"category",void 0),jt([n(".ft-size-watcher--watcher")],Pt.prototype,"watcher",void 0),c("ft-size-watcher")(Pt);
133
- /**
134
- * @license
135
- * Copyright 2020 Google LLC
136
- * SPDX-License-Identifier: BSD-3-Clause
137
- */
138
- const Tt=Symbol.for(""),At=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===Tt)return null===(i=t)||void 0===i?void 0:i._$litStatic$},_t=t=>({_$litStatic$:t,r:Tt}),Ht=new Map,Zt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=At(n));)a+=s+e[++c],h=!0;l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Ht.get(t))&&(r.raw=r,Ht.set(t,e=r)),i=l}return t(e,...i)})(K);var Kt,Wt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!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 Vt=ft.extend("--ft-typography-font-family",bt.titleFont),qt=ft.extend("--ft-typography-font-family",bt.contentFont),Jt={fontFamily:qt,fontSize:ft.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ft.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ft.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ft.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ft.create("--ft-typography-text-transform","UNKNOWN","inherit")},Xt=ft.extend("--ft-typography-title-font-family",Vt),Yt=ft.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),Qt=ft.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),Gt=ft.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),te=ft.extend("--ft-typography-title-line-height",Jt.lineHeight,"1.2"),ee=ft.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),ie=ft.extend("--ft-typography-title-dense-font-family",Vt),oe=ft.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),se=ft.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ne=ft.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),re=ft.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"1.7"),le=ft.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),ae=ft.extend("--ft-typography-subtitle1-font-family",qt),ce=ft.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=ft.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),pe=ft.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),de=ft.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"1.5"),fe=ft.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),ue=ft.extend("--ft-typography-subtitle2-font-family",qt),be=ft.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ve=ft.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),ge=ft.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),xe=ft.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"1.7"),ye=ft.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),me={fontFamily:ft.extend("--ft-typography-body1-font-family",qt),fontSize:ft.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),fontWeight:ft.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),lineHeight:ft.extend("--ft-typography-body1-line-height",Jt.lineHeight,"1.5"),textTransform:ft.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit")},$e={fontFamily:ft.extend("--ft-typography-body2-font-family",qt),fontSize:ft.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),lineHeight:ft.extend("--ft-typography-body2-line-height",Jt.lineHeight,"1.4"),textTransform:ft.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit")},we={fontFamily:ft.extend("--ft-typography-caption-font-family",qt),fontSize:ft.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),fontWeight:ft.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),lineHeight:ft.extend("--ft-typography-caption-line-height",Jt.lineHeight,"1.33"),textTransform:ft.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit")},ke=ft.extend("--ft-typography-breadcrumb-font-family",qt),Se=ft.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),Oe=ft.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),Ce=ft.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),ze=ft.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"1.6"),Ee=ft.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Be=ft.extend("--ft-typography-overline-font-family",qt),Me=ft.extend("--ft-typography-overline-font-size",Jt.fontSize,"10px"),Ne=ft.extend("--ft-typography-overline-font-weight",Jt.fontWeight,"normal"),Re=ft.extend("--ft-typography-overline-letter-spacing",Jt.letterSpacing,"1.5px"),Fe=ft.extend("--ft-typography-overline-line-height",Jt.lineHeight,"1.6"),Le=ft.extend("--ft-typography-overline-text-transform",Jt.textTransform,"uppercase"),De={fontFamily:ft.extend("--ft-typography-button-font-family",qt),fontSize:ft.extend("--ft-typography-button-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-button-font-weight",Jt.fontWeight,"600"),letterSpacing:ft.extend("--ft-typography-button-letter-spacing",Jt.letterSpacing,"1.246px"),lineHeight:ft.extend("--ft-typography-button-line-height",Jt.lineHeight,"1.15"),textTransform:ft.extend("--ft-typography-button-text-transform",Jt.textTransform,"uppercase")},Ie=v`
139
- .ft-typography--title {
140
- font-family: ${Xt};
141
- font-size: ${Yt};
142
- font-weight: ${Qt};
143
- letter-spacing: ${Gt};
144
- line-height: ${te};
145
- text-transform: ${ee};
146
- }
147
- `,je=v`
148
- .ft-typography--title-dense {
149
- font-family: ${ie};
150
- font-size: ${oe};
151
- font-weight: ${se};
152
- letter-spacing: ${ne};
153
- line-height: ${re};
154
- text-transform: ${le};
155
- }
156
- `,Ue=v`
157
- .ft-typography--subtitle1 {
158
- font-family: ${ae};
159
- font-size: ${ce};
160
- font-weight: ${he};
161
- letter-spacing: ${pe};
162
- line-height: ${de};
163
- text-transform: ${fe};
164
- }
165
- `,Pe=v`
166
- .ft-typography--subtitle2 {
167
- font-family: ${ue};
168
- font-size: ${be};
169
- font-weight: ${ve};
170
- letter-spacing: ${ge};
171
- line-height: ${xe};
172
- text-transform: ${ye};
173
- }
174
-
175
- `,Te=v`
176
- .ft-typography--body1 {
177
- font-family: ${me.fontFamily};
178
- font-size: ${me.fontSize};
179
- font-weight: ${me.fontWeight};
180
- letter-spacing: ${me.letterSpacing};
181
- line-height: ${me.lineHeight};
182
- text-transform: ${me.textTransform};
183
- }
184
- `,Ae=v`
185
- .ft-typography--body2 {
186
- font-family: ${$e.fontFamily};
187
- font-size: ${$e.fontSize};
188
- font-weight: ${$e.fontWeight};
189
- letter-spacing: ${$e.letterSpacing};
190
- line-height: ${$e.lineHeight};
191
- text-transform: ${$e.textTransform};
192
- }
193
- `,_e=v`
194
- .ft-typography--caption {
195
- font-family: ${we.fontFamily};
196
- font-size: ${we.fontSize};
197
- font-weight: ${we.fontWeight};
198
- letter-spacing: ${we.letterSpacing};
199
- line-height: ${we.lineHeight};
200
- text-transform: ${we.textTransform};
201
- }
202
- `,He=v`
203
- .ft-typography--breadcrumb {
204
- font-family: ${ke};
205
- font-size: ${Se};
206
- font-weight: ${Oe};
207
- letter-spacing: ${Ce};
208
- line-height: ${ze};
209
- text-transform: ${Ee};
210
- }
211
- `,Ze=v`
212
- .ft-typography--overline {
213
- font-family: ${Be};
214
- font-size: ${Me};
215
- font-weight: ${Ne};
216
- letter-spacing: ${Re};
217
- line-height: ${Fe};
218
- text-transform: ${Le};
219
- }
220
- `,Ke=v`
221
- .ft-typography--button {
222
- font-family: ${De.fontFamily};
223
- font-size: ${De.fontSize};
224
- font-weight: ${De.fontWeight};
225
- letter-spacing: ${De.letterSpacing};
226
- line-height: ${De.lineHeight};
227
- text-transform: ${De.textTransform};
228
- }
229
- `;class We extends vt{constructor(){super(...arguments),this.variant=Kt.body1}render(){return this.element?Zt`
230
- <${_t(this.element)}
231
- class="ft-typography ft-typography--${this.variant}">
232
- <slot></slot>
233
- </${_t(this.element)}>
234
- `:Zt`
235
- <slot class="ft-typography ft-typography--${this.variant}"></slot>
236
- `}}function Ve(t,e){return t.flatMap((t=>[t,...Ve(e(t),e)]))}function qe(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Je(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Je(e,t.selected))),value:t.value}}function Xe(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Je(t,!1)))}}We.styles=[Ie,je,Ue,Pe,Te,Ae,_e,He,Ze,Ke,v`
237
- .ft-typography {
238
- vertical-align: inherit;
239
- }
240
- `],Wt([i()],We.prototype,"element",void 0),Wt([i()],We.prototype,"variant",void 0),c("ft-typography")(We);var Ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Qe=ft.extend("--ft-ripple-color",bt.colorContent),Ge={color:Qe,backgroundColor:ft.extend("--ft-ripple-background-color",Qe),opacityContentOnSurfacePressed:ft.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ft.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ft.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ft.external(bt.opacityContentOnSurfaceSelected,"Design system")},ti=ft.extend("--ft-ripple-color",bt.colorPrimary),ei=ti,ii=ft.extend("--ft-ripple-background-color",ti),oi=ft.extend("--ft-ripple-color",bt.colorSecondary),si=oi,ni=ft.extend("--ft-ripple-background-color",oi);class ri extends vt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new t(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return K`
241
- <style>
242
- .ft-ripple .ft-ripple--effect,
243
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
244
- width: ${this.rippleSize}px;
245
- height: ${this.rippleSize}px;
246
- }
247
-
248
- .ft-ripple .ft-ripple--effect {
249
- left: ${this.originX}px;
250
- top: ${this.originY}px;
251
- }
252
- </style>
253
- <div class="${Dt(t)}">
254
- <div class="ft-ripple--background"></div>
255
- <div class="ft-ripple--effect"></div>
256
- </div>
257
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ri.elementDefinitions={},ri.styles=v`
258
- :host {
259
- display: contents;
260
- }
261
-
262
- .ft-ripple {
263
- position: absolute;
264
- inset: 0;
265
- pointer-events: none;
266
- }
267
-
268
- .ft-ripple:not(.ft-ripple--unbounded) {
269
- overflow: hidden;
270
- }
271
-
272
- .ft-ripple .ft-ripple--background,
273
- .ft-ripple .ft-ripple--effect {
274
- position: absolute;
275
- opacity: 0;
276
- }
277
-
278
- .ft-ripple .ft-ripple--background {
279
- background-color: ${Ge.backgroundColor};
280
- }
281
-
282
- .ft-ripple .ft-ripple--effect {
283
- background-color: ${Ge.color};
284
- }
285
-
286
- .ft-ripple.ft-ripple--secondary .ft-ripple--background {
287
- background-color: ${ni};
288
- }
289
-
290
- .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
291
- background-color: ${si};
292
- }
293
-
294
- .ft-ripple.ft-ripple--primary .ft-ripple--background {
295
- background-color: ${ii};
296
- }
297
-
298
- .ft-ripple.ft-ripple--primary .ft-ripple--effect {
299
- background-color: ${ei};
300
- }
301
-
302
- .ft-ripple .ft-ripple--background {
303
- top: 0;
304
- left: 0;
305
- height: 100%;
306
- width: 100%;
307
- transition: opacity 75ms linear;
308
- }
309
-
310
- .ft-ripple .ft-ripple--effect,
311
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
312
- border-radius: 50%;
313
- }
314
-
315
- .ft-ripple .ft-ripple--effect {
316
- transform: translate(-50%, -50%) scale(0.15);
317
- transition: transform 300ms ease, opacity 75ms linear;
318
- }
319
-
320
- .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
321
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
322
- left: 50%;
323
- top: 50%;
324
- }
325
-
326
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
327
- transform: translate(-50%, -50%);
328
- }
329
-
330
- .ft-ripple.ft-ripple--hovered .ft-ripple--background {
331
- opacity: ${Ge.opacityContentOnSurfaceHover};
332
- }
333
-
334
- .ft-ripple.ft-ripple--selected .ft-ripple--background {
335
- opacity: ${Ge.opacityContentOnSurfaceSelected};
336
- }
337
-
338
- .ft-ripple.ft-ripple--focused .ft-ripple--background {
339
- opacity: ${Ge.opacityContentOnSurfaceFocused};
340
- }
341
-
342
- .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
343
- opacity: ${Ge.opacityContentOnSurfacePressed};
344
- transform: translate(-50%, -50%) scale(1);
345
- }
346
- `,Ye([i({type:Boolean})],ri.prototype,"primary",void 0),Ye([i({type:Boolean})],ri.prototype,"secondary",void 0),Ye([i({type:Boolean})],ri.prototype,"unbounded",void 0),Ye([i({type:Boolean})],ri.prototype,"activated",void 0),Ye([i({type:Boolean})],ri.prototype,"selected",void 0),Ye([i({type:Boolean})],ri.prototype,"disabled",void 0),Ye([o()],ri.prototype,"hovered",void 0),Ye([o()],ri.prototype,"focused",void 0),Ye([o()],ri.prototype,"pressed",void 0),Ye([o()],ri.prototype,"rippling",void 0),Ye([o()],ri.prototype,"rippleSize",void 0),Ye([o()],ri.prototype,"originX",void 0),Ye([o()],ri.prototype,"originY",void 0),Ye([n(".ft-ripple")],ri.prototype,"ripple",void 0),Ye([n(".ft-ripple--effect")],ri.prototype,"rippleEffect",void 0),c("ft-ripple")(ri);var li=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ai=ft.create("--ft-tooltip-distance","SIZE","4px"),ci=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),hi=ft.create("--ft-tooltip-background-color","COLOR","#666666"),pi=ft.create("--ft-tooltip-z-index","NUMBER","1"),di=ft.external(bt.borderRadiusS,"Design system");class fi extends vt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new t,this.revealDebouncer=new t}render(){return K`
347
- <div part="container"
348
- class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
349
- @mouseenter=${this.onHover}
350
- @mouseleave=${this.onOut}
351
- @focusin=${this.onHover}
352
- @focusout=${this.onOut}
353
- @touchstart=${this.onTouch}>
354
- <div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
355
- <div part="tooltip-content" class="ft-tooltip--content">
356
- <ft-typography variant="caption">${this.text}</ft-typography>
357
- </div>
358
- </div>
359
- <slot></slot>
360
- </div>
361
- `}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,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.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())}}fi.elementDefinitions={"ft-typography":We},fi.styles=v`
362
- .ft-tooltip--container {
363
- display: block;
364
- position: relative;
365
- }
366
-
367
- .ft-tooltip--inline {
368
- display: inline-block;
369
- max-width: 100%;
370
- }
371
-
372
- .ft-tooltip {
373
- position: absolute;
374
- box-sizing: border-box;
375
- overflow: hidden;
376
- width: max-content;
377
- max-width: 150px;
378
- text-align: center;
379
- padding: ${ai};
380
- z-index: ${pi};
381
- }
382
-
383
- .ft-tooltip--content {
384
- padding: 4px 8px;
385
- border-radius: ${di};
386
- background-color: ${hi};
387
- color: ${ci};
388
- top: -500px;
389
- left: -500px;
390
- position: relative;
391
- word-break: break-word;
392
- }
393
- `,li([i()],fi.prototype,"text",void 0),li([i({type:Boolean})],fi.prototype,"manual",void 0),li([i({type:Boolean})],fi.prototype,"inline",void 0),li([i({type:Number})],fi.prototype,"delay",void 0),li([i()],fi.prototype,"position",void 0),li([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?a({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],fi.prototype,"slotNodes",void 0),li([n(".ft-tooltip--container")],fi.prototype,"container",void 0),li([n("slot")],fi.prototype,"target",void 0),li([n(".ft-tooltip")],fi.prototype,"tooltip",void 0),li([n(".ft-tooltip--content")],fi.prototype,"tooltipContent",void 0),li([o()],fi.prototype,"visible",void 0),c("ft-tooltip")(fi);const ui={color:ft.extend("--ft-loader-color",bt.colorPrimary),size:ft.create("--ft-loader-size","SIZE","80px")};class bi extends vt{static get styles(){return v`
394
- :host {
395
- line-height: 0;
396
- }
397
-
398
- .ft-loader {
399
- display: inline-block;
400
- position: relative;
401
-
402
- width: ${ui.size};
403
- height: ${ui.size};
404
- }
405
-
406
- .ft-loader div {
407
- position: absolute;
408
- top: 37.5%;
409
- width: 25%;
410
- height: 25%;
411
- border-radius: 50%;
412
- background: ${ui.color};
413
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
414
- }
415
-
416
- .ft-loader div:nth-child(1) {
417
- left: 2.5%;
418
- animation: appear 0.6s infinite;
419
- }
420
-
421
- .ft-loader div:nth-child(2) {
422
- left: 2.5%;
423
- animation: move 0.6s infinite;
424
- }
425
-
426
- .ft-loader div:nth-child(3) {
427
- left: 37.5%;
428
- animation: move 0.6s infinite;
429
- }
430
-
431
- .ft-loader div:nth-child(4) {
432
- left: 72.5%;
433
- animation: disappear 0.6s infinite;
434
- }
435
-
436
- @keyframes appear {
437
- 0% {
438
- transform: scale(0);
439
- }
440
- 100% {
441
- transform: scale(1);
442
- }
443
- }
444
-
445
- @keyframes disappear {
446
- 0% {
447
- transform: scale(1);
448
- }
449
- 100% {
450
- transform: scale(0);
451
- }
452
- }
453
-
454
- @keyframes move {
455
- 0% {
456
- transform: translate(0, 0);
457
- }
458
- 100% {
459
- transform: translate(calc(0.35 * ${ui.size}), 0);
460
- }
461
- }
462
- `}render(){return K`
463
- <div class="ft-loader">
464
- <div></div>
465
- <div></div>
466
- <div></div>
467
- <div></div>
468
- </div>
469
- `}}c("ft-loader")(bi);
470
- /**
471
- * @license
472
- * Copyright 2017 Google LLC
473
- * SPDX-License-Identifier: BSD-3-Clause
474
- */
475
- class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===V||null==t)return this.ft=void 0,this.it=t;if(t===W)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}vi.directiveName="unsafeHTML",vi.resultType=1;const gi=Ot(vi);var xi,yi;!function(t){t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.STAR_PLAIN="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN_PLAIN="&#xe94d;",t.THUMBS_DOWN="&#xe94e;",t.THUMBS_UP_PLAIN="&#xe94f;",t.THUMBS_UP="&#xe950;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe900;",t.EYE="\f06e",t.DISC="&#xe901;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe902;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe90f;",t.ADMIN_USERS="&#xe910;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe912;"}(xi||(xi={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(yi||(yi={}));const mi=new Map([...["abw"].map((t=>[t,yi.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,yi.AUDIO])),...["avi"].map((t=>[t,yi.AVI])),...["chm","xhs"].map((t=>[t,yi.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,yi.CODE])),...["csv"].map((t=>[t,yi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,yi.DITA])),...["epub"].map((t=>[t,yi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,yi.EXCEL])),...["flac"].map((t=>[t,yi.FLAC])),...["gif"].map((t=>[t,yi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,yi.GZIP])),...["html","htm","xhtml"].map((t=>[t,yi.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,yi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,yi.JPEG])),...["json"].map((t=>[t,yi.JSON])),...["m4a","m4p"].map((t=>[t,yi.M4A])),...["mov","qt"].map((t=>[t,yi.MOV])),...["mp3"].map((t=>[t,yi.MP3])),...["mp4","m4v"].map((t=>[t,yi.MP4])),...["ogg","oga"].map((t=>[t,yi.OGG])),...["pdf","ps"].map((t=>[t,yi.PDF])),...["png"].map((t=>[t,yi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,yi.POWERPOINT])),...["rar"].map((t=>[t,yi.RAR])),...["stp"].map((t=>[t,yi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,yi.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,yi.VIDEO])),...["wav"].map((t=>[t,yi.WAV])),...["wma"].map((t=>[t,yi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,yi.WORD])),...["xml","xsl","rdf"].map((t=>[t,yi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,yi.YAML])),...["zip"].map((t=>[t,yi.ZIP]))]),$i=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 wi,ki=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(wi||(wi={}));const Si={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class Oi extends vt{constructor(){super(...arguments),this.variant=wi.fluid_topics}render(){return K`
476
- <i class="ft-icon ${"ft-icon--"+this.variant}">
477
- ${gi(this.getIcon())}
478
- <slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
479
- </i>
480
- `}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;let i=this.textContent;return this.variant===wi.file_format?null!==(t=yi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===wi.fluid_topics?null!==(e=xi[i.toUpperCase()])&&void 0!==e?e:i:V}}Oi.elementDefinitions={},Oi.styles=v`
481
- :host {
482
- display: inline-block;
483
- }
484
- :host, i.ft-icon {
485
- width: ${Si.size};
486
- height: ${Si.size};
487
- text-align: center;
488
- }
489
-
490
- i.ft-icon {
491
- font-size: ${Si.size};
492
- line-height: 1;
493
- font-weight: normal;
494
- text-transform: none;
495
- font-style: normal;
496
- font-variant: normal;
497
- speak: none;
498
- text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
499
- text-rendering: auto;
500
- -webkit-font-smoothing: antialiased;
501
- -moz-osx-font-smoothing: grayscale;
502
- }
503
-
504
- .ft-icon--fluid-topics {
505
- font-family: ${Si.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
506
- }
507
-
508
- .ft-icon--file-format {
509
- font-family: ${Si.fileFormatFontFamily}, ft-mime, sans-serif;
510
- }
511
-
512
- .ft-icon--material {
513
- font-family: ${Si.materialFontFamily}, "Material Icons", sans-serif;
514
- }
515
- `,ki([i()],Oi.prototype,"variant",void 0),ki([n("slot")],Oi.prototype,"slottedContent",void 0),c("ft-icon")(Oi);var Ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const zi=ft.extend("--ft-button-color",bt.colorPrimary),Ei={backgroundColor:ft.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",bt.borderRadiusL),color:zi,fontSize:ft.extend("--ft-button-font-size",De.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",zi),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Bi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",bt.colorOnPrimary)),Mi={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",bt.colorPrimary)),color:Bi,rippleColor:ft.extend("--ft-button-primary-ripple-color",Bi)},Ni=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",bt.borderRadiusM));class Ri extends vt{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())}}static get styles(){return[gt,v`
516
- :host {
517
- display: inline-block;
518
- max-width: 100%;
519
- pointer-events: none;
520
- }
521
-
522
- button {
523
- box-shadow: 0px 0px 0px transparent;
524
- border: 0px solid transparent;
525
- text-shadow: 0px 0px 0px transparent;
526
- font-size: inherit;
527
- }
528
-
529
- button:hover {
530
- box-shadow: 0px 0px 0px transparent;
531
- border: 0px solid transparent;
532
- text-shadow: 0px 0px 0px transparent;
533
- }
534
-
535
- button:active {
536
- outline: none;
537
- border: none;
538
- }
539
-
540
- button:focus {
541
- outline: 0;
542
- }
543
-
544
- .ft-button {
545
- position: relative;
546
- display: flex;
547
- justify-content: center;
548
- align-items: center;
549
- width: 100%;
550
- overflow: hidden;
551
- box-sizing: border-box;
552
- border: none;
553
- pointer-events: auto;
554
- line-height: 0;
555
-
556
- --ft-button-internal-font-size: ${Ei.fontSize};
557
- --ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
558
- --ft-button-internal-color: ${Ei.color};
559
- ${ut(Si.size,Ei.iconSize)};
560
- --ft-button-internal-vertical-padding: 6px;
561
- --ft-button-internal-horizontal-padding: 8px;
562
- ${ut(Ge.color,Ei.rippleColor)};
563
- --ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ei.iconSize});
564
-
565
- border-radius: ${Ei.borderRadius};
566
- padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
567
- background-color: ${Ei.backgroundColor};
568
- color: var(--ft-button-internal-color);
569
- -webkit-mask-image: radial-gradient(white, black);
570
- }
571
-
572
- .ft-button:not([disabled]):hover {
573
- cursor: pointer;
574
- }
575
-
576
- .ft-button--dense {
577
- --ft-button-internal-vertical-padding: 2px;
578
- --ft-button-internal-horizontal-padding: 4px;
579
- border-radius: ${Ni};
580
- }
581
-
582
- .ft-button--round {
583
- border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
584
- }
585
-
586
- .ft-button[disabled] {
587
- filter: grayscale(1);
588
- opacity: ${Ei.opacityDisabled};
589
- }
590
-
591
- .ft-button.ft-button--primary {
592
- background-color: ${Mi.backgroundColor};
593
- --ft-button-internal-color: ${Mi.color};
594
- ${ut(Ge.color,Mi.rippleColor)};
595
- }
596
-
597
- .ft-button.ft-button--outlined {
598
- border: 1px solid var(--ft-button-internal-color);
599
- padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
600
- }
601
-
602
- .ft-button:focus {
603
- outline: none;
604
- }
605
-
606
- .ft-button--label {
607
- position: relative;
608
- overflow: hidden;
609
- white-space: nowrap;
610
- text-overflow: ellipsis;
611
- display: block;
612
- margin: 0 var(--ft-button-internal-horizontal-padding);
613
- ${ut(De.fontSize,"var(--ft-button-internal-font-size)")};
614
- ${ut(De.lineHeight,"var(--ft-button-internal-content-height)")};
615
- }
616
-
617
- .ft-button--safari-fix .ft-button--label {
618
- margin-right: 0;
619
- }
620
-
621
- .ft-button--safari-fix .ft-button--label:after {
622
- content: "\\0000a0";
623
- display: inline-block;
624
- width: 0;
625
- }
626
-
627
- .ft-button--label[hidden] {
628
- display: none;
629
- }
630
-
631
- ft-icon {
632
- flex-shrink: 0;
633
- position: relative;
634
- }
635
-
636
- .ft-button--label[hidden] + ft-icon {
637
- margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
638
- padding: 0 var(--ft-button-internal-vertical-padding);
639
- }
640
-
641
- .ft-button:not(.ft-button--trailing-icon) ft-icon,
642
- .ft-button:not(.ft-button--trailing-icon) ft-loader {
643
- order: -1;
644
- }
645
-
646
- ft-loader {
647
- ${ut(ui.size,Ei.iconSize)};
648
- ${ut(ui.color,"var(--ft-button-internal-color)")};
649
- }
650
- `]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":wt,"ft-no-text-select":!0};return this.addTooltip(K`
651
- <button part="button"
652
- class="${Dt(t)}"
653
- aria-label="${this.getLabel()}"
654
- ?disabled=${this.isDisabled()}>
655
- <ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
656
- <ft-typography part="label"
657
- variant="button"
658
- class="ft-button--label"
659
- ?hidden=${!this.hasTextContent()}>
660
- <slot @slotchange=${this.onSlotchange}></slot>
661
- </ft-typography>
662
- ${this.resolveIcon()}
663
- </button>
664
- `)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:K`
665
- <ft-tooltip part="tooltip"
666
- text="${this.getLabel()}"
667
- position="${this.tooltipPosition}">
668
- ${t}
669
- </ft-tooltip>
670
- `}resolveIcon(){return this.loading?K`
671
- <ft-loader></ft-loader> `:this.icon?K`
672
- <ft-icon variant="material">${this.icon}</ft-icon> `:V}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ri.elementDefinitions={"ft-ripple":ri,"ft-tooltip":fi,"ft-typography":We,"ft-icon":Oi,"ft-loader":bi},Ci([i({type:Boolean})],Ri.prototype,"primary",void 0),Ci([i({type:Boolean})],Ri.prototype,"outlined",void 0),Ci([i({type:Boolean})],Ri.prototype,"disabled",void 0),Ci([i({type:Boolean})],Ri.prototype,"dense",void 0),Ci([i({type:Boolean})],Ri.prototype,"round",void 0),Ci([i({type:String})],Ri.prototype,"label",void 0),Ci([i({type:String})],Ri.prototype,"icon",void 0),Ci([i({type:Boolean})],Ri.prototype,"trailingIcon",void 0),Ci([i({type:Boolean})],Ri.prototype,"loading",void 0),Ci([i({type:String})],Ri.prototype,"tooltipPosition",void 0),Ci([n(".ft-button")],Ri.prototype,"button",void 0),Ci([n(".ft-button--label slot")],Ri.prototype,"slottedContent",void 0),c("ft-button")(Ri);var Fi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Li=ft.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Di=ft.external(bt.colorPrimary,"Design system"),Ii=ft.external(bt.colorOnPrimary,"Design system"),ji=ft.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),Ui=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Pi extends vt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return K`
673
- <label class="${Dt(t)}">
674
- <div class="ft-checkbox--box-container">
675
- <input type="checkbox"
676
- name=${this.name}
677
- .checked=${this.checked}
678
- .disabled=${this.disabled}
679
- @change=${this.onChange}
680
- >
681
- <ft-ripple
682
- ?disabled=${this.disabled}
683
- ?primary=${this.checked||this.indeterminate}
684
- unbounded>
685
- </ft-ripple>
686
- <div class="ft-checkbox--box">
687
- <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
688
- <path class="ft-checkbox--checkmark-path" fill="none"
689
- d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
690
- </svg>
691
- </div>
692
- </div>
693
- <ft-typography variant="body2">
694
- <slot></slot>
695
- </ft-typography>
696
- </label>
697
- `}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Pi.elementDefinitions={"ft-ripple":ri,"ft-typography":We},Pi.styles=v`
698
- * {
699
- box-sizing: border-box;
700
- }
701
-
702
- .ft-checkbox {
703
- box-sizing: border-box;
704
- color: ${Li};
705
-
706
- display: inline-flex;
707
- align-items: center;
708
- gap: 4px;
709
- }
710
-
711
- .ft-checkbox--disabled {
712
- color: ${Ui};
713
- }
714
-
715
- input {
716
- opacity: 0;
717
- position: absolute;
718
- width: 40px;
719
- height: 40px;
720
- margin: 0;
721
- }
722
-
723
- .ft-checkbox--box-container {
724
- position: relative;
725
- width: 40px;
726
- height: 40px;
727
-
728
- display: flex;
729
- justify-content: center;
730
- align-items: center;
731
- flex-shrink: 0;
732
- }
733
-
734
- .ft-checkbox--box {
735
- display: flex;
736
- border: 2px solid ${ji};
737
- border-radius: 2px;
738
-
739
- width: 18px;
740
- height: 18px;
741
-
742
- color: ${Ii};
743
- }
744
-
745
-
746
- .ft-checkbox--checked .ft-checkbox--box,
747
- .ft-checkbox--indeterminate .ft-checkbox--box {
748
- border-color: ${Di};
749
- background-color: ${Di};
750
- }
751
-
752
- .ft-checkbox--disabled .ft-checkbox--box {
753
- border-color: ${Ui};
754
- background-color: transparent;
755
- color: ${Ui};
756
- }
757
-
758
- .ft-checkbox--checkmark {
759
- transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
760
- opacity: 0;
761
- }
762
-
763
- .ft-checkbox--checkmark-path {
764
- stroke-dashoffset: 0;
765
- stroke: currentcolor;
766
- stroke-width: 3px;
767
- stroke-dasharray: 30;
768
- }
769
-
770
- .ft-checkbox--checked .ft-checkbox--checkmark,
771
- .ft-checkbox--indeterminate .ft-checkbox--checkmark {
772
- opacity: 1;
773
- }
774
- `,Fi([i()],Pi.prototype,"name",void 0),Fi([i({type:Boolean})],Pi.prototype,"checked",void 0),Fi([i({type:Boolean})],Pi.prototype,"indeterminate",void 0),Fi([i({type:Boolean})],Pi.prototype,"disabled",void 0),Fi([n(".ft-checkbox")],Pi.prototype,"container",void 0),Fi([n("ft-ripple")],Pi.prototype,"ripple",void 0),c("ft-checkbox")(Pi);var Ti=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ai=ft.extend("--ft-radio-text-color",bt.colorOnSurfaceHigh),_i=ft.external(bt.colorPrimary,"Design system"),Hi=(ft.external(bt.colorOnPrimary,"Design system"),ft.extend("--ft-radio-border-color",bt.colorOnSurfaceMedium)),Zi=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Ki extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Wi extends vt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return K`
775
- <div class="${Dt(t)}">
776
- <div class="ft-radio--box-container">
777
- <input id="radio-button"
778
- type="radio"
779
- name="${this.name}"
780
- value="${this.value}"
781
- .checked=${this.checked}
782
- .disabled=${this.disabled}
783
- @change=${this.onChange}
784
- >
785
- <ft-ripple
786
- ?disabled=${this.disabled}
787
- ?primary=${this.checked}
788
- unbounded>
789
- </ft-ripple>
790
- <div class="ft-radio--box">
791
- </div>
792
- </div>
793
- <label for="radio-button" @click=${t=>t.stopPropagation()}>
794
- <ft-typography variant="body2">
795
- <slot></slot>
796
- </ft-typography>
797
- </label>
798
- </div>
799
- `}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ki(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Ki(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Wi.elementDefinitions={"ft-ripple":ri,"ft-typography":We},Wi.styles=v`
800
- * {
801
- box-sizing: border-box;
802
- }
803
-
804
- .ft-radio {
805
- box-sizing: border-box;
806
- color: ${Ai};
807
-
808
- display: inline-flex;
809
- align-items: center;
810
- gap: 4px;
811
- }
812
-
813
- .ft-radio--disabled {
814
- color: ${Zi};
815
- }
816
-
817
- input {
818
- opacity: 0;
819
- position: absolute;
820
- width: 40px;
821
- height: 40px;
822
- margin: 0;
823
- }
824
-
825
- .ft-radio--box-container {
826
- position: relative;
827
- width: 40px;
828
- height: 40px;
829
-
830
- display: flex;
831
- justify-content: center;
832
- align-items: center;
833
- flex-shrink: 0;
834
- }
835
-
836
- .ft-radio--box {
837
- border: 2px solid ${Hi};
838
- border-radius: 50%;
839
-
840
- display: flex;
841
- justify-content: center;
842
- align-items: center;
843
-
844
- width: 20px;
845
- height: 20px;
846
- }
847
-
848
- .ft-radio--box:after {
849
- content: " ";
850
- background-color: ${_i};
851
-
852
- border-radius: 50%;
853
-
854
- width: 12px;
855
- height: 12px;
856
-
857
- transform: scale(0);
858
- transition: transform 100ms ease;
859
- }
860
-
861
- .ft-radio--checked .ft-radio--box {
862
- border-color: ${_i};
863
- }
864
-
865
-
866
- .ft-radio--checked .ft-radio--box:after {
867
- transform: scale(1);
868
- }
869
-
870
- .ft-radio--disabled .ft-radio--box {
871
- border-color: ${Zi};
872
- background-color: transparent;
873
- }
874
-
875
- .ft-radio--disabled .ft-radio--box:after {
876
- background-color: ${Zi};
877
- }
878
- `,Ti([i()],Wi.prototype,"value",void 0),Ti([i()],Wi.prototype,"name",void 0),Ti([i({type:Boolean})],Wi.prototype,"checked",void 0),Ti([i({type:Boolean})],Wi.prototype,"disabled",void 0),Ti([n(".ft-radio")],Wi.prototype,"container",void 0),Ti([n("ft-ripple")],Wi.prototype,"ripple",void 0),Ti([n("input")],Wi.prototype,"input",void 0);var Vi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qi extends vt{constructor(){super(...arguments),this.name=""}render(){return K`
879
- <slot @slotchange=${this.onSlotChange}
880
- @change=${this.onChange}
881
- @keydown=${this.onKeyDown}
882
- @focusin=${this.onFocusIn}
883
- ></slot>
884
- `}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}qi.elementDefinitions={},qi.styles=v`
885
- :host {
886
- display: contents;
887
- }
888
- `,Vi([i()],qi.prototype,"name",void 0),Vi([a()],qi.prototype,"radioButtons",void 0),c("ft-radio")(Wi),c("ft-radio-group")(qi);var Ji=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Xi={borderRadiusM:ft.external(bt.borderRadiusM,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),colorOnPrimary:ft.external(bt.colorOnPrimary,"Design system"),fontFamily:ft.external($e.fontFamily,"Body2 typography"),fontSize:ft.external($e.fontSize,"Body2 typography"),fontWeight:ft.external($e.fontWeight,"Body2 typography"),letterSpacing:ft.external($e.letterSpacing,"Body2 typography"),lineHeight:ft.external($e.lineHeight,"Body2 typography"),textTransform:ft.external($e.textTransform,"Body2 typography")};class Yi extends vt{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}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}render(){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 K`
889
- <div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
890
- ${null==this.parent?null:K`
891
- <div tabindex="0"
892
- class="ft-filter-level--go-back"
893
- ?disabled=${this.disabled}
894
- @keyup=${this.goBackOnKeyPress}
895
- @click=${this.goBackOnClick}>
896
- <ft-ripple></ft-ripple>
897
- <ft-icon variant="material">chevron_left</ft-icon>
898
- <ft-typography variant="body2">${this.parent.label}</ft-typography>
899
- </div>
900
- `}
901
- ${Lt(e,(t=>t.value),(t=>{var e;return K`
902
- <div class="ft-filter-level--option" part="options">
903
- ${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
904
- ${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?V:K`
905
- <ft-button icon="chevron_right"
906
- label="${t.label}"
907
- ?disabled=${this.disabled}
908
- tooltipPosition="left"
909
- @click=${()=>this.displayLevel(t)}></ft-button>
910
- `}
911
- </div>
912
- `}))}
913
- ${e.length<t.length?K`
914
- <ft-button
915
- class="ft-filter-level--display-more"
916
- icon="expand_more"
917
- dense trailingIcon
918
- @click=${this.displayMore}>
919
- ${this.moreValuesButtonLabel}
920
- </ft-button>
921
- `:V}
922
- </div>
923
- `}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 K`
924
- <ft-checkbox name="${this.id}"
925
- .checked=${t.selected}
926
- .disabled=${this.disabled}
927
- .indeterminate=${Ve(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
928
- @change=${e=>this.optionsChanged(e,t)}>
929
- ${t.label}
930
- </ft-checkbox>
931
- `}buildMonoValuedOption(t){return K`
932
- <ft-radio name="${this.id+Math.round(1e6*Math.random())}"
933
- .checked=${t.selected}
934
- ?disabled=${this.disabled}
935
- @click=${e=>this.optionsChanged(e,t)}
936
- @keyup=${e=>this.onRadioKeyUp(e,t)}
937
- @change=${t=>t.stopPropagation()}>
938
-
939
- ${t.label}
940
- </ft-radio>
941
- `}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Yi.elementDefinitions={"ft-button":Ri,"ft-ripple":ri,"ft-typography":We,"ft-checkbox":Pi,"ft-icon":Oi,"ft-radio":Wi},Yi.styles=[v`
942
- .ft-filter-level--container {
943
- display: flex;
944
- flex-direction: column;
945
- }
946
-
947
- .ft-filter-level--container > * {
948
- padding: 0 10px;
949
- }
950
-
951
- .ft-filter-level--go-back {
952
- flex-shrink: 0;
953
- text-decoration: none;
954
- position: relative;
955
- border-radius: ${Xi.borderRadiusM};
956
- overflow: hidden;
957
- display: flex;
958
- align-items: center;
959
- padding: 4px 4px;
960
- gap: 4px;
961
- cursor: pointer;
962
- color: ${Xi.colorOnSurface};
963
- }
964
-
965
- .ft-filter-level--go-back:focus {
966
- outline: none;
967
- }
968
-
969
- .ft-filter-level--go-back ft-icon {
970
- flex-shrink: 0;
971
- }
972
-
973
- .ft-filter-level--go-back ft-typography {
974
- display: block;
975
- flex-grow: 1;
976
- flex-shrink: 0;
977
- }
978
-
979
- .ft-filter-level--option {
980
- display: flex;
981
- align-items: center;
982
- max-width: 100%;
983
- }
984
-
985
- .ft-filter-level--option ft-button {
986
- margin-right: -10px;
987
- flex-shrink: 0;
988
- }
989
-
990
- ft-button {
991
- ${ut(Ei.color,Xi.colorOnSurface)};
992
- }
993
-
994
- ft-radio, ft-checkbox {
995
- flex-shrink: 1;
996
- flex-grow: 1;
997
- display: block;
998
- max-width: calc(100% + 10px);
999
- margin-left: -10px;
1000
- word-break: break-word;
1001
- }
1002
- `],Ji([i({type:String})],Yi.prototype,"id",void 0),Ji([i({type:Object})],Yi.prototype,"parent",void 0),Ji([i({type:Array})],Yi.prototype,"options",void 0),Ji([i({type:Boolean})],Yi.prototype,"multivalued",void 0),Ji([i({type:Boolean})],Yi.prototype,"disabled",void 0),Ji([i({type:Boolean})],Yi.prototype,"hideSelectedOptions",void 0),Ji([i({type:Boolean})],Yi.prototype,"preventNavigation",void 0),Ji([i({type:String})],Yi.prototype,"filter",void 0),Ji([i({type:String})],Yi.prototype,"moreValuesButtonLabel",void 0),Ji([i({type:Number})],Yi.prototype,"displayedValuesLimit",void 0),Ji([n(".ft-filter-level--container")],Yi.prototype,"container",void 0),Ji([o()],Yi.prototype,"displayedPages",void 0);var Qi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Gi={buttonsColor:ft.extend("--ft-snap-scroll-buttons-color",bt.colorPrimary),buttonsZIndex:ft.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ft.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ft.external(bt.colorSurface,"Design system")};class to extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class eo extends vt{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 t(200),this.updateScrollDebouncer=new t(100)}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)])}render(){const t=Dt({"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":wt}),e=this.controls&&this.withScroll;return K`
1003
- <div part="container" class="${t}">
1004
- <ft-button
1005
- class="ft-snap-scroll--previous"
1006
- part="controls"
1007
- primary
1008
- icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
1009
- ?hidden=${!e||this.startReached}
1010
- ?disabled=${!e||this.startReached}
1011
- @click=${this.previous}
1012
- ></ft-button>
1013
- <slot class="ft-snap-scroll--content"
1014
- part="content"
1015
- @slotchange=${this.onSlotChange}></slot>
1016
- <ft-button
1017
- class="ft-snap-scroll--next"
1018
- part="controls"
1019
- primary
1020
- icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
1021
- ?hidden=${!e||this.endReached}
1022
- ?disabled=${!e||this.endReached}
1023
- @click=${this.next}
1024
- ></ft-button>
1025
- </div>
1026
- `}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 to(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)}}eo.elementDefinitions={"ft-button":Ri},eo.styles=v`
1027
- .ft-snap-scroll {
1028
- box-sizing: border-box;
1029
- position: relative;
1030
- display: flex;
1031
-
1032
- --ft-snap-scroll-transparent-color: transparent;
1033
- }
1034
-
1035
- .ft-snap-scroll.ft-snap-scroll--safari-fix {
1036
- /* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
1037
- /* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
1038
- --ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
1039
- }
1040
-
1041
- .ft-snap-scroll,
1042
- .ft-snap-scroll--content {
1043
- overflow: hidden;
1044
- }
1045
-
1046
- .ft-snap-scroll--limit-size,
1047
- .ft-snap-scroll--limit-size .ft-snap-scroll--content {
1048
- width: 100%;
1049
- height: 100%;
1050
- }
1051
-
1052
- .ft-snap-scroll--content {
1053
- flex-grow: 1;
1054
- flex-shrink: 1;
1055
- box-sizing: border-box;
1056
- scroll-snap-align: start;
1057
- display: flex;
1058
- flex-wrap: nowrap;
1059
- align-items: flex-start;
1060
- justify-content: flex-start;
1061
- gap: ${Gi.gap};
1062
- }
1063
-
1064
- .ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
1065
- display: none;
1066
- }
1067
-
1068
- .ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
1069
- -ms-overflow-style: none;
1070
- scrollbar-width: none;
1071
- }
1072
-
1073
- .ft-snap-scroll--content::slotted(*) {
1074
- flex-shrink: 0;
1075
- flex-grow: 1;
1076
- max-height: 100%;
1077
- max-width: 100%;
1078
- }
1079
-
1080
- .ft-snap-scroll--horizontal,
1081
- .ft-snap-scroll--horizontal .ft-snap-scroll--content {
1082
- width: 100%;
1083
- }
1084
-
1085
- .ft-snap-scroll--vertical,
1086
- .ft-snap-scroll--vertical .ft-snap-scroll--content {
1087
- height: 100%;
1088
- }
1089
-
1090
- .ft-snap-scroll--horizontal .ft-snap-scroll--content {
1091
- flex-direction: row;
1092
- overflow-x: auto;
1093
- }
1094
-
1095
- .ft-snap-scroll--vertical .ft-snap-scroll--content {
1096
- flex-direction: column;
1097
- overflow-y: auto;
1098
- }
1099
-
1100
- .ft-snap-scroll--previous,
1101
- .ft-snap-scroll--next {
1102
- position: absolute;
1103
- display: flex;
1104
- z-index: ${Gi.buttonsZIndex};
1105
- opacity: 1;
1106
- transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
1107
- ${ut(Ei.backgroundColor,"transparent")};
1108
- ${ut(Ei.color,Gi.buttonsColor)};
1109
- }
1110
-
1111
- .ft-snap-scroll--previous[hidden],
1112
- .ft-snap-scroll--next[hidden] {
1113
- z-index: -1;
1114
- opacity: 0;
1115
- }
1116
-
1117
- .ft-snap-scroll--horizontal .ft-snap-scroll--previous {
1118
- top: 0;
1119
- left: -1px;
1120
- bottom: 0;
1121
- background: linear-gradient(to right, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
1122
- }
1123
-
1124
- .ft-snap-scroll--vertical .ft-snap-scroll--previous {
1125
- top: -1px;
1126
- left: 0;
1127
- right: 0;
1128
- background: linear-gradient(to bottom, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
1129
- }
1130
-
1131
- .ft-snap-scroll--horizontal .ft-snap-scroll--next {
1132
- top: 0;
1133
- right: -1px;
1134
- bottom: 0;
1135
- background: linear-gradient(to left, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
1136
- }
1137
-
1138
- .ft-snap-scroll--vertical .ft-snap-scroll--next {
1139
- left: 0;
1140
- right: 0;
1141
- bottom: -1px;
1142
- background: linear-gradient(to top, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
1143
- }
1144
-
1145
- .ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
1146
- .ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
1147
- .ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
1148
- .ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
1149
- background-color: ${Gi.colorSurface};
1150
- }
1151
- `,Qi([i({type:Boolean})],eo.prototype,"horizontal",void 0),Qi([i({type:Boolean})],eo.prototype,"hideScrollbar",void 0),Qi([i({type:Boolean})],eo.prototype,"controls",void 0),Qi([i({type:Boolean})],eo.prototype,"limitSize",void 0),Qi([o()],eo.prototype,"elements",void 0),Qi([o()],eo.prototype,"currentElement",void 0),Qi([o()],eo.prototype,"withScroll",void 0),Qi([o()],eo.prototype,"startReached",void 0),Qi([o()],eo.prototype,"endReached",void 0),Qi([n(".ft-snap-scroll--content")],eo.prototype,"contentSlot",void 0),c("ft-snap-scroll")(eo);var io=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const oo=ft.external(bt.colorOutline,"Design system"),so=ft.external(bt.colorOnSurface,"Design system"),no=ft.external(bt.colorOnSurfaceMedium,"Design system"),ro=ft.external(bt.colorPrimary,"Design system"),lo=ft.external(bt.colorSurface,"Design system"),ao=ft.external(bt.transitionDuration,"Design system"),co=ft.external(bt.transitionTimingFunction,"Design system");class ho extends CustomEvent{constructor(t){super("change",{detail:t})}}class po extends vt{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 t(300),this.changeDebouncer=new t(10)}get flatOptions(){return Ve(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return K`
1152
- <div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
1153
- part="container">
1154
- ${this.label||i?K`
1155
- <div class="ft-filter--header" part="header">
1156
- <ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
1157
- </ft-typography>
1158
- ${i?K`
1159
- <ft-button icon="close" dense @click=${this.clear} part="clear-button">
1160
- ${this.clearButtonLabel}
1161
- </ft-button>
1162
- `:null}
1163
- </div>
1164
- `:null}
1165
- <div class="ft-filter--filter" ?hidden=${!o}>
1166
- <input type="search"
1167
- part="input"
1168
- class="ft-typography--caption"
1169
- ?disabled=${!o}
1170
- placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
1171
- @search=${this.onFilterChange}
1172
- @keyup=${this.onFilterChange}>
1173
- </div>
1174
- <div class="ft-filter--values">
1175
- ${this.renderLevels()}
1176
- </div>
1177
- <slot class="ft-filter--slot"
1178
- @slotchange=${this.updateOptionsFromSlot}
1179
- @option-change=${this.optionsChanged}></slot>
1180
- </div>
1181
- `}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,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return K`
1182
- ${this.raiseSelectedOptions&&e.length>0?K`
1183
- <ft-filter-level
1184
- id="${this.id}"
1185
- ?multivalued=${this.multivalued}
1186
- ?disabled=${this.disabled}
1187
- preventNavigation
1188
- .options=${e}
1189
- @change=${this.onChange}
1190
- part="selected-values"
1191
- ></ft-filter-level>
1192
- <div class="ft-filter--separator">
1193
- `:null}
1194
- <ft-snap-scroll horizontal hideScrollbar
1195
- class="ft-filter--levels"
1196
- @current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
1197
- ${this.renderLevel(o,this.options)}
1198
- ${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(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(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
1199
- </ft-snap-scroll>
1200
- `}renderLevel(t,e,i){return K`
1201
- <ft-filter-level
1202
- class="${t}"
1203
- id="${this.id}"
1204
- filter="${this.filter}"
1205
- moreValuesButtonLabel="${this.moreValuesButtonLabel}"
1206
- ?multivalued=${this.multivalued}
1207
- ?disabled=${this.disabled||"ft-filter--level-center"!==t}
1208
- ?hideSelectedOptions=${this.raiseSelectedOptions}
1209
- .parent=${i}
1210
- .options=${e}
1211
- .displayedValuesLimit=${this.displayedValuesLimit}
1212
- @change=${this.onChange}
1213
- @go-back=${this.goBack}
1214
- @display-level=${this.onDisplayLevel}
1215
- part="values"
1216
- ></ft-filter-level>
1217
- `}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new ho(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}po.elementDefinitions={"ft-button":Ri,"ft-filter-level":Yi,"ft-snap-scroll":eo,"ft-typography":We},po.styles=[_e,v`
1218
- :host {
1219
- display: flex;
1220
- max-height: 100%;
1221
- max-width: 100%;
1222
- }
1223
-
1224
- .ft-filter--container {
1225
- flex-grow: 1;
1226
- display: flex;
1227
- flex-direction: column;
1228
- max-height: 100%;
1229
- max-width: 100%;
1230
- color: ${so};
1231
- background: ${lo};
1232
- }
1233
-
1234
- .ft-filter--header {
1235
- display: flex;
1236
- flex-wrap: wrap;
1237
- gap: 4px;
1238
- flex-shrink: 0;
1239
- padding: 0 10px;
1240
- margin-bottom: 8px;
1241
- ${ut(Jt.fontSize,"14px")};
1242
- }
1243
-
1244
- .ft-filter--header ft-button {
1245
- flex-shrink: 0;
1246
- margin-left: auto;
1247
- ${ut(Ei.iconSize,"18px")};
1248
- }
1249
-
1250
- .ft-filter--label {
1251
- display: block;
1252
- flex-shrink: 1;
1253
- flex-grow: 1;
1254
- word-break: break-word;
1255
- ${ut(Jt.lineHeight,"22px")};
1256
- ${ut(Jt.fontWeight,"bold")};
1257
- }
1258
-
1259
- .ft-filter--filter {
1260
- flex-shrink: 0;
1261
- display: flex;
1262
- margin: 0;
1263
- margin-bottom: 8px;
1264
- padding: 0 10px;
1265
- overflow: hidden;
1266
- height: 32px;
1267
- transition: height ${ao} ${co},
1268
- margin ${ao} ${co};
1269
- transition-delay: 500ms;
1270
- }
1271
-
1272
- .ft-filter--filter[hidden] {
1273
- height: 0;
1274
- margin-bottom: 0;
1275
- }
1276
-
1277
- input {
1278
- display: block;
1279
- width: 100%;
1280
- border-radius: 4px;
1281
- border: 1px solid ${oo};
1282
- padding: 4px;
1283
- background-color: ${lo};
1284
- color: ${no};
1285
- outline-color: ${ro};
1286
- }
1287
-
1288
- .ft-filter--values {
1289
- flex-grow: 1;
1290
- flex-shrink: 1;
1291
- max-width: 100%;
1292
- overflow-x: hidden;
1293
- overflow-y: auto;
1294
- }
1295
-
1296
- .ft-filter--separator {
1297
- border-top: 1px solid ${oo};
1298
- margin: 4px 10px;
1299
- }
1300
-
1301
- .ft-filter--levels-container {
1302
- position: relative;
1303
- overflow: hidden;
1304
- }
1305
-
1306
- .ft-filter--levels {
1307
- position: relative;
1308
- overflow: hidden;
1309
- }
1310
-
1311
- ft-filter-level {
1312
- width: 100%;
1313
- }
1314
-
1315
- .ft-filter--level-left {
1316
- height: 0;
1317
- }
1318
-
1319
- slot {
1320
- display: none;
1321
- }
1322
- `],io([i({type:String})],po.prototype,"id",void 0),io([i({type:String})],po.prototype,"label",void 0),io([i({type:String})],po.prototype,"filterPlaceHolder",void 0),io([i({type:String})],po.prototype,"clearButtonLabel",void 0),io([i({type:String})],po.prototype,"moreValuesButtonLabel",void 0),io([h([])],po.prototype,"options",void 0),io([i({type:Boolean})],po.prototype,"multivalued",void 0),io([i({type:Boolean})],po.prototype,"disabled",void 0),io([i({type:Boolean})],po.prototype,"raiseSelectedOptions",void 0),io([i({type:Number})],po.prototype,"displayedValuesLimit",void 0),io([n(".ft-filter--slot")],po.prototype,"slotElement",void 0),io([n(".ft-filter--container")],po.prototype,"container",void 0),io([n(".ft-filter--values")],po.prototype,"valuesContainer",void 0),io([n(".ft-filter--levels")],po.prototype,"levelsContainer",void 0),io([n(".ft-filter--levels ft-filter-level:last-child")],po.prototype,"lastLevel",void 0),io([n(".ft-filter--filter input")],po.prototype,"filterInput",void 0),io([function(t){return s({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],po.prototype,"levels",void 0),io([o()],po.prototype,"withScroll",void 0),io([o()],po.prototype,"filter",void 0),io([o()],po.prototype,"slideIn",void 0),io([o()],po.prototype,"slideOut",void 0);var fo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class uo extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return K`
1323
- <slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
1324
- `}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}uo.elementDefinitions={},fo([i({type:String})],uo.prototype,"label",void 0),fo([i({type:Object,converter:t=>t})],uo.prototype,"value",void 0),fo([i({type:Boolean,reflect:!0})],uo.prototype,"selected",void 0),fo([i({type:Object})],uo.prototype,"subOptions",void 0),fo([n(".ft-filter-option--slot")],uo.prototype,"slotElement",void 0),c("ft-filter")(po),c("ft-filter-option")(uo);var bo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class vo extends vt{constructor(){super(...arguments),this.multi=!1}render(){return K`
1325
- <div class="ft-accordion">
1326
- <slot @activated=${this.onChange}></slot>
1327
- </div>
1328
- `}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}vo.elementDefinitions={},vo.styles=v`
1329
- .ft-accordion {
1330
- box-sizing: border-box;
1331
- }
1332
- `,bo([i({type:Boolean})],vo.prototype,"multi",void 0),bo([n("slot")],vo.prototype,"content",void 0);var go=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const xo=ft.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),yo=ft.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),mo=ft.external(bt.colorOutline,"Design system");class $o extends vt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return K`
1333
- <div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
1334
- <div class="ft-accordion-item--toggle"
1335
- part="toggle"
1336
- @click=${()=>this.active=!this.active}
1337
- @keydown=${this.onToggleKeyDown}
1338
- tabindex="0">
1339
- <ft-ripple part="toggle-ripple"></ft-ripple>
1340
- ${this.icon?K`
1341
- <ft-icon variant="material">${this.icon}</ft-icon>
1342
- `:null}
1343
- ${this.label?K`
1344
- <ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
1345
- </ft-typography>
1346
- `:K`
1347
- <slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
1348
- `}
1349
- <ft-icon variant="material">${this.active?"expand_less":"expand_more"}</ft-icon>
1350
- </div>
1351
- <div class="ft-accordion-item--content" part="content" @focusin=${()=>this.active=!0}>
1352
- <slot></slot>
1353
- </div>
1354
- <div class="ft-accordion-item--separator" part="separator"></div>
1355
- </div>
1356
- `}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)}}$o.elementDefinitions={"ft-ripple":ri,"ft-typography":We,"ft-icon":Oi},$o.styles=v`
1357
- .ft-accordion-item {
1358
- display: flex;
1359
- flex-direction: column;
1360
- }
1361
-
1362
- .ft-accordion-item--toggle {
1363
- flex-shrink: 0;
1364
- flex-grow: 0;
1365
- position: relative;
1366
- display: flex;
1367
- align-items: center;
1368
- cursor: pointer;
1369
- padding: ${yo} ${xo};
1370
- gap: calc(${xo} / 2);
1371
- outline: none;
1372
- }
1373
-
1374
- .ft-accordion-item--toggle > *:not(ft-ripple) {
1375
- position: relative;
1376
- }
1377
-
1378
- .ft-accordion-item--label {
1379
- flex-grow: 1;
1380
- flex-shrink: 1;
1381
- display: block;
1382
- }
1383
-
1384
- .ft-accordion-item--content {
1385
- box-sizing: border-box;
1386
- flex-shrink: 1;
1387
- flex-grow: 1;
1388
- overflow: hidden;
1389
- height: 0;
1390
- }
1391
-
1392
- .ft-accordion-item--active .ft-accordion-item--content {
1393
- height: initial;
1394
- overflow: visible;
1395
- padding: ${yo} ${xo};
1396
- }
1397
-
1398
- .ft-accordion-item--separator {
1399
- border-bottom: 1px solid ${mo};
1400
- }
1401
- `,go([i({type:String})],$o.prototype,"icon",void 0),go([i({type:String})],$o.prototype,"label",void 0),go([i({type:Boolean,reflect:!0})],$o.prototype,"active",void 0),c("ft-accordion")(vo),c("ft-accordion-item")($o);var wo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ko=ft.extend("--ft-chip-color",bt.colorOnSurface),So={backgroundColor:ft.extend("--ft-chip-background-color",bt.colorSurface),color:ko,fontSize:ft.extend("--ft-chip-font-size",$e.fontSize),iconSize:ft.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ft.extend("--ft-chip-ripple-color",ko),horizontalPadding:ft.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ft.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ft.external(bt.colorOutline,"Design system"),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Oo=ft.extend("--ft-chip-highlighted-color",ft.extend("--ft-chip-color",bt.colorOnPrimary)),Co={backgroundColor:ft.extend("--ft-chip-highlighted-background-color",ft.extend("--ft-chip-background-color",bt.colorPrimary)),color:Oo,rippleColor:ft.extend("--ft-chip-highlighted-ripple-color",Oo)},zo=ft.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Eo=ft.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Bo extends CustomEvent{constructor(){super("icon-click")}}class Mo extends vt{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}static get styles(){return[gt,v`
1402
- :host {
1403
- display: inline-block;
1404
- max-width: 100%;
1405
- pointer-events: none;
1406
- }
1407
-
1408
- .ft-chip {
1409
- position: relative;
1410
- display: flex;
1411
- justify-content: center;
1412
- align-items: center;
1413
- width: 100%;
1414
- overflow: hidden;
1415
- box-sizing: border-box;
1416
- pointer-events: auto;
1417
-
1418
- --ft-chip-internal-font-size: ${So.fontSize};
1419
- --ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
1420
- ${ut(Si.size,So.iconSize)};
1421
- --ft-chip-internal-vertical-padding: ${So.verticalPadding};
1422
- --ft-chip-internal-horizontal-padding: ${So.horizontalPadding};
1423
- --ft-chip-internal-icon-padding: 3px;
1424
- --ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${So.iconSize});
1425
-
1426
- border: 1px solid ${So.colorOutline};
1427
- color: ${So.color};
1428
- ${ut(Ge.color,So.rippleColor)};
1429
- border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
1430
- padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
1431
- background-color: ${So.backgroundColor};
1432
- line-height: var(--ft-chip-internal-content-height);
1433
- }
1434
-
1435
- .ft-chip > *:not(ft-ripple) {
1436
- position: relative;
1437
- }
1438
-
1439
- .ft-chip--dense {
1440
- --ft-chip-internal-icon-padding: 3px;
1441
- --ft-chip-internal-vertical-padding: ${Eo};
1442
- --ft-chip-internal-horizontal-padding: ${zo};
1443
- --ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
1444
- }
1445
-
1446
- .ft-chip--no-content {
1447
- --ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
1448
- }
1449
-
1450
- .ft-chip--disabled {
1451
- cursor: default;
1452
- pointer-events: none;
1453
- filter: grayscale(1);
1454
- opacity: ${So.opacityDisabled};
1455
- }
1456
-
1457
- .ft-chip--highlighted {
1458
- border: none;
1459
- padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
1460
- background-color: ${Co.backgroundColor};
1461
- ${ut(Ge.color,Co.rippleColor)};
1462
- color: ${Co.color};
1463
- }
1464
-
1465
- .ft-chip--clickable {
1466
- cursor: pointer;
1467
- -webkit-mask-image: radial-gradient(white, black);
1468
- }
1469
-
1470
- .ft-chip:focus {
1471
- outline: none;
1472
- }
1473
-
1474
- .ft-chip--icon-container {
1475
- display: inline-flex;
1476
- position: relative;
1477
- overflow: hidden;
1478
- border-radius: 100%;
1479
- justify-content: center;
1480
- align-items: center;
1481
- flex-shrink: 0;
1482
-
1483
- padding: var(--ft-chip-internal-icon-padding);
1484
- margin: calc((-1) * var(--ft-chip-internal-icon-padding));
1485
- }
1486
-
1487
- .ft-chip--icon-container > *:not(ft-ripple) {
1488
- position: relative;
1489
- }
1490
-
1491
- .ft-chip--label {
1492
- vertical-align: bottom;
1493
- display: block;
1494
- margin: 0 var(--ft-chip-internal-horizontal-padding);
1495
- ${ut($e.fontSize,"var(--ft-chip-internal-font-size)")};
1496
- ${ut($e.lineHeight,"var(--ft-chip-internal-content-height)")};
1497
- }
1498
-
1499
- .ft-chip--safari-fix .ft-chip--label {
1500
- margin-right: 0;
1501
- }
1502
-
1503
- .ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
1504
- overflow: hidden;
1505
- white-space: nowrap;
1506
- text-overflow: ellipsis;
1507
- }
1508
-
1509
- .ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
1510
- content: "\\0000a0";
1511
- display: inline-block;
1512
- width: 0;
1513
- }
1514
-
1515
- .ft-chip--no-content .ft-chip--label {
1516
- display: none;
1517
- }
1518
-
1519
- .ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
1520
- width: var(--ft-chip-internal-content-height);
1521
- height: var(--ft-chip-internal-content-height);
1522
- }
1523
-
1524
- .ft-chip--icon-container:focus {
1525
- outline: none;
1526
- }
1527
-
1528
- .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
1529
- order: -1;
1530
- }
1531
- `]}render(){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":wt};return K`
1532
- <div class="${Dt(t)}"
1533
- aria-label="${this.getLabel()}"
1534
- tabindex="${this.interactionsOnChip?0:-1}"
1535
- @keyup=${this.onKeyUp}>
1536
- <ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
1537
- <ft-typography variant="body2" element="span" class="ft-chip--label">
1538
- <slot @slotchange=${this.onSlotchange}></slot>
1539
- </ft-typography>
1540
- ${this.internalIcon?this.renderIcon():null}
1541
- </div>
1542
- `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return K`
1543
- <div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
1544
- tabindex="${this.interactionsOnIcon?0:-1}"
1545
- @click=${this.onIconClick}
1546
- @keyup=${this.onIconKeyUp}>
1547
- <ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
1548
- <ft-icon variant="material">${this.internalIcon}</ft-icon>
1549
- </div>
1550
- `}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bo))}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)}}Mo.elementDefinitions={"ft-ripple":ri,"ft-typography":We,"ft-icon":Oi},wo([i({type:Boolean})],Mo.prototype,"highlighted",void 0),wo([i({type:Boolean})],Mo.prototype,"removable",void 0),wo([i({type:Boolean})],Mo.prototype,"disabled",void 0),wo([i({type:Boolean})],Mo.prototype,"clickable",void 0),wo([i({type:Boolean})],Mo.prototype,"iconClickable",void 0),wo([i({type:Boolean})],Mo.prototype,"dense",void 0),wo([i({type:Boolean})],Mo.prototype,"multiLine",void 0),wo([i({type:String})],Mo.prototype,"label",void 0),wo([i({type:String})],Mo.prototype,"icon",void 0),wo([i({type:Boolean})],Mo.prototype,"trailingIcon",void 0),wo([n("ft-typography slot")],Mo.prototype,"slottedContent",void 0),c("ft-chip")(Mo);var No=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ro={fontSize:ft.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ft.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ft.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ft.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ft.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ft.extend("--ft-input-label-border-color",bt.colorOutline),textColor:ft.extend("--ft-input-label-text-color",bt.colorOnSurfaceMedium),disabledTextColor:ft.extend("--ft-input-label-disabled-text-color",bt.colorOnSurfaceDisabled),colorSurface:ft.external(bt.colorSurface,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class Fo extends vt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return K`
1551
- <div class="${Dt(t)}">
1552
- ${this.text?K`
1553
- <div class="ft-input-label--text ft-typography--caption">
1554
- <span class="ft-input-label--floating-text">${this.text}</span>
1555
- <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
1556
- </div>
1557
- `:null}
1558
- </div>
1559
- `}}Fo.elementDefinitions={},Fo.styles=[_e,v`
1560
- .ft-input-label {
1561
- position: absolute;
1562
- inset: 0;
1563
- display: flex;
1564
- }
1565
-
1566
- .ft-input-label {
1567
- border-color: ${Ro.borderColor};
1568
- }
1569
-
1570
- .ft-input-label.ft-input-label--in-error {
1571
- border-color: ${Ro.colorError}
1572
- }
1573
-
1574
- .ft-input-label:before,
1575
- .ft-input-label:after {
1576
- content: "";
1577
- display: flex;
1578
- border-bottom-width: 1px;
1579
- border-bottom-style: solid;
1580
- border-color: inherit;
1581
- }
1582
-
1583
- .ft-input-label:before {
1584
- width: ${Ro.horizontalSpacing};
1585
- flex-shrink: 0;
1586
- }
1587
-
1588
- .ft-input-label:after {
1589
- flex-grow: 1;
1590
- flex-shrink: 1;
1591
- }
1592
-
1593
- .ft-input-label--text {
1594
- display: flex;
1595
- flex-shrink: 1;
1596
- position: relative;
1597
- border-bottom-width: 1px;
1598
- border-bottom-style: solid;
1599
- border-color: inherit;
1600
- color: ${Ro.textColor};
1601
- transition: font-size 250ms, line-height 250ms, color 250ms;
1602
- ${ut(we.fontSize,Ro.fontSize)};
1603
- ${ut(we.lineHeight,Ro.fontSize)};
1604
- }
1605
-
1606
- .ft-input-label--in-error .ft-input-label--text {
1607
- color: ${Ro.colorError}
1608
- }
1609
-
1610
- .ft-input-label--disabled .ft-input-label--text {
1611
- color: ${Ro.disabledTextColor};
1612
- }
1613
-
1614
- .ft-input-label--hidden-text {
1615
- padding: 0 4px;
1616
- opacity: 0;
1617
- }
1618
-
1619
- .ft-input-label--floating-text {
1620
- position: absolute;
1621
- top: calc(50% - var(--ft-typography-caption-line-height) / 2);
1622
- transition: top 250ms;
1623
- width: calc(100% - 8px);
1624
- overflow: hidden;
1625
- white-space: nowrap;
1626
- text-overflow: ellipsis;
1627
- padding: ${Ro.verticalSpacing} 4px;
1628
- margin: calc(${Ro.verticalSpacing} * -1) 0;
1629
- }
1630
-
1631
- .ft-input-label--raised .ft-input-label--text {
1632
- ${ut(we.fontSize,Ro.raisedFontSize)};
1633
- ${ut(we.lineHeight,Ro.raisedFontSize)};
1634
- }
1635
-
1636
- .ft-input-label--raised .ft-input-label--floating-text {
1637
- top: ${Ro.verticalSpacing};
1638
- }
1639
-
1640
- .ft-input-label--outlined .ft-input-label--text,
1641
- .ft-input-label--outlined:before,
1642
- .ft-input-label--outlined:after {
1643
- border-top-width: 1px;
1644
- border-top-style: solid;
1645
- }
1646
-
1647
- .ft-input-label--outlined:before {
1648
- border-left-width: 1px;
1649
- border-left-style: solid;
1650
- border-radius: ${Ro.borderRadiusS} 0 0 ${Ro.borderRadiusS};
1651
- }
1652
-
1653
- .ft-input-label--outlined:after {
1654
- border-right-width: 1px;
1655
- border-right-style: solid;
1656
- border-radius: 0 ${Ro.borderRadiusS} ${Ro.borderRadiusS} 0;
1657
- }
1658
-
1659
- .ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
1660
- padding: 2px 4px;
1661
- z-index: ${Ro.raisedZIndex};
1662
- background-color: ${Ro.colorSurface};
1663
- border-radius: ${Ro.borderRadiusS};
1664
- top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
1665
- }
1666
-
1667
- .ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
1668
- border-top: none;
1669
- }
1670
- `],No([i({type:String})],Fo.prototype,"text",void 0),No([i({type:Boolean})],Fo.prototype,"raised",void 0),No([i({type:Boolean})],Fo.prototype,"outlined",void 0),No([i({type:Boolean})],Fo.prototype,"disabled",void 0),No([i({type:Boolean})],Fo.prototype,"error",void 0),c("ft-input-label")(Fo);var Lo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Do extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return K``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Do.elementDefinitions={},Lo([i({type:String})],Do.prototype,"label",void 0),Lo([i({type:Object,converter:t=>t})],Do.prototype,"value",void 0),Lo([i({type:Boolean,reflect:!0})],Do.prototype,"selected",void 0);const Io={labelSize:ft.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ft.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ft.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:ft.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:ft.extend("--ft-select-selected-option-color",bt.colorOnSurface),helperColor:ft.extend("--ft-select-helper-color",bt.colorOnSurfaceMedium),optionsColor:ft.extend("--ft-select-options-color",bt.colorOnSurface),optionsZIndex:ft.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class jo extends vt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let n=this.hasOptionsMenuOpen,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return K`
1671
- <div class="${Dt(a)}" part="container">
1672
- <div class="ft-select--main-panel" part="main-panel">
1673
- <ft-input-label text="${this.label}"
1674
- part="label"
1675
- ?disabled=${r}
1676
- ?outlined=${this.outlined}
1677
- ?raised=${l||n}
1678
- ?error=${this.error}
1679
- ></ft-input-label>
1680
- <div class="ft-select--input-panel"
1681
- part="selected-value"
1682
- tabindex="${r?"-1":"0"}"
1683
- @click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
1684
- @keydown=${this.onMainPanelKeyDown}
1685
- aria-label="${this.label}"
1686
- aria-haspopup="listbox"
1687
- aria-expanded="${n}">
1688
- <ft-ripple ?disabled=${r} ?activated=${!this.outlined}></ft-ripple>
1689
- <ft-typography variant="body1" class="ft-select--selected-option">
1690
- ${null!==(s=null===(o=this.selectedOption)||void 0===o?void 0:o.label)&&void 0!==s?s:""}
1691
- </ft-typography>
1692
- <ft-icon variant="material">${n?"expand_less":"expand_more"}</ft-icon>
1693
- </div>
1694
- <div class="ft-select--options"
1695
- part="options"
1696
- @keydown=${this.onOptionsKeyDown}
1697
- innerrole="listbox">
1698
- ${Lt(this.options,(t=>t.value),(t=>this.renderOption(t)))}
1699
- </div>
1700
- </div>
1701
- ${this.helper?K`
1702
- <ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
1703
- </ft-typography>`:void 0}
1704
- </div>
1705
- <slot @slotchange=${this.updateOptionsFromSlot}
1706
- @option-change=${this.updateOptionsFromSlot}
1707
- ></slot>
1708
- `}renderOption(t){let e=this.selectedOption===t;return K`
1709
- <div class="${Dt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
1710
- part="option"
1711
- tabindex="0"
1712
- data-value="${t.value}"
1713
- @keydown=${e=>this.onOptionKeyDown(e,t)}
1714
- @click=${()=>this.selectOption(t)}>
1715
- <ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
1716
- ${t.label}
1717
- </div>
1718
- `}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}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}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 hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}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,o,s,n;let r;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(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.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)}}jo.elementDefinitions={"ft-input-label":Fo,"ft-typography":We,"ft-ripple":ri,"ft-icon":Oi},jo.styles=[Ae,_e,v`
1719
- *:focus {
1720
- outline: none;
1721
- }
1722
-
1723
- .ft-select {
1724
- display: flex;
1725
- flex-direction: column;
1726
- align-items: stretch;
1727
- }
1728
-
1729
- .ft-select--main-panel {
1730
- position: relative;
1731
- display: flex;
1732
- height: calc(4 * ${Io.verticalSpacing} + ${Io.labelSize} + ${Io.selectedOptionSize});
1733
- }
1734
-
1735
- .ft-select--input-panel {
1736
- flex-grow: 1;
1737
- position: relative;
1738
- display: flex;
1739
- align-items: center;
1740
- overflow: hidden;
1741
- padding-left: 16px;
1742
- padding-right: 8px;
1743
- gap: 8px;
1744
- color: ${Io.selectedOptionColor};
1745
- ${ut(Ge.color,Io.selectedOptionColor)};
1746
- }
1747
-
1748
- .ft-select--input-panel,
1749
- .ft-select--option {
1750
- ${ut(Ge.opacityContentOnSurfaceHover,"0.08")};
1751
- ${ut(Ge.opacityContentOnSurfacePressed,"0.04")};
1752
- }
1753
-
1754
- .ft-select--input-panel > *:not(ft-ripple),
1755
- .ft-select--option > *:not(ft-ripple) {
1756
- position: relative;
1757
- }
1758
-
1759
- .ft-select--disabled .ft-select--input-panel,
1760
- .ft-select--disabled .ft-select--option {
1761
- color: ${Io.colorOnSurfaceDisabled};
1762
- }
1763
-
1764
- .ft-select:not(.ft-select--disabled) .ft-select--input-panel,
1765
- .ft-select:not(.ft-select--disabled) .ft-select--option {
1766
- cursor: pointer;
1767
- }
1768
-
1769
- ft-input-label {
1770
- ${ut(Ro.fontSize,Io.selectedOptionSize)};
1771
- ${ut(Ro.raisedFontSize,Io.labelSize)};
1772
- ${ut(Ro.verticalSpacing,Io.verticalSpacing)};
1773
- }
1774
-
1775
- .ft-select:not(.ft-select--disabled):focus-within ft-icon {
1776
- color: ${Io.colorPrimary};
1777
- }
1778
-
1779
- .ft-select:not(.ft-select--disabled):focus-within ft-input-label {
1780
- ${ut(Ro.borderColor,Io.colorPrimary)};
1781
- ${ut(Ro.textColor,Io.colorPrimary)};
1782
- }
1783
-
1784
- .ft-select--selected-option {
1785
- display: block;
1786
- flex-grow: 1;
1787
- flex-shrink: 1;
1788
- overflow: hidden;
1789
- white-space: nowrap;
1790
- text-overflow: ellipsis;
1791
- ${ut(me.fontSize,Io.selectedOptionSize)};
1792
- ${ut(me.lineHeight,Io.selectedOptionSize)};
1793
- }
1794
-
1795
- .ft-select--in-error .ft-select--selected-option {
1796
- color: ${Io.colorError};
1797
- }
1798
-
1799
- ft-icon {
1800
- flex-shrink: 0;
1801
- }
1802
-
1803
- slot {
1804
- display: none;
1805
- }
1806
-
1807
- .ft-select--filled .ft-select--input-panel {
1808
- border-radius: ${Io.borderRadiusS} ${Io.borderRadiusS} 0 0;
1809
- }
1810
-
1811
- .ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
1812
- align-self: stretch;
1813
- padding-top: calc(${Io.labelSize} + 2 * ${Io.verticalSpacing});
1814
- }
1815
-
1816
- .ft-select--outlined .ft-select--input-panel {
1817
- border-radius: ${Io.borderRadiusS};
1818
- }
1819
-
1820
- .ft-select--options {
1821
- display: none;
1822
- position: absolute;
1823
- top: 100%;
1824
- left: 0;
1825
- right: 0;
1826
- color: ${Io.optionsColor};
1827
- background: ${Io.colorSurface};
1828
- z-index: ${Io.optionsZIndex};
1829
- box-shadow: ${Io.elevation02};
1830
- }
1831
-
1832
- .ft-select--fixed .ft-select--options {
1833
- position: fixed;
1834
- right: unset;
1835
- /* left and top are set dynamically */
1836
- }
1837
-
1838
- .ft-select--options-displayed .ft-select--options {
1839
- display: block;
1840
- max-height: ${Io.optionsHeight};
1841
- overflow-y: auto;
1842
- }
1843
-
1844
- .ft-select--option {
1845
- position: relative;
1846
- padding: 4px 16px;
1847
- min-height: 32px;
1848
- display: flex;
1849
- align-items: center;
1850
- }
1851
-
1852
- .ft-select--helper-text {
1853
- padding: 0 12px 0 16px;
1854
- color: ${Io.helperColor};
1855
- }
1856
-
1857
- .ft-select--in-error .ft-select--helper-text {
1858
- color: ${Io.colorError};
1859
- }
1860
- `],Lo([i({type:String})],jo.prototype,"label",void 0),Lo([i({type:String})],jo.prototype,"helper",void 0),Lo([i({type:Boolean})],jo.prototype,"outlined",void 0),Lo([i({type:Boolean})],jo.prototype,"disabled",void 0),Lo([i({type:Boolean})],jo.prototype,"error",void 0),Lo([i({type:Boolean})],jo.prototype,"fixedMenuPosition",void 0),Lo([i({type:Array})],jo.prototype,"options",void 0),Lo([o()],jo.prototype,"selectedOption",void 0),Lo([o()],jo.prototype,"optionsDisplayed",void 0),Lo([o()],jo.prototype,"focusOptions",void 0),Lo([n(".ft-select")],jo.prototype,"container",void 0),Lo([n(".ft-select--options")],jo.prototype,"optionsMenu",void 0),Lo([n(".ft-select--input-panel")],jo.prototype,"mainPanel",void 0),Lo([n(".ft-select--option:first-child")],jo.prototype,"firstOption",void 0),Lo([n(".ft-select--option:focus")],jo.prototype,"focusedOption",void 0),Lo([n(".ft-select--option.ft-select--option-selected")],jo.prototype,"selectedOptionElement",void 0),Lo([n(".ft-select--option:last-child")],jo.prototype,"lastOption",void 0),Lo([n("slot")],jo.prototype,"optionsSlot",void 0),c("ft-select")(jo),c("ft-select-option")(Do);const Uo={display:ft.create("--ft-skeleton--display","DISPLAY","block"),width:ft.create("--ft-skeleton--width","SIZE","100%"),height:ft.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:ft.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:ft.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:ft.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:ft.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:ft.external(bt.borderRadiusM,"Design system")};class Po extends vt{render(){return K`
1861
- `}}Po.elementDefinitions={},Po.styles=v`
1862
- :host {
1863
- width: ${Uo.width};
1864
- height: ${Uo.height};
1865
- display: ${Uo.display};
1866
- overflow: hidden;
1867
- border-radius: ${Uo.borderRadiusM};
1868
- background: linear-gradient(
1869
- 90deg,
1870
- transparent,
1871
- ${Uo.glareColor} calc(0.45 * ${Uo.glareWidth}),
1872
- ${Uo.glareColor} calc(0.55 * ${Uo.glareWidth}),
1873
- transparent ${Uo.glareWidth}
1874
- ), ${Uo.backgroundColor};
1875
- background-repeat: repeat-y;
1876
- background-size: 100vw 100vh;
1877
- background-attachment: fixed;
1878
- background-position: calc(${Uo.glareWidth} * -1) 0;
1879
- animation: shine ${Uo.animationDuration} infinite;
1880
- animation-timing-function: linear;
1881
- }
1882
-
1883
- @keyframes shine {
1884
- to {
1885
- background-position: calc(100vw + ${Uo.glareWidth}) 0, calc(${Uo.glareWidth} * -1) 0;
1886
- }
1887
- }
1888
- `,c("ft-skeleton")(Po);const To={height:ft.create("--ft-search-bar-height","SIZE","38px"),borderRadius:ft.extend("--ft-search-bar-border-radius",bt.borderRadiusS),mobileOpenPosition:ft.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:ft.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:ft.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:ft.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:ft.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:ft.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurface:ft.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ft.external(bt.colorOnSurfaceMedium,"Design system"),colorOutline:ft.external(bt.colorOutline,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),buttonColor:ft.external(Ei.color,"Button"),buttonRippleColor:ft.external(Ei.rippleColor,"Button")},Ao=v`
1889
- * {
1890
- box-sizing: border-box;
1891
- }
1892
-
1893
- .ft-search-bar--container {
1894
- display: flex;
1895
- flex-direction: column;
1896
- gap: 8px;
1897
- color: ${To.colorOnSurface};
1898
- outline: none;
1899
- }
1900
-
1901
- .ft-search-bar--container > * {
1902
- flex-shrink: 0;
1903
- }
1904
-
1905
- .ft-search-bar--mobile-menu-open {
1906
- position: ${To.mobileOpenPosition};
1907
- top: ${To.mobileOpenTop};
1908
- bottom: ${To.mobileOpenBottom};
1909
- left: ${To.mobileOpenLeft};
1910
- right: ${To.mobileOpenRight};
1911
- z-index: ${To.floatingZIndex};
1912
- padding: 16px;
1913
- background: ${To.colorSurface};
1914
- }
1915
-
1916
- .ft-search-bar {
1917
- position: relative;
1918
- display: flex;
1919
- flex-direction: row;
1920
- align-items: center;
1921
- height: ${To.height};
1922
-
1923
- background: ${To.colorSurface};
1924
- border: 1px solid ${To.colorOutline};
1925
- border-radius: ${To.borderRadius};
1926
- }
1927
-
1928
- .ft-search-bar--skeleton {
1929
- ${ut(Uo.height,To.height)};
1930
- ${ut(Uo.borderRadiusM,To.borderRadius)};
1931
- }
1932
-
1933
- .ft-search-bar--floating-panel-open .ft-search-bar {
1934
- border-radius: ${To.borderRadius} ${To.borderRadius} 0 0;
1935
- }
1936
-
1937
- .ft-search-bar--input-container {
1938
- flex-grow: 1;
1939
- flex-shrink: 1;
1940
- position: relative;
1941
- height: calc(100% - 2px);
1942
- }
1943
-
1944
- .ft-search-bar--input-outline {
1945
- flex-grow: 1;
1946
- flex-shrink: 1;
1947
- height: 100%;
1948
- width: 100%;
1949
- align-self: stretch;
1950
- display: grid;
1951
- padding: 0 8px;
1952
- border-radius: ${To.borderRadius};
1953
- }
1954
-
1955
- .ft-search-bar--dense .ft-search-bar--input-outline {
1956
- grid-template-columns: auto minmax(200px, 1fr);
1957
- gap: 8px;
1958
- }
1959
-
1960
- .ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
1961
- outline: 2px solid ${To.colorPrimary};
1962
- }
1963
-
1964
- .ft-search-bar--input {
1965
- height: 100%;
1966
- flex-grow: 1;
1967
- border: none;
1968
- background-color: transparent;
1969
- outline: none;
1970
- }
1971
-
1972
- .ft-search-bar--desktop .ft-search-bar--input {
1973
- flex-shrink: 0;
1974
- min-width: 250px;
1975
- }
1976
-
1977
- .ft-search-bar--actions {
1978
- flex-shrink: 0;
1979
- display: flex;
1980
- flex-direction: row;
1981
- align-items: center;
1982
- height: 100%;
1983
-
1984
- --ft-tooltip-z-index: 3;
1985
- }
1986
-
1987
- .ft-search-bar > ft-button,
1988
- .ft-search-bar--actions ft-button {
1989
- flex-shrink: 0;
1990
- }
1991
-
1992
- .ft-search-bar--left-action {
1993
- ${ut(Ei.borderRadius,v`calc(${To.borderRadius} - 1px) 0 0 calc(${To.borderRadius} - 1px)`)};
1994
- border-right: 1px solid ${To.colorOutline};
1995
- height: 100%;
1996
- }
1997
-
1998
- .ft-search-bar--left-action::part(button) {
1999
- height: 100%;
2000
- }
2001
-
2002
- .ft-search-bar--floating-panel-open .ft-search-bar--left-action {
2003
- ${ut(Ei.borderRadius,v`calc(${To.borderRadius} - 1px) 0 0 0`)};
2004
- }
2005
-
2006
- .ft-search-bar .ft-search-bar--launch-search,
2007
- .ft-search-bar--clear-query {
2008
- margin: 0 4px;
2009
- }
2010
-
2011
- .ft-search-bar--separator {
2012
- height: 20px;
2013
- border-right: 1px solid ${To.colorOutline};
2014
- }
2015
-
2016
- .ft-search-bar--left-action.ft-search-bar--content-locale {
2017
- ${ut(Ro.borderColor,"transparent")};
2018
- ${ut(Ro.borderRadiusS,v`calc(${To.borderRadius} - 1px)`)};
2019
- ${ut(Io.selectedOptionColor,To.buttonColor)};
2020
- }
2021
-
2022
- .ft-search-bar--left-action.ft-search-bar--content-locale,
2023
- .ft-search-bar--left-action.ft-search-bar--content-locale::part(container),
2024
- .ft-search-bar--left-action.ft-search-bar--content-locale::part(main-panel) {
2025
- height: 100%;
2026
- }
2027
-
2028
- .ft-search-bar--left-action.ft-search-bar--content-locale::part(options) {
2029
- top: calc(100% + 1px);
2030
- right: unset;
2031
- width: max-content;
2032
- min-width: 100%;
2033
- }
2034
-
2035
- .ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
2036
- border-radius: calc(${To.borderRadius} - 1px) 0 0 calc(${To.borderRadius} - 1px);
2037
- }
2038
-
2039
- `,_o=v`
2040
- .ft-search-bar--floating-panel .ft-search-bar--presets {
2041
- margin-right: auto;
2042
- }
2043
-
2044
- .ft-search-bar--floating-panel .ft-search-bar--presets {
2045
- min-width: 250px;
2046
- ${ut(Io.optionsZIndex,"2")};
2047
- }
2048
-
2049
- .ft-search-bar--floating-panel {
2050
- flex-direction: column;
2051
- gap: 16px;
2052
- padding: 16px;
2053
- }
2054
-
2055
- .ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
2056
- display: flex;
2057
- }
2058
-
2059
- .ft-search-bar--desktop .ft-search-bar--facets-actions {
2060
- display: flex;
2061
- align-items: center;
2062
- justify-content: flex-end;
2063
- gap: 8px;
2064
- padding: 0 10px;
2065
- }
2066
-
2067
- .ft-search-bar--mobile .ft-search-bar--facets-actions {
2068
- flex-shrink: 0;
2069
- flex-grow: 0;
2070
- display: flex;
2071
- gap: 16px;
2072
- align-items: center;
2073
- justify-content: space-evenly;
2074
- }
2075
-
2076
- .ft-search-bar--mobile .ft-search-bar--facets-actions > * {
2077
- flex-grow: 1;
2078
- flex-basis: 0;
2079
- }
2080
-
2081
- ft-filter::part(clear-button) {
2082
- display: none;
2083
- }
2084
-
2085
- .ft-search-bar--floating-panel .ft-search-bar--filters-container {
2086
- display: block;
2087
- height: 350px;
2088
- --ft-snap-scroll-gap: 16px;
2089
- }
2090
-
2091
- .ft-search-bar--floating-panel ft-filter {
2092
- display: flex;
2093
- flex-grow: 0;
2094
- max-height: 100%;
2095
- max-width: 250px;
2096
- }
2097
-
2098
- .ft-search-bar--hierarchical-filter {
2099
- width: 250px;
2100
- }
2101
-
2102
- .ft-search-bar--mobile .ft-search-bar--filters-container {
2103
- flex-grow: 1;
2104
- flex-shrink: 1;
2105
- overflow-y: auto;
2106
- margin: 0 -16px;
2107
- padding: 0 16px;
2108
- }
2109
-
2110
- .ft-search-bar--mobile .ft-search-bar--filters-container ft-filter {
2111
- display: flex;
2112
- max-height: 60vh;
2113
- }
2114
-
2115
- .ft-search-bar--mobile ft-filter::part(container) {
2116
- flex-grow: 1;
2117
- }
2118
-
2119
- .ft-search-bar--filter-label {
2120
- display: flex;
2121
- justify-content: space-between;
2122
- align-items: baseline;
2123
- gap: 8px;
2124
- }
2125
-
2126
- .ft-search-bar--filter-label > * {
2127
- white-space: nowrap;
2128
- overflow: hidden;
2129
- text-overflow: ellipsis;
2130
- }
2131
-
2132
- .ft-search-bar--filter-label > :first-child {
2133
- flex-shrink: 0;
2134
- }
2135
-
2136
- .ft-search-bar--filter-label > :last-child {
2137
- flex-shrink: 1;
2138
- color: ${To.colorOnSurfaceMedium};
2139
- }
2140
-
2141
- ft-accordion-item::part(toggle) {
2142
- margin-left: -16px;
2143
- margin-right: -16px;
2144
- }
2145
-
2146
- ft-accordion-item::part(label) {
2147
- overflow: hidden;
2148
- }
2149
-
2150
- ft-accordion-item::part(content) {
2151
- padding-left: 0;
2152
- padding-right: 0;
2153
- }
2154
-
2155
- .ft-search-bar--floating-panel .ft-search-bar--launch-search {
2156
- margin: 0;
2157
- }
2158
- `,Ho=v`
2159
- .ft-search-bar--selected-filters:not(ft-snap-scroll) {
2160
- flex-shrink: 0;
2161
- display: flex;
2162
- flex-direction: row;
2163
- flex-wrap: wrap;
2164
- gap: 8px;
2165
- }
2166
-
2167
- ft-snap-scroll.ft-search-bar--selected-filters {
2168
- overflow: hidden;
2169
- ${ut(Gi.gap,"4px")};
2170
- }
2171
-
2172
- ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
2173
- align-items: center;
2174
- }
2175
-
2176
- .ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
2177
- ${ut(So.iconSize,"17px")};
2178
- ${ut(So.fontSize,"12px")};
2179
- }
2180
-
2181
- .ft-search-bar--selected-filters * {
2182
- max-width: 100%;
2183
- }
2184
-
2185
- .ft-search-bar--selected-filters ft-chip {
2186
- flex-grow: 0;
2187
- }
2188
- `,Zo=v`
2189
- .ft-search-bar--mobile .ft-search-bar--suggestions {
2190
- flex-grow: 1;
2191
- flex-shrink: 1;
2192
- overflow-y: auto;
2193
- height: 0;
2194
- }
2195
-
2196
- .ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
2197
- border-top: 1px solid ${To.colorOutline};
2198
- }
2199
-
2200
- .ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
2201
- height: initial;
2202
- }
2203
-
2204
- .ft-search-bar--floating-panel,
2205
- .ft-search-bar--desktop .ft-search-bar--suggestions {
2206
- position: absolute;
2207
- z-index: var(--ft-search-bar-floating-components-z-index, 1);
2208
- top: 100%;
2209
- left: -1px;
2210
- right: -1px;
2211
- display: none;
2212
- background: ${To.colorSurface};
2213
- border: 1px solid ${To.colorOutline};
2214
- border-radius: 0 0 ${To.borderRadius} ${To.borderRadius};
2215
- box-shadow: ${To.elevation02};
2216
- outline: none;
2217
- }
2218
-
2219
- .ft-search-bar--desktop .ft-search-bar--suggestions {
2220
- top: calc(100% + 2px);
2221
- }
2222
-
2223
- .ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty {
2224
- display: block;
2225
- }
2226
-
2227
- .ft-search-bar--no-suggestions {
2228
- text-align: center;
2229
- padding: 8px;
2230
- color: ${To.colorOnSurface};
2231
- }
2232
-
2233
- .ft-search-bar--suggestion {
2234
- text-decoration: none;
2235
- position: relative;
2236
- display: flex;
2237
- align-items: center;
2238
- padding: 8px;
2239
- gap: 8px;
2240
- cursor: pointer;
2241
- color: ${To.colorOnSurface};
2242
- min-height: 52px;
2243
- }
2244
-
2245
- .ft-search-bar--suggestion > *:not(ft-ripple) {
2246
- position: relative;
2247
- }
2248
-
2249
- .ft-search-bar--desktop .ft-search-bar--suggestion {
2250
- min-height: 44px;
2251
- }
2252
-
2253
- .ft-search-bar--suggestion:focus {
2254
- outline: none;
2255
- }
2256
-
2257
- .ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
2258
- border-top: 1px solid ${To.colorOutline};
2259
- }
2260
-
2261
- .ft-search-bar--suggestion ft-typography {
2262
- display: block;
2263
- flex-grow: 1;
2264
- flex-shrink: 1;
2265
- }
2266
- `;var Ko=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};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 Wo={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 Vo extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class qo extends CustomEvent{constructor(t){super("change",{detail:t})}}class Jo extends vt{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new xt(Wo,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=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("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new t(500),this.suggestDebouncer=new t(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)))))}get isMobileMenuOpen(){return this.forceMobileMenuOpen||this.mobileMenuOpen}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,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(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===It.S}}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.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}render(){return K`
2267
- <ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
2268
- ${this.renderSearchBar()}
2269
- `}renderSearchBar(){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.isMobileMenuOpen};return this.facetsInitialized&&this.availableContentLocalesInitialized?K`
2270
- <div class="${Dt(t)}" part="container" tabindex="-1">
2271
- ${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
2272
- </div>
2273
- `:K`
2274
- <ft-skeleton class="ft-search-bar--skeleton" part="loader"></ft-skeleton>
2275
- `}renderMobileSearchBar(){return K`
2276
- <div class="ft-search-bar">
2277
- <div class="ft-search-bar--input-container" part="input-container">
2278
- <div class="ft-search-bar--input-outline" part="input-outline">
2279
- <input class="ft-search-bar--input ft-typography--body2"
2280
- part="input"
2281
- type="text"
2282
- placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
2283
- value="${this.query}"
2284
- @keyup=${this.onSearchBarKeyUp}
2285
- @focus=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}>
2286
- </div>
2287
- </div>
2288
- ${this.renderMobileSearchBarButtons()}
2289
- </div>
2290
- ${this.displayFacets?this.renderFacetsActions():this.renderSelectedFacets()}
2291
- ${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
2292
- ${this.isMobileMenuOpen||this.displayFacets?K`
2293
- <ft-button class="ft-search-bar--launch-search"
2294
- part="launch-search-in-panel"
2295
- icon="search"
2296
- @click=${this.launchSearch}>
2297
- ${this.labelResolver.resolve("searchButton")}
2298
- </ft-button>
2299
- `:V}
2300
- `}renderMobileSearchBarButtons(){const t=this.query||this.isMobileMenuOpen&&!this.forceMobileMenuOpen;return K`
2301
- ${t?K`
2302
- <div class="ft-search-bar--actions"
2303
- part="search-bar-actions">
2304
- <ft-button class="ft-search-bar--clear-query"
2305
- part="clear-query"
2306
- icon="close"
2307
- round
2308
- label="${this.labelResolver.resolve("clearInputButton")}"
2309
- tooltipPosition="left"
2310
- @click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
2311
- ></ft-button>
2312
- </div>
2313
- `:V}
2314
- <div class="ft-search-bar--actions"
2315
- part="search-bar-actions">
2316
- <ft-button class="ft-search-bar--launch-search"
2317
- part="launch-search-in-bar"
2318
- icon="search"
2319
- round
2320
- label="${this.labelResolver.resolve("searchButton")}"
2321
- tooltipPosition="left"
2322
- @click=${()=>{var t;return this.isMobileMenuOpen?this.launchSearch():null===(t=this.input)||void 0===t?void 0:t.focus()}}
2323
- ></ft-button>
2324
- </div>
2325
- `}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return K`
2326
- <ft-accordion class="ft-search-bar--filters-container">
2327
- ${this.hasLocaleSelector?K`
2328
- <ft-accordion-item data-facet-key="ft:contentLocale">
2329
- <div class="ft-search-bar--filter-label" slot="toggle">
2330
- <ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}
2331
- </ft-typography>
2332
- <ft-typography variant="body2">
2333
- ${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}
2334
- </ft-typography>
2335
- </div>
2336
- <ft-filter
2337
- part="filters filter-ft-locale"
2338
- exportparts=${this.getFilterExportParts("ft-locale")}
2339
- class="ft-search-bar--content-locale"
2340
- filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
2341
- .options=${this.contentLocalesAsFilterOptions()}
2342
- @change=${t=>this.contentLocale=t.detail[0]}
2343
- ></ft-filter>
2344
- </ft-accordion-item>
2345
- `:null}
2346
- ${Lt(this.facets,(t=>t.key),(t=>{const e=Xe(t),i=t.key.replace(":","-");return K`
2347
- <ft-accordion-item data-facet-key="${t.key}">
2348
- <div class="ft-search-bar--filter-label" slot="toggle">
2349
- <ft-typography variant="button">${t.label}</ft-typography>
2350
- <ft-typography variant="body2">
2351
- ${function(t){return Ve(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
2352
- </ft-typography>
2353
- </div>
2354
- <ft-filter
2355
- part="filters filter-${i}"
2356
- exportparts=${this.getFilterExportParts(i)}
2357
- id="${e.id}"
2358
- filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
2359
- clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
2360
- moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
2361
- ?multivalued=${e.multivalued}
2362
- raiseSelectedOptions
2363
- .options=${e.options}
2364
- .displayedValuesLimit=${10}
2365
- @change=${t=>this.setFilter(e.id,t.detail)}
2366
- ></ft-filter>
2367
- </ft-accordion-item>
2368
- `}))}
2369
- </ft-accordion>
2370
- `}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return K`
2371
- <div class="ft-search-bar" part="search-bar">
2372
- ${this.renderSearchBarLeftAction()}
2373
- <div class="ft-search-bar--input-container" part="input-container">
2374
- <div class="ft-search-bar--input-outline" part="input-outline">
2375
- ${this.dense?this.renderSelectedFacets():V}
2376
- <input class="ft-search-bar--input ft-typography--body2"
2377
- part="input"
2378
- type="text"
2379
- placeholder="${this.labelResolver.resolve("inputPlaceHolder")}"
2380
- value="${this.query}"
2381
- @keydown=${this.onSearchBarKeyDown}
2382
- @keyup=${this.onSearchBarKeyUp}>
2383
- </div>
2384
- ${this.renderSuggestions()}
2385
- </div>
2386
- ${this.renderDesktopSearchBarButtons()}
2387
- <div class="ft-search-bar--floating-panel" @keyup=${this.onFloatingContainerKeyUp} tabindex="-1">
2388
- ${this.renderFacetsActions()}
2389
- ${this.renderDesktopFacets()}
2390
- <div class="ft-search-bar--facets-actions">
2391
- <ft-button class="ft-search-bar--launch-search"
2392
- part="launch-search-in-panel"
2393
- icon="search"
2394
- @click=${this.launchSearch}>
2395
- ${this.labelResolver.resolve("searchButton")}
2396
- </ft-button>
2397
- </div>
2398
- </div>
2399
- </div>
2400
- ${this.dense?V:this.renderSelectedFacets()}
2401
- `}renderSearchBarLeftAction(){return this.hasFacets?K`
2402
- <ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action"
2403
- part="filters-opener"
2404
- trailingIcon
2405
- icon="${this.displayFacets?"expand_less":"expand_more"}"
2406
- @click=${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}
2407
- @focusin=${t=>t.stopPropagation()}>
2408
- ${this.labelResolver.resolve("filtersButton")}
2409
- </ft-button>
2410
- `:this.hasLocaleSelector?K`
2411
- <ft-select outlined
2412
- class="ft-search-bar--content-locale ft-search-bar--left-action"
2413
- part="content-locale"
2414
- @change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
2415
- ${Lt(this.availableContentLocales,(t=>t.lang),(t=>K`
2416
- <ft-select-option .value=${t.lang}
2417
- label="${t.label}"
2418
- ?selected=${t.lang===this.contentLocale}>
2419
- </ft-select-option>
2420
- `))}
2421
- </ft-select>
2422
- `:V}renderDesktopSearchBarButtons(){return K`
2423
- <div class="ft-search-bar--actions"
2424
- part="search-bar-actions">
2425
- ${this.query?K`
2426
- <ft-button class="ft-search-bar--clear-query"
2427
- part="clear-query"
2428
- icon="close"
2429
- round dense
2430
- label="${this.labelResolver.resolve("clearInputButton")}"
2431
- @click=${()=>this.setQuery("")}
2432
- ></ft-button>
2433
- <div class="ft-search-bar--separator"></div>
2434
- `:null}
2435
- <ft-button class="ft-search-bar--launch-search"
2436
- part="launch-search-in-bar"
2437
- icon="search"
2438
- round dense
2439
- label="${this.labelResolver.resolve("searchButton")}"
2440
- @click=${this.launchSearch}
2441
- ></ft-button>
2442
- </div>
2443
- `}renderFacetsActions(){var t;return K`
2444
- <div class="ft-search-bar--facets-actions">
2445
- ${this.hasPresets?K`
2446
- <ft-select
2447
- class="ft-search-bar--presets"
2448
- part="presets"
2449
- label="${this.labelResolver.resolve("presetsSelector")}"
2450
- outlined
2451
- @change=${t=>this.selectedPreset=t.detail}>
2452
- ${Lt(null!==(t=this.presets)&&void 0!==t?t:[],(t=>t.name),(t=>K`
2453
- <ft-select-option value="${t.name}"
2454
- label="${t.name}"
2455
- ?selected=${t.name===this.selectedPreset}>
2456
- </ft-select-option>
2457
- `))}
2458
- </ft-select>
2459
- `:V}
2460
- ${this.searchFilters.length>0?K`
2461
- <ft-button part="facets-actions"
2462
- @click=${this.clearFilters}>
2463
- ${this.labelResolver.resolve("clearFilters")}
2464
- </ft-button>
2465
- `:V}
2466
- <slot name="facets-actions"></slot>
2467
- </div>
2468
- `}renderDesktopFacets(){return this.hasFacets?K`
2469
- <ft-snap-scroll horizontal limitSize controls
2470
- class="ft-search-bar--filters-container"
2471
- part="filters-container"
2472
- exportparts="controls:snap-scroll-controls">
2473
- ${this.hasLocaleSelector?K`
2474
- <ft-filter class="ft-search-bar--content-locale"
2475
- part="filters filter-ft-locale"
2476
- exportparts=${this.getFilterExportParts("ft-locale")}
2477
- label="${this.labelResolver.resolve("contentLocaleSelector")}"
2478
- filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
2479
- .options=${this.contentLocalesAsFilterOptions()}
2480
- @change=${t=>this.contentLocale=t.detail[0]}
2481
- ></ft-filter>
2482
- `:V}
2483
- ${Lt(this.facets,(t=>t.key),(t=>{const e=Xe(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})),o=t.key.replace(":","-");return K`
2484
- <ft-filter
2485
- class="${i?"ft-search-bar--hierarchical-filter":""}"
2486
- part="filters filter-${o}"
2487
- exportparts=${this.getFilterExportParts(o)}
2488
- id="${e.id}"
2489
- label="${e.label}"
2490
- filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}"
2491
- clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}"
2492
- moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}"
2493
- ?multivalued=${e.multivalued}
2494
- raiseSelectedOptions
2495
- .options=${e.options}
2496
- .displayedValuesLimit=${10}
2497
- @change=${t=>this.setFilter(e.id,t.detail)}
2498
- ></ft-filter>
2499
- `}))}
2500
- </ft-snap-scroll>
2501
- `:V}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.isMobileMenuOpen,e=K`
2502
- ${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?K`
2503
- <ft-chip part="selected-filters"
2504
- ?dense=${this.dense&&!this.isMobile}
2505
- ?clickable=${this.isMobile}
2506
- @click=${()=>this.openMobileFilters("ft:contentLocale")}>
2507
- ${this.getLocaleLabel(this.contentLocale)}
2508
- </ft-chip>
2509
- `:null}
2510
- ${Lt(this.facets,(t=>t.key),(e=>{const i=function(t){return Ve(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return Lt(i,(o=>{let s=e.label+": "+function(t){return qe(t).split("|").join(" > ")}(o);const n=K`
2511
- <ft-chip
2512
- part="selected-filters"
2513
- ?dense=${this.dense&&!this.isMobile}
2514
- ?clickable=${this.isMobile}
2515
- ?removable=${!this.isMobile}
2516
- icon=${this.isMobile?V:"close"}
2517
- label="${s}"
2518
- title=${t?s:V}
2519
- @click=${()=>this.openMobileFilters(e.key)}
2520
- @icon-click=${()=>this.setFilter(e.key,i.filter((t=>t!==o)))}>
2521
- ${function(t){return qe(t).split("|").pop()}(o)}
2522
- </ft-chip>
2523
- `;return t?n:K`
2524
- <ft-tooltip inline text="${s}">
2525
- ${n}
2526
- </ft-tooltip>
2527
- `}))}))}
2528
- ${this.isMobile?K`
2529
- <ft-chip part="selected-filters"
2530
- icon="add"
2531
- clickable
2532
- @click=${()=>{this.mobileMenuOpen=!0,this.displayFacets=!0}}>
2533
- ${this.labelResolver.resolve("filtersButton")}
2534
- </ft-chip>
2535
- `:V}
2536
- `;return t?K`
2537
- <ft-snap-scroll horizontal controls hideScrollbar limitSize
2538
- class="ft-search-bar--selected-filters"
2539
- part="selected-filters-container"
2540
- exportparts="controls:snap-scroll-controls">
2541
- ${e}
2542
- </ft-snap-scroll>
2543
- `:K`
2544
- <div class="ft-search-bar--selected-filters" part="selected-filters-container">
2545
- ${e}
2546
- </div>
2547
- `}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return K`
2548
- <div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
2549
- @keydown=${this.onSuggestKeyDown}>
2550
- ${Lt(t.slice(0,5),(t=>t),(t=>K`
2551
- <a href="${this.searchRequestSerializer({...this.request,query:t})}"
2552
- part="suggestions"
2553
- class="ft-search-bar--suggestion ft-search-bar--recent-search"
2554
- @keyup=${e=>this.onSuggestKeyUp(e,t)}
2555
- @click=${e=>this.onSuggestClick(e,t)}>
2556
- <ft-ripple></ft-ripple>
2557
- <ft-icon variant="material" part="suggestion-icon">history</ft-icon>
2558
- <ft-typography variant="body1">${t}</ft-typography>
2559
- <ft-button icon="close"
2560
- round
2561
- part="remove-suggestion"
2562
- ?dense=${!this.isMobile}
2563
- label="${this.labelResolver.resolve("removeRecentSearch")}"
2564
- tooltipPosition="left"
2565
- @click=${e=>this.removeRecentSearch(e,t)}></ft-button>
2566
- </a>
2567
- `))}
2568
- ${Lt(this.suggestions,(t=>t.value),(t=>K`
2569
- <a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
2570
- part="suggestions"
2571
- class="ft-search-bar--suggestion"
2572
- @keyup=${e=>this.onSuggestKeyUp(e,t.value)}
2573
- @click=${e=>this.onSuggestClick(e,t.value)}>
2574
- <ft-ripple></ft-ripple>
2575
- ${this.getIcon(t)}
2576
- <ft-typography variant="body1">${t.value}</ft-typography>
2577
- </a>
2578
- `))}
2579
- ${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?K`
2580
- <ft-typography class="ft-search-bar--no-suggestions" element="p"
2581
- variant="body2">
2582
- ${this.labelResolver.resolve("noSuggestions")}
2583
- </ft-typography>
2584
- `:null}
2585
- </div>
2586
- `}getIcon(t){const e="DOCUMENT"===t.type?wi.file_format:wi.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?xi.BOOK:xi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=$i.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=mi.get(l))&&void 0!==o?o:mi.get(e))&&void 0!==s?s:mi.get(r))&&void 0!==n?n:yi.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=xi.TOPICS}return K`
2587
- <ft-icon variant="${e}" part="suggestion-icon">
2588
- ${i}
2589
- </ft-icon>
2590
- `}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var e,i,o,s,n,r;if(t.has("labels")&&(this.labelResolver=new xt(Wo,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("presets")&&(null!==(o=this.presets)&&void 0!==o?o:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>qe(t))))))),t.has("selectedPreset")){const t=(null!==(s=this.presets)&&void 0!==s?s:[]).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=(null!==(n=this.presets)&&void 0!==n?n:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("api")&&this.updateAvailableContentLocales(),["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 qo(this.request))}async updateAvailableContentLocales(){this.api&&(this.availableContentLocales=await this.api.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])),this.availableContentLocalesInitialized=!0)}contentAvailableCallback(t){var e,i,o;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===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),100))}updateFacets(){this.api&&(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.facetsInitialized=!0}))):(this.facets=[],this.facetsInitialized=!0))}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 Vo(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){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Ve(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Ve(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,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}getFilterExportParts(t){return["container","header","clear-button","input"].map((e=>this.getFilterSubPartExportAttribute(e,t))).join(",")}getFilterSubPartExportAttribute(t,e){return`${t}:filters-${t},${t}:filter-${e}-${t}`}}Jo.elementDefinitions={"ft-accordion":vo,"ft-accordion-item":$o,"ft-button":Ri,"ft-chip":Mo,"ft-filter":po,"ft-filter-option":uo,"ft-icon":Oi,"ft-ripple":ri,"ft-select":jo,"ft-select-option":Do,"ft-size-watcher":Pt,"ft-skeleton":Po,"ft-snap-scroll":eo,"ft-tooltip":fi,"ft-typography":We},Jo.styles=[Ae,Ao,_o,Ho,Zo],Ko([i({type:Boolean})],Jo.prototype,"dense",void 0),Ko([i()],Jo.prototype,"mode",void 0),Ko([i({type:Boolean})],Jo.prototype,"forceMobileMenuOpen",void 0),Ko([i()],Jo.prototype,"baseUrl",void 0),Ko([i()],Jo.prototype,"apiIntegrationIdentifier",void 0),Ko([i()],Jo.prototype,"contentLocale",void 0),Ko([o()],Jo.prototype,"availableContentLocales",void 0),Ko([o()],Jo.prototype,"availableContentLocalesInitialized",void 0),Ko([i()],Jo.prototype,"uiLocale",void 0),Ko([h({})],Jo.prototype,"labels",void 0),Ko([h([])],Jo.prototype,"displayedFilters",void 0),Ko([h([])],Jo.prototype,"presets",void 0),Ko([i({type:String,reflect:!0})],Jo.prototype,"selectedPreset",void 0),Ko([h([])],Jo.prototype,"priors",void 0),Ko([i()],Jo.prototype,"searchRequestSerializer",void 0),Ko([o()],Jo.prototype,"searchFilters",void 0),Ko([o()],Jo.prototype,"sizeCategory",void 0),Ko([o()],Jo.prototype,"displayFacets",void 0),Ko([o()],Jo.prototype,"mobileMenuOpen",void 0),Ko([o()],Jo.prototype,"facets",void 0),Ko([o()],Jo.prototype,"facetsInitialized",void 0),Ko([n(".ft-search-bar--container")],Jo.prototype,"container",void 0),Ko([n(".ft-search-bar--filters-opener")],Jo.prototype,"filtersOpener",void 0),Ko([n(".ft-search-bar--floating-panel")],Jo.prototype,"floatingContainer",void 0),Ko([n("ft-snap-scroll.ft-search-bar--filters-container")],Jo.prototype,"scrollingFiltersContainer",void 0),Ko([n(".ft-search-bar--input")],Jo.prototype,"input",void 0),Ko([o()],Jo.prototype,"query",void 0),Ko([o()],Jo.prototype,"suggestions",void 0),Ko([o()],Jo.prototype,"suggestionsLoaded",void 0),Ko([o()],Jo.prototype,"recentSearches",void 0),Ko([o()],Jo.prototype,"scrollToFacet",void 0),Ko([n(".ft-search-bar--suggestion:first-child")],Jo.prototype,"firstSuggestion",void 0),Ko([n(".ft-search-bar--suggestion:focus-within")],Jo.prototype,"focusedSuggestion",void 0),Ko([n(".ft-search-bar--suggestion:last-child")],Jo.prototype,"lastSuggestion",void 0),Ko([o()],Jo.prototype,"api",void 0),c("ft-search-bar")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),K`
2591
- ${i.map((t=>K`
2592
- <style>${t}</style>
2593
- `))}
2594
- ${super.render()}
2595
- `}},i.styles=void 0,i.elementDefinitions=o,i}(Jo))}();