@fluid-topics/ft-search-facet 0.3.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/build/SearchFacetMessages.d.ts +10 -0
- package/build/SearchFacetMessages.js +3 -0
- package/build/converter.d.ts +4 -0
- package/build/converter.js +12 -0
- package/build/ft-search-facet.css.d.ts +3 -0
- package/build/ft-search-facet.css.js +6 -0
- package/build/ft-search-facet.d.ts +20 -0
- package/build/ft-search-facet.js +93 -0
- package/build/ft-search-facet.light.js +1249 -0
- package/build/ft-search-facet.min.js +1380 -0
- package/build/ft-search-facet.properties.d.ts +5 -0
- package/build/ft-search-facet.properties.js +2 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +7 -0
- package/package.json +36 -0
|
@@ -0,0 +1,1380 @@
|
|
|
1
|
+
!function(t){
|
|
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,r=new WeakMap,n=new WeakMap,s=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){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(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=r.prototype.attributeChangedCallback,a=new Set(r.observedAttributes||[]);u(r,a,l);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let h=i.call(o,t);h||(h=f(t),e.call(o,t,h)),this===window.customElements&&(s.set(r,c),c.standInClass=h);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)n.delete(t),p(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.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=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},f=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,r=o._getDefinition(e);return r?p(i,r):n.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,r),i.call(this,n,t,r)}else o.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},p=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),a=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const y=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const g=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(g(Element,"innerHTML"),g(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!==r.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"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(yr){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e extends Promise{constructor(t){super(((e,i)=>t((t=>{this.isCanceled?i(new Error("Promise has been canceled")):e(t)}),(t=>{this.isCanceled?i(new Error("Promise has been canceled")):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.content[t]instanceof e&&this.content[t].cancel(),delete this.content[t]}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,i){if(void 0===this.content[t]){if(null==(i=null!=i?i:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(o=i(),new e(((t,e)=>o.then(t).catch(e))));return this.content[t]=r,r.then((e=>(this.content[t]=e,e)))}var o;if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class o{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/const r=(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 n(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/}function s(t){return n({...t,state:!0})}
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2017 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/const l=({finisher:t,descriptor:e})=>(i,o)=>{var r;if(void 0===o){const o=null!==(r=i.originalKey)&&void 0!==r?r: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 r=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(r,o)}}
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2017 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
+
*/;function a(t,e){return l({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 c;const h=null!=(null===(c=window.HTMLSlotElement)||void 0===c?void 0:c.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function f(t){const{slot:e,selector:i}=null!=t?t:{};return l({descriptor:o=>({get(){var o;const r="slot"+(e?`[name=${e}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=n?h(n,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright 2017 Google LLC
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*/function u(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!u(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!u(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(o=i;0!=o--;){var n=r[o];if(!u(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const d=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function p(t,e){const i=()=>JSON.parse(JSON.stringify(t));return n({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!u(t,e),...null!=e?e:{}})}const v=window,b=v.ShadowRoot&&(void 0===v.ShadyCSS||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y=Symbol(),g=new WeakMap;
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright 2019 Google LLC
|
|
57
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
+
*/class x{constructor(t,e,i){if(this._$cssResult$=!0,i!==y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(b&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=g.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&g.set(e,t))}return t}toString(){return this.cssText}}const m=t=>new x("string"==typeof t?t:t+"",void 0,y),w=(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 x(i,t,y)},$=(t,e)=>{b?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=v.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},O=b?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return m(e)})(t):t
|
|
59
|
+
/**
|
|
60
|
+
* @license
|
|
61
|
+
* Copyright 2017 Google LLC
|
|
62
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
+
*/;var k;const S=window,C=S.trustedTypes,j=C?C.emptyScript:"",E=S.reactiveElementPolyfillSupport,N={toAttribute(t,e){switch(e){case Boolean:t=t?j: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}},M=(t,e)=>e!==t&&(e==e||t==t),R={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:M};class z extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=R){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 r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||R}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._$Ev=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(O(t))}else void 0!==t&&e.push(O(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).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._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.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 $(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||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)}_$EO(t,e,i=R){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:N).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:N;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||M)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||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._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||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)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
64
|
+
/**
|
|
65
|
+
* @license
|
|
66
|
+
* Copyright 2017 Google LLC
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*/
|
|
69
|
+
var A;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:z}),(null!==(k=S.reactiveElementVersions)&&void 0!==k?k:S.reactiveElementVersions=[]).push("1.4.1");const B=window,U=B.trustedTypes,P=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,F=`lit$${(Math.random()+"").slice(9)}$`,L="?"+F,D=`<${L}>`,I=document,T=(t="")=>I.createComment(t),_=t=>null===t||"object"!=typeof t&&"function"!=typeof t,W=Array.isArray,H=t=>W(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,Z=/>/g,q=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),J=/'/g,X=/"/g,G=/^(?:script|style|textarea|title)$/i,Y=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Q=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),et=new WeakMap,it=I.createTreeWalker(I,129,null,!1),ot=(t,e)=>{const i=t.length-1,o=[];let r,n=2===e?"<svg>":"",s=K;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(s.lastIndex=h,a=s.exec(i),null!==a);)h=s.lastIndex,s===K?"!--"===a[1]?s=V:void 0!==a[1]?s=Z:void 0!==a[2]?(G.test(a[2])&&(r=RegExp("</"+a[2],"g")),s=q):void 0!==a[3]&&(s=q):s===q?">"===a[0]?(s=null!=r?r:K,c=-1):void 0===a[1]?c=-2:(c=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?q:'"'===a[3]?X:J):s===X||s===J?s=q:s===V||s===Z?s=K:(s=q,r=void 0);const f=s===q&&t[e+1].startsWith("/>")?" ":"";n+=s===K?i+D:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+F+f):i+F+(-2===c?(o.push(void 0),e):f)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==P?P.createHTML(l):l,o]};class rt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const s=t.length-1,l=this.parts,[a,c]=ot(t,e);if(this.el=rt.createElement(a,i),it.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=it.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(F)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(F),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?ct:"?"===e[1]?ft:"@"===e[1]?ut:at})}else l.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(G.test(o.tagName)){const t=o.textContent.split(F),e=t.length-1;if(e>0){o.textContent=U?U.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),it.nextNode(),l.push({type:2,index:++r});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===L)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)l.push({type:7,index:r}),t+=F.length-1}r++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,o){var r,n,s,l;if(e===Q)return e;let a=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const c=_(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!==(s=(l=i)._$Co)&&void 0!==s?s:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=nt(t,a._$AS(t,e.values),a,o)),e}class st{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);it.currentNode=r;let n=it.nextNode(),s=0,l=0,a=o[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new lt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new dt(n,this,t)),this.u.push(e),a=o[++l]}s!==(null==a?void 0:a.index)&&(n=it.nextNode(),s++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class lt{constructor(t,e,i,o){var r;this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),_(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Q&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):H(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==tt&&_(this._$AH)?this._$AA.nextSibling.data=t:this.T(I.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=rt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new st(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new rt(t)),e}k(t){W(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new lt(this.O(T()),this.O(T()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class at{constructor(t,e,i,o,r){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=tt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(void 0===r)t=nt(this,t,e,0),n=!_(t)||t!==this._$AH&&t!==Q,n&&(this._$AH=t);else{const o=t;let s,l;for(t=r[0],s=0;s<r.length-1;s++)l=nt(this,o[i+s],e,s),l===Q&&(l=this._$AH[s]),n||(n=!_(l)||l!==this._$AH[s]),l===tt?t=tt:t!==tt&&(t+=(null!=l?l:"")+r[s+1]),this._$AH[s]=l}n&&!o&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ct extends at{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}const ht=U?U.emptyScript:"";class ft extends at{constructor(){super(...arguments),this.type=4}j(t){t&&t!==tt?this.element.setAttribute(this.name,ht):this.element.removeAttribute(this.name)}}class ut extends at{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=nt(this,t,e,0))&&void 0!==i?i:tt)===Q)return;const o=this._$AH,r=t===tt&&o!==tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==tt&&(o===tt||r);r&&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 dt{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){nt(this,t)}}const pt={P:"$lit$",A:F,M:L,C:1,L:ot,R:st,D:H,V:nt,I:lt,H:at,N:ft,U:ut,B:ct,F:dt},vt=B.litHtmlPolyfillSupport;null==vt||vt(rt,lt),(null!==(A=B.litHtmlVersions)&&void 0!==A?A:B.litHtmlVersions=[]).push("2.4.0");
|
|
70
|
+
/**
|
|
71
|
+
* @license
|
|
72
|
+
* Copyright 2017 Google LLC
|
|
73
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
+
*/
|
|
75
|
+
var bt,yt;class gt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=((t,e,i)=>{var o,r;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new lt(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Q}}gt.finalized=!0,gt._$litElement$=!0,null===(bt=globalThis.litElementHydrateSupport)||void 0===bt||bt.call(globalThis,{LitElement:gt});const xt=globalThis.litElementPolyfillSupport;null==xt||xt({LitElement:gt}),(null!==(yt=globalThis.litElementVersions)&&void 0!==yt?yt:globalThis.litElementVersions=[]).push("3.2.2");class mt{static create(t,e,i){let o=t=>m(null!=t?t:i),r=w`var(${m(t)}, ${o(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=o,r.get=e=>w`var(${m(t)}, ${o(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),r=w`var(${m(t)}, ${o(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=o,r.get=e=>w`var(${m(t)}, ${o(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):m(null!=e?e:t.defaultValue),o=w`var(${m(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>w`var(${m(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function wt(t,e){return m(`${t.name}: ${e}`)}const $t={colorPrimary:mt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:mt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:mt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:mt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:mt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:mt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:mt.create("--ft-color-error","COLOR","#B00020"),colorOutline:mt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:mt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:mt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:mt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:mt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:mt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:mt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:mt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:mt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:mt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:mt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:mt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:mt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:mt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:mt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:mt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:mt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:mt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:mt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:mt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:mt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:mt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:mt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:mt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:mt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:mt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:mt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:mt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:mt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:mt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:mt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:mt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:mt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:mt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:mt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:mt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:mt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:mt.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:mt.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:mt.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:mt.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:mt.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:mt.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:mt.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:mt.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:mt.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:mt.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:mt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:mt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:mt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:mt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:mt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:mt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:mt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:mt.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
|
+
*/var Ot=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class kt 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 r=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return $(r,this.constructor.elementStyles),r}}}(gt)){constructor(){super(),this.exportpartsDebouncer=new o(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),Y`
|
|
81
|
+
${t.map((t=>Y`
|
|
82
|
+
<style>${t}</style>
|
|
83
|
+
`))}
|
|
84
|
+
${this.getTemplate()}
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,r,n,s;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}Ot([n()],kt.prototype,"exportpartsPrefix",void 0),Ot([p([])],kt.prototype,"exportpartsPrefixes",void 0),Ot([n()],kt.prototype,"customStylesheet",void 0);const St=w`
|
|
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
|
+
`;w`
|
|
95
|
+
.ft-word-wrap {
|
|
96
|
+
white-space: normal;
|
|
97
|
+
word-wrap: break-word;
|
|
98
|
+
-ms-word-break: break-all;
|
|
99
|
+
word-break: break-all;
|
|
100
|
+
word-break: break-word;
|
|
101
|
+
-ms-hyphens: auto;
|
|
102
|
+
-moz-hyphens: auto;
|
|
103
|
+
-webkit-hyphens: auto;
|
|
104
|
+
hyphens: auto
|
|
105
|
+
}
|
|
106
|
+
`;const Ct=w`
|
|
107
|
+
.ft-safari-ellipsis-fix {
|
|
108
|
+
margin-right: 0;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ft-safari-ellipsis-fix:after {
|
|
113
|
+
content: "\\0000a0";
|
|
114
|
+
display: inline-block;
|
|
115
|
+
width: 0;
|
|
116
|
+
}
|
|
117
|
+
`;class jt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let r=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function Et(t){for(var e=arguments.length,i=Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Nt(t){return!!t&&!!t[ve]}function Mt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===be}(t)||Array.isArray(t)||!!t[pe]||!!t.constructor[pe]||Pt(t)||Ft(t))}function Rt(t,e,i){void 0===i&&(i=!1),0===zt(t)?(i?Object.keys:ye)(t).forEach((function(o){i&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function zt(t){var e=t[ve];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Pt(t)?2:Ft(t)?3:0}function At(t,e){return 2===zt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Bt(t,e,i){var o=zt(t);2===o?t.set(e,i):3===o?(t.delete(e),t.add(i)):t[e]=i}function Ut(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Pt(t){return he&&t instanceof Map}function Ft(t){return fe&&t instanceof Set}function Lt(t){return t.o||t.t}function Dt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ge(t);delete e[ve];for(var i=ye(e),o=0;o<i.length;o++){var r=i[o],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function It(t,e){return void 0===e&&(e=!1),_t(t)||Nt(t)||!Mt(t)||(zt(t)>1&&(t.set=t.add=t.clear=t.delete=Tt),Object.freeze(t),e&&Rt(t,(function(t,e){return It(e,!0)}),!0)),t}function Tt(){Et(2)}function _t(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Wt(t){var e=xe[t];return e||Et(18,t),e}function Ht(){return ae}function Kt(t,e){e&&(Wt("Patches"),t.u=[],t.s=[],t.v=e)}function Vt(t){Zt(t),t.p.forEach(Jt),t.p=null}function Zt(t){t===ae&&(ae=t.l)}function qt(t){return ae={p:[],l:ae,h:t,m:!0,_:0}}function Jt(t){var e=t[ve];0===e.i||1===e.i?e.j():e.O=!0}function Xt(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||Wt("ES5").S(e,t,o),o?(i[ve].P&&(Vt(e),Et(4)),Mt(t)&&(t=Gt(e,t),e.l||Qt(e,t)),e.u&&Wt("Patches").M(i[ve].t,t,e.u,e.s)):t=Gt(e,i,[]),Vt(e),e.u&&e.v(e.u,e.s),t!==de?t:void 0}function Gt(t,e,i){if(_t(e))return e;var o=e[ve];if(!o)return Rt(e,(function(r,n){return Yt(t,o,e,r,n,i)}),!0),e;if(o.A!==t)return e;if(!o.P)return Qt(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=Dt(o.k):o.o;Rt(3===o.i?new Set(r):r,(function(e,n){return Yt(t,o,r,e,n,i)})),Qt(t,r,!1),i&&t.u&&Wt("Patches").R(o,i,t.u,t.s)}return o.o}function Yt(t,e,i,o,r,n){if(Nt(r)){var s=Gt(t,r,n&&e&&3!==e.i&&!At(e.D,o)?n.concat(o):void 0);if(Bt(i,o,s),!Nt(s))return;t.m=!1}if(Mt(r)&&!_t(r)){if(!t.h.F&&t._<1)return;Gt(t,r),e&&e.A.l||Qt(t,r)}}function Qt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&It(e,i)}function te(t,e){var i=t[ve];return(i?Lt(i):t)[e]}function ee(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var o=Object.getOwnPropertyDescriptor(i,e);if(o)return o;i=Object.getPrototypeOf(i)}}function ie(t){t.P||(t.P=!0,t.l&&ie(t.l))}function oe(t){t.o||(t.o=Dt(t.t))}function re(t,e,i){var o=Pt(e)?Wt("MapSet").N(e,i):Ft(e)?Wt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),o={i:i?1:0,A:e?e.A:Ht(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=o,n=me;i&&(r=[o],n=we);var s=Proxy.revocable(r,n),l=s.revoke,a=s.proxy;return o.k=a,o.j=l,a}(e,i):Wt("ES5").J(e,i);return(i?i.A:Ht()).p.push(o),o}function ne(t){return Nt(t)||Et(22,t),function t(e){if(!Mt(e))return e;var i,o=e[ve],r=zt(e);if(o){if(!o.P&&(o.i<4||!Wt("ES5").K(o)))return o.t;o.I=!0,i=se(e,r),o.I=!1}else i=se(e,r);return Rt(i,(function(e,r){o&&function(t,e){return 2===zt(t)?t.get(e):t[e]}(o.t,e)===r||Bt(i,e,t(r))})),3===r?new Set(i):i}(t)}function se(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Dt(t)}var le,ae,ce="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),he="undefined"!=typeof Map,fe="undefined"!=typeof Set,ue="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,de=ce?Symbol.for("immer-nothing"):((le={})["immer-nothing"]=!0,le),pe=ce?Symbol.for("immer-draftable"):"__$immer_draftable",ve=ce?Symbol.for("immer-state"):"__$immer_state",be=""+Object.prototype.constructor,ye="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ge=Object.getOwnPropertyDescriptors||function(t){var e={};return ye(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},xe={},me={get:function(t,e){if(e===ve)return t;var i=Lt(t);if(!At(i,e))return function(t,e,i){var o,r=ee(e,i);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(t.k):void 0}(t,i,e);var o=i[e];return t.I||!Mt(o)?o:o===te(t.t,e)?(oe(t),t.o[e]=re(t.A.h,o,t)):o},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,i){var o=ee(Lt(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,i),!0;if(!t.P){var r=te(Lt(t),e),n=null==r?void 0:r[ve];if(n&&n.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Ut(i,r)&&(void 0!==i||At(t.t,e)))return!0;oe(t),ie(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==te(t.t,e)||e in t.t?(t.D[e]=!1,oe(t),ie(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Lt(t),o=Reflect.getOwnPropertyDescriptor(i,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:i[e]}:o},defineProperty:function(){Et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Et(12)}},we={};Rt(me,(function(t,e){we[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),we.deleteProperty=function(t,e){return we.set.call(this,t,e,void 0)},we.set=function(t,e,i){return me.set.call(this,t[0],e,i,t[0])};var $e=function(){function t(t){var e=this;this.g=ue,this.F=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var o=arguments.length,s=Array(o>1?o-1:0),l=1;l<o;l++)s[l-1]=arguments[l];return n.produce(t,(function(t){var o;return(o=i).call.apply(o,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&Et(6),void 0!==o&&"function"!=typeof o&&Et(7),Mt(t)){var l=qt(e),a=re(e,t,void 0),c=!0;try{s=i(a),c=!1}finally{c?Vt(l):Zt(l)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Kt(l,o),Xt(t,l)}),(function(t){throw Vt(l),t})):(Kt(l,o),Xt(s,l))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===de&&(s=void 0),e.F&&It(s,!0),o){var h=[],f=[];Wt("Patches").M(t,s,h,f),o(h,f)}return s}Et(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var o,r,n=e.produce(t,i,(function(t,e){o=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,o,r]})):[n,o,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Mt(t)||Et(8),Nt(t)&&(t=ne(t));var e=qt(this),i=re(this,t,void 0);return i[ve].C=!0,Zt(e),i},e.finishDraft=function(t,e){var i=(t&&t[ve]).A;return Kt(i,e),Xt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ue&&Et(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var o=e[i];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}i>-1&&(e=e.slice(i+1));var r=Wt("Patches").$;return Nt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),Oe=new $e,ke=Oe.produce;Oe.produceWithPatches.bind(Oe),Oe.setAutoFreeze.bind(Oe),Oe.setUseProxies.bind(Oe),Oe.applyPatches.bind(Oe),Oe.createDraft.bind(Oe),Oe.finishDraft.bind(Oe);var Se=ke;function Ce(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function je(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function Ee(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?je(Object(i),!0).forEach((function(e){Ce(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ne(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Me="function"==typeof Symbol&&Symbol.observable||"@@observable",Re=function(){return Math.random().toString(36).substring(7).split("").join(".")},ze={INIT:"@@redux/INIT"+Re(),REPLACE:"@@redux/REPLACE"+Re(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Re()}};function Ae(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Be(t,e,i){var o;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ne(1));return i(Be)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var r=t,n=e,s=[],l=s,a=!1;function c(){l===s&&(l=s.slice())}function h(){if(a)throw new Error(Ne(3));return n}function f(t){if("function"!=typeof t)throw new Error(Ne(4));if(a)throw new Error(Ne(5));var e=!0;return c(),l.push(t),function(){if(e){if(a)throw new Error(Ne(6));e=!1,c();var i=l.indexOf(t);l.splice(i,1),s=null}}}function u(t){if(!Ae(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(a)throw new Error(Ne(9));try{a=!0,n=r(n,t)}finally{a=!1}for(var e=s=l,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(Ne(10));r=t,u({type:ze.REPLACE})}function p(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[Me]=function(){return this},t}return u({type:ze.INIT}),(o={dispatch:u,subscribe:f,getState:h,replaceReducer:d})[Me]=p,o}function Ue(t){for(var e=Object.keys(t),i={},o=0;o<e.length;o++){var r=e[o];"function"==typeof t[r]&&(i[r]=t[r])}var n,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:ze.INIT}))throw new Error(Ne(12));if(void 0===i(void 0,{type:ze.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(13))}))}(i)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var o=!1,r={},l=0;l<s.length;l++){var a=s[l],c=i[a],h=t[a],f=c(h,e);if(void 0===f)throw e&&e.type,new Error(Ne(14));r[a]=f,o=o||f!==h}return(o=o||s.length!==Object.keys(t).length)?r:t}}function Pe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Fe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),o=function(){throw new Error(Ne(15))},r={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return o=Pe.apply(void 0,n)(i.dispatch),Ee(Ee({},i),{},{dispatch:o})}}}function Le(t){return function(e){var i=e.dispatch,o=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,o,t):e(r)}}}}var De=Le();De.withExtraArgument=Le;var Ie,Te=De,_e=(Ie=function(t,e){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Ie(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),We=function(t,e){for(var i=0,o=e.length,r=t.length;i<o;i++,r++)t[r]=e[i];return t},He=Object.defineProperty,Ke=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,qe=function(t,e,i){return e in t?He(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Je=function(t,e){for(var i in e||(e={}))Ve.call(e,i)&&qe(t,i,e[i]);if(Ke)for(var o=0,r=Ke(e);o<r.length;o++){i=r[o];Ze.call(e,i)&&qe(t,i,e[i])}return t},Xe="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Pe:Pe.apply(null,arguments)};var Ge=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return _e(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function Ye(t){return Mt(t)?Se(t,(function(){})):t}function Qe(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var o=new Ge;i&&(!function(t){return"boolean"==typeof t}(i)?o.push(Te.withExtraArgument(i.extraArgument)):o.push(Te));return o}(t)}}function ti(t){var e,i=Qe(),o=t||{},r=o.reducer,n=void 0===r?void 0:r,s=o.middleware,l=void 0===s?i():s,a=o.devTools,c=void 0===a||a,h=o.preloadedState,f=void 0===h?void 0:h,u=o.enhancers,d=void 0===u?void 0:u;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Ue(n)}var p=l;"function"==typeof p&&(p=p(i));var v=Fe.apply(void 0,p),b=Pe;c&&(b=Xe(Je({trace:!1},"object"==typeof c&&c)));var y=[v];return Array.isArray(d)?y=We([v],d):"function"==typeof d&&(y=d(y)),Be(e,f,b.apply(void 0,y))}function ei(t,e){function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Je(Je({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function ii(t){var e,i={},o=[],r={addCase:function(t,e){var o="string"==typeof t?t:t.type;if(o in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[o]=e,r},addMatcher:function(t,e){return o.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,o,e]}function oi(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,o="function"==typeof t.initialState?t.initialState:Ye(t.initialState),r=t.reducers||{},n=Object.keys(r),s={},l={},a={};function c(){var e="function"==typeof t.extraReducers?ii(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,n=e[1],s=void 0===n?[]:n,a=e[2],c=void 0===a?void 0:a,h=Je(Je({},r),l);return function(t,e,i,o){void 0===i&&(i=[]);var r,n="function"==typeof e?ii(e):[e,i,o],s=n[0],l=n[1],a=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return Ye(t())};else{var c=Ye(t);r=function(){return c}}function h(t,e){void 0===t&&(t=r());var i=We([s[e.type]],l.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[a]),i.reduce((function(t,i){if(i){var o;if(Nt(t))return void 0===(o=i(t,e))?t:o;if(Mt(t))return Se(t,(function(t){return i(t,e)}));if(void 0===(o=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return t}),t)}return h.getInitialState=r,h}(o,h,s,c)}return n.forEach((function(t){var i,o,n=r[t],c=e+"/"+t;"reducer"in n?(i=n.reducer,o=n.prepare):i=n,s[t]=i,l[c]=i,a[t]=o?ei(c,o):ei(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:a,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var ri="listenerMiddleware";ei(ri+"/add"),ei(ri+"/removeAll"),ei(ri+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[ve];return me.get(e,t)},set:function(e){var i=this[ve];me.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][ve];if(!r.P)switch(r.i){case 5:o(r)&&ie(r);break;case 4:i(r)&&ie(r)}}}function i(t){for(var e=t.t,i=t.k,o=ye(i),r=o.length-1;r>=0;r--){var n=o[r];if(n!==ve){var s=e[n];if(void 0===s&&!At(e,n))return!0;var l=i[n],a=l&&l[ve];if(a?a.t!==s:!Ut(l,s))return!0}}var c=!!e[ve];return o.length!==ye(e).length+(c?0:1)}function o(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var o=0;o<e.length;o++)if(!e.hasOwnProperty(o))return!0;return!1}var r={};!function(t,e){xe[t]||(xe[t]=e)}("ES5",{J:function(e,i){var o=Array.isArray(e),r=function(e,i){if(e){for(var o=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(o,""+r,t(r,!0));return o}var n=ge(i);delete n[ve];for(var s=ye(n),l=0;l<s.length;l++){var a=s[l];n[a]=t(a,e||!!n[a].enumerable)}return Object.create(Object.getPrototypeOf(i),n)}(o,e),n={i:o?5:4,A:i?i.A:Ht(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,ve,{value:n,writable:!0}),r},S:function(t,i,r){r?Nt(i)&&i[ve].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[ve];if(i){var r=i.t,n=i.k,s=i.D,l=i.i;if(4===l)Rt(n,(function(e){e!==ve&&(void 0!==r[e]||At(r,e)?s[e]||t(n[e]):(s[e]=!0,ie(i)))})),Rt(r,(function(t){void 0!==n[t]||At(n,t)||(s[t]=!1,ie(i))}));else if(5===l){if(o(i)&&(ie(i),s.length=!0),n.length<r.length)for(var a=n.length;a<r.length;a++)s[a]=!1;else for(var c=r.length;c<n.length;c++)s[c]=!0;for(var h=Math.min(n.length,r.length),f=0;f<h;f++)n.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(n[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):o(t)}})}();const ni=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),si=(t,e)=>{var i;const o=ni(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!u(t,e),(i,r)=>{var n,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(n=o.attribute)&&void 0!==n&&n});const l=i;l.reduxProperties=l.reduxProperties||new Map;const a=null!==(s=ni(t)?o.selector:t)&&void 0!==s?s:t=>t[r];l.reduxProperties.set(r,{selector:a,store:o.store})}};class li extends kt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:ai(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:ai(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function ai(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class ci{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const o=t[e];if(o)return(...t)=>{const e=o(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,o=window.ftReduxStores[e];if(ai(o))return o;if(null==i)return;const r=oi(i);if(o)return new ci(r,o);const n=ti({reducer:r.reducer});return window.ftReduxStores[i.name]=new ci(r,n)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var hi,fi,ui;const di=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(ui=null===(fi=null===(hi=window.safari)||void 0===hi?void 0:hi.pushNotification)||void 0===fi?void 0:fi.toString())&&void 0!==ui?ui:""),pi=w`
|
|
118
|
+
`
|
|
119
|
+
/**
|
|
120
|
+
* @license
|
|
121
|
+
* Copyright 2020 Google LLC
|
|
122
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
+
*/,vi=Symbol.for(""),bi=t=>{if((null==t?void 0:t.r)===vi)return null==t?void 0:t._$litStatic$},yi=t=>({_$litStatic$:t,r:vi}),gi=new Map,xi=(t=>(e,...i)=>{const o=i.length;let r,n;const s=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],r=bi(n));)a+=r+e[++c],h=!0;l.push(n),s.push(a),c++}if(c===o&&s.push(e[o]),h){const t=s.join("$$lit$$");void 0===(e=gi.get(t))&&(s.raw=s,gi.set(t,e=s)),i=l}return t(e,...i)})(Y);var mi;!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"}(mi||(mi={}));const wi=mt.extend("--ft-typography-font-family",$t.titleFont),$i=mt.extend("--ft-typography-font-family",$t.contentFont),Oi={fontFamily:$i,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},ki=mt.extend("--ft-typography-title-font-family",wi),Si=mt.extend("--ft-typography-title-font-size",Oi.fontSize,"20px"),Ci=mt.extend("--ft-typography-title-font-weight",Oi.fontWeight,"normal"),ji=mt.extend("--ft-typography-title-letter-spacing",Oi.letterSpacing,"0.15px"),Ei=mt.extend("--ft-typography-title-line-height",Oi.lineHeight,"1.2"),Ni=mt.extend("--ft-typography-title-text-transform",Oi.textTransform,"inherit"),Mi=mt.extend("--ft-typography-title-dense-font-family",wi),Ri=mt.extend("--ft-typography-title-dense-font-size",Oi.fontSize,"14px"),zi=mt.extend("--ft-typography-title-dense-font-weight",Oi.fontWeight,"normal"),Ai=mt.extend("--ft-typography-title-dense-letter-spacing",Oi.letterSpacing,"0.105px"),Bi=mt.extend("--ft-typography-title-dense-line-height",Oi.lineHeight,"1.7"),Ui=mt.extend("--ft-typography-title-dense-text-transform",Oi.textTransform,"inherit"),Pi=mt.extend("--ft-typography-subtitle1-font-family",$i),Fi=mt.extend("--ft-typography-subtitle1-font-size",Oi.fontSize,"16px"),Li=mt.extend("--ft-typography-subtitle1-font-weight",Oi.fontWeight,"600"),Di=mt.extend("--ft-typography-subtitle1-letter-spacing",Oi.letterSpacing,"0.144px"),Ii=mt.extend("--ft-typography-subtitle1-line-height",Oi.lineHeight,"1.5"),Ti=mt.extend("--ft-typography-subtitle1-text-transform",Oi.textTransform,"inherit"),_i=mt.extend("--ft-typography-subtitle2-font-family",$i),Wi=mt.extend("--ft-typography-subtitle2-font-size",Oi.fontSize,"14px"),Hi=mt.extend("--ft-typography-subtitle2-font-weight",Oi.fontWeight,"normal"),Ki=mt.extend("--ft-typography-subtitle2-letter-spacing",Oi.letterSpacing,"0.098px"),Vi=mt.extend("--ft-typography-subtitle2-line-height",Oi.lineHeight,"1.7"),Zi=mt.extend("--ft-typography-subtitle2-text-transform",Oi.textTransform,"inherit"),qi=mt.extend("--ft-typography-body1-font-family",$i),Ji=mt.extend("--ft-typography-body1-font-size",Oi.fontSize,"16px"),Xi=mt.extend("--ft-typography-body1-font-weight",Oi.fontWeight,"normal"),Gi=mt.extend("--ft-typography-body1-letter-spacing",Oi.letterSpacing,"0.496px"),Yi=mt.extend("--ft-typography-body1-line-height",Oi.lineHeight,"1.5"),Qi=mt.extend("--ft-typography-body1-text-transform",Oi.textTransform,"inherit"),to={fontFamily:mt.extend("--ft-typography-body2-font-family",$i),fontSize:mt.extend("--ft-typography-body2-font-size",Oi.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-body2-font-weight",Oi.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-body2-letter-spacing",Oi.letterSpacing,"0.252px"),lineHeight:mt.extend("--ft-typography-body2-line-height",Oi.lineHeight,"1.4"),textTransform:mt.extend("--ft-typography-body2-text-transform",Oi.textTransform,"inherit")},eo=mt.extend("--ft-typography-caption-font-family",$i),io=mt.extend("--ft-typography-caption-font-size",Oi.fontSize,"12px"),oo=mt.extend("--ft-typography-caption-font-weight",Oi.fontWeight,"normal"),ro=mt.extend("--ft-typography-caption-letter-spacing",Oi.letterSpacing,"0.396px"),no=mt.extend("--ft-typography-caption-line-height",Oi.lineHeight,"1.33"),so=mt.extend("--ft-typography-caption-text-transform",Oi.textTransform,"inherit"),lo=mt.extend("--ft-typography-breadcrumb-font-family",$i),ao=mt.extend("--ft-typography-breadcrumb-font-size",Oi.fontSize,"10px"),co=mt.extend("--ft-typography-breadcrumb-font-weight",Oi.fontWeight,"normal"),ho=mt.extend("--ft-typography-breadcrumb-letter-spacing",Oi.letterSpacing,"0.33px"),fo=mt.extend("--ft-typography-breadcrumb-line-height",Oi.lineHeight,"1.6"),uo=mt.extend("--ft-typography-breadcrumb-text-transform",Oi.textTransform,"inherit"),po=mt.extend("--ft-typography-overline-font-family",$i),vo=mt.extend("--ft-typography-overline-font-size",Oi.fontSize,"10px"),bo=mt.extend("--ft-typography-overline-font-weight",Oi.fontWeight,"normal"),yo=mt.extend("--ft-typography-overline-letter-spacing",Oi.letterSpacing,"1.5px"),go=mt.extend("--ft-typography-overline-line-height",Oi.lineHeight,"1.6"),xo=mt.extend("--ft-typography-overline-text-transform",Oi.textTransform,"uppercase"),mo={fontFamily:mt.extend("--ft-typography-button-font-family",$i),fontSize:mt.extend("--ft-typography-button-font-size",Oi.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-button-font-weight",Oi.fontWeight,"600"),letterSpacing:mt.extend("--ft-typography-button-letter-spacing",Oi.letterSpacing,"1.246px"),lineHeight:mt.extend("--ft-typography-button-line-height",Oi.lineHeight,"1.15"),textTransform:mt.extend("--ft-typography-button-text-transform",Oi.textTransform,"uppercase")},wo=w`
|
|
124
|
+
.ft-typography--title {
|
|
125
|
+
font-family: ${ki};
|
|
126
|
+
font-size: ${Si};
|
|
127
|
+
font-weight: ${Ci};
|
|
128
|
+
letter-spacing: ${ji};
|
|
129
|
+
line-height: ${Ei};
|
|
130
|
+
text-transform: ${Ni};
|
|
131
|
+
}
|
|
132
|
+
`,$o=w`
|
|
133
|
+
.ft-typography--title-dense {
|
|
134
|
+
font-family: ${Mi};
|
|
135
|
+
font-size: ${Ri};
|
|
136
|
+
font-weight: ${zi};
|
|
137
|
+
letter-spacing: ${Ai};
|
|
138
|
+
line-height: ${Bi};
|
|
139
|
+
text-transform: ${Ui};
|
|
140
|
+
}
|
|
141
|
+
`,Oo=w`
|
|
142
|
+
.ft-typography--subtitle1 {
|
|
143
|
+
font-family: ${Pi};
|
|
144
|
+
font-size: ${Fi};
|
|
145
|
+
font-weight: ${Li};
|
|
146
|
+
letter-spacing: ${Di};
|
|
147
|
+
line-height: ${Ii};
|
|
148
|
+
text-transform: ${Ti};
|
|
149
|
+
}
|
|
150
|
+
`,ko=w`
|
|
151
|
+
.ft-typography--subtitle2 {
|
|
152
|
+
font-family: ${_i};
|
|
153
|
+
font-size: ${Wi};
|
|
154
|
+
font-weight: ${Hi};
|
|
155
|
+
letter-spacing: ${Ki};
|
|
156
|
+
line-height: ${Vi};
|
|
157
|
+
text-transform: ${Zi};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
`,So=w`
|
|
161
|
+
.ft-typography--body1 {
|
|
162
|
+
font-family: ${qi};
|
|
163
|
+
font-size: ${Ji};
|
|
164
|
+
font-weight: ${Xi};
|
|
165
|
+
letter-spacing: ${Gi};
|
|
166
|
+
line-height: ${Yi};
|
|
167
|
+
text-transform: ${Qi};
|
|
168
|
+
}
|
|
169
|
+
`,Co=w`
|
|
170
|
+
.ft-typography--body2 {
|
|
171
|
+
font-family: ${to.fontFamily};
|
|
172
|
+
font-size: ${to.fontSize};
|
|
173
|
+
font-weight: ${to.fontWeight};
|
|
174
|
+
letter-spacing: ${to.letterSpacing};
|
|
175
|
+
line-height: ${to.lineHeight};
|
|
176
|
+
text-transform: ${to.textTransform};
|
|
177
|
+
}
|
|
178
|
+
`,jo=w`
|
|
179
|
+
.ft-typography--caption {
|
|
180
|
+
font-family: ${eo};
|
|
181
|
+
font-size: ${io};
|
|
182
|
+
font-weight: ${oo};
|
|
183
|
+
letter-spacing: ${ro};
|
|
184
|
+
line-height: ${no};
|
|
185
|
+
text-transform: ${so};
|
|
186
|
+
}
|
|
187
|
+
`,Eo=w`
|
|
188
|
+
.ft-typography--breadcrumb {
|
|
189
|
+
font-family: ${lo};
|
|
190
|
+
font-size: ${ao};
|
|
191
|
+
font-weight: ${co};
|
|
192
|
+
letter-spacing: ${ho};
|
|
193
|
+
line-height: ${fo};
|
|
194
|
+
text-transform: ${uo};
|
|
195
|
+
}
|
|
196
|
+
`,No=w`
|
|
197
|
+
.ft-typography--overline {
|
|
198
|
+
font-family: ${po};
|
|
199
|
+
font-size: ${vo};
|
|
200
|
+
font-weight: ${bo};
|
|
201
|
+
letter-spacing: ${yo};
|
|
202
|
+
line-height: ${go};
|
|
203
|
+
text-transform: ${xo};
|
|
204
|
+
}
|
|
205
|
+
`,Mo=w`
|
|
206
|
+
.ft-typography--button {
|
|
207
|
+
font-family: ${mo.fontFamily};
|
|
208
|
+
font-size: ${mo.fontSize};
|
|
209
|
+
font-weight: ${mo.fontWeight};
|
|
210
|
+
letter-spacing: ${mo.letterSpacing};
|
|
211
|
+
line-height: ${mo.lineHeight};
|
|
212
|
+
text-transform: ${mo.textTransform};
|
|
213
|
+
}
|
|
214
|
+
`,Ro=w`
|
|
215
|
+
.ft-typography {
|
|
216
|
+
vertical-align: inherit;
|
|
217
|
+
}
|
|
218
|
+
`;var zo=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Ao extends kt{constructor(){super(...arguments),this.variant=mi.body1}render(){return this.element?xi`
|
|
219
|
+
<${yi(this.element)}
|
|
220
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
221
|
+
<slot></slot>
|
|
222
|
+
</${yi(this.element)}>
|
|
223
|
+
`:xi`
|
|
224
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
225
|
+
`}}function Bo(t,e){return t.flatMap((t=>[t,...Bo(e(t),e)]))}
|
|
226
|
+
/**
|
|
227
|
+
* @license
|
|
228
|
+
* Copyright 2017 Google LLC
|
|
229
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
230
|
+
*/Ao.styles=[wo,$o,Oo,ko,So,Co,jo,Eo,No,Mo,Ro],zo([n()],Ao.prototype,"element",void 0),zo([n()],Ao.prototype,"variant",void 0),d("ft-typography")(Ao);const Uo=1,Po=2,Fo=t=>(...e)=>({_$litDirective$:t,values:e});class Lo{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)}}
|
|
231
|
+
/**
|
|
232
|
+
* @license
|
|
233
|
+
* Copyright 2020 Google LLC
|
|
234
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
235
|
+
*/const{I:Do}=pt,Io=()=>document.createComment(""),To=(t,e,i)=>{var o;const r=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=r.insertBefore(Io(),n),o=r.insertBefore(Io(),n);i=new Do(e,o,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,l=s!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==s._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,n),t=e}}}return i},_o=(t,e,i=t)=>(t._$AI(e,i),t),Wo={},Ho=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}},Ko=(t,e,i)=>{const o=new Map;for(let r=e;r<=i;r++)o.set(t[r],r);return o},Vo=Fo(class extends Lo{constructor(t){if(super(t),t.type!==Po)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const r=[],n=[];let s=0;for(const e of t)r[s]=o?o(e,s):s,n[s]=i(e,s),s++;return{values:n,keys:r}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var r;const n=(t=>t._$AH)(t),{values:s,keys:l}=this.ht(e,i,o);if(!Array.isArray(n))return this.ut=l,s;const a=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],c=[];let h,f,u=0,d=n.length-1,p=0,v=s.length-1;for(;u<=d&&p<=v;)if(null===n[u])u++;else if(null===n[d])d--;else if(a[u]===l[p])c[p]=_o(n[u],s[p]),u++,p++;else if(a[d]===l[v])c[v]=_o(n[d],s[v]),d--,v--;else if(a[u]===l[v])c[v]=_o(n[u],s[v]),To(t,c[v+1],n[u]),u++,v--;else if(a[d]===l[p])c[p]=_o(n[d],s[p]),To(t,n[u],n[d]),d--,p++;else if(void 0===h&&(h=Ko(l,p,v),f=Ko(a,u,d)),h.has(a[u]))if(h.has(a[d])){const e=f.get(l[p]),i=void 0!==e?n[e]:null;if(null===i){const e=To(t,n[u]);_o(e,s[p]),c[p]=e}else c[p]=_o(i,s[p]),To(t,n[u],i),n[e]=null;p++}else Ho(n[d]),d--;else Ho(n[u]),u++;for(;p<=v;){const e=To(t,c[v+1]);_o(e,s[p]),c[p++]=e}for(;u<=d;){const t=n[u++];null!==t&&Ho(t)}return this.ut=l,((t,e=Wo)=>{t._$AH=e})(t,c),Q}}),Zo=Fo(class extends Lo{constructor(t){var e;if(super(t),t.type!==Uo||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(r.add(t),this.nt.add(t)):(r.remove(t),this.nt.delete(t)))}return Q}}),qo=mt.extend("--ft-ripple-color",$t.colorContent),Jo={color:qo,backgroundColor:mt.extend("--ft-ripple-background-color",qo),opacityContentOnSurfacePressed:mt.external($t.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:mt.external($t.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:mt.external($t.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:mt.external($t.opacityContentOnSurfaceSelected,"Design system")},Xo=mt.extend("--ft-ripple-color",$t.colorPrimary),Go=Xo,Yo=mt.extend("--ft-ripple-background-color",Xo),Qo=mt.extend("--ft-ripple-color",$t.colorSecondary),tr=Qo,er=mt.extend("--ft-ripple-background-color",Qo),ir=w`
|
|
236
|
+
:host {
|
|
237
|
+
display: contents;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.ft-ripple {
|
|
241
|
+
position: absolute;
|
|
242
|
+
inset: 0;
|
|
243
|
+
pointer-events: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.ft-ripple .ft-ripple--background,
|
|
251
|
+
.ft-ripple .ft-ripple--effect {
|
|
252
|
+
position: absolute;
|
|
253
|
+
opacity: 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ft-ripple .ft-ripple--background {
|
|
257
|
+
background-color: ${Jo.backgroundColor};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.ft-ripple .ft-ripple--effect {
|
|
261
|
+
background-color: ${Jo.color};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
265
|
+
background-color: ${er};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
269
|
+
background-color: ${tr};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
273
|
+
background-color: ${Yo};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
277
|
+
background-color: ${Go};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ft-ripple .ft-ripple--background {
|
|
281
|
+
top: 0;
|
|
282
|
+
left: 0;
|
|
283
|
+
height: 100%;
|
|
284
|
+
width: 100%;
|
|
285
|
+
transition: opacity 75ms linear;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ft-ripple .ft-ripple--effect,
|
|
289
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
290
|
+
border-radius: 50%;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ft-ripple .ft-ripple--effect {
|
|
294
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
295
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
299
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
300
|
+
left: 50%;
|
|
301
|
+
top: 50%;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
305
|
+
transform: translate(-50%, -50%);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
309
|
+
opacity: ${Jo.opacityContentOnSurfaceHover};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
313
|
+
opacity: ${Jo.opacityContentOnSurfaceSelected};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
317
|
+
opacity: ${Jo.opacityContentOnSurfaceFocused};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
321
|
+
opacity: ${Jo.opacityContentOnSurfacePressed};
|
|
322
|
+
transform: translate(-50%, -50%) scale(1);
|
|
323
|
+
}
|
|
324
|
+
`;
|
|
325
|
+
/**
|
|
326
|
+
* @license
|
|
327
|
+
* Copyright 2017 Google LLC
|
|
328
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
329
|
+
*/var or=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class rr extends kt{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 o(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new o(10),this.moveRipple=t=>{var e,i;let{x:o,y:r}=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!=r?r-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 Y`
|
|
330
|
+
<style>
|
|
331
|
+
.ft-ripple .ft-ripple--effect,
|
|
332
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
333
|
+
width: ${this.rippleSize}px;
|
|
334
|
+
height: ${this.rippleSize}px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.ft-ripple .ft-ripple--effect {
|
|
338
|
+
left: ${this.originX}px;
|
|
339
|
+
top: ${this.originY}px;
|
|
340
|
+
}
|
|
341
|
+
</style>
|
|
342
|
+
<div class="${Zo(t)}">
|
|
343
|
+
<div class="ft-ripple--background"></div>
|
|
344
|
+
<div class="ft-ripple--effect"></div>
|
|
345
|
+
</div>
|
|
346
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=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",r),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",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}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()}}rr.elementDefinitions={},rr.styles=ir,or([n({type:Boolean})],rr.prototype,"primary",void 0),or([n({type:Boolean})],rr.prototype,"secondary",void 0),or([n({type:Boolean})],rr.prototype,"unbounded",void 0),or([n({type:Boolean})],rr.prototype,"activated",void 0),or([n({type:Boolean})],rr.prototype,"selected",void 0),or([n({type:Boolean})],rr.prototype,"disabled",void 0),or([s()],rr.prototype,"hovered",void 0),or([s()],rr.prototype,"focused",void 0),or([s()],rr.prototype,"pressed",void 0),or([s()],rr.prototype,"rippling",void 0),or([s()],rr.prototype,"rippleSize",void 0),or([s()],rr.prototype,"originX",void 0),or([s()],rr.prototype,"originY",void 0),or([a(".ft-ripple")],rr.prototype,"ripple",void 0),or([a(".ft-ripple--effect")],rr.prototype,"rippleEffect",void 0),d("ft-ripple")(rr);const nr=mt.create("--ft-tooltip-distance","SIZE","4px"),sr=mt.create("--ft-tooltip-color","COLOR","#FFFFFF"),lr=mt.create("--ft-tooltip-background-color","COLOR","#666666"),ar=mt.create("--ft-tooltip-z-index","NUMBER","1"),cr=mt.external($t.borderRadiusS,"Design system"),hr=mt.create("--ft-tooltip-max-width","SIZE","150px"),fr=w`
|
|
347
|
+
.ft-tooltip--container {
|
|
348
|
+
display: block;
|
|
349
|
+
position: relative;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.ft-tooltip--inline {
|
|
353
|
+
display: inline-block;
|
|
354
|
+
max-width: 100%;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-tooltip {
|
|
358
|
+
position: absolute;
|
|
359
|
+
box-sizing: border-box;
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
width: max-content;
|
|
362
|
+
max-width: ${hr};
|
|
363
|
+
text-align: center;
|
|
364
|
+
padding: ${nr};
|
|
365
|
+
z-index: ${ar};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ft-tooltip--content {
|
|
369
|
+
padding: 4px 8px;
|
|
370
|
+
border-radius: ${cr};
|
|
371
|
+
background-color: ${lr};
|
|
372
|
+
color: ${sr};
|
|
373
|
+
top: -500px;
|
|
374
|
+
left: -500px;
|
|
375
|
+
position: relative;
|
|
376
|
+
word-break: break-word;
|
|
377
|
+
}
|
|
378
|
+
`;var ur=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class dr extends kt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new o,this.revealDebouncer=new o}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return Y`
|
|
379
|
+
<div part="container"
|
|
380
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
381
|
+
@mouseenter=${this.onHover}
|
|
382
|
+
@mouseleave=${this.onOut}
|
|
383
|
+
@focusin=${this.onHover}
|
|
384
|
+
@focusout=${this.onOut}
|
|
385
|
+
@touchstart=${this.onTouch}>
|
|
386
|
+
<slot></slot>
|
|
387
|
+
<div part="tooltip" role="tooltip" inert
|
|
388
|
+
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
389
|
+
?hidden=${!this.visible}>
|
|
390
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
391
|
+
<slot name="text"></slot>
|
|
392
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let r=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,r=o;break;case"bottom":n=e.height,r=o;break;case"left":n=i,r=-this.tooltip.clientWidth;break;case"right":n=i,r=e.width}e.left+r+this.tooltip.clientWidth>window.innerWidth&&(r=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+r<0&&(r=0);const s=this.tooltip.style;s.left=r+"px",s.top=n+"px",s.maxWidth=`max(${e.width}px, ${hr})`}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())}}dr.elementDefinitions={"ft-typography":Ao},dr.styles=fr,ur([n()],dr.prototype,"text",void 0),ur([n({type:Boolean})],dr.prototype,"manual",void 0),ur([n({type:Boolean})],dr.prototype,"inline",void 0),ur([n({type:Number})],dr.prototype,"delay",void 0),ur([n()],dr.prototype,"position",void 0),ur([function(t,e,i){let o,r=t;return"object"==typeof t?(r=t.slot,o=t):o={flatten:e},i?f({slot:r,flatten:e,selector:i}):l({descriptor:t=>({get(){var t,e;const i="slot"+(r?`[name=${r}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],dr.prototype,"slotNodes",void 0),ur([a(".ft-tooltip--container")],dr.prototype,"container",void 0),ur([a("slot")],dr.prototype,"target",void 0),ur([a(".ft-tooltip")],dr.prototype,"tooltip",void 0),ur([a(".ft-tooltip--content")],dr.prototype,"tooltipContent",void 0),ur([s()],dr.prototype,"visible",void 0),d("ft-tooltip")(dr);const pr={color:mt.extend("--ft-loader-color",$t.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},vr=w`
|
|
397
|
+
:host {
|
|
398
|
+
line-height: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.ft-loader {
|
|
402
|
+
display: inline-block;
|
|
403
|
+
position: relative;
|
|
404
|
+
|
|
405
|
+
width: ${pr.size};
|
|
406
|
+
height: ${pr.size};
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.ft-loader div {
|
|
410
|
+
position: absolute;
|
|
411
|
+
top: 37.5%;
|
|
412
|
+
width: 25%;
|
|
413
|
+
height: 25%;
|
|
414
|
+
border-radius: 50%;
|
|
415
|
+
background: ${pr.color};
|
|
416
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.ft-loader div:nth-child(1) {
|
|
420
|
+
left: 2.5%;
|
|
421
|
+
animation: appear 0.6s infinite;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.ft-loader div:nth-child(2) {
|
|
425
|
+
left: 2.5%;
|
|
426
|
+
animation: move 0.6s infinite;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.ft-loader div:nth-child(3) {
|
|
430
|
+
left: 37.5%;
|
|
431
|
+
animation: move 0.6s infinite;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.ft-loader div:nth-child(4) {
|
|
435
|
+
left: 72.5%;
|
|
436
|
+
animation: disappear 0.6s infinite;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@keyframes appear {
|
|
440
|
+
0% {
|
|
441
|
+
transform: scale(0);
|
|
442
|
+
}
|
|
443
|
+
100% {
|
|
444
|
+
transform: scale(1);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
@keyframes disappear {
|
|
449
|
+
0% {
|
|
450
|
+
transform: scale(1);
|
|
451
|
+
}
|
|
452
|
+
100% {
|
|
453
|
+
transform: scale(0);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@keyframes move {
|
|
458
|
+
0% {
|
|
459
|
+
transform: translate(0, 0);
|
|
460
|
+
}
|
|
461
|
+
100% {
|
|
462
|
+
transform: translate(calc(0.35 * ${pr.size}), 0);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
`;class br extends kt{render(){return Y`
|
|
466
|
+
<div class="ft-loader">
|
|
467
|
+
<div></div>
|
|
468
|
+
<div></div>
|
|
469
|
+
<div></div>
|
|
470
|
+
<div></div>
|
|
471
|
+
</div>
|
|
472
|
+
`}}br.styles=vr,d("ft-loader")(br);
|
|
473
|
+
/**
|
|
474
|
+
* @license
|
|
475
|
+
* Copyright 2017 Google LLC
|
|
476
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
477
|
+
*/
|
|
478
|
+
class yr extends Lo{constructor(t){if(super(t),this.it=tt,t.type!==Po)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===tt||null==t)return this._t=void 0,this.it=t;if(t===Q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}yr.directiveName="unsafeHTML",yr.resultType=1;const gr=Fo(yr);var xr,mr;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(xr||(xr={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(mr||(mr={})),new Map([...["abw"].map((t=>[t,mr.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,mr.AUDIO])),...["avi"].map((t=>[t,mr.AVI])),...["chm","xhs"].map((t=>[t,mr.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,mr.CODE])),...["csv"].map((t=>[t,mr.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,mr.DITA])),...["epub"].map((t=>[t,mr.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,mr.EXCEL])),...["flac"].map((t=>[t,mr.FLAC])),...["gif"].map((t=>[t,mr.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,mr.GZIP])),...["html","htm","xhtml"].map((t=>[t,mr.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,mr.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,mr.JPEG])),...["json"].map((t=>[t,mr.JSON])),...["m4a","m4p"].map((t=>[t,mr.M4A])),...["mov","qt"].map((t=>[t,mr.MOV])),...["mp3"].map((t=>[t,mr.MP3])),...["mp4","m4v"].map((t=>[t,mr.MP4])),...["ogg","oga"].map((t=>[t,mr.OGG])),...["pdf","ps"].map((t=>[t,mr.PDF])),...["png"].map((t=>[t,mr.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,mr.POWERPOINT])),...["rar"].map((t=>[t,mr.RAR])),...["stp"].map((t=>[t,mr.STP])),...["txt","rtf","md","mdown"].map((t=>[t,mr.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,mr.VIDEO])),...["wav"].map((t=>[t,mr.WAV])),...["wma"].map((t=>[t,mr.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,mr.WORD])),...["xml","xsl","rdf"].map((t=>[t,mr.XML])),...["yaml","yml","x-yaml"].map((t=>[t,mr.YAML])),...["zip"].map((t=>[t,mr.ZIP]))]);const wr={size:mt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:mt.extend("--ft-icon-fluid-topics-font-family",mt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:mt.extend("--ft-icon-file-format-font-family",mt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:mt.extend("--ft-icon-material-font-family",mt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:mt.create("--ft-icon-vertical-align","UNKNOWN","unset")},$r=w`
|
|
479
|
+
:host, i.ft-icon {
|
|
480
|
+
display: inline-flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
flex-shrink: 0;
|
|
483
|
+
flex-grow: 0;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:host {
|
|
487
|
+
width: ${wr.size};
|
|
488
|
+
height: ${wr.size};
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
i.ft-icon {
|
|
492
|
+
width: 100%;
|
|
493
|
+
height: 100%;
|
|
494
|
+
font-size: ${wr.size};
|
|
495
|
+
line-height: 1;
|
|
496
|
+
font-weight: normal;
|
|
497
|
+
text-transform: none;
|
|
498
|
+
font-style: normal;
|
|
499
|
+
font-variant: normal;
|
|
500
|
+
speak: none;
|
|
501
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
502
|
+
text-rendering: auto;
|
|
503
|
+
-webkit-font-smoothing: antialiased;
|
|
504
|
+
-moz-osx-font-smoothing: grayscale;
|
|
505
|
+
vertical-align: ${wr.verticalAlign};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
i.ft-icon.ft-icon--fluid-topics {
|
|
509
|
+
font-family: ${wr.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
510
|
+
|
|
511
|
+
/* Ugly fix because font is broken */
|
|
512
|
+
font-size: calc(0.9 * ${wr.size});
|
|
513
|
+
position: relative;
|
|
514
|
+
top: -5%;
|
|
515
|
+
justify-content: center;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.ft-icon--file-format {
|
|
519
|
+
font-family: ${wr.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.ft-icon--material {
|
|
523
|
+
font-family: ${wr.materialFontFamily}, "Material Icons", sans-serif;
|
|
524
|
+
}
|
|
525
|
+
`;var Or;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Or||(Or={}));var kr=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Sr extends kt{constructor(){super(...arguments),this.resolvedIcon=tt}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Or.fluid_topics,i="material"!==e||this.value;return Y`
|
|
526
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
527
|
+
${gr(this.resolvedIcon)}
|
|
528
|
+
<slot ?hidden=${i}></slot>
|
|
529
|
+
</i>
|
|
530
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Or.file_format:this.resolvedIcon=null!==(t=mr[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Or.material:this.resolvedIcon=this.value||tt;break;default:this.resolvedIcon=null!==(e=xr[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Sr.elementDefinitions={},Sr.styles=$r,kr([n()],Sr.prototype,"variant",void 0),kr([n()],Sr.prototype,"value",void 0),kr([s()],Sr.prototype,"resolvedIcon",void 0),kr([a("slot")],Sr.prototype,"slottedContent",void 0),d("ft-icon")(Sr);const Cr=mt.extend("--ft-button-color",$t.colorPrimary),jr={backgroundColor:mt.extend("--ft-button-background-color",$t.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",$t.borderRadiusL),color:Cr,fontSize:mt.extend("--ft-button-font-size",mo.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",Cr),opacityDisabled:mt.external($t.colorOpacityDisabled,"Design system")},Er=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",$t.colorOnPrimary)),Nr={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",$t.colorPrimary)),color:Er,rippleColor:mt.extend("--ft-button-primary-ripple-color",Er)},Mr=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",$t.borderRadiusM)),Rr=[St,w`
|
|
531
|
+
:host {
|
|
532
|
+
display: inline-block;
|
|
533
|
+
max-width: 100%;
|
|
534
|
+
pointer-events: none;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
button {
|
|
538
|
+
box-shadow: 0px 0px 0px transparent;
|
|
539
|
+
border: 0px solid transparent;
|
|
540
|
+
text-shadow: 0px 0px 0px transparent;
|
|
541
|
+
font-size: ${jr.fontSize};
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
button:hover {
|
|
545
|
+
box-shadow: 0px 0px 0px transparent;
|
|
546
|
+
border: 0px solid transparent;
|
|
547
|
+
text-shadow: 0px 0px 0px transparent;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
button:active {
|
|
551
|
+
outline: none;
|
|
552
|
+
border: none;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
button:focus {
|
|
556
|
+
outline: 0;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.ft-button {
|
|
560
|
+
position: relative;
|
|
561
|
+
display: flex;
|
|
562
|
+
justify-content: center;
|
|
563
|
+
align-items: center;
|
|
564
|
+
width: 100%;
|
|
565
|
+
overflow: hidden;
|
|
566
|
+
box-sizing: border-box;
|
|
567
|
+
border: none;
|
|
568
|
+
pointer-events: auto;
|
|
569
|
+
|
|
570
|
+
--ft-button-internal-line-height: calc(${jr.fontSize} + 2px);
|
|
571
|
+
--ft-button-internal-color: ${jr.color};
|
|
572
|
+
${wt(wr.size,jr.iconSize)};
|
|
573
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
574
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
575
|
+
${wt(Jo.color,jr.rippleColor)};
|
|
576
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${jr.iconSize});
|
|
577
|
+
|
|
578
|
+
border-radius: ${jr.borderRadius};
|
|
579
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
580
|
+
background-color: ${jr.backgroundColor};
|
|
581
|
+
color: var(--ft-button-internal-color);
|
|
582
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.ft-button:not([disabled]):hover {
|
|
586
|
+
cursor: pointer;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.ft-button--dense {
|
|
590
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
591
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
592
|
+
border-radius: ${Mr};
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.ft-button--round {
|
|
596
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.ft-button[disabled] {
|
|
600
|
+
filter: grayscale(1);
|
|
601
|
+
opacity: ${jr.opacityDisabled};
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.ft-button.ft-button--primary {
|
|
605
|
+
background-color: ${Nr.backgroundColor};
|
|
606
|
+
--ft-button-internal-color: ${Nr.color};
|
|
607
|
+
${wt(Jo.color,Nr.rippleColor)};
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.ft-button.ft-button--outlined {
|
|
611
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
612
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.ft-button:focus {
|
|
616
|
+
outline: none;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.ft-button--label {
|
|
620
|
+
position: relative;
|
|
621
|
+
overflow: hidden;
|
|
622
|
+
white-space: nowrap;
|
|
623
|
+
text-overflow: ellipsis;
|
|
624
|
+
display: block;
|
|
625
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
626
|
+
${wt(mo.fontSize,"1em")};
|
|
627
|
+
${wt(mo.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.ft-button--label[hidden] {
|
|
631
|
+
display: none;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
ft-icon {
|
|
635
|
+
flex-shrink: 0;
|
|
636
|
+
position: relative;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.ft-button--label[hidden] + ft-icon {
|
|
640
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
641
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
645
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
646
|
+
order: -1;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
ft-loader {
|
|
650
|
+
${wt(pr.size,jr.iconSize)};
|
|
651
|
+
${wt(pr.color,"var(--ft-button-internal-color)")};
|
|
652
|
+
}
|
|
653
|
+
`];var zr=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Ar extends kt{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Or.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(Y`
|
|
654
|
+
<button part="button"
|
|
655
|
+
class="${Zo(t)}"
|
|
656
|
+
aria-label="${this.getLabel()}"
|
|
657
|
+
?disabled=${this.isDisabled()}>
|
|
658
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
659
|
+
<ft-typography part="label"
|
|
660
|
+
variant="button"
|
|
661
|
+
element="span"
|
|
662
|
+
class="ft-button--label ${di?"ft-safari-ellipsis-fix":""}"
|
|
663
|
+
?hidden=${!this.hasTextContent()}>
|
|
664
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
665
|
+
</ft-typography>
|
|
666
|
+
${this.resolveIcon()}
|
|
667
|
+
</button>
|
|
668
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?Y`
|
|
669
|
+
<ft-tooltip part="tooltip"
|
|
670
|
+
text="${this.getLabel()}"
|
|
671
|
+
position="${this.tooltipPosition}">
|
|
672
|
+
${t}
|
|
673
|
+
</ft-tooltip>
|
|
674
|
+
`:t}resolveIcon(){return this.loading?Y`
|
|
675
|
+
<ft-loader></ft-loader> `:this.icon?Y`
|
|
676
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:tt}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}}Ar.elementDefinitions={"ft-ripple":rr,"ft-tooltip":dr,"ft-typography":Ao,"ft-icon":Sr,"ft-loader":br},Ar.styles=[Ct,Rr],zr([n({type:String,reflect:!0})],Ar.prototype,"role",void 0),zr([n({type:Boolean})],Ar.prototype,"primary",void 0),zr([n({type:Boolean})],Ar.prototype,"outlined",void 0),zr([n({type:Boolean})],Ar.prototype,"disabled",void 0),zr([n({type:Boolean})],Ar.prototype,"dense",void 0),zr([n({type:Boolean})],Ar.prototype,"round",void 0),zr([n({type:String})],Ar.prototype,"label",void 0),zr([n({type:String})],Ar.prototype,"icon",void 0),zr([n({type:String})],Ar.prototype,"iconVariant",void 0),zr([n({type:Boolean})],Ar.prototype,"trailingIcon",void 0),zr([n({type:Boolean})],Ar.prototype,"loading",void 0),zr([n({type:String})],Ar.prototype,"tooltipPosition",void 0),zr([n({type:Boolean})],Ar.prototype,"hideTooltip",void 0),zr([n({type:Boolean})],Ar.prototype,"forceTooltip",void 0),zr([a(".ft-button")],Ar.prototype,"button",void 0),zr([a(".ft-button--label slot")],Ar.prototype,"slottedContent",void 0),d("ft-button")(Ar);const Br=mt.extend("--ft-checkbox-text-color",$t.colorOnSurfaceHigh),Ur=mt.external($t.colorPrimary,"Design system"),Pr=mt.external($t.colorOnPrimary,"Design system"),Fr=mt.extend("--ft-checkbox-border-color",$t.colorOnSurfaceMedium),Lr=mt.external($t.colorOnSurfaceDisabled,"Design system"),Dr=w`
|
|
677
|
+
* {
|
|
678
|
+
box-sizing: border-box;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.ft-checkbox {
|
|
682
|
+
box-sizing: border-box;
|
|
683
|
+
color: ${Br};
|
|
684
|
+
|
|
685
|
+
display: inline-flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
gap: 4px;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.ft-checkbox--disabled {
|
|
691
|
+
color: ${Lr};
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
input {
|
|
695
|
+
opacity: 0;
|
|
696
|
+
position: absolute;
|
|
697
|
+
width: 40px;
|
|
698
|
+
height: 40px;
|
|
699
|
+
margin: 0;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.ft-checkbox--box-container {
|
|
703
|
+
position: relative;
|
|
704
|
+
width: 40px;
|
|
705
|
+
height: 40px;
|
|
706
|
+
|
|
707
|
+
display: flex;
|
|
708
|
+
justify-content: center;
|
|
709
|
+
align-items: center;
|
|
710
|
+
flex-shrink: 0;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.ft-checkbox--box {
|
|
714
|
+
display: flex;
|
|
715
|
+
border: 2px solid ${Fr};
|
|
716
|
+
border-radius: 2px;
|
|
717
|
+
|
|
718
|
+
width: 18px;
|
|
719
|
+
height: 18px;
|
|
720
|
+
|
|
721
|
+
color: ${Pr};
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
726
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
727
|
+
border-color: ${Ur};
|
|
728
|
+
background-color: ${Ur};
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
732
|
+
border-color: ${Lr};
|
|
733
|
+
background-color: transparent;
|
|
734
|
+
color: ${Lr};
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.ft-checkbox--checkmark {
|
|
738
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
739
|
+
opacity: 0;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ft-checkbox--checkmark-path {
|
|
743
|
+
stroke-dashoffset: 0;
|
|
744
|
+
stroke: currentcolor;
|
|
745
|
+
stroke-width: 3px;
|
|
746
|
+
stroke-dasharray: 30;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
750
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
751
|
+
opacity: 1;
|
|
752
|
+
}
|
|
753
|
+
`;var Ir=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Tr extends kt{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 Y`
|
|
754
|
+
<label class="${Zo(t)}" for="checkbox-input">
|
|
755
|
+
<div class="ft-checkbox--box-container">
|
|
756
|
+
<ft-ripple
|
|
757
|
+
?disabled=${this.disabled}
|
|
758
|
+
?primary=${this.checked||this.indeterminate}
|
|
759
|
+
unbounded>
|
|
760
|
+
</ft-ripple>
|
|
761
|
+
<div class="ft-checkbox--box">
|
|
762
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
763
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
764
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
765
|
+
</svg>
|
|
766
|
+
</div>
|
|
767
|
+
<input type="checkbox"
|
|
768
|
+
id="checkbox-input"
|
|
769
|
+
name="${this.name}"
|
|
770
|
+
.checked=${this.checked}
|
|
771
|
+
.disabled=${this.disabled}
|
|
772
|
+
@change=${this.onChange}
|
|
773
|
+
>
|
|
774
|
+
</div>
|
|
775
|
+
<ft-typography variant="body2">
|
|
776
|
+
<slot></slot>
|
|
777
|
+
</ft-typography>
|
|
778
|
+
</label>
|
|
779
|
+
`}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)}}Tr.elementDefinitions={"ft-ripple":rr,"ft-typography":Ao},Tr.styles=Dr,Ir([n()],Tr.prototype,"name",void 0),Ir([n({type:Boolean,reflect:!0})],Tr.prototype,"checked",void 0),Ir([n({type:Boolean})],Tr.prototype,"indeterminate",void 0),Ir([n({type:Boolean})],Tr.prototype,"disabled",void 0),Ir([a(".ft-checkbox")],Tr.prototype,"container",void 0),Ir([a("ft-ripple")],Tr.prototype,"ripple",void 0),d("ft-checkbox")(Tr);const _r=mt.extend("--ft-radio-text-color",$t.colorOnSurfaceHigh),Wr=mt.external($t.colorPrimary,"Design system"),Hr=(mt.external($t.colorOnPrimary,"Design system"),mt.extend("--ft-radio-border-color",$t.colorOnSurfaceMedium)),Kr=mt.external($t.colorOnSurfaceDisabled,"Design system"),Vr=w`
|
|
780
|
+
* {
|
|
781
|
+
box-sizing: border-box;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.ft-radio {
|
|
785
|
+
box-sizing: border-box;
|
|
786
|
+
color: ${_r};
|
|
787
|
+
|
|
788
|
+
display: inline-flex;
|
|
789
|
+
align-items: center;
|
|
790
|
+
gap: 4px;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.ft-radio--disabled {
|
|
794
|
+
color: ${Kr};
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
input {
|
|
798
|
+
opacity: 0;
|
|
799
|
+
position: absolute;
|
|
800
|
+
width: 40px;
|
|
801
|
+
height: 40px;
|
|
802
|
+
margin: 0;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.ft-radio--box-container {
|
|
806
|
+
position: relative;
|
|
807
|
+
width: 40px;
|
|
808
|
+
height: 40px;
|
|
809
|
+
|
|
810
|
+
display: flex;
|
|
811
|
+
justify-content: center;
|
|
812
|
+
align-items: center;
|
|
813
|
+
flex-shrink: 0;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.ft-radio--box {
|
|
817
|
+
border: 2px solid ${Hr};
|
|
818
|
+
border-radius: 50%;
|
|
819
|
+
|
|
820
|
+
display: flex;
|
|
821
|
+
justify-content: center;
|
|
822
|
+
align-items: center;
|
|
823
|
+
|
|
824
|
+
width: 20px;
|
|
825
|
+
height: 20px;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.ft-radio--box:after {
|
|
829
|
+
content: " ";
|
|
830
|
+
background-color: ${Wr};
|
|
831
|
+
|
|
832
|
+
border-radius: 50%;
|
|
833
|
+
|
|
834
|
+
width: 12px;
|
|
835
|
+
height: 12px;
|
|
836
|
+
|
|
837
|
+
transform: scale(0);
|
|
838
|
+
transition: transform 100ms ease;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.ft-radio--checked .ft-radio--box {
|
|
842
|
+
border-color: ${Wr};
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
847
|
+
transform: scale(1);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.ft-radio--disabled .ft-radio--box {
|
|
851
|
+
border-color: ${Kr};
|
|
852
|
+
background-color: transparent;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
856
|
+
background-color: ${Kr};
|
|
857
|
+
}
|
|
858
|
+
`;var Zr=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class qr extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Jr extends kt{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 Y`
|
|
859
|
+
<div class="${Zo(t)}">
|
|
860
|
+
<div class="ft-radio--box-container">
|
|
861
|
+
<ft-ripple
|
|
862
|
+
?disabled=${this.disabled}
|
|
863
|
+
?primary=${this.checked}
|
|
864
|
+
unbounded>
|
|
865
|
+
</ft-ripple>
|
|
866
|
+
<div class="ft-radio--box">
|
|
867
|
+
</div>
|
|
868
|
+
<input id="radio-button"
|
|
869
|
+
type="radio"
|
|
870
|
+
name="${this.name}"
|
|
871
|
+
value="${this.value}"
|
|
872
|
+
.checked=${this.checked}
|
|
873
|
+
.disabled=${this.disabled}
|
|
874
|
+
@change=${this.onChange}
|
|
875
|
+
>
|
|
876
|
+
</div>
|
|
877
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
878
|
+
<ft-typography variant="body2">
|
|
879
|
+
<slot></slot>
|
|
880
|
+
</ft-typography>
|
|
881
|
+
</label>
|
|
882
|
+
</div>
|
|
883
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new qr(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 qr(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Jr.elementDefinitions={"ft-ripple":rr,"ft-typography":Ao},Jr.styles=Vr,Zr([n()],Jr.prototype,"value",void 0),Zr([n()],Jr.prototype,"name",void 0),Zr([n({type:Boolean,reflect:!0})],Jr.prototype,"checked",void 0),Zr([n({type:Boolean})],Jr.prototype,"disabled",void 0),Zr([a(".ft-radio")],Jr.prototype,"container",void 0),Zr([a("ft-ripple")],Jr.prototype,"ripple",void 0),Zr([a("input")],Jr.prototype,"input",void 0);const Xr=w`
|
|
884
|
+
:host {
|
|
885
|
+
display: contents;
|
|
886
|
+
}
|
|
887
|
+
`;var Gr=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Yr extends kt{constructor(){super(...arguments),this.name=""}render(){return Y`
|
|
888
|
+
<slot @slotchange=${this.onSlotChange}
|
|
889
|
+
@change=${this.onChange}
|
|
890
|
+
@keydown=${this.onKeyDown}
|
|
891
|
+
@focusin=${this.focusCurrentValue}
|
|
892
|
+
></slot>
|
|
893
|
+
`}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})),this.focusCurrentValue()}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))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Yr.elementDefinitions={},Yr.styles=Xr,Gr([n()],Yr.prototype,"name",void 0),Gr([f()],Yr.prototype,"radioButtons",void 0),d("ft-radio")(Jr),d("ft-radio-group")(Yr);const Qr={borderRadiusM:mt.external($t.borderRadiusM,"Design system"),colorOutline:mt.external($t.colorOutline,"Design system"),colorOnSurface:mt.external($t.colorOnSurface,"Design system"),colorOnSurfaceMedium:mt.external($t.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:mt.external($t.colorOnSurfaceDisabled,"Design system"),colorPrimary:mt.external($t.colorPrimary,"Design system"),colorOnPrimary:mt.external($t.colorOnPrimary,"Design system"),fontFamily:mt.external(to.fontFamily,"Body2 typography"),fontSize:mt.external(to.fontSize,"Body2 typography"),fontWeight:mt.external(to.fontWeight,"Body2 typography"),letterSpacing:mt.external(to.letterSpacing,"Body2 typography"),lineHeight:mt.external(to.lineHeight,"Body2 typography"),textTransform:mt.external(to.textTransform,"Body2 typography")},tn=w`
|
|
894
|
+
.ft-filter-level--container {
|
|
895
|
+
display: flex;
|
|
896
|
+
flex-direction: column;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.ft-filter-level--container > * {
|
|
900
|
+
padding: 0 10px;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.ft-filter-level--go-back {
|
|
904
|
+
flex-shrink: 0;
|
|
905
|
+
text-decoration: none;
|
|
906
|
+
position: relative;
|
|
907
|
+
border-radius: ${Qr.borderRadiusM};
|
|
908
|
+
overflow: hidden;
|
|
909
|
+
display: flex;
|
|
910
|
+
align-items: center;
|
|
911
|
+
padding: 4px 4px;
|
|
912
|
+
gap: 4px;
|
|
913
|
+
cursor: pointer;
|
|
914
|
+
color: ${Qr.colorOnSurface};
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.ft-filter-level--go-back:focus {
|
|
918
|
+
outline: none;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.ft-filter-level--go-back ft-icon {
|
|
922
|
+
flex-shrink: 0;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.ft-filter-level--go-back ft-typography {
|
|
926
|
+
display: block;
|
|
927
|
+
flex-grow: 1;
|
|
928
|
+
flex-shrink: 0;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.ft-filter-level--option {
|
|
932
|
+
display: flex;
|
|
933
|
+
align-items: center;
|
|
934
|
+
max-width: 100%;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.ft-filter-level--option ft-button {
|
|
938
|
+
margin-right: -10px;
|
|
939
|
+
flex-shrink: 0;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
ft-button {
|
|
943
|
+
${wt(jr.color,Qr.colorOnSurface)};
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
ft-radio, ft-checkbox {
|
|
947
|
+
flex-shrink: 1;
|
|
948
|
+
flex-grow: 1;
|
|
949
|
+
display: flex;
|
|
950
|
+
max-width: calc(100% + 10px);
|
|
951
|
+
margin-left: -10px;
|
|
952
|
+
word-break: break-word;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.ft-filter-level--no-values {
|
|
956
|
+
margin: 10px 0;
|
|
957
|
+
color: ${Qr.colorOnSurfaceMedium};
|
|
958
|
+
}
|
|
959
|
+
`;var en=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class on extends kt{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 Y`
|
|
960
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
961
|
+
${null==this.parent?null:Y`
|
|
962
|
+
<div tabindex="0"
|
|
963
|
+
part="controls go-back"
|
|
964
|
+
class="ft-filter-level--go-back"
|
|
965
|
+
?disabled=${this.disabled}
|
|
966
|
+
@keyup=${this.goBackOnKeyPress}
|
|
967
|
+
@click=${this.goBackOnClick}>
|
|
968
|
+
<ft-ripple></ft-ripple>
|
|
969
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
970
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
971
|
+
</div>
|
|
972
|
+
`}
|
|
973
|
+
${0===this.options.length&&this.noValuesLabel?Y`
|
|
974
|
+
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
975
|
+
${this.noValuesLabel}
|
|
976
|
+
</ft-typography>
|
|
977
|
+
`:tt}
|
|
978
|
+
${Vo(e,(t=>t.value),(t=>{var e;return Y`
|
|
979
|
+
<div class="ft-filter-level--option" part="options">
|
|
980
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
981
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?tt:Y`
|
|
982
|
+
<ft-button icon="chevron_right"
|
|
983
|
+
part="controls navigate-hierarchy"
|
|
984
|
+
label="${t.label}"
|
|
985
|
+
?disabled=${this.disabled}
|
|
986
|
+
tooltipPosition="left"
|
|
987
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
988
|
+
`}
|
|
989
|
+
</div>
|
|
990
|
+
`}))}
|
|
991
|
+
${e.length<t.length?Y`
|
|
992
|
+
<ft-button
|
|
993
|
+
class="ft-filter-level--display-more"
|
|
994
|
+
icon="expand_more"
|
|
995
|
+
dense trailingIcon
|
|
996
|
+
part="controls display-more"
|
|
997
|
+
@click=${this.displayMore}>
|
|
998
|
+
${this.moreValuesButtonLabel}
|
|
999
|
+
</ft-button>
|
|
1000
|
+
`:tt}
|
|
1001
|
+
</div>
|
|
1002
|
+
`}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 Y`
|
|
1003
|
+
<ft-checkbox name="${this.id}"
|
|
1004
|
+
part="multivalued-option"
|
|
1005
|
+
data-value="${t.value}"
|
|
1006
|
+
.checked=${t.selected}
|
|
1007
|
+
.disabled=${this.disabled}
|
|
1008
|
+
.indeterminate=${Bo(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1009
|
+
@change=${e=>this.optionsChanged(e,t)}>
|
|
1010
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1011
|
+
</ft-checkbox>
|
|
1012
|
+
`}buildMonoValuedOption(t){return Y`
|
|
1013
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
1014
|
+
part="monovalued-option"
|
|
1015
|
+
data-value="${t.value}"
|
|
1016
|
+
.checked=${t.selected}
|
|
1017
|
+
.disabled=${this.disabled}
|
|
1018
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
1019
|
+
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
1020
|
+
@change=${t=>t.stopPropagation()}>
|
|
1021
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1022
|
+
</ft-radio>
|
|
1023
|
+
`}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}))}}on.elementDefinitions={"ft-button":Ar,"ft-ripple":rr,"ft-typography":Ao,"ft-checkbox":Tr,"ft-icon":Sr,"ft-radio":Jr},on.styles=tn,en([n({type:String})],on.prototype,"id",void 0),en([n({type:Object})],on.prototype,"parent",void 0),en([n({type:Array})],on.prototype,"options",void 0),en([n({type:Boolean})],on.prototype,"multivalued",void 0),en([n({type:Boolean})],on.prototype,"disabled",void 0),en([n({type:Boolean})],on.prototype,"hideSelectedOptions",void 0),en([n({type:Boolean})],on.prototype,"preventNavigation",void 0),en([n({type:String})],on.prototype,"filter",void 0),en([n({type:String})],on.prototype,"moreValuesButtonLabel",void 0),en([n({type:String})],on.prototype,"noValuesLabel",void 0),en([n({type:Number})],on.prototype,"displayedValuesLimit",void 0),en([a(".ft-filter-level--container")],on.prototype,"container",void 0),en([s()],on.prototype,"displayedPages",void 0);const rn={buttonsColor:mt.extend("--ft-snap-scroll-buttons-color",$t.colorPrimary),buttonsZIndex:mt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:mt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:mt.external($t.colorSurface,"Design system")},nn=w`
|
|
1024
|
+
.ft-snap-scroll {
|
|
1025
|
+
box-sizing: border-box;
|
|
1026
|
+
position: relative;
|
|
1027
|
+
display: flex;
|
|
1028
|
+
|
|
1029
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1033
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1034
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1035
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.ft-snap-scroll,
|
|
1039
|
+
.ft-snap-scroll--content {
|
|
1040
|
+
overflow: hidden;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.ft-snap-scroll--limit-size,
|
|
1044
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1045
|
+
width: 100%;
|
|
1046
|
+
height: 100%;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.ft-snap-scroll--content {
|
|
1050
|
+
flex-grow: 1;
|
|
1051
|
+
flex-shrink: 1;
|
|
1052
|
+
box-sizing: border-box;
|
|
1053
|
+
scroll-snap-align: start;
|
|
1054
|
+
display: flex;
|
|
1055
|
+
flex-wrap: nowrap;
|
|
1056
|
+
align-items: flex-start;
|
|
1057
|
+
justify-content: flex-start;
|
|
1058
|
+
gap: ${rn.gap};
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1062
|
+
display: none;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1066
|
+
-ms-overflow-style: none;
|
|
1067
|
+
scrollbar-width: none;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1071
|
+
flex-shrink: 0;
|
|
1072
|
+
flex-grow: 1;
|
|
1073
|
+
max-height: 100%;
|
|
1074
|
+
max-width: 100%;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.ft-snap-scroll--horizontal,
|
|
1078
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1079
|
+
width: 100%;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
.ft-snap-scroll--vertical,
|
|
1083
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1084
|
+
height: 100%;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1088
|
+
flex-direction: row;
|
|
1089
|
+
overflow-x: auto;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1093
|
+
flex-direction: column;
|
|
1094
|
+
overflow-y: auto;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.ft-snap-scroll--previous,
|
|
1098
|
+
.ft-snap-scroll--next {
|
|
1099
|
+
position: absolute;
|
|
1100
|
+
display: flex;
|
|
1101
|
+
z-index: ${rn.buttonsZIndex};
|
|
1102
|
+
opacity: 1;
|
|
1103
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1104
|
+
${wt(jr.backgroundColor,"transparent")};
|
|
1105
|
+
${wt(jr.color,rn.buttonsColor)};
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.ft-snap-scroll--previous[hidden],
|
|
1109
|
+
.ft-snap-scroll--next[hidden] {
|
|
1110
|
+
z-index: -1;
|
|
1111
|
+
opacity: 0;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1115
|
+
top: 0;
|
|
1116
|
+
left: -1px;
|
|
1117
|
+
bottom: 0;
|
|
1118
|
+
background: linear-gradient(to right, ${rn.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1122
|
+
top: -1px;
|
|
1123
|
+
left: 0;
|
|
1124
|
+
right: 0;
|
|
1125
|
+
background: linear-gradient(to bottom, ${rn.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1129
|
+
top: 0;
|
|
1130
|
+
right: -1px;
|
|
1131
|
+
bottom: 0;
|
|
1132
|
+
background: linear-gradient(to left, ${rn.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1136
|
+
left: 0;
|
|
1137
|
+
right: 0;
|
|
1138
|
+
bottom: -1px;
|
|
1139
|
+
background: linear-gradient(to top, ${rn.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1143
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1144
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1145
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1146
|
+
background-color: ${rn.colorSurface};
|
|
1147
|
+
}
|
|
1148
|
+
`;var sn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class ln extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class an extends kt{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 o(200),this.updateScrollDebouncer=new o(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=Zo({"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":di}),e=this.controls&&this.withScroll;return Y`
|
|
1149
|
+
<div part="container" class="${t}">
|
|
1150
|
+
<ft-button
|
|
1151
|
+
class="ft-snap-scroll--previous"
|
|
1152
|
+
part="controls"
|
|
1153
|
+
primary
|
|
1154
|
+
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
1155
|
+
?hidden=${!e||this.startReached}
|
|
1156
|
+
?disabled=${!e||this.startReached}
|
|
1157
|
+
@click=${this.previous}
|
|
1158
|
+
></ft-button>
|
|
1159
|
+
<slot class="ft-snap-scroll--content"
|
|
1160
|
+
part="content"
|
|
1161
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
1162
|
+
<ft-button
|
|
1163
|
+
class="ft-snap-scroll--next"
|
|
1164
|
+
part="controls"
|
|
1165
|
+
primary
|
|
1166
|
+
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
1167
|
+
?hidden=${!e||this.endReached}
|
|
1168
|
+
?disabled=${!e||this.endReached}
|
|
1169
|
+
@click=${this.next}
|
|
1170
|
+
></ft-button>
|
|
1171
|
+
</div>
|
|
1172
|
+
`}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 ln(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)}}an.elementDefinitions={"ft-button":Ar},an.styles=nn,sn([n({type:Boolean})],an.prototype,"horizontal",void 0),sn([n({type:Boolean})],an.prototype,"hideScrollbar",void 0),sn([n({type:Boolean})],an.prototype,"controls",void 0),sn([n({type:Boolean})],an.prototype,"limitSize",void 0),sn([s()],an.prototype,"elements",void 0),sn([s()],an.prototype,"currentElement",void 0),sn([s()],an.prototype,"withScroll",void 0),sn([s()],an.prototype,"startReached",void 0),sn([s()],an.prototype,"endReached",void 0),sn([a(".ft-snap-scroll--content")],an.prototype,"contentSlot",void 0),d("ft-snap-scroll")(an);const cn=mt.external($t.colorOutline,"Design system"),hn=mt.external($t.colorOnSurface,"Design system"),fn=mt.external($t.colorOnSurfaceMedium,"Design system"),un=mt.external($t.colorPrimary,"Design system"),dn=mt.external($t.colorSurface,"Design system"),pn=mt.external($t.transitionDuration,"Design system"),vn=mt.external($t.transitionTimingFunction,"Design system"),bn=[jo,w`
|
|
1173
|
+
:host {
|
|
1174
|
+
display: flex;
|
|
1175
|
+
max-height: 100%;
|
|
1176
|
+
max-width: 100%;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.ft-filter--container {
|
|
1180
|
+
flex-grow: 1;
|
|
1181
|
+
display: flex;
|
|
1182
|
+
flex-direction: column;
|
|
1183
|
+
max-height: 100%;
|
|
1184
|
+
max-width: 100%;
|
|
1185
|
+
color: ${hn};
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.ft-filter--header {
|
|
1189
|
+
display: flex;
|
|
1190
|
+
flex-wrap: wrap;
|
|
1191
|
+
gap: 4px;
|
|
1192
|
+
flex-shrink: 0;
|
|
1193
|
+
padding: 0 10px;
|
|
1194
|
+
margin-bottom: 8px;
|
|
1195
|
+
${wt(Oi.fontSize,"14px")};
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.ft-filter--header ft-button {
|
|
1199
|
+
flex-shrink: 0;
|
|
1200
|
+
margin-left: auto;
|
|
1201
|
+
${wt(jr.iconSize,"18px")};
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
.ft-filter--label {
|
|
1205
|
+
display: block;
|
|
1206
|
+
flex-shrink: 1;
|
|
1207
|
+
flex-grow: 1;
|
|
1208
|
+
word-break: break-word;
|
|
1209
|
+
${wt(Oi.lineHeight,"22px")};
|
|
1210
|
+
${wt(Oi.fontWeight,"bold")};
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.ft-filter--filter {
|
|
1214
|
+
flex-shrink: 0;
|
|
1215
|
+
display: flex;
|
|
1216
|
+
margin: 0;
|
|
1217
|
+
margin-bottom: 8px;
|
|
1218
|
+
padding: 0 10px;
|
|
1219
|
+
overflow: hidden;
|
|
1220
|
+
height: 32px;
|
|
1221
|
+
transition: height ${pn} ${vn},
|
|
1222
|
+
margin ${pn} ${vn};
|
|
1223
|
+
transition-delay: 500ms;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
.ft-filter--filter[hidden] {
|
|
1227
|
+
height: 0;
|
|
1228
|
+
margin-bottom: 0;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
input {
|
|
1232
|
+
display: block;
|
|
1233
|
+
width: 100%;
|
|
1234
|
+
border-radius: 4px;
|
|
1235
|
+
border: 1px solid ${cn};
|
|
1236
|
+
padding: 4px;
|
|
1237
|
+
background-color: ${dn};
|
|
1238
|
+
color: ${hn};
|
|
1239
|
+
outline-color: ${un};
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
input::placeholder {
|
|
1243
|
+
color: ${fn};
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
input:placeholder-shown {
|
|
1247
|
+
text-overflow: ellipsis;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.ft-filter--values {
|
|
1251
|
+
flex-grow: 1;
|
|
1252
|
+
flex-shrink: 1;
|
|
1253
|
+
max-width: 100%;
|
|
1254
|
+
overflow-x: hidden;
|
|
1255
|
+
overflow-y: auto;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.ft-filter--separator {
|
|
1259
|
+
border-top: 1px solid ${cn};
|
|
1260
|
+
margin: 4px 10px;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
.ft-filter--levels-container {
|
|
1264
|
+
position: relative;
|
|
1265
|
+
overflow: hidden;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
.ft-filter--levels {
|
|
1269
|
+
position: relative;
|
|
1270
|
+
overflow: hidden;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
ft-filter-level {
|
|
1274
|
+
width: 100%;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
.ft-filter--level-left {
|
|
1278
|
+
height: 0;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
slot {
|
|
1282
|
+
display: none;
|
|
1283
|
+
}
|
|
1284
|
+
`];var yn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class gn extends CustomEvent{constructor(t){super("change",{detail:t})}}class xn extends kt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new o(300),this.changeDebouncer=new o(10)}get flatOptions(){return Bo(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,r=this.filterPlaceHolder.replace("{0}",this.label);return Y`
|
|
1285
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1286
|
+
part="container">
|
|
1287
|
+
${this.label||i?Y`
|
|
1288
|
+
<div class="ft-filter--header" part="header">
|
|
1289
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1290
|
+
</ft-typography>
|
|
1291
|
+
${i&&!this.hideClearButton?Y`
|
|
1292
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1293
|
+
${this.clearButtonLabel}
|
|
1294
|
+
</ft-button>
|
|
1295
|
+
`:null}
|
|
1296
|
+
</div>
|
|
1297
|
+
`:null}
|
|
1298
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1299
|
+
<input type="search"
|
|
1300
|
+
part="input"
|
|
1301
|
+
class="ft-typography--caption"
|
|
1302
|
+
?disabled=${!o}
|
|
1303
|
+
placeholder="${r}"
|
|
1304
|
+
size="${o?r.length:0}"
|
|
1305
|
+
@search=${this.onFilterChange}
|
|
1306
|
+
@keyup=${this.onFilterChange}>
|
|
1307
|
+
</div>
|
|
1308
|
+
<div class="ft-filter--values">
|
|
1309
|
+
${this.renderLevels()}
|
|
1310
|
+
</div>
|
|
1311
|
+
<slot class="ft-filter--slot"
|
|
1312
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1313
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1314
|
+
</div>
|
|
1315
|
+
`}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 Y`
|
|
1316
|
+
${this.raiseSelectedOptions&&e.length>0?Y`
|
|
1317
|
+
<ft-filter-level
|
|
1318
|
+
id="${this.id}"
|
|
1319
|
+
?multivalued=${this.multivalued}
|
|
1320
|
+
?disabled=${this.disabled}
|
|
1321
|
+
preventNavigation
|
|
1322
|
+
.options=${e}
|
|
1323
|
+
@change=${this.onChange}
|
|
1324
|
+
part="values selected-values"
|
|
1325
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1326
|
+
></ft-filter-level>
|
|
1327
|
+
<div class="ft-filter--separator">
|
|
1328
|
+
`:null}
|
|
1329
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1330
|
+
class="ft-filter--levels"
|
|
1331
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1332
|
+
${this.renderLevel(o,this.options)}
|
|
1333
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const r=(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(r,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1334
|
+
</ft-snap-scroll>
|
|
1335
|
+
`}renderLevel(t,e,i){return Y`
|
|
1336
|
+
<ft-filter-level
|
|
1337
|
+
class="${t}"
|
|
1338
|
+
id="${this.id}"
|
|
1339
|
+
.filter="${this.filter}"
|
|
1340
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1341
|
+
?multivalued=${this.multivalued}
|
|
1342
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1343
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1344
|
+
.parent=${i}
|
|
1345
|
+
.options=${e}
|
|
1346
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1347
|
+
@change=${this.onChange}
|
|
1348
|
+
@go-back=${this.goBack}
|
|
1349
|
+
@display-level=${this.onDisplayLevel}
|
|
1350
|
+
part="values available-values"
|
|
1351
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1352
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1353
|
+
></ft-filter-level>
|
|
1354
|
+
`}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;this.dispatchEvent(new gn(this.selectedValues)),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)}}xn.elementDefinitions={"ft-button":Ar,"ft-filter-level":on,"ft-snap-scroll":an,"ft-typography":Ao},xn.styles=bn,yn([n({type:String})],xn.prototype,"id",void 0),yn([n({type:String})],xn.prototype,"label",void 0),yn([n({type:String})],xn.prototype,"filterPlaceHolder",void 0),yn([n({type:String})],xn.prototype,"clearButtonLabel",void 0),yn([n({type:String})],xn.prototype,"moreValuesButtonLabel",void 0),yn([n({type:String})],xn.prototype,"noValuesLabel",void 0),yn([p([])],xn.prototype,"options",void 0),yn([n({type:Boolean})],xn.prototype,"multivalued",void 0),yn([n({type:Boolean})],xn.prototype,"disabled",void 0),yn([n({type:Boolean})],xn.prototype,"raiseSelectedOptions",void 0),yn([n({type:Number})],xn.prototype,"displayedValuesLimit",void 0),yn([n({type:Boolean})],xn.prototype,"hideClearButton",void 0),yn([a(".ft-filter--slot")],xn.prototype,"slotElement",void 0),yn([a(".ft-filter--container")],xn.prototype,"container",void 0),yn([a(".ft-filter--values")],xn.prototype,"valuesContainer",void 0),yn([a(".ft-filter--levels")],xn.prototype,"levelsContainer",void 0),yn([a(".ft-filter--levels ft-filter-level:last-child")],xn.prototype,"lastLevel",void 0),yn([a(".ft-filter--filter input")],xn.prototype,"filterInput",void 0),yn([function(t){return l({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")],xn.prototype,"levels",void 0),yn([s()],xn.prototype,"withScroll",void 0),yn([s()],xn.prototype,"filter",void 0),yn([s()],xn.prototype,"slideIn",void 0),yn([s()],xn.prototype,"slideOut",void 0);var mn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class wn extends kt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return Y`
|
|
1355
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1356
|
+
`}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}))}}wn.elementDefinitions={},mn([n({type:String})],wn.prototype,"label",void 0),mn([n({type:Object,converter:t=>t})],wn.prototype,"value",void 0),mn([n({type:Boolean,reflect:!0})],wn.prototype,"selected",void 0),mn([n({type:Object})],wn.prototype,"subOptions",void 0),mn([p({})],wn.prototype,"renderOption",void 0),mn([a(".ft-filter-option--slot")],wn.prototype,"slotElement",void 0),d("ft-filter")(xn),d("ft-filter-option")(wn);var $n=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class On extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const kn=Symbol("registerInterval");class Sn extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[kn]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[kn]):this.dispatchEvent(new On)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=kn,$n([s()],i.prototype,"stateManager",void 0),i}(li)){}function Cn(t){return t.rootNodes.map((t=>jn(t)))}function jn(t){return{label:t.label,value:t.value,selected:t.selected,subOptions:t.childNodes.map((t=>jn(t)))}}const En=w`
|
|
1357
|
+
`,Nn=w`
|
|
1358
|
+
`,Mn=ci.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Rn{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Mn.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?Rn.build(t):null!==(e=Rn.API)&&void 0!==e?e:Rn.API=Rn.build()}static await(t){return new Promise((e=>{let i=Rn.get(t);if(i)e(i);else{const o=Mn.subscribe((()=>{i=Rn.get(t),i&&(o(),e(i))}))}}))}}var zn;const An=Symbol("clearAfterUnitTest");class Bn{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[zn]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=Mn.getState().uiLocale,Mn.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Mn.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new jt(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}zn=An,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Bn(Rn.get));const Un=window.FluidTopicsI18nService;var Pn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Fn extends kt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Rn.get(),this.cache=new i,this.cleanSessionDebouncer=new o}render(){return Y`
|
|
1359
|
+
<slot></slot>
|
|
1360
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Mn.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Mn.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Mn.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Mn.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Mn.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Mn.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Mn.actions.setSession(this.session),t.has("availableUiLocales")&&Mn.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Un.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Fn.elementDefinitions={},Fn.styles=Nn,Pn([n()],Fn.prototype,"baseUrl",void 0),Pn([n()],Fn.prototype,"apiIntegrationIdentifier",void 0),Pn([n()],Fn.prototype,"uiLocale",void 0),Pn([p([])],Fn.prototype,"availableUiLocales",void 0),Pn([n({type:Boolean})],Fn.prototype,"editorMode",void 0),Pn([n({type:Boolean})],Fn.prototype,"noCustom",void 0),Pn([n({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Fn.prototype,"noCustomComponent",void 0),Pn([n({type:Boolean})],Fn.prototype,"withManualResources",void 0),Pn([p([])],Fn.prototype,"messageContexts",void 0),Pn([p(void 0)],Fn.prototype,"session",void 0),Pn([n({type:Object})],Fn.prototype,"apiProvider",void 0),d("ft-app-context")(Fn);const Ln=Symbol("i18nProperties"),Dn=Symbol("i18nUnsubs");function In(t){var e;return e=Dn,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var o;if("string"==typeof t)return Un.resolveMessage(t,e,...i);const r=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return Un.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Ln])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[Ln])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ln]&&new Set([...this[Ln].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Dn].has(t)||this[Dn].set(t,Un.subscribe(t,(()=>this.onI18nUpdate(t)))),Un.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Dn].forEach((t=>t())),this[Dn].clear()}}}class Tn extends(In(kt)){}class _n extends(In(li)){}var Wn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Hn extends Tn{render(){return this.key&&this.context?Y`
|
|
1361
|
+
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
1362
|
+
`:tt}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Hn.elementDefinitions={},Hn.styles=En,Wn([n()],Hn.prototype,"context",void 0),Wn([n()],Hn.prototype,"key",void 0),Wn([p([])],Hn.prototype,"args",void 0),Wn([n()],Hn.prototype,"defaultMessage",void 0);class Kn{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>Un.resolveMessage(this.name,e,...t)})}static build(t){return new Kn(t)}static fromGwt(t){return new Kn(t)}}d("ft-i18n")(Hn);const Vn=Kn.build("designedSearchFacet");var Zn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class qn extends(In(Sn)){constructor(){super(...arguments),this.facetId="",this.maxValues=7,this.facets=[]}setSearchStateManager(t){super.setSearchStateManager(t),this.facetId&&t.addFacet(this.facetId),this.addI18nContext(Vn),this.addStore(Mn)}render(){let t=this.facets.find((t=>t.key==this.facetId));return t?Y`
|
|
1363
|
+
<div class="ft-search-facet--label">
|
|
1364
|
+
<ft-typography variant="button">${t.label}</ft-typography>
|
|
1365
|
+
</div>
|
|
1366
|
+
<ft-filter
|
|
1367
|
+
part="filter"
|
|
1368
|
+
.exportpartsPrefixes=${["filter"]}
|
|
1369
|
+
id="${this.facetId}"
|
|
1370
|
+
?multivalued=${t.multiSelectionable}
|
|
1371
|
+
raiseSelectedOptions
|
|
1372
|
+
.options=${Cn(t)}
|
|
1373
|
+
.displayedValuesLimit=${this.maxValues}
|
|
1374
|
+
filterPlaceHolder="${Vn.messages.filterInputPlaceHolder(t.label)}"
|
|
1375
|
+
clearButtonLabel="${Vn.messages.clearFilterButton()}"
|
|
1376
|
+
moreValuesButtonLabel="${Vn.messages.displayMoreFilterValuesButton()}"
|
|
1377
|
+
noValuesLabel="${Vn.messages.noFilterValuesAvailable()}"
|
|
1378
|
+
@change=${this.onFacetValueSelected}
|
|
1379
|
+
></ft-filter>
|
|
1380
|
+
`:!this.facetId&&this.editorMode?Y`${Vn.messages.noMetadataSelected()}`:tt}updated(t){var e;super.updated(t),t.has("facetId")&&(null===(e=this.stateManager)||void 0===e||e.replaceFacet(t.get("facetId"),this.facetId))}onFacetValueSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setFilter(this.facetId,t.detail)}}qn.elementDefinitions={"ft-filter":xn,"ft-typography":Ao},qn.styles=pi,Zn([n()],qn.prototype,"facetId",void 0),Zn([n({type:Number})],qn.prototype,"maxValues",void 0),Zn([si({store:"search"})],qn.prototype,"request",void 0),Zn([si({store:"search"})],qn.prototype,"facets",void 0),Zn([si({store:Mn.name})],qn.prototype,"editorMode",void 0),d("ft-search-facet")(qn),t.FtSearchFacet=qn,t.FtSearchFacetCssVariables={},t.styles=pi,Object.defineProperty(t,"W",{value:!0})}({});
|