@fluid-topics/ft-reader-context 0.3.15 → 0.3.16

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 CHANGED
@@ -35,7 +35,6 @@ import "@fluid-topics/public-api/dist/fluidtopics.min.js"
35
35
  import "@fluid-topics/ft-reader-context"
36
36
  import "@fluid-topics/ft-reader-toc"
37
37
  import "@fluid-topics/ft-reader-content"
38
- import "@fluid-topics/ft-reader-current-page-toc"
39
38
 
40
39
  function render() {
41
40
  return html`
@@ -46,7 +45,7 @@ function render() {
46
45
  >
47
46
  <ft-reader-toc></ft-reader-toc>
48
47
  <ft-reader-content></ft-reader-content>
49
- <ft-reader-current-page-toc></ft-reader-current-page-toc>
48
+ <ft-reader-toc scope="current-page"></ft-reader-toc>
50
49
  </ft-reader-context>
51
50
  `
52
51
  }
@@ -73,7 +72,7 @@ function render() {
73
72
  overflow: auto;
74
73
  }
75
74
 
76
- ft-reader-toc, ft-reader-current-page-toc {
75
+ ft-reader-toc {
77
76
  flex-shrink: 0;
78
77
  flex-grow: 0;
79
78
  width: 20%;
@@ -84,7 +83,7 @@ function render() {
84
83
  flex-grow: 1;
85
84
  }
86
85
 
87
- ft-reader-current-page-toc[empty] {
86
+ ft-reader-toc[scope="current-page"][empty] {
88
87
  display: none;
89
88
  }
90
89
 
@@ -95,13 +94,12 @@ function render() {
95
94
  mapId="<Structured publication identifier>">
96
95
  <ft-reader-toc></ft-reader-toc>
97
96
  <ft-reader-content></ft-reader-content>
98
- <ft-reader-current-page-toc></ft-reader-current-page-toc>
97
+ <ft-reader-toc scope="current-page"></ft-reader-toc>
99
98
  </ft-reader-context>
100
99
 
101
100
  <script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/dist/fluidtopics.min.js"></script>
102
101
  <script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/ft-reader-context/build/ft-reader-context.min.js"></script>
103
102
  <script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/ft-reader-toc/build/ft-reader-toc.min.js"></script>
104
- <script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/ft-reader-current-page-toc/build/ft-reader-current-page-toc.min.js"></script>
105
103
  <script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/ft-reader-content/build/ft-reader-content.min.js"></script>
106
104
  </body>
107
105
  </html>
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
16
16
  */
17
- if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,n=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,u=new WeakMap;let c;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 u=r.prototype.attributeChangedCallback,c=new Set(r.observedAttributes||[]);h(r,c,u);const a={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:u,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,a),this._definitionsByClass.set(r,a);let l=i.call(n,t);l||(l=f(t),e.call(n,t,l)),this===window.customElements&&(s.set(r,a),a.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,a,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,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 n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=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 a=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!a(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),a(e)||(e=u.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 n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):o.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.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)}},h=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o,r),i.call(this,o,t,r)}else n.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},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)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),c=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)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const w=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&u.set(t,this),b.pop(),t}};w(ShadowRoot,"createElement",document),w(ShadowRoot,"importNode",document),w(Element,"insertAdjacentHTML");const y=(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(y(Element,"innerHTML"),y(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 n=e.call(this,...i);return t.set(n,this),n},i.forEach((e=>{const i=window.ElementInternals.prototype,n=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${n} on 'ElementInternals': The target element is not a form-associated custom element.`);n?.call(this,...e)}}));class n extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,i)=>{const n=t.getAttribute("name"),r=e.get(n)||[];this[+i]=t,r.push(t),e.set(n,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new n(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 o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,i,n)=>{try{e.bind(window.customElements)(t,i,n)}catch(e){console.warn(t,i,n,e)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
17
+ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,n=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap;let u;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 a=r.prototype.attributeChangedCallback,u=new Set(r.observedAttributes||[]);h(r,u,a);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:u};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let l=i.call(n,t);l||(l=f(t),e.call(n,t,l)),this===window.customElements&&(s.set(r,c),c.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,c,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,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 n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=u;if(e)return u=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,l=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=a.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 n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):o.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.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)}},h=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o,r),i.call(this,o,t,r)}else n.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},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)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),u=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)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const w=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};w(ShadowRoot,"createElement",document),w(ShadowRoot,"importNode",document),w(Element,"insertAdjacentHTML");const y=(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(y(Element,"innerHTML"),y(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 n=e.call(this,...i);return t.set(n,this),n},i.forEach((e=>{const i=window.ElementInternals.prototype,n=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${n} on 'ElementInternals': The target element is not a form-associated custom element.`);n?.call(this,...e)}}));class n extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,i)=>{const n=t.getAttribute("name"),r=e.get(n)||[];this[+i]=t,r.push(t),e.set(n,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new n(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 o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,i,n)=>{try{e.bind(window.customElements)(t,i,n)}catch(e){console.warn(t,i,n,e)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -29,24 +29,24 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
29
29
  * @license
30
30
  * Copyright 2019 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */,u=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),a=new WeakMap;class l{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)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(u&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}}const f=t=>new l("string"==typeof t?t:t+"",void 0,c),h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>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[n+1]),t[0]);return new l(i,t,c)},d=(t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},v=u?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(t):t
32
+ */,a=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),c=new WeakMap;class l{constructor(t,e,i){if(this._$cssResult$=!0,i!==u)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(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=c.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&c.set(e,t))}return t}toString(){return this.cssText}}const f=t=>new l("string"==typeof t?t:t+"",void 0,u),h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>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[n+1]),t[0]);return new l(i,t,u)},d=(t,e)=>{a?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},v=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(t):t
33
33
  /**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */;var p;const b=window.trustedTypes,w=b?b.emptyScript:"",y=window.reactiveElementPolyfillSupport,m={toAttribute(t,e){switch(e){case Boolean:t=t?w: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}},g=(t,e)=>e!==t&&(e==e||t==t),x={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g};class O 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 n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=x){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,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}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(v(t))}else void 0!==t&&e.push(v(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 d(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=x){var n,r;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const s=(null!==(r=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:m.toAttribute)(e,i.type);this._$El=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var i,n;const r=this.constructor,o=r._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=r.getPropertyOptions(o),s=t.converter,u=null!==(n=null!==(i=null==s?void 0:s.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==n?n:m.fromAttribute;this._$El=o,this[o]=u(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||g)(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))):n=!1),!this.isUpdatePending&&n&&(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){}}
37
+ */;var p;const b=window.trustedTypes,w=b?b.emptyScript:"",y=window.reactiveElementPolyfillSupport,m={toAttribute(t,e){switch(e){case Boolean:t=t?w: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}},g=(t,e)=>e!==t&&(e==e||t==t),x={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g};class O 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 n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=x){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,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}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(v(t))}else void 0!==t&&e.push(v(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 d(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=x){var n,r;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const s=(null!==(r=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:m.toAttribute)(e,i.type);this._$El=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var i,n;const r=this.constructor,o=r._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=r.getPropertyOptions(o),s=t.converter,a=null!==(n=null!==(i=null==s?void 0:s.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==n?n:m.fromAttribute;this._$El=o,this[o]=a(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||g)(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))):n=!1),!this.isUpdatePending&&n&&(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){}}
38
38
  /**
39
39
  * @license
40
40
  * Copyright 2017 Google LLC
41
41
  * SPDX-License-Identifier: BSD-3-Clause
42
42
  */
43
- var E;O.finalized=!0,O.elementProperties=new Map,O.elementStyles=[],O.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:O}),(null!==(p=globalThis.reactiveElementVersions)&&void 0!==p?p:globalThis.reactiveElementVersions=[]).push("1.3.4");const j=globalThis.trustedTypes,N=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,S="?"+R,C=`<${S}>`,M=document,A=(t="")=>M.createComment(t),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,F=/>/g,k=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),P=/'/g,L=/"/g,_=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),K=new WeakMap,H=M.createTreeWalker(M,129,null,!1);class z{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,u=this.parts,[c,a]=((t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=$;for(let e=0;e<i;e++){const i=t[e];let u,c,a=-1,l=0;for(;l<i.length&&(s.lastIndex=l,c=s.exec(i),null!==c);)l=s.lastIndex,s===$?"!--"===c[1]?s=I:void 0!==c[1]?s=F:void 0!==c[2]?(_.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=k):void 0!==c[3]&&(s=k):s===k?">"===c[0]?(s=null!=r?r:$,a=-1):void 0===c[1]?a=-2:(a=s.lastIndex-c[2].length,u=c[1],s=void 0===c[3]?k:'"'===c[3]?L:P):s===L||s===P?s=k:s===I||s===F?s=$:(s=k,r=void 0);const f=s===k&&t[e+1].startsWith("/>")?" ":"";o+=s===$?i+C:a>=0?(n.push(u),i.slice(0,a)+"$lit$"+i.slice(a)+R+f):i+R+(-2===a?(n.push(void 0),e):f)}const u=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==N?N.createHTML(u):u,n]})(t,e);if(this.el=z.createElement(c,i),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=H.nextNode())&&u.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(R)){const i=a[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(R),e=/([.?@])?(.*)/.exec(i);u.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?X:"?"===e[1]?Y:"@"===e[1]?Q:q})}else u.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(_.test(n.tagName)){const t=n.textContent.split(R),e=t.length-1;if(e>0){n.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],A()),H.nextNode(),u.push({type:2,index:++r});n.append(t[e],A())}}}else if(8===n.nodeType)if(n.data===S)u.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(R,t+1));)u.push({type:7,index:r}),t+=R.length-1}r++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function J(t,e,i=t,n){var r,o,s,u;if(e===W)return e;let c=void 0!==n?null===(r=i._$Cl)||void 0===r?void 0:r[n]:i._$Cu;const a=T(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,i,n)),void 0!==n?(null!==(s=(u=i)._$Cl)&&void 0!==s?s:u._$Cl=[])[n]=c:i._$Cu=c),void 0!==c&&(e=J(t,c._$AS(t,e.values),c,n)),e}class V{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:n}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);H.currentNode=r;let o=H.nextNode(),s=0,u=0,c=n[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new Z(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new tt(o,this,t)),this.v.push(e),c=n[++u]}s!==(null==c?void 0:c.index)&&(o=H.nextNode(),s++)}return r}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,n){var r;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$C_=null===(r=null==n?void 0:n.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._$C_}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=J(this,t,e),T(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==W&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>U(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==D&&T(this._$AH)?this._$AA.nextSibling.data=t:this.k(M.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=z.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.m(i);else{const t=new V(r,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new z(t)),e}S(t){U(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new Z(this.j(A()),this.j(A()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$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._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class q{constructor(t,e,i,n,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=J(this,t,e,0),o=!T(t)||t!==this._$AH&&t!==W,o&&(this._$AH=t);else{const n=t;let s,u;for(t=r[0],s=0;s<r.length-1;s++)u=J(this,n[i+s],e,s),u===W&&(u=this._$AH[s]),o||(o=!T(u)||u!==this._$AH[s]),u===D?t=D:t!==D&&(t+=(null!=u?u:"")+r[s+1]),this._$AH[s]=u}o&&!n&&this.P(t)}P(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends q{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===D?void 0:t}}const G=j?j.emptyScript:"";class Y extends q{constructor(){super(...arguments),this.type=4}P(t){t&&t!==D?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class Q extends q{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=J(this,t,e,0))&&void 0!==i?i:D)===W)return;const n=this._$AH,r=t===D&&n!==D||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),o&&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 tt{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){J(this,t)}}const et=window.litHtmlPolyfillSupport;
43
+ var E;O.finalized=!0,O.elementProperties=new Map,O.elementStyles=[],O.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:O}),(null!==(p=globalThis.reactiveElementVersions)&&void 0!==p?p:globalThis.reactiveElementVersions=[]).push("1.3.4");const j=globalThis.trustedTypes,N=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,S="?"+R,C=`<${S}>`,M=document,A=(t="")=>M.createComment(t),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,k=/>/g,F=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),P=/'/g,L=/"/g,_=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),K=new WeakMap,H=M.createTreeWalker(M,129,null,!1);class z{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[u,c]=((t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=$;for(let e=0;e<i;e++){const i=t[e];let a,u,c=-1,l=0;for(;l<i.length&&(s.lastIndex=l,u=s.exec(i),null!==u);)l=s.lastIndex,s===$?"!--"===u[1]?s=I:void 0!==u[1]?s=k:void 0!==u[2]?(_.test(u[2])&&(r=RegExp("</"+u[2],"g")),s=F):void 0!==u[3]&&(s=F):s===F?">"===u[0]?(s=null!=r?r:$,c=-1):void 0===u[1]?c=-2:(c=s.lastIndex-u[2].length,a=u[1],s=void 0===u[3]?F:'"'===u[3]?L:P):s===L||s===P?s=F:s===I||s===k?s=$:(s=F,r=void 0);const f=s===F&&t[e+1].startsWith("/>")?" ":"";o+=s===$?i+C:c>=0?(n.push(a),i.slice(0,c)+"$lit$"+i.slice(c)+R+f):i+R+(-2===c?(n.push(void 0),e):f)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==N?N.createHTML(a):a,n]})(t,e);if(this.el=z.createElement(u,i),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=H.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(R)){const i=c[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(R),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?X:"?"===e[1]?Y:"@"===e[1]?Q:q})}else a.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(_.test(n.tagName)){const t=n.textContent.split(R),e=t.length-1;if(e>0){n.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],A()),H.nextNode(),a.push({type:2,index:++r});n.append(t[e],A())}}}else if(8===n.nodeType)if(n.data===S)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(R,t+1));)a.push({type:7,index:r}),t+=R.length-1}r++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function J(t,e,i=t,n){var r,o,s,a;if(e===W)return e;let u=void 0!==n?null===(r=i._$Cl)||void 0===r?void 0:r[n]:i._$Cu;const c=T(e)?void 0:e._$litDirective$;return(null==u?void 0:u.constructor)!==c&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===c?u=void 0:(u=new c(t),u._$AT(t,i,n)),void 0!==n?(null!==(s=(a=i)._$Cl)&&void 0!==s?s:a._$Cl=[])[n]=u:i._$Cu=u),void 0!==u&&(e=J(t,u._$AS(t,e.values),u,n)),e}class V{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:n}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);H.currentNode=r;let o=H.nextNode(),s=0,a=0,u=n[0];for(;void 0!==u;){if(s===u.index){let e;2===u.type?e=new Z(o,o.nextSibling,this,t):1===u.type?e=new u.ctor(o,u.name,u.strings,this,t):6===u.type&&(e=new tt(o,this,t)),this.v.push(e),u=n[++a]}s!==(null==u?void 0:u.index)&&(o=H.nextNode(),s++)}return r}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,n){var r;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$C_=null===(r=null==n?void 0:n.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._$C_}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=J(this,t,e),T(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==W&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>U(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==D&&T(this._$AH)?this._$AA.nextSibling.data=t:this.k(M.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=z.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.m(i);else{const t=new V(r,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new z(t)),e}S(t){U(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new Z(this.j(A()),this.j(A()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$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._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class q{constructor(t,e,i,n,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=J(this,t,e,0),o=!T(t)||t!==this._$AH&&t!==W,o&&(this._$AH=t);else{const n=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=J(this,n[i+s],e,s),a===W&&(a=this._$AH[s]),o||(o=!T(a)||a!==this._$AH[s]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}o&&!n&&this.P(t)}P(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends q{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===D?void 0:t}}const G=j?j.emptyScript:"";class Y extends q{constructor(){super(...arguments),this.type=4}P(t){t&&t!==D?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class Q extends q{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=J(this,t,e,0))&&void 0!==i?i:D)===W)return;const n=this._$AH,r=t===D&&n!==D||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),o&&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 tt{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){J(this,t)}}const et=window.litHtmlPolyfillSupport;
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2017 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- var it,nt;null==et||et(z,Z),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?E:globalThis.litHtmlVersions=[]).push("2.2.7");class rt extends O{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 n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new Z(e.insertBefore(A(),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 W}}rt.finalized=!0,rt._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:rt});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:rt}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.2");class st{static create(t,e,i){let n=t=>f(null!=t?t:i),r=h`var(${f(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>h`var(${f(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=h`var(${f(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>h`var(${f(t)}, ${n(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):f(null!=e?e:t.defaultValue),n=h`var(${f(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>h`var(${f(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}st.create("--ft-color-primary","COLOR","#2196F3"),st.create("--ft-color-primary-variant","COLOR","#1976D2"),st.create("--ft-color-secondary","COLOR","#FFCC80"),st.create("--ft-color-secondary-variant","COLOR","#F57C00"),st.create("--ft-color-surface","COLOR","#FFFFFF"),st.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-error","COLOR","#B00020"),st.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),st.create("--ft-color-opacity-high","NUMBER","1"),st.create("--ft-color-opacity-medium","NUMBER","0.74"),st.create("--ft-color-opacity-disabled","NUMBER","0.38"),st.create("--ft-color-on-primary","COLOR","#FFFFFF"),st.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),st.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),st.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),st.create("--ft-color-on-secondary","COLOR","#FFFFFF"),st.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),st.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),st.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),st.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),st.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),st.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),st.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),st.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),st.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),st.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),st.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),st.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),st.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),st.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),st.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),st.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),st.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),st.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),st.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),st.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),st.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),st.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),st.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),st.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),st.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),st.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.create("--ft-border-radius-S","SIZE","4px"),st.create("--ft-border-radius-M","SIZE","8px"),st.create("--ft-border-radius-L","SIZE","12px"),st.create("--ft-border-radius-XL","SIZE","16px"),st.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),st.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),st.create("--ft-transition-duration","UNKNOWN","250ms"),st.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");var ut=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ct extends(
49
+ var it,nt;null==et||et(z,Z),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?E:globalThis.litHtmlVersions=[]).push("2.2.7");class rt extends O{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 n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new Z(e.insertBefore(A(),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 W}}rt.finalized=!0,rt._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:rt});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:rt}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.2");class st{static create(t,e,i){let n=t=>f(null!=t?t:i),r=h`var(${f(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>h`var(${f(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=h`var(${f(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>h`var(${f(t)}, ${n(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):f(null!=e?e:t.defaultValue),n=h`var(${f(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>h`var(${f(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}st.create("--ft-color-primary","COLOR","#2196F3"),st.create("--ft-color-primary-variant","COLOR","#1976D2"),st.create("--ft-color-secondary","COLOR","#FFCC80"),st.create("--ft-color-secondary-variant","COLOR","#F57C00"),st.create("--ft-color-surface","COLOR","#FFFFFF"),st.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-error","COLOR","#B00020"),st.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),st.create("--ft-color-opacity-high","NUMBER","1"),st.create("--ft-color-opacity-medium","NUMBER","0.74"),st.create("--ft-color-opacity-disabled","NUMBER","0.38"),st.create("--ft-color-on-primary","COLOR","#FFFFFF"),st.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),st.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),st.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),st.create("--ft-color-on-secondary","COLOR","#FFFFFF"),st.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),st.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),st.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),st.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),st.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),st.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),st.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),st.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),st.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),st.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),st.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),st.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),st.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),st.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),st.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),st.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),st.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),st.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),st.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),st.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),st.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),st.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),st.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),st.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),st.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),st.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),st.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.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)"),st.create("--ft-border-radius-S","SIZE","4px"),st.create("--ft-border-radius-M","SIZE","8px"),st.create("--ft-border-radius-L","SIZE","12px"),st.create("--ft-border-radius-XL","SIZE","16px"),st.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),st.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),st.create("--ft-transition-duration","UNKNOWN","250ms"),st.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");var at=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ut extends(
50
50
  /**
51
51
  * @license
52
52
  * Copyright 2021 Google LLC
@@ -57,7 +57,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
57
57
  <style>${t}</style>
58
58
  `))}
59
59
  ${this.getTemplate()}
60
- `}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,n,r,o,s;const u=t=>null!=t&&t.trim().length>0,c=t.filter(u).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const a=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===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(u).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const l=[...a.values()].flatMap((t=>c.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}contentAvailableCallback(t){}}function at(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];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 lt(t){return!!t&&!!t[Xt]}function ft(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)===Gt}(t)||Array.isArray(t)||!!t[qt]||!!t.constructor[qt]||wt(t)||yt(t))}function ht(t,e,i){void 0===i&&(i=!1),0===dt(t)?(i?Object.keys:Yt)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function dt(t){var e=t[Xt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:wt(t)?2:yt(t)?3:0}function vt(t,e){return 2===dt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pt(t,e,i){var n=dt(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function bt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function wt(t){return zt&&t instanceof Map}function yt(t){return Jt&&t instanceof Set}function mt(t){return t.o||t.t}function gt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Qt(t);delete e[Xt];for(var i=Yt(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function xt(t,e){return void 0===e&&(e=!1),Et(t)||lt(t)||!ft(t)||(dt(t)>1&&(t.set=t.add=t.clear=t.delete=Ot),Object.freeze(t),e&&ht(t,(function(t,e){return xt(e,!0)}),!0)),t}function Ot(){at(2)}function Et(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function jt(t){var e=te[t];return e||at(18,t),e}function Nt(){return Kt}function Rt(t,e){e&&(jt("Patches"),t.u=[],t.s=[],t.v=e)}function St(t){Ct(t),t.p.forEach(At),t.p=null}function Ct(t){t===Kt&&(Kt=t.l)}function Mt(t){return Kt={p:[],l:Kt,h:t,m:!0,_:0}}function At(t){var e=t[Xt];0===e.i||1===e.i?e.j():e.O=!0}function Tt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||jt("ES5").S(e,t,n),n?(i[Xt].P&&(St(e),at(4)),ft(t)&&(t=Ut(e,t),e.l||It(e,t)),e.u&&jt("Patches").M(i[Xt].t,t,e.u,e.s)):t=Ut(e,i,[]),St(e),e.u&&e.v(e.u,e.s),t!==Zt?t:void 0}function Ut(t,e,i){if(Et(e))return e;var n=e[Xt];if(!n)return ht(e,(function(r,o){return $t(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return It(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=gt(n.k):n.o;ht(3===n.i?new Set(r):r,(function(e,o){return $t(t,n,r,e,o,i)})),It(t,r,!1),i&&t.u&&jt("Patches").R(n,i,t.u,t.s)}return n.o}function $t(t,e,i,n,r,o){if(lt(r)){var s=Ut(t,r,o&&e&&3!==e.i&&!vt(e.D,n)?o.concat(n):void 0);if(pt(i,n,s),!lt(s))return;t.m=!1}if(ft(r)&&!Et(r)){if(!t.h.F&&t._<1)return;Ut(t,r),e&&e.A.l||It(t,r)}}function It(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&xt(e,i)}function Ft(t,e){var i=t[Xt];return(i?mt(i):t)[e]}function kt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Pt(t){t.P||(t.P=!0,t.l&&Pt(t.l))}function Lt(t){t.o||(t.o=gt(t.t))}function _t(t,e,i){var n=wt(e)?jt("MapSet").N(e,i):yt(e)?jt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Nt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ee;i&&(r=[n],o=ie);var s=Proxy.revocable(r,o),u=s.revoke,c=s.proxy;return n.k=c,n.j=u,c}(e,i):jt("ES5").J(e,i);return(i?i.A:Nt()).p.push(n),n}function Bt(t){return lt(t)||at(22,t),function t(e){if(!ft(e))return e;var i,n=e[Xt],r=dt(e);if(n){if(!n.P&&(n.i<4||!jt("ES5").K(n)))return n.t;n.I=!0,i=Wt(e,r),n.I=!1}else i=Wt(e,r);return ht(i,(function(e,r){n&&function(t,e){return 2===dt(t)?t.get(e):t[e]}(n.t,e)===r||pt(i,e,t(r))})),3===r?new Set(i):i}(t)}function Wt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gt(t)}ut([n()],ct.prototype,"exportpartsPrefix",void 0),ut([function(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)},...null!=e?e:{}})}([])],ct.prototype,"exportpartsPrefixes",void 0),h`
60
+ `}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,n,r,o,s;const a=t=>null!=t&&t.trim().length>0,u=t.filter(a).map((t=>t.trim()));if(0===u.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===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>u.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}contentAvailableCallback(t){}}function ct(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];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 lt(t){return!!t&&!!t[Xt]}function ft(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)===Gt}(t)||Array.isArray(t)||!!t[qt]||!!t.constructor[qt]||wt(t)||yt(t))}function ht(t,e,i){void 0===i&&(i=!1),0===dt(t)?(i?Object.keys:Yt)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function dt(t){var e=t[Xt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:wt(t)?2:yt(t)?3:0}function vt(t,e){return 2===dt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pt(t,e,i){var n=dt(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function bt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function wt(t){return zt&&t instanceof Map}function yt(t){return Jt&&t instanceof Set}function mt(t){return t.o||t.t}function gt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Qt(t);delete e[Xt];for(var i=Yt(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function xt(t,e){return void 0===e&&(e=!1),Et(t)||lt(t)||!ft(t)||(dt(t)>1&&(t.set=t.add=t.clear=t.delete=Ot),Object.freeze(t),e&&ht(t,(function(t,e){return xt(e,!0)}),!0)),t}function Ot(){ct(2)}function Et(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function jt(t){var e=te[t];return e||ct(18,t),e}function Nt(){return Kt}function Rt(t,e){e&&(jt("Patches"),t.u=[],t.s=[],t.v=e)}function St(t){Ct(t),t.p.forEach(At),t.p=null}function Ct(t){t===Kt&&(Kt=t.l)}function Mt(t){return Kt={p:[],l:Kt,h:t,m:!0,_:0}}function At(t){var e=t[Xt];0===e.i||1===e.i?e.j():e.O=!0}function Tt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||jt("ES5").S(e,t,n),n?(i[Xt].P&&(St(e),ct(4)),ft(t)&&(t=Ut(e,t),e.l||It(e,t)),e.u&&jt("Patches").M(i[Xt].t,t,e.u,e.s)):t=Ut(e,i,[]),St(e),e.u&&e.v(e.u,e.s),t!==Zt?t:void 0}function Ut(t,e,i){if(Et(e))return e;var n=e[Xt];if(!n)return ht(e,(function(r,o){return $t(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return It(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=gt(n.k):n.o;ht(3===n.i?new Set(r):r,(function(e,o){return $t(t,n,r,e,o,i)})),It(t,r,!1),i&&t.u&&jt("Patches").R(n,i,t.u,t.s)}return n.o}function $t(t,e,i,n,r,o){if(lt(r)){var s=Ut(t,r,o&&e&&3!==e.i&&!vt(e.D,n)?o.concat(n):void 0);if(pt(i,n,s),!lt(s))return;t.m=!1}if(ft(r)&&!Et(r)){if(!t.h.F&&t._<1)return;Ut(t,r),e&&e.A.l||It(t,r)}}function It(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&xt(e,i)}function kt(t,e){var i=t[Xt];return(i?mt(i):t)[e]}function Ft(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Pt(t){t.P||(t.P=!0,t.l&&Pt(t.l))}function Lt(t){t.o||(t.o=gt(t.t))}function _t(t,e,i){var n=wt(e)?jt("MapSet").N(e,i):yt(e)?jt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Nt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ee;i&&(r=[n],o=ie);var s=Proxy.revocable(r,o),a=s.revoke,u=s.proxy;return n.k=u,n.j=a,u}(e,i):jt("ES5").J(e,i);return(i?i.A:Nt()).p.push(n),n}function Bt(t){return lt(t)||ct(22,t),function t(e){if(!ft(e))return e;var i,n=e[Xt],r=dt(e);if(n){if(!n.P&&(n.i<4||!jt("ES5").K(n)))return n.t;n.I=!0,i=Wt(e,r),n.I=!1}else i=Wt(e,r);return ht(i,(function(e,r){n&&function(t,e){return 2===dt(t)?t.get(e):t[e]}(n.t,e)===r||pt(i,e,t(r))})),3===r?new Set(i):i}(t)}function Wt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gt(t)}at([n()],ut.prototype,"exportpartsPrefix",void 0),at([function(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)},...null!=e?e:{}})}([])],ut.prototype,"exportpartsPrefixes",void 0),h`
61
61
  .ft-no-text-select {
62
62
  -webkit-touch-callout: none;
63
63
  -webkit-user-select: none;
@@ -66,7 +66,19 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
66
66
  -ms-user-select: none;
67
67
  user-select: none;
68
68
  }
69
- `;var Dt,Kt,Ht="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),zt="undefined"!=typeof Map,Jt="undefined"!=typeof Set,Vt="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Zt=Ht?Symbol.for("immer-nothing"):((Dt={})["immer-nothing"]=!0,Dt),qt=Ht?Symbol.for("immer-draftable"):"__$immer_draftable",Xt=Ht?Symbol.for("immer-state"):"__$immer_state",Gt=""+Object.prototype.constructor,Yt="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Qt=Object.getOwnPropertyDescriptors||function(t){var e={};return Yt(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},te={},ee={get:function(t,e){if(e===Xt)return t;var i=mt(t);if(!vt(i,e))return function(t,e,i){var n,r=kt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!ft(n)?n:n===Ft(t.t,e)?(Lt(t),t.o[e]=_t(t.A.h,n,t)):n},has:function(t,e){return e in mt(t)},ownKeys:function(t){return Reflect.ownKeys(mt(t))},set:function(t,e,i){var n=kt(mt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=Ft(mt(t),e),o=null==r?void 0:r[Xt];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(bt(i,r)&&(void 0!==i||vt(t.t,e)))return!0;Lt(t),Pt(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!==Ft(t.t,e)||e in t.t?(t.D[e]=!1,Lt(t),Pt(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=mt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){at(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){at(12)}},ie={};ht(ee,(function(t,e){ie[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ie.deleteProperty=function(t,e){return ie.set.call(this,t,e,void 0)},ie.set=function(t,e,i){return ee.set.call(this,t[0],e,i,t[0])};var ne=function(){function t(t){var e=this;this.g=Vt,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),u=1;u<n;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&at(6),void 0!==n&&"function"!=typeof n&&at(7),ft(t)){var u=Mt(e),c=_t(e,t,void 0),a=!0;try{s=i(c),a=!1}finally{a?St(u):Ct(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Rt(u,n),Tt(t,u)}),(function(t){throw St(u),t})):(Rt(u,n),Tt(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===Zt&&(s=void 0),e.F&&xt(s,!0),n){var l=[],f=[];jt("Patches").M(t,s,l,f),n(l,f)}return s}at(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,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){ft(t)||at(8),lt(t)&&(t=Bt(t));var e=Mt(this),i=_t(this,t,void 0);return i[Xt].C=!0,Ct(e),i},e.finishDraft=function(t,e){var i=(t&&t[Xt]).A;return Rt(i,e),Tt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Vt&&at(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=jt("Patches").$;return lt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),re=new ne,oe=re.produce;re.produceWithPatches.bind(re),re.setAutoFreeze.bind(re),re.setUseProxies.bind(re),re.applyPatches.bind(re),re.createDraft.bind(re),re.finishDraft.bind(re);var se=oe;function ue(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ce(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ae(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ce(Object(i),!0).forEach((function(e){ue(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function le(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 fe="function"==typeof Symbol&&Symbol.observable||"@@observable",he=function(){return Math.random().toString(36).substring(7).split("").join(".")},de={INIT:"@@redux/INIT"+he(),REPLACE:"@@redux/REPLACE"+he(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+he()}};function ve(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 pe(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(le(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(le(1));return i(pe)(t,e)}if("function"!=typeof t)throw new Error(le(2));var r=t,o=e,s=[],u=s,c=!1;function a(){u===s&&(u=s.slice())}function l(){if(c)throw new Error(le(3));return o}function f(t){if("function"!=typeof t)throw new Error(le(4));if(c)throw new Error(le(5));var e=!0;return a(),u.push(t),function(){if(e){if(c)throw new Error(le(6));e=!1,a();var i=u.indexOf(t);u.splice(i,1),s=null}}}function h(t){if(!ve(t))throw new Error(le(7));if(void 0===t.type)throw new Error(le(8));if(c)throw new Error(le(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=u,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(le(10));r=t,h({type:de.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(le(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[fe]=function(){return this},t}return h({type:de.INIT}),(n={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[fe]=v,n}function be(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:de.INIT}))throw new Error(le(12));if(void 0===i(void 0,{type:de.PROBE_UNKNOWN_ACTION()}))throw new Error(le(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},u=0;u<s.length;u++){var c=s[u],a=i[c],l=t[c],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(le(14));r[c]=f,n=n||f!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function we(){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 ye(){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),n=function(){throw new Error(le(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=we.apply(void 0,o)(i.dispatch),ae(ae({},i),{},{dispatch:n})}}}function me(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var ge=me();ge.withExtraArgument=me;var xe,Oe=ge,Ee=(xe=function(t,e){return xe=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])},xe(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}xe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),je=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Ne=Object.defineProperty,Re=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Me=function(t,e,i){return e in t?Ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ae=function(t,e){for(var i in e||(e={}))Se.call(e,i)&&Me(t,i,e[i]);if(Re)for(var n=0,r=Re(e);n<r.length;n++){i=r[n];Ce.call(e,i)&&Me(t,i,e[i])}return t},Te="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?we:we.apply(null,arguments)};var Ue=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ee(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,je([void 0],t[0].concat(this)))):new(e.bind.apply(e,je([void 0],t.concat(this))))},e}(Array);function $e(t){return ft(t)?se(t,(function(){})):t}function Ie(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Ue;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Oe.withExtraArgument(i.extraArgument)):n.push(Oe));return n}(t)}}function Fe(t){var e,i=Ie(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,u=void 0===s?i():s,c=n.devTools,a=void 0===c||c,l=n.preloadedState,f=void 0===l?void 0:l,h=n.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;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}(o))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=be(o)}var v=u;"function"==typeof v&&(v=v(i));var p=ye.apply(void 0,v),b=we;a&&(b=Te(Ae({trace:!1},"object"==typeof a&&a)));var w=[p];return Array.isArray(d)?w=je([p],d):"function"==typeof d&&(w=d(w)),pe(e,f,b.apply(void 0,w))}function ke(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ae(Ae({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 Pe(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Le(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:$e(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},u={},c={};function a(){var e="function"==typeof t.extraReducers?Pe(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,c=e[2],a=void 0===c?void 0:c,l=Ae(Ae({},r),u);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?Pe(e):[e,i,n],s=o[0],u=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return $e(t())};else{var a=$e(t);r=function(){return a}}function l(t,e){void 0===t&&(t=r());var i=je([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[c]),i.reduce((function(t,i){if(i){var n;if(lt(t))return void 0===(n=i(t,e))?t:n;if(ft(t))return se(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,s,a)}return o.forEach((function(t){var i,n,o=r[t],a=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,u[a]=i,c[t]=n?ke(a,n):ke(a)})),{name:e,reducer:function(t,e){return i||(i=a()),i(t,e)},actions:c,caseReducers:s,getInitialState:function(){return i||(i=a()),i.getInitialState()}}}var _e="listenerMiddleware";ke(_e+"/add"),ke(_e+"/removeAll"),ke(_e+"/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[Xt];return ee.get(e,t)},set:function(e){var i=this[Xt];ee.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Xt];if(!r.P)switch(r.i){case 5:n(r)&&Pt(r);break;case 4:i(r)&&Pt(r)}}}function i(t){for(var e=t.t,i=t.k,n=Yt(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==Xt){var s=e[o];if(void 0===s&&!vt(e,o))return!0;var u=i[o],c=u&&u[Xt];if(c?c.t!==s:!bt(u,s))return!0}}var a=!!e[Xt];return n.length!==Yt(e).length+(a?0:1)}function n(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 n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){te[t]||(te[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=Qt(i);delete o[Xt];for(var s=Yt(o),u=0;u<s.length;u++){var c=s[u];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Nt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,Xt,{value:o,writable:!0}),r},S:function(t,i,r){r?lt(i)&&i[Xt].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Xt];if(i){var r=i.t,o=i.k,s=i.D,u=i.i;if(4===u)ht(o,(function(e){e!==Xt&&(void 0!==r[e]||vt(r,e)?s[e]||t(o[e]):(s[e]=!0,Pt(i)))})),ht(r,(function(t){void 0!==o[t]||vt(o,t)||(s[t]=!1,Pt(i))}));else if(5===u){if(n(i)&&(Pt(i),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var a=r.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Be=(t,e)=>(i,n)=>{i.constructor.createProperty(n,{attribute:!1,hasChanged:null!=e?e:(t,e)=>!o(t,e)});const r=i;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(n,null!=t?t:t=>t[n])};class We extends ct{get store(){return this.internalStore}set store(t){this.internalStore=t,this.store&&this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,i)=>{this[i]=e(t,this)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()})),this.onStoreAvailable(),this.requestUpdate()}onStoreAvailable(){}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}}var De,Ke;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ke=null===(De=window.safari)||void 0===De?void 0:De.pushNotification)||void 0===Ke||Ke.toString());const He={setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setRenderBeforeFirst:(t,e)=>{t.renderBeforeFirst=e.payload},setRenderAfterLast:(t,e)=>{t.renderAfterLast=e.payload}};class ze{convertNodes(t){var e,i,n,r;const o={},s=new Set,u=new Set,c=[],a=(t,e,i)=>t.map((t=>{var n;t.page&&c.push(t.tocId);let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const l={...t,prettyUrl:r,depth:e,parentTocId:i,children:a(t.children,e+1,t.tocId)};return r&&(s.has(r)&&u.add(r),s.add(r)),o[t.tocId]=l,l})),l=a(null!=t?t:[],1),f=this.buildPages(c,o);let h={};return 0===f.length?f.push({number:1,title:null!==(i=null===(e=l[0])||void 0===e?void 0:e.title)&&void 0!==i?i:"",rootTocId:null!==(r=null===(n=l[0])||void 0===n?void 0:n.tocId)&&void 0!==r?r:"root",toc:[],topics:this.tocIds(l),hiddenTopics:[]}):h=this.indexPages(f),{toc:l,nodeByTocId:o,duplicatedPrettyUrls:u,pages:f,pageByTocId:h}}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildPages(t,e){return t.map((t=>e[t])).map(((t,i)=>{var n,r,o,s,u;const c={number:i+1,title:t.title,rootTocId:t.tocId,toc:(null===(n=t.page)||void 0===n?void 0:n.onItsOwn)?[]:t.children,topics:[],hiddenTopics:[]},a=(t,e)=>(e?c.topics:c.hiddenTopics).push(t),l=null!==(o=null===(r=t.page)||void 0===r?void 0:r.parentsVisibility)&&void 0!==o?o:[];return this.buildBreadcrumb(t,e).forEach(((t,e)=>{a(t,l[e])})),a(t.tocId,null===(s=t.page)||void 0===s?void 0:s.visible),(null===(u=t.page)||void 0===u?void 0:u.onItsOwn)||c.topics.push(...this.tocIds(t.children)),c}))}buildBreadcrumb(t,e){const i=[];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=e[t.parentTocId];return i}indexPages(t){const e={};for(let i of t)for(let t of[...i.topics,...i.hiddenTopics])e[t]||(e[t]=i);return e}}class Je{constructor(t,e,i,n){this.converter=t,this.api=e,this.baseUrl=i,this.mapId=n,this.topics={},this.topicContents={},i.endsWith("/")||(this.baseUrl=i+"/")}static build(t,e,i){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");return new Je(new ze,new window.fluidtopics.FluidTopicsApi(t,e,!0),t,i)}clear(){this.map=void 0,this.enrichedToc=void 0,this.topics={},this.topicContents={}}getMap(){return this.loadIfNeeded((()=>this.map),(t=>this.map=t),(()=>this.api.getMap(this.mapId)))}getEnrichedToc(){return this.loadIfNeeded((()=>this.enrichedToc),(t=>this.enrichedToc=t),(()=>this.api.getTableOfContent(this.mapId).then((t=>this.converter.convertNodes(t)))))}async getToc(){return(await this.getEnrichedToc()).toc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeOrThrow(t){if("boolean"==typeof this.enrichedToc)throw new Error((this.enrichedToc," still loading"));return this.enrichedToc.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.loadIfNeeded((()=>this.topics[t]),(e=>this.topics[t]=e),(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.loadIfNeeded((()=>this.topicContents[t]),(e=>this.topicContents[t]=e),(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.baseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o="object"==typeof this.enrichedToc?this.enrichedToc:void 0,s=null==o?void 0:o.pageByTocId[t],u=null==o?void 0:o.nodeByTocId[t],c=null==u?void 0:u.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==u?void 0:u.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=c?c.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=c?c:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}async loadIfNeeded(t,e,i){for(void 0===t()&&(e(!0),e(await i().catch((t=>(console.error(t),!1)))));!0===t();)await s(10);const n=t();if(!1===n)throw new Error("Could not load data");return n}}class Ve{constructor(t,i){this.store=t,this.slice=i,this.reloadDebouncer=new e(10)}static build(t){const e=(t=>Le({name:"ft-reader-"+t,initialState:{baseUrl:"",apiIntegrationIdentifier:"ft-reader",visibleTopics:[],renderBeforeFirst:2,renderAfterLast:3},reducers:He}))(t.trim()||"context");return new Ve(function(t,e,i){window.ftReduxStores||(window.ftReduxStores={});const n=e||t.name;return window.ftReduxStores[n]||(window.ftReduxStores[n]=Fe({reducer:t.reducer})),window.ftReduxStores[n]}(e),e)}setBaseUrl(t){this.setRequiredStateField("baseUrl","setBaseUrl",t)}setApiIntegrationIdentifier(t){this.setRequiredStateField("apiIntegrationIdentifier","setApiIntegrationIdentifier",t)}setMapId(t){this.setRequiredStateField("mapId","setMapId",t)}setRenderBeforeFirst(t){this.dispatch(this.slice.actions.setRenderBeforeFirst(t))}setRenderAfterLast(t){this.dispatch(this.slice.actions.setRenderAfterLast(t))}setVisibleTopics(t){this.dispatch(this.slice.actions.setVisibleTopics(t))}async navigateToTopic(t,e,i){for(;null==this.service;)await s(5);let n=null!=i?await this.service.getPage(i):await this.service.getPageByTocId(t);this.dispatch(this.slice.actions.setCurrentPage(n),this.slice.actions.setScrollTarget({tocId:t,section:e}))}async navigateToPage(t){for(;null==this.service;)await s(5);let e=await this.service.getPage(t);this.dispatch(this.slice.actions.setCurrentPage(e))}scrollDone(){this.dispatch(this.slice.actions.setScrollTarget({}))}setRequiredStateField(t,e,i){this.store.getState()[t]!==i&&(this.dispatch(this.slice.actions[e](i)),this.clearAll(),this.reload())}clearAll(){this.dispatch(this.slice.actions.setMap(void 0),this.slice.actions.setToc(void 0),this.slice.actions.setCurrentPage(void 0))}reload(){const t=this.store.getState();t.baseUrl&&t.apiIntegrationIdentifier&&t.mapId?this.service=Je.build(t.baseUrl,t.apiIntegrationIdentifier,t.mapId):this.service=void 0,this.reloadDebouncer.run((async()=>{this.reloadMap(),this.reloadToc()}))}async reloadMap(){var t;const e=await(null===(t=this.service)||void 0===t?void 0:t.getMap());this.dispatch(this.slice.actions.setMap(e))}async reloadToc(){var t;const e=await(null===(t=this.service)||void 0===t?void 0:t.getToc());this.dispatch(this.slice.actions.setToc(e))}dispatch(...t){for(let e of t)this.store.dispatch(e)}}const Ze=h`
70
- `;var qe=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Xe extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class Ge extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Ye extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}const Qe=t=>e=>+(null!=e?e:"NaN")>0?+e:t;class ti extends We{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-reader",this.renderBeforeFirst=2,this.renderAfterLast=3,this.visibleTopics=[],this.navigationDebouncer=new e(5)}render(){return B`
69
+ `,h`
70
+ .ft-word-wrap {
71
+ white-space: normal;
72
+ word-wrap: break-word;
73
+ -ms-word-break: break-all;
74
+ word-break: break-all;
75
+ word-break: break-word;
76
+ -ms-hyphens: auto;
77
+ -moz-hyphens: auto;
78
+ -webkit-hyphens: auto;
79
+ hyphens: auto
80
+ }
81
+ `;var Dt,Kt,Ht="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),zt="undefined"!=typeof Map,Jt="undefined"!=typeof Set,Vt="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Zt=Ht?Symbol.for("immer-nothing"):((Dt={})["immer-nothing"]=!0,Dt),qt=Ht?Symbol.for("immer-draftable"):"__$immer_draftable",Xt=Ht?Symbol.for("immer-state"):"__$immer_state",Gt=""+Object.prototype.constructor,Yt="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Qt=Object.getOwnPropertyDescriptors||function(t){var e={};return Yt(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},te={},ee={get:function(t,e){if(e===Xt)return t;var i=mt(t);if(!vt(i,e))return function(t,e,i){var n,r=Ft(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!ft(n)?n:n===kt(t.t,e)?(Lt(t),t.o[e]=_t(t.A.h,n,t)):n},has:function(t,e){return e in mt(t)},ownKeys:function(t){return Reflect.ownKeys(mt(t))},set:function(t,e,i){var n=Ft(mt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=kt(mt(t),e),o=null==r?void 0:r[Xt];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(bt(i,r)&&(void 0!==i||vt(t.t,e)))return!0;Lt(t),Pt(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!==kt(t.t,e)||e in t.t?(t.D[e]=!1,Lt(t),Pt(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=mt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){ct(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ct(12)}},ie={};ht(ee,(function(t,e){ie[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ie.deleteProperty=function(t,e){return ie.set.call(this,t,e,void 0)},ie.set=function(t,e,i){return ee.set.call(this,t[0],e,i,t[0])};var ne=function(){function t(t){var e=this;this.g=Vt,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&ct(6),void 0!==n&&"function"!=typeof n&&ct(7),ft(t)){var a=Mt(e),u=_t(e,t,void 0),c=!0;try{s=i(u),c=!1}finally{c?St(a):Ct(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Rt(a,n),Tt(t,a)}),(function(t){throw St(a),t})):(Rt(a,n),Tt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===Zt&&(s=void 0),e.F&&xt(s,!0),n){var l=[],f=[];jt("Patches").M(t,s,l,f),n(l,f)}return s}ct(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,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){ft(t)||ct(8),lt(t)&&(t=Bt(t));var e=Mt(this),i=_t(this,t,void 0);return i[Xt].C=!0,Ct(e),i},e.finishDraft=function(t,e){var i=(t&&t[Xt]).A;return Rt(i,e),Tt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Vt&&ct(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=jt("Patches").$;return lt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),re=new ne,oe=re.produce;re.produceWithPatches.bind(re),re.setAutoFreeze.bind(re),re.setUseProxies.bind(re),re.applyPatches.bind(re),re.createDraft.bind(re),re.finishDraft.bind(re);var se=oe;function ae(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ue(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ce(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ue(Object(i),!0).forEach((function(e){ae(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function le(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 fe="function"==typeof Symbol&&Symbol.observable||"@@observable",he=function(){return Math.random().toString(36).substring(7).split("").join(".")},de={INIT:"@@redux/INIT"+he(),REPLACE:"@@redux/REPLACE"+he(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+he()}};function ve(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 pe(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(le(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(le(1));return i(pe)(t,e)}if("function"!=typeof t)throw new Error(le(2));var r=t,o=e,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function l(){if(u)throw new Error(le(3));return o}function f(t){if("function"!=typeof t)throw new Error(le(4));if(u)throw new Error(le(5));var e=!0;return c(),a.push(t),function(){if(e){if(u)throw new Error(le(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function h(t){if(!ve(t))throw new Error(le(7));if(void 0===t.type)throw new Error(le(8));if(u)throw new Error(le(9));try{u=!0,o=r(o,t)}finally{u=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(le(10));r=t,h({type:de.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(le(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[fe]=function(){return this},t}return h({type:de.INIT}),(n={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[fe]=v,n}function be(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:de.INIT}))throw new Error(le(12));if(void 0===i(void 0,{type:de.PROBE_UNKNOWN_ACTION()}))throw new Error(le(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},a=0;a<s.length;a++){var u=s[a],c=i[u],l=t[u],f=c(l,e);if(void 0===f)throw e&&e.type,new Error(le(14));r[u]=f,n=n||f!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function we(){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 ye(){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),n=function(){throw new Error(le(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=we.apply(void 0,o)(i.dispatch),ce(ce({},i),{},{dispatch:n})}}}function me(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var ge=me();ge.withExtraArgument=me;var xe,Oe=ge,Ee=(xe=function(t,e){return xe=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])},xe(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}xe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),je=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Ne=Object.defineProperty,Re=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Me=function(t,e,i){return e in t?Ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ae=function(t,e){for(var i in e||(e={}))Se.call(e,i)&&Me(t,i,e[i]);if(Re)for(var n=0,r=Re(e);n<r.length;n++){i=r[n];Ce.call(e,i)&&Me(t,i,e[i])}return t},Te="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?we:we.apply(null,arguments)};var Ue=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ee(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,je([void 0],t[0].concat(this)))):new(e.bind.apply(e,je([void 0],t.concat(this))))},e}(Array);function $e(t){return ft(t)?se(t,(function(){})):t}function Ie(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Ue;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Oe.withExtraArgument(i.extraArgument)):n.push(Oe));return n}(t)}}function ke(t){var e,i=Ie(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,u=n.devTools,c=void 0===u||u,l=n.preloadedState,f=void 0===l?void 0:l,h=n.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;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}(o))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=be(o)}var v=a;"function"==typeof v&&(v=v(i));var p=ye.apply(void 0,v),b=we;c&&(b=Te(Ae({trace:!1},"object"==typeof c&&c)));var w=[p];return Array.isArray(d)?w=je([p],d):"function"==typeof d&&(w=d(w)),pe(e,f,b.apply(void 0,w))}function Fe(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ae(Ae({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 Pe(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Le(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:$e(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},u={};function c(){var e="function"==typeof t.extraReducers?Pe(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,u=e[2],c=void 0===u?void 0:u,l=Ae(Ae({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?Pe(e):[e,i,n],s=o[0],a=o[1],u=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return $e(t())};else{var c=$e(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=je([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[u]),i.reduce((function(t,i){if(i){var n;if(lt(t))return void 0===(n=i(t,e))?t:n;if(ft(t))return se(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,s,c)}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[c]=i,u[t]=n?Fe(c,n):Fe(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:u,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var _e="listenerMiddleware";Fe(_e+"/add"),Fe(_e+"/removeAll"),Fe(_e+"/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[Xt];return ee.get(e,t)},set:function(e){var i=this[Xt];ee.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Xt];if(!r.P)switch(r.i){case 5:n(r)&&Pt(r);break;case 4:i(r)&&Pt(r)}}}function i(t){for(var e=t.t,i=t.k,n=Yt(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==Xt){var s=e[o];if(void 0===s&&!vt(e,o))return!0;var a=i[o],u=a&&a[Xt];if(u?u.t!==s:!bt(a,s))return!0}}var c=!!e[Xt];return n.length!==Yt(e).length+(c?0:1)}function n(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 n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){te[t]||(te[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=Qt(i);delete o[Xt];for(var s=Yt(o),a=0;a<s.length;a++){var u=s[a];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Nt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,Xt,{value:o,writable:!0}),r},S:function(t,i,r){r?lt(i)&&i[Xt].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Xt];if(i){var r=i.t,o=i.k,s=i.D,a=i.i;if(4===a)ht(o,(function(e){e!==Xt&&(void 0!==r[e]||vt(r,e)?s[e]||t(o[e]):(s[e]=!0,Pt(i)))})),ht(r,(function(t){void 0!==o[t]||vt(o,t)||(s[t]=!1,Pt(i))}));else if(5===a){if(n(i)&&(Pt(i),s.length=!0),o.length<r.length)for(var u=o.length;u<r.length;u++)s[u]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Be=(t,e)=>(i,n)=>{i.constructor.createProperty(n,{attribute:!1,hasChanged:null!=e?e:(t,e)=>!o(t,e)});const r=i;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(n,null!=t?t:t=>t[n])};class We extends ut{get store(){return this.internalStore}set store(t){this.internalStore=t,this.store&&this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,i)=>{this[i]=e(t,this)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()})),this.onStoreAvailable(),this.requestUpdate()}onStoreAvailable(){}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}}var De,Ke;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ke=null===(De=window.safari)||void 0===De?void 0:De.pushNotification)||void 0===Ke||Ke.toString());const He={setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setRenderBeforeFirst:(t,e)=>{t.renderBeforeFirst=e.payload},setRenderAfterLast:(t,e)=>{t.renderAfterLast=e.payload}};class ze{convertNodes(t){var e,i,n,r;const o={},s=new Set,a=new Set,u=[],c=(t,e,i)=>t.map((t=>{var n;t.page&&u.push(t.tocId);let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const l={...t,prettyUrl:r,depth:e,parentTocId:i,children:c(t.children,e+1,t.tocId)};return r&&(s.has(r)&&a.add(r),s.add(r)),o[t.tocId]=l,l})),l=c(null!=t?t:[],1),f=this.buildPages(u,o);let h={};return 0===f.length?f.push({number:1,title:null!==(i=null===(e=l[0])||void 0===e?void 0:e.title)&&void 0!==i?i:"",rootTocId:null!==(r=null===(n=l[0])||void 0===n?void 0:n.tocId)&&void 0!==r?r:"root",toc:[],topics:this.tocIds(l),hiddenTopics:[]}):h=this.indexPages(f),{toc:l,nodeByTocId:o,duplicatedPrettyUrls:a,pages:f,pageByTocId:h}}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildPages(t,e){return t.map((t=>e[t])).map(((t,i)=>{var n,r,o,s,a;const u={number:i+1,title:t.title,rootTocId:t.tocId,toc:(null===(n=t.page)||void 0===n?void 0:n.onItsOwn)?[]:t.children,topics:[],hiddenTopics:[]},c=(t,e)=>(e?u.topics:u.hiddenTopics).push(t),l=null!==(o=null===(r=t.page)||void 0===r?void 0:r.parentsVisibility)&&void 0!==o?o:[];return this.buildBreadcrumb(t,e).forEach(((t,e)=>{c(t,l[e])})),c(t.tocId,null===(s=t.page)||void 0===s?void 0:s.visible),(null===(a=t.page)||void 0===a?void 0:a.onItsOwn)||u.topics.push(...this.tocIds(t.children)),u}))}buildBreadcrumb(t,e){const i=[];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=e[t.parentTocId];return i}indexPages(t){const e={};for(let i of t)for(let t of[...i.topics,...i.hiddenTopics])e[t]||(e[t]=i);return e}}class Je{constructor(t,e,i,n){this.converter=t,this.api=e,this.baseUrl=i,this.mapId=n,this.topics={},this.topicContents={},i.endsWith("/")||(this.baseUrl=i+"/")}static build(t,e,i){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");return new Je(new ze,new window.fluidtopics.FluidTopicsApi(t,e,!0),t,i)}clear(){this.map=void 0,this.enrichedToc=void 0,this.topics={},this.topicContents={}}getMap(){return this.loadIfNeeded((()=>this.map),(t=>this.map=t),(()=>this.api.getMap(this.mapId)))}getEnrichedToc(){return this.loadIfNeeded((()=>this.enrichedToc),(t=>this.enrichedToc=t),(()=>this.api.getTableOfContent(this.mapId).then((t=>this.converter.convertNodes(t)))))}async getToc(){return(await this.getEnrichedToc()).toc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeOrThrow(t){if("boolean"==typeof this.enrichedToc)throw new Error((this.enrichedToc," still loading"));return this.enrichedToc.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.loadIfNeeded((()=>this.topics[t]),(e=>this.topics[t]=e),(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.loadIfNeeded((()=>this.topicContents[t]),(e=>this.topicContents[t]=e),(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.baseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o="object"==typeof this.enrichedToc?this.enrichedToc:void 0,s=null==o?void 0:o.pageByTocId[t],a=null==o?void 0:o.nodeByTocId[t],u=null==a?void 0:a.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==a?void 0:a.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=u?u.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=u?u:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}async loadIfNeeded(t,e,i){for(void 0===t()&&(e(!0),e(await i().catch((t=>(console.error(t),!1)))));!0===t();)await s(10);const n=t();if(!1===n)throw new Error("Could not load data");return n}}class Ve{constructor(t,i){this.store=t,this.slice=i,this.reloadDebouncer=new e(10)}static build(t){const e=(t=>Le({name:"ft-reader-"+t,initialState:{baseUrl:"",apiIntegrationIdentifier:"ft-reader",visibleTopics:[],renderBeforeFirst:2,renderAfterLast:3},reducers:He}))(t.trim()||"context");return new Ve(function(t,e,i){window.ftReduxStores||(window.ftReduxStores={});const n=e||t.name;return window.ftReduxStores[n]||(window.ftReduxStores[n]=ke({reducer:t.reducer})),window.ftReduxStores[n]}(e),e)}setBaseUrl(t){this.setRequiredStateField("baseUrl","setBaseUrl",t)}setApiIntegrationIdentifier(t){this.setRequiredStateField("apiIntegrationIdentifier","setApiIntegrationIdentifier",t)}setMapId(t){this.setRequiredStateField("mapId","setMapId",t)}setRenderBeforeFirst(t){this.dispatch(this.slice.actions.setRenderBeforeFirst(t))}setRenderAfterLast(t){this.dispatch(this.slice.actions.setRenderAfterLast(t))}setVisibleTopics(t){this.dispatch(this.slice.actions.setVisibleTopics(t))}async navigateToTopic(t,e,i){for(;null==this.service;)await s(5);let n=null!=i?await this.service.getPage(i):await this.service.getPageByTocId(t);this.dispatch(this.slice.actions.setCurrentPage(n),this.slice.actions.setScrollTarget({tocId:t,section:e}))}async navigateToPage(t){for(;null==this.service;)await s(5);let e=await this.service.getPage(t);this.dispatch(this.slice.actions.setCurrentPage(e))}scrollDone(){this.dispatch(this.slice.actions.setScrollTarget({}))}setRequiredStateField(t,e,i){this.store.getState()[t]!==i&&(this.dispatch(this.slice.actions[e](i)),this.clearAll(),this.reload())}clearAll(){this.dispatch(this.slice.actions.setMap(void 0),this.slice.actions.setToc(void 0),this.slice.actions.setCurrentPage(void 0))}reload(){const t=this.store.getState();t.baseUrl&&t.apiIntegrationIdentifier&&t.mapId?this.service=Je.build(t.baseUrl,t.apiIntegrationIdentifier,t.mapId):this.service=void 0,this.reloadDebouncer.run((async()=>{this.reloadMap(),this.reloadToc()}))}async reloadMap(){var t;const e=await(null===(t=this.service)||void 0===t?void 0:t.getMap());this.dispatch(this.slice.actions.setMap(e))}async reloadToc(){var t;const e=await(null===(t=this.service)||void 0===t?void 0:t.getToc());this.dispatch(this.slice.actions.setToc(e))}dispatch(...t){for(let e of t)this.store.dispatch(e)}}const Ze=h`
82
+ `;var qe=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Xe extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class Ge extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Ye extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}const Qe=t=>e=>+(null!=e?e:"NaN")>0?+e:t;class ti extends We{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-reader",this.renderBeforeFirst=2,this.renderAfterLast=3,this.visibleTopics=[],this.navigationDebouncer=new e(5)}render(){return B`
71
83
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
72
84
  `}get stateManager(){return null==this._stateManager&&(this._stateManager=Ve.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this.store=this.stateManager.store),this._stateManager}updated(t){super.updated(t),t.has("baseUrl")&&this.baseUrl&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.stateManager.navigateToTopic("root")),t.has("page")&&!this.tocId&&null!=this.page&&this.stateManager.navigateToPage(this.page),(t.has("tocId")||t.has("section")||t.has("page"))&&this.tocId&&this.stateManager.navigateToTopic(this.tocId,this.section,this.page),t.has("renderBeforeFirst")&&this.stateManager.setRenderBeforeFirst(this.renderBeforeFirst),t.has("renderAfterLast")&&this.stateManager.setRenderAfterLast(this.renderAfterLast)}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new Xe(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.navigationDebouncer.run((()=>this.stateManager.service.getAccurateNavigationData(e.tocId,this.currentPageNumber,e.section).then((t=>this.dispatchEvent(new Ye(t))))))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>this.stateManager.service.getAccurateNavigationData(t,this.currentPageNumber)))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated})));this.dispatchEvent(new Ge(this.map,e))}))}navigateToTarget(){null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}registerComponent(t){t.stopPropagation();t.composedPath()[0].setReaderStateManager(this.stateManager)}}var ei;ti.styles=Ze,qe([n()],ti.prototype,"baseUrl",void 0),qe([n()],ti.prototype,"apiIntegrationIdentifier",void 0),qe([n()],ti.prototype,"mapId",void 0),qe([n()],ti.prototype,"tocId",void 0),qe([n()],ti.prototype,"section",void 0),qe([n({type:Number,converter:{fromAttribute:Qe()}})],ti.prototype,"page",void 0),qe([n({type:Number,converter:{fromAttribute:Qe(2)}})],ti.prototype,"renderBeforeFirst",void 0),qe([n({type:Number,converter:{fromAttribute:Qe(3)}})],ti.prototype,"renderAfterLast",void 0),qe([Be()],ti.prototype,"map",void 0),qe([Be()],ti.prototype,"toc",void 0),qe([Be()],ti.prototype,"visibleTopics",void 0),qe([Be((t=>{var e;return null===(e=t.currentPage)||void 0===e?void 0:e.number}))],ti.prototype,"currentPageNumber",void 0),qe([Be()],ti.prototype,"scrollTarget",void 0),(ei="ft-reader-context",t=>{window.customElements.get(ei)||window.customElements.define(ei,t)})(ti),t.FtReaderContext=ti,t.FtReaderContextCssVariables={},t.MapLoadedEvent=Xe,t.NavigationDoneEvent=Ye,t.VisibleTopicsChangeEvent=Ge,t.styles=Ze,Object.defineProperty(t,"U",{value:!0})}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,7 +19,7 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "0.3.15",
22
+ "@fluid-topics/ft-wc-utils": "0.3.16",
23
23
  "@reduxjs/toolkit": "^1.6.2",
24
24
  "lit": "2.2.8"
25
25
  },
@@ -29,5 +29,5 @@
29
29
  "peerDependencies": {
30
30
  "@fluid-topics/public-api": "1.0.22"
31
31
  },
32
- "gitHead": "067add51b15dae11774878d4fcee1dfc734d00fa"
32
+ "gitHead": "0d05a101f09cb5819ee10930772a873e7e0cc87b"
33
33
  }