@fluid-topics/ft-reader-content 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- !function(t,e,i,s,r,n){var o=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class d extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=h,o([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}const a=e.FtCssVariableFactory.create("--ft-infinite-scroll-padding","SIZE","0"),c=e.FtCssVariableFactory.create("--ft-infinite-scroll-items-gap","SIZE","4px"),v=i.css`
1
+ !function(t,e,i,s,r,n){var o=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class a extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=h,o([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}const d=e.FtCssVariableFactory.create("--ft-infinite-scroll-padding","SIZE","0"),c=e.FtCssVariableFactory.create("--ft-infinite-scroll-items-gap","SIZE","4px"),v=i.css`
2
2
  .items-container {
3
3
  position: relative;
4
- padding: ${a};
4
+ padding: ${d};
5
5
  outline: none;
6
6
  }
7
7
 
@@ -25,6 +25,10 @@
25
25
  margin-top: ${c};
26
26
  }
27
27
 
28
+ .item-container:not(.visible) {
29
+ overflow: hidden;
30
+ }
31
+
28
32
  .resizable:not(.rendered) {
29
33
  width: 0;
30
34
  }
@@ -36,7 +40,7 @@
36
40
  .rendered {
37
41
  display: flow-root;
38
42
  }
39
- `;var u=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class f extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class p extends Event{constructor(){super("scrolled-to-target")}}class b extends e.FtLitElement{constructor(){super(...arguments),this.items=[],this.renderItem=()=>i.html``,this.getItemKey=(t,e)=>`${e} - ${JSON.stringify(t)}`,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e.Debouncer(5),this.scrollDoneDebouncer=new e.Debouncer(10),this.onVisibilityChange=t=>{let e=new Set(this.visibleItems),i=new Set;for(let s of t){let t=+s.target.attributes.getNamedItem("data-item-index").value;s.intersectionRect.height>0?(e.add(t),i.add(t)):i.has(t)||e.delete(t)}this.visibleItems=[...e].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{var e,i,s;this.triggerFindScrollableParent(),t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));const r=this.scrollable&&"none"===(null!==(e=getComputedStyle(this.scrollable).overflowAnchor)&&void 0!==e?e:"none");for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index"),n=e.target.parentElement.clientHeight,o=e.contentRect.height;if(this.alreadyRenderedIndexes.has(t)||e.target.classList.contains("rendered")){const t=this.getOffset(e.target.parentElement)+n<(null!==(s=null===(i=this.scrollable)||void 0===i?void 0:i.scrollTop)&&void 0!==s?s:0);r&&t&&(this.scrollable.scrollTop+=Math.ceil(o-n)),e.target.parentElement.style.height=o+"px"}}},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.resizeObserver.observe(t.children.item(0)),this.intersectionObserver.observe(t)}))},this.mutationObserver=new MutationObserver(this.onMutation),this.resetVisibleItemsDebouncer=new e.Debouncer(10)}get scrollable(){var t;return null!==(t=this.internalScroll?this.internalScrollable:this.firstScrollableParent)&&void 0!==t?t:document.body}render(){return i.html`
43
+ `;var u=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class f extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class p extends Event{constructor(){super("scrolled-to-target")}}class b extends e.FtLitElement{constructor(){super(...arguments),this.items=[],this.renderItem=()=>i.html``,this.getItemKey=(t,e)=>`${e} - ${JSON.stringify(t)}`,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e.Debouncer(5),this.scrollDoneDebouncer=new e.Debouncer(10),this.onVisibilityChange=t=>{let e=new Set(this.visibleItems),i=new Set;for(let s of t){let t=+s.target.attributes.getNamedItem("data-item-index").value;s.intersectionRect.height>0?(e.add(t),i.add(t)):i.has(t)||e.delete(t)}this.visibleItems=[...e].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let e=this.searchFirstVisibleItem([...this.itemsContainer.children]),i=this.scrollable.scrollTop-this.getOffset(e);for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index");(this.alreadyRenderedIndexes.has(t)||e.target.classList.contains("rendered"))&&setTimeout((()=>e.target.parentElement.style.height=e.target.clientHeight+"px"),0)}setTimeout((()=>{null!=e&&null!=i&&this.scrolledToTarget&&(this.scrollable.scrollTop=this.getOffset(e)+Math.min(i,e.clientHeight))}),0)},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.resizeObserver.observe(t.children.item(0)),this.intersectionObserver.observe(t)}))},this.mutationObserver=new MutationObserver(this.onMutation),this.resetVisibleItemsDebouncer=new e.Debouncer(10)}get scrollable(){var t;return null!==(t=this.internalScroll?this.internalScrollable:this.firstScrollableParent)&&void 0!==t?t:document.body}render(){return i.html`
40
44
  <div class="items-container ${this.internalScroll?"scrollable":""}"
41
45
  tabindex="-1"
42
46
  @find-scrollable-parent=${this.findScrollableParent}>
@@ -44,19 +48,19 @@
44
48
  </div>
45
49
  `}renderItemContainer(t,e){const s=this.scrolledToTarget&&this.visibleItems.includes(e),r=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(o=this.visibleItems)?o:[])[(null!=o?o:[]).length-1]+this.renderAfterLast;var o;r&&this.alreadyRenderedIndexes.add(e);return i.html`
46
50
  <div id="item-${e}"
47
- class="item-container"
51
+ class="item-container ${s?"visible":""}"
48
52
  data-item-index="${e}">
49
53
  <div class="resizable ${s?"visible":""} ${r?"rendered":""}">
50
54
  ${r?(()=>{const s=this.renderItem(t,e);return"string"==typeof s?i.html`${n.unsafeHTML(s)}`:s})():null}
51
55
  </div>
52
56
  </div>
53
- `}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let e=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;e>=this.items.length&&(e=-1);let i=this.getItem(e);this.scrollToTarget(i),this.onMutation(),this.scrollDoneDebouncer.run((()=>{this.scrolledToTarget=!0}))}))}getItem(t){var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${t}`)}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable&&0===i?this.scrollable.scrollTop=0:t.scrollIntoView({block:"start"})}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.initIntersectionObserver(),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}initIntersectionObserver(){this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{root:this.scrollable,rootMargin:"-8px",threshold:[0,.01,.1,1]})}triggerFindScrollableParent(){var t;null===(t=this.itemsContainer)||void 0===t||t.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){let e,i;t.stopPropagation();for(let s of t.composedPath()){const t=s,r=this.elementCanScroll(t);if(t.clientHeight&&t.clientHeight<t.scrollHeight&&r){e=t;break}r&&(i=t)}let s=e||i;s!==this.firstScrollableParent&&(this.firstScrollableParent=s,this.firstScrollableParent&&(this.firstScrollableParent.style.overflowAnchor="none"),this.initIntersectionObserver(),this.resetScroll())}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)}catch(t){return!1}}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),(t.has("scrollToItem")||t.has("scrollToIndex")&&(null!=this.scrollToItem||null!=this.scrollToIndex))&&this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.onVisibleItemsChange(),t.has("scrolledToTarget")&&this.scrolledToTarget&&(null!=this.scrollToItem||null!=this.scrollToIndex)&&this.dispatchEvent(new p)}onVisibleItemsChange(){this.visibleItems.every(((t,e)=>null==this.visibleItems[e+1]||t+1===this.visibleItems[e+1]))||e.deepEqual(this.visibleItems,this.lastNotOkVisibleItems)?(this.resetVisibleItemsDebouncer.cancel(),this.dispatchEvent(new f(this.visibleItems,this.visibleItems.map((t=>this.items[t]))))):this.resetVisibleItemsDebouncer.run((()=>{this.lastNotOkVisibleItems=[...this.visibleItems],this.visibleItems=[],this.initIntersectionObserver(),this.onMutation()}))}}b.styles=v,u([s.property({type:Array})],b.prototype,"items",void 0),u([s.property({attribute:!1})],b.prototype,"renderItem",void 0),u([s.property({attribute:!1})],b.prototype,"getItemKey",void 0),u([s.property({type:Object})],b.prototype,"scrollToItem",void 0),u([s.property({type:Number})],b.prototype,"scrollToIndex",void 0),u([s.property({type:Boolean})],b.prototype,"internalScroll",void 0),u([s.property({type:Number})],b.prototype,"renderBeforeFirst",void 0),u([s.property({type:Number})],b.prototype,"renderAfterLast",void 0),u([s.state({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],b.prototype,"visibleItems",void 0),u([s.query(".scrollable")],b.prototype,"internalScrollable",void 0),u([s.query(".items-container")],b.prototype,"itemsContainer",void 0),u([s.state()],b.prototype,"scrolledToTarget",void 0),e.customElement("ft-infinite-scroll")(b);const m=i.css`
57
+ `}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let e=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;e>=this.items.length&&(e=-1);let i=this.getItem(e);this.scrollToTarget(i),this.scrollDoneDebouncer.run((()=>{this.onMutation(),this.scrolledToTarget=!0}))}))}getItem(t){var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${t}`)}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable&&0===i?this.scrollable.scrollTop=0:this.scrollable.scrollTop=this.getOffset(t)}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}getBottomOffset(t){var e;return this.getOffset(t)+(null!==(e=null==t?void 0:t.clientHeight)&&void 0!==e?e:0)}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.initIntersectionObserver(),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}initIntersectionObserver(){this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{root:this.scrollable,rootMargin:"-8px",threshold:[0,.01,.1,1]})}triggerFindScrollableParent(){var t;null===(t=this.itemsContainer)||void 0===t||t.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){let e,i;t.stopPropagation();for(let s of t.composedPath()){const t=s,r=this.elementCanScroll(t);if(t.clientHeight&&t.clientHeight<t.scrollHeight&&r){e=t;break}r&&(i=t)}let s=e||i;s!==this.firstScrollableParent&&(this.firstScrollableParent=s,this.initIntersectionObserver(),this.resetScroll())}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)}catch(t){return!1}}searchFirstVisibleItem(t,e,i){if(e=null!=e?e:0,(i=null!=i?i:t.length-1)-e<=0)return t[e];const s=Math.floor((i-e)/2)+e;return this.getOffset(t[s])>this.scrollable.scrollTop?this.searchFirstVisibleItem(t,e,s-1):this.getBottomOffset(t[s])<this.scrollable.scrollTop?this.searchFirstVisibleItem(t,s+1,i):t[s]}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),!t.has("scrollToItem")&&!t.has("scrollToIndex")||null==this.scrollToItem&&null==this.scrollToIndex||this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.onVisibleItemsChange(),t.has("scrolledToTarget")&&this.scrolledToTarget&&(null!=this.scrollToItem||null!=this.scrollToIndex)&&this.dispatchEvent(new p)}onVisibleItemsChange(){this.visibleItems.every(((t,e)=>null==this.visibleItems[e+1]||t+1===this.visibleItems[e+1]))||e.deepEqual(this.visibleItems,this.lastNotOkVisibleItems)?(this.resetVisibleItemsDebouncer.cancel(),this.dispatchEvent(new f(this.visibleItems,this.visibleItems.map((t=>this.items[t]))))):this.resetVisibleItemsDebouncer.run((()=>{this.lastNotOkVisibleItems=[...this.visibleItems],this.visibleItems=[],this.initIntersectionObserver(),this.onMutation()}))}}b.styles=v,u([s.property({type:Array})],b.prototype,"items",void 0),u([s.property({attribute:!1})],b.prototype,"renderItem",void 0),u([s.property({attribute:!1})],b.prototype,"getItemKey",void 0),u([s.property({type:Object})],b.prototype,"scrollToItem",void 0),u([s.property({type:Number})],b.prototype,"scrollToIndex",void 0),u([s.property({type:Boolean})],b.prototype,"internalScroll",void 0),u([s.property({type:Number})],b.prototype,"renderBeforeFirst",void 0),u([s.property({type:Number})],b.prototype,"renderAfterLast",void 0),u([s.state({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],b.prototype,"visibleItems",void 0),u([s.query(".scrollable")],b.prototype,"internalScrollable",void 0),u([s.query(".items-container")],b.prototype,"itemsContainer",void 0),u([s.state()],b.prototype,"scrolledToTarget",void 0),e.customElement("ft-infinite-scroll")(b);const m=i.css`
54
58
  `,g=i.css`
55
- `;var I=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class x extends d{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return i.html`
59
+ `;var I=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class w extends a{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return i.html`
56
60
  <article id=${this.tocId}>
57
61
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
58
62
  </article>
59
- `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}x.styles=g,I([e.redux({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],x.prototype,"mapId",void 0),I([s.property()],x.prototype,"tocId",void 0),I([s.property({type:Boolean})],x.prototype,"disableContextInteractions",void 0),I([s.state()],x.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(x);var w=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class $ extends d{constructor(){super(...arguments),this.renderTopic=()=>i.html`
63
+ `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}w.styles=g,I([e.redux({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],w.prototype,"mapId",void 0),I([s.property()],w.prototype,"tocId",void 0),I([s.property({type:Boolean})],w.prototype,"disableContextInteractions",void 0),I([s.state()],w.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(w);var x=function(t,e,i,s){for(var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class $ extends a{constructor(){super(...arguments),this.renderTopic=()=>i.html`
60
64
  <ft-reader-topic-title></ft-reader-topic-title>
61
65
  <ft-reader-topic-content></ft-reader-topic-content>
62
66
  `,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e.Debouncer(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?i.nothing:i.html`
@@ -76,4 +80,4 @@
76
80
  <ft-reader-topic-context tocId="${t}" ?disableContextInteractions=${this.disableContextInteractions}>
77
81
  ${this.renderTopic(t,e)}
78
82
  </ft-reader-topic-context>
79
- `}getScrollTarget(){var t,e,i,s,r;if(this.disableContextInteractions)return null;const n=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(r=this.scrollTarget)||void 0===r?void 0:r.tocId)||n&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}$.elementDefinitions={"ft-infinite-scroll":b},$.styles=m,w([s.property()],$.prototype,"renderTopic",void 0),w([s.property({type:Boolean})],$.prototype,"disableContextInteractions",void 0),w([e.redux()],$.prototype,"currentPage",void 0),w([e.redux()],$.prototype,"scrollTarget",void 0),w([e.redux()],$.prototype,"visibleTopics",void 0),w([e.redux({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadBeforeFirstVisibleTopic)&&void 0!==i?i:5}})],$.prototype,"renderBeforeFirst",void 0),w([e.redux({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadAfterLastVisibleTopic)&&void 0!==i?i:5}})],$.prototype,"renderAfterLast",void 0),w([s.query(".ft-reader-content")],$.prototype,"container",void 0),e.customElement("ft-reader-content")($),t.FtReaderContent=$,t.FtReaderContentCssVariables={},t.styles=m}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
83
+ `}getScrollTarget(){var t,e,i,s,r;if(this.disableContextInteractions)return null;const n=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(r=this.scrollTarget)||void 0===r?void 0:r.tocId)||n&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}$.elementDefinitions={"ft-infinite-scroll":b},$.styles=m,x([s.property()],$.prototype,"renderTopic",void 0),x([s.property({type:Boolean})],$.prototype,"disableContextInteractions",void 0),x([e.redux()],$.prototype,"currentPage",void 0),x([e.redux()],$.prototype,"scrollTarget",void 0),x([e.redux()],$.prototype,"visibleTopics",void 0),x([e.redux({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadBeforeFirstVisibleTopic)&&void 0!==i?i:5}})],$.prototype,"renderBeforeFirst",void 0),x([e.redux({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadAfterLastVisibleTopic)&&void 0!==i?i:5}})],$.prototype,"renderAfterLast",void 0),x([s.query(".ft-reader-content")],$.prototype,"container",void 0),e.customElement("ft-reader-content")($),t.FtReaderContent=$,t.FtReaderContentCssVariables={},t.styles=m}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
@@ -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,s=window.customElements,n=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);u(n,a,l);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(s,t);c||(c=d(t),e.call(s,t,c)),this===window.customElements&&(o.set(n,h),h.standInClass=c);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)r.delete(t),v(t,h,!0)}const f=this._whenDefinedPromises.get(t);return void 0!==f&&(f.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),s.upgrade.apply(s,arguments),b.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.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 s=this._awaitingUpgrade.get(e);s||this._awaitingUpgrade.set(e,s=new Set),i?s.add(t):s.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=o.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),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const s=c(i)||window.customElements,n=s._getDefinition(e);return n?v(i,n):r.set(i,s),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=n.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,e,i)=>{if(0===e.size||void 0===i)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);s.call(this,r,n),i.call(this,r,t,n)}else s.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);n.call(this,s),i.call(this,s,t,null)}else n.call(this,s)})},p=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):p(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),a=t;try{new e.elementClass}catch(t){p(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)},f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=f.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const m=(t,e,i=void 0)=>{const s=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=s.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const x=(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(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const s=e.call(this,...i);return t.set(s,this),s},i.forEach((e=>{const i=window.ElementInternals.prototype,s=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...e)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const s=t.getAttribute("name"),n=e.get(s)||[];this[+i]=t,n.push(t),e.set(s,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new s(t))}))}namedItem(t){return this[t]}}const o=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=o.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Jt){const t=window.customElements.define;window.customElements.define=(e,i,s)=>{if(null!==i)try{t.bind(window.customElements)(e,i,s)}catch(t){console.info(e,i,s,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const s=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void s(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
17
+ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,s=window.customElements,n=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap;let h;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,h=new Set(n.observedAttributes||[]);d(n,h,l);const a={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:h};this._definitionsByTag.set(t,a),this._definitionsByClass.set(n,a);let c=i.call(s,t);c||(c=u(t),e.call(s,t,c)),this===window.customElements&&(o.set(n,a),a.standInClass=c);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)r.delete(t),v(t,a,!0)}const f=this._whenDefinedPromises.get(t);return void 0!==f&&(f.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),s.upgrade.apply(s,arguments),b.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.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 s=this._awaitingUpgrade.get(e);s||this._awaitingUpgrade.set(e,s=new Set),i?s.add(t):s.delete(t)}},window.HTMLElement=function(){let e=h;if(e)return h=void 0,e;const i=o.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),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,c=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=l.get(e)?.getRootNode()||document)}return e.customElements},u=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const s=c(i)||window.customElements,n=s._getDefinition(e);return n?v(i,n):r.set(i,s),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=n.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);s.call(this,r,n),i.call(this,r,t,n)}else s.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);n.call(this,s),i.call(this,s,t,null)}else n.call(this,s)})},p=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):p(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),h=t;try{new e.elementClass}catch(t){p(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)},f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=f.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const m=(t,e,i=void 0)=>{const s=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=s.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const x=(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(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const s=e.call(this,...i);return t.set(s,this),s},i.forEach((e=>{const i=window.ElementInternals.prototype,s=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...e)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const s=t.getAttribute("name"),n=e.get(s)||[];this[+i]=t,n.push(t),e.set(s,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new s(t))}))}namedItem(t){return this[t]}}const o=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=o.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Zt){const t=window.customElements.define;window.customElements.define=(e,i,s)=>{if(null!==i)try{t.bind(window.customElements)(e,i,s)}catch(t){console.info(e,i,s,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const s=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void s(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -40,13 +40,13 @@ function r(t,e){return(({finisher:t,descriptor:e})=>(i,s)=>{var n;if(void 0===s)
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */var o;function l(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,s,n;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(s=i;0!=s--;)if(!l(t[s],e[s]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;for(s of t.entries())if(!l(s[1],e.get(s[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(n=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(s=i;0!=s--;)if(!Object.prototype.hasOwnProperty.call(e,n[s]))return!1;for(s=i;0!=s--;){var r=n[s];if(!l(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(o=window.HTMLSlotElement)||void 0===o||o.prototype.assignedElements;const a=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};
43
+ */var o;function l(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,s,n;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(s=i;0!=s--;)if(!l(t[s],e[s]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;for(s of t.entries())if(!l(s[1],e.get(s[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(n=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(s=i;0!=s--;)if(!Object.prototype.hasOwnProperty.call(e,n[s]))return!1;for(s=i;0!=s--;){var r=n[s];if(!l(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(o=window.HTMLSlotElement)||void 0===o||o.prototype.assignedElements;const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2019 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- const h=window,c=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),u=new WeakMap;let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==d)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(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}};const v=t=>new p("string"==typeof t?t:t+"",void 0,d),f=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>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[s+1]),t[0]);return new p(i,t,d)},b=(t,e)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=h.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))},m=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return v(e)})(t):t
49
+ const a=window,c=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),d=new WeakMap;let p=class{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(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const v=t=>new p("string"==typeof t?t:t+"",void 0,u),f=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>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[s+1]),t[0]);return new p(i,t,u)},b=(t,e)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=a.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))},m=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return v(e)})(t):t
50
50
  /**
51
51
  * @license
52
52
  * Copyright 2017 Google LLC
@@ -57,13 +57,13 @@ const h=window,c=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
59
  */
60
- var E;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==O||O({ReactiveElement:$}),(null!==(x=g.reactiveElementVersions)&&void 0!==x?x:g.reactiveElementVersions=[]).push("1.6.1");const R=window,M=R.trustedTypes,k=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,U="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,F="?"+T,A=`<${F}>`,I=document,j=()=>I.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,_=t=>B(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,D=/>/g,z=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,Z=/"/g,J=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),G=new WeakMap,Q=I.createTreeWalker(I,129,null,!1),Y=(t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":"",o=K;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(o.lastIndex=c,a=o.exec(i),null!==a);)c=o.lastIndex,o===K?"!--"===a[1]?o=P:void 0!==a[1]?o=D:void 0!==a[2]?(J.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=z):void 0!==a[3]&&(o=z):o===z?">"===a[0]?(o=null!=n?n:K,h=-1):void 0===a[1]?h=-2:(h=o.lastIndex-a[2].length,l=a[1],o=void 0===a[3]?z:'"'===a[3]?Z:H):o===Z||o===H?o=z:o===P||o===D?o=K:(o=z,n=void 0);const d=o===z&&t[e+1].startsWith("/>")?" ":"";r+=o===K?i+A:h>=0?(s.push(l),i.slice(0,h)+U+i.slice(h)+T+d):i+T+(-2===h?(s.push(void 0),e):d)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==k?k.createHTML(l):l,s]};class tt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[a,h]=Y(t,e);if(this.el=tt.createElement(a,i),Q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=Q.nextNode())&&l.length<o;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(U)||e.startsWith(T)){const i=h[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+U).split(T),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?lt:"@"===e[1]?at:nt})}else l.push({type:6,index:n})}for(const e of t)s.removeAttribute(e)}if(J.test(s.tagName)){const t=s.textContent.split(T),e=t.length-1;if(e>0){s.textContent=M?M.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],j()),Q.nextNode(),l.push({type:2,index:++n});s.append(t[e],j())}}}else if(8===s.nodeType)if(s.data===F)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(T,t+1));)l.push({type:7,index:n}),t+=T.length-1}n++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function et(t,e,i=t,s){var n,r,o,l;if(e===q)return e;let a=void 0!==s?null===(n=i._$Co)||void 0===n?void 0:n[s]:i._$Cl;const h=L(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,s)),void 0!==s?(null!==(o=(l=i)._$Co)&&void 0!==o?o:l._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=et(t,a._$AS(t,e.values),a,s)),e}class it{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);Q.currentNode=n;let r=Q.nextNode(),o=0,l=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new st(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ht(r,this,t)),this._$AV.push(e),a=s[++l]}o!==(null==a?void 0:a.index)&&(r=Q.nextNode(),o++)}return n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class st{constructor(t,e,i,s){var n;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=et(this,t,e),L(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):_(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==X&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(I.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=tt.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new it(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new tt(t)),e}T(t){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new st(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,s,n){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=et(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const s=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=et(this,s[i+o],e,o),l===q&&(l=this._$AH[o]),r||(r=!L(l)||l!==this._$AH[o]),l===X?t=X:t!==X&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!s&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const ot=M?M.emptyScript:"";class lt extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class at extends nt{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=et(this,t,e,0))&&void 0!==i?i:X)===q)return;const s=this._$AH,n=t===X&&s!==X||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==X&&(s===X||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 ht{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){et(this,t)}}const ct={O:U,P:T,A:F,C:1,M:Y,L:it,D:_,R:et,I:st,V:nt,H:lt,N:at,U:rt,F:ht},dt=R.litHtmlPolyfillSupport;null==dt||dt(tt,st),(null!==(E=R.litHtmlVersions)&&void 0!==E?E:R.litHtmlVersions=[]).push("2.7.3");
60
+ var E;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==O||O({ReactiveElement:$}),(null!==(x=g.reactiveElementVersions)&&void 0!==x?x:g.reactiveElementVersions=[]).push("1.6.1");const R=window,M=R.trustedTypes,k=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,U="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,F="?"+T,I=`<${F}>`,A=document,j=()=>A.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,_=t=>B(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,D=/>/g,z=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,V=/"/g,Z=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),G=new WeakMap,Q=A.createTreeWalker(A,129,null,!1),Y=(t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":"",o=K;for(let e=0;e<i;e++){const i=t[e];let l,h,a=-1,c=0;for(;c<i.length&&(o.lastIndex=c,h=o.exec(i),null!==h);)c=o.lastIndex,o===K?"!--"===h[1]?o=P:void 0!==h[1]?o=D:void 0!==h[2]?(Z.test(h[2])&&(n=RegExp("</"+h[2],"g")),o=z):void 0!==h[3]&&(o=z):o===z?">"===h[0]?(o=null!=n?n:K,a=-1):void 0===h[1]?a=-2:(a=o.lastIndex-h[2].length,l=h[1],o=void 0===h[3]?z:'"'===h[3]?V:H):o===V||o===H?o=z:o===P||o===D?o=K:(o=z,n=void 0);const u=o===z&&t[e+1].startsWith("/>")?" ":"";r+=o===K?i+I:a>=0?(s.push(l),i.slice(0,a)+U+i.slice(a)+T+u):i+T+(-2===a?(s.push(void 0),e):u)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==k?k.createHTML(l):l,s]};class tt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[h,a]=Y(t,e);if(this.el=tt.createElement(h,i),Q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=Q.nextNode())&&l.length<o;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(U)||e.startsWith(T)){const i=a[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+U).split(T),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?lt:"@"===e[1]?ht:nt})}else l.push({type:6,index:n})}for(const e of t)s.removeAttribute(e)}if(Z.test(s.tagName)){const t=s.textContent.split(T),e=t.length-1;if(e>0){s.textContent=M?M.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],j()),Q.nextNode(),l.push({type:2,index:++n});s.append(t[e],j())}}}else if(8===s.nodeType)if(s.data===F)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(T,t+1));)l.push({type:7,index:n}),t+=T.length-1}n++}}static createElement(t,e){const i=A.createElement("template");return i.innerHTML=t,i}}function et(t,e,i=t,s){var n,r,o,l;if(e===q)return e;let h=void 0!==s?null===(n=i._$Co)||void 0===n?void 0:n[s]:i._$Cl;const a=L(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(r=null==h?void 0:h._$AO)||void 0===r||r.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,i,s)),void 0!==s?(null!==(o=(l=i)._$Co)&&void 0!==o?o:l._$Co=[])[s]=h:i._$Cl=h),void 0!==h&&(e=et(t,h._$AS(t,e.values),h,s)),e}class it{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:A).importNode(i,!0);Q.currentNode=n;let r=Q.nextNode(),o=0,l=0,h=s[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new st(r,r.nextSibling,this,t):1===h.type?e=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(e=new at(r,this,t)),this._$AV.push(e),h=s[++l]}o!==(null==h?void 0:h.index)&&(r=Q.nextNode(),o++)}return n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class st{constructor(t,e,i,s){var n;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=et(this,t,e),L(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):_(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==X&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=tt.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new it(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new tt(t)),e}T(t){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new st(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,s,n){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=et(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const s=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=et(this,s[i+o],e,o),l===q&&(l=this._$AH[o]),r||(r=!L(l)||l!==this._$AH[o]),l===X?t=X:t!==X&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!s&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const ot=M?M.emptyScript:"";class lt extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class ht extends nt{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=et(this,t,e,0))&&void 0!==i?i:X)===q)return;const s=this._$AH,n=t===X&&s!==X||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==X&&(s===X||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 at{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){et(this,t)}}const ct={O:U,P:T,A:F,C:1,M:Y,L:it,D:_,R:et,I:st,V:nt,H:lt,N:ht,U:rt,F:at},ut=R.litHtmlPolyfillSupport;null==ut||ut(tt,st),(null!==(E=R.litHtmlVersions)&&void 0!==E?E:R.litHtmlVersions=[]).push("2.7.3");
61
61
  /**
62
62
  * @license
63
63
  * Copyright 2017 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
65
  */
66
- var ut,pt;let vt=class extends ${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 s,n;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new st(e.insertBefore(j(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};vt.finalized=!0,vt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:vt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:vt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let s=t=>v(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):v(null!=e?e:t.defaultValue),s=f`var(${v(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>f`var(${v(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class mt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return b(i,t.elementStyles),i}}var xt,gt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends mt{constructor(){super(),this[xt]=new e(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ot].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,s,n,r,o;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const h=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!==(n=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],i=null!==(o=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Ct,Nt;xt=Ot,gt([s()],St.prototype,"exportpartsPrefix",void 0),gt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!l(t,e),...null!=e?e:{}})}([])],St.prototype,"exportpartsPrefixes",void 0),gt([s()],St.prototype,"customStylesheet",void 0),f`
66
+ var dt,pt;let vt=class extends ${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 s,n;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new st(e.insertBefore(j(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};vt.finalized=!0,vt._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:vt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:vt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let s=t=>v(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),n=f`var(${v(t)}, ${s(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=s,n.get=e=>f`var(${v(t)}, ${s(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):v(null!=e?e:t.defaultValue),s=f`var(${v(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>f`var(${v(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.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)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class mt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return b(i,t.elementStyles),i}}var xt,gt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const wt=Symbol("constructorPrototype"),yt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends mt{constructor(){super(),this[xt]=new e(5),this[yt]=this.constructor.name,this[wt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yt]&&Object.setPrototypeOf(this,this[wt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ot].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,s,n,r,o;const l=t=>null!=t&&t.trim().length>0,h=t.filter(l).map((t=>t.trim()));if(0===h.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!==(n=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==n?n:[],i=null!==(o=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==o?o:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>a.add(t)))}if(0===a.size)return void this.removeAttribute("exportparts");const c=[...a.values()].flatMap((t=>h.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Ct,Nt;xt=Ot,gt([s()],St.prototype,"exportpartsPrefix",void 0),gt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!l(t,e),...null!=e?e:{}})}([])],St.prototype,"exportpartsPrefixes",void 0),gt([s()],St.prototype,"customStylesheet",void 0),f`
67
67
  .ft-no-text-select {
68
68
  -webkit-touch-callout: none;
69
69
  -webkit-user-select: none;
@@ -95,7 +95,7 @@ var ut,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOp
95
95
  display: inline-block;
96
96
  width: 0;
97
97
  }
98
- `;const $t=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!l(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}},Et=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores");class Mt extends St{constructor(){super(...arguments),this[Ct]=new Map,this[Nt]=new Map}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Rt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:function(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Rt].delete(e)}setupStore(t,e){this[Rt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this[Et].set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[Et]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[Et].has(t)&&this[Et].get(t)(),this[Et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}var kt,Ut;Ct=Et,Nt=Rt,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ut=null===(kt=window.safari)||void 0===kt?void 0:kt.pushNotification)||void 0===Ut||Ut.toString());var Tt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class Ft extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const At=Symbol("registerInterval");class It extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[At]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[At]):this.dispatchEvent(new Ft)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=At,Tt([n()],i.prototype,"stateManager",void 0),i}(Mt)){}
98
+ `;const $t=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!l(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}},Et=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores");class Mt extends St{constructor(){super(...arguments),this[Ct]=new Map,this[Nt]=new Map}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Rt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:function(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Rt].delete(e)}setupStore(t,e){this[Rt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this[Et].set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[Et]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[Et].has(t)&&this[Et].get(t)(),this[Et].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}var kt,Ut;Ct=Et,Nt=Rt,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ut=null===(kt=window.safari)||void 0===kt?void 0:kt.pushNotification)||void 0===Ut||Ut.toString());var Tt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class Ft extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const It=Symbol("registerInterval");class At extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[It]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[It]):this.dispatchEvent(new Ft)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=It,Tt([n()],i.prototype,"stateManager",void 0),i}(Mt)){}
99
99
  /**
100
100
  * @license
101
101
  * Copyright 2017 Google LLC
@@ -105,7 +105,7 @@ var ut,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOp
105
105
  * @license
106
106
  * Copyright 2020 Google LLC
107
107
  * SPDX-License-Identifier: BSD-3-Clause
108
- */const{I:_t}=ct,Wt=()=>document.createComment(""),Kt=(t,e,i)=>{var s;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Wt(),r),s=n.insertBefore(Wt(),r);i=new _t(e,s,t,t.options)}else{const e=i._$AB.nextSibling,o=i._$AM,l=o!==t;if(l){let e;null===(s=i._$AQ)||void 0===s||s.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==o._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return i},Pt=(t,e,i=t)=>(t._$AI(e,i),t),Dt={},zt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const s=t._$AB.nextSibling;for(;i!==s;){const t=i.nextSibling;i.remove(),i=t}},Ht=(t,e,i)=>{const s=new Map;for(let n=e;n<=i;n++)s.set(t[n],n);return s},Zt=Lt(class extends Bt{constructor(t){if(super(t),t.type!==jt)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const n=[],r=[];let o=0;for(const e of t)n[o]=s?s(e,o):o,r[o]=i(e,o),o++;return{values:r,keys:n}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){var n;const r=(t=>t._$AH)(t),{values:o,keys:l}=this.dt(e,i,s);if(!Array.isArray(r))return this.ht=l,o;const a=null!==(n=this.ht)&&void 0!==n?n:this.ht=[],h=[];let c,d,u=0,p=r.length-1,v=0,f=o.length-1;for(;u<=p&&v<=f;)if(null===r[u])u++;else if(null===r[p])p--;else if(a[u]===l[v])h[v]=Pt(r[u],o[v]),u++,v++;else if(a[p]===l[f])h[f]=Pt(r[p],o[f]),p--,f--;else if(a[u]===l[f])h[f]=Pt(r[u],o[f]),Kt(t,h[f+1],r[u]),u++,f--;else if(a[p]===l[v])h[v]=Pt(r[p],o[v]),Kt(t,r[u],r[p]),p--,v++;else if(void 0===c&&(c=Ht(l,v,f),d=Ht(a,u,p)),c.has(a[u]))if(c.has(a[p])){const e=d.get(l[v]),i=void 0!==e?r[e]:null;if(null===i){const e=Kt(t,r[u]);Pt(e,o[v]),h[v]=e}else h[v]=Pt(i,o[v]),Kt(t,r[u],i),r[e]=null;v++}else zt(r[p]),p--;else zt(r[u]),u++;for(;v<=f;){const e=Kt(t,h[f+1]);Pt(e,o[v]),h[v++]=e}for(;u<=p;){const t=r[u++];null!==t&&zt(t)}return this.ht=l,((t,e=Dt)=>{t._$AH=e})(t,h),q}});
108
+ */const{I:_t}=ct,Wt=()=>document.createComment(""),Kt=(t,e,i)=>{var s;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Wt(),r),s=n.insertBefore(Wt(),r);i=new _t(e,s,t,t.options)}else{const e=i._$AB.nextSibling,o=i._$AM,l=o!==t;if(l){let e;null===(s=i._$AQ)||void 0===s||s.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==o._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return i},Pt=(t,e,i=t)=>(t._$AI(e,i),t),Dt={},zt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const s=t._$AB.nextSibling;for(;i!==s;){const t=i.nextSibling;i.remove(),i=t}},Ht=(t,e,i)=>{const s=new Map;for(let n=e;n<=i;n++)s.set(t[n],n);return s},Vt=Lt(class extends Bt{constructor(t){if(super(t),t.type!==jt)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const n=[],r=[];let o=0;for(const e of t)n[o]=s?s(e,o):o,r[o]=i(e,o),o++;return{values:r,keys:n}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){var n;const r=(t=>t._$AH)(t),{values:o,keys:l}=this.dt(e,i,s);if(!Array.isArray(r))return this.ht=l,o;const h=null!==(n=this.ht)&&void 0!==n?n:this.ht=[],a=[];let c,u,d=0,p=r.length-1,v=0,f=o.length-1;for(;d<=p&&v<=f;)if(null===r[d])d++;else if(null===r[p])p--;else if(h[d]===l[v])a[v]=Pt(r[d],o[v]),d++,v++;else if(h[p]===l[f])a[f]=Pt(r[p],o[f]),p--,f--;else if(h[d]===l[f])a[f]=Pt(r[d],o[f]),Kt(t,a[f+1],r[d]),d++,f--;else if(h[p]===l[v])a[v]=Pt(r[p],o[v]),Kt(t,r[d],r[p]),p--,v++;else if(void 0===c&&(c=Ht(l,v,f),u=Ht(h,d,p)),c.has(h[d]))if(c.has(h[p])){const e=u.get(l[v]),i=void 0!==e?r[e]:null;if(null===i){const e=Kt(t,r[d]);Pt(e,o[v]),a[v]=e}else a[v]=Pt(i,o[v]),Kt(t,r[d],i),r[e]=null;v++}else zt(r[p]),p--;else zt(r[d]),d++;for(;v<=f;){const e=Kt(t,a[f+1]);Pt(e,o[v]),a[v++]=e}for(;d<=p;){const t=r[d++];null!==t&&zt(t)}return this.ht=l,((t,e=Dt)=>{t._$AH=e})(t,a),q}});
109
109
  /**
110
110
  * @license
111
111
  * Copyright 2017 Google LLC
@@ -116,7 +116,7 @@ var ut,pt;let vt=class extends ${constructor(){super(...arguments),this.renderOp
116
116
  * Copyright 2017 Google LLC
117
117
  * SPDX-License-Identifier: BSD-3-Clause
118
118
  */
119
- class Jt extends Bt{constructor(t){if(super(t),this.et=X,t.type!==jt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===X||null==t)return this.ft=void 0,this.et=t;if(t===q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Jt.directiveName="unsafeHTML",Jt.resultType=1;const Vt=Lt(Jt),qt=bt.create("--ft-infinite-scroll-padding","SIZE","0"),Xt=bt.create("--ft-infinite-scroll-items-gap","SIZE","4px"),Gt=f`
119
+ class Zt extends Bt{constructor(t){if(super(t),this.et=X,t.type!==jt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===X||null==t)return this.ft=void 0,this.et=t;if(t===q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Zt.directiveName="unsafeHTML",Zt.resultType=1;const Jt=Lt(Zt),qt=bt.create("--ft-infinite-scroll-padding","SIZE","0"),Xt=bt.create("--ft-infinite-scroll-items-gap","SIZE","4px"),Gt=f`
120
120
  .items-container {
121
121
  position: relative;
122
122
  padding: ${qt};
@@ -143,6 +143,10 @@ class Jt extends Bt{constructor(t){if(super(t),this.et=X,t.type!==jt)throw Error
143
143
  margin-top: ${Xt};
144
144
  }
145
145
 
146
+ .item-container:not(.visible) {
147
+ overflow: hidden;
148
+ }
149
+
146
150
  .resizable:not(.rendered) {
147
151
  width: 0;
148
152
  }
@@ -154,30 +158,30 @@ class Jt extends Bt{constructor(t){if(super(t),this.et=X,t.type!==jt)throw Error
154
158
  .rendered {
155
159
  display: flow-root;
156
160
  }
157
- `;var Qt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class Yt extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class te extends Event{constructor(){super("scrolled-to-target")}}class ee extends St{constructor(){super(...arguments),this.items=[],this.renderItem=()=>V``,this.getItemKey=(t,e)=>`${e} - ${JSON.stringify(t)}`,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e(5),this.scrollDoneDebouncer=new e(10),this.onVisibilityChange=t=>{let e=new Set(this.visibleItems),i=new Set;for(let s of t){let t=+s.target.attributes.getNamedItem("data-item-index").value;s.intersectionRect.height>0?(e.add(t),i.add(t)):i.has(t)||e.delete(t)}this.visibleItems=[...e].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{var e,i,s;this.triggerFindScrollableParent(),t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));const n=this.scrollable&&"none"===(null!==(e=getComputedStyle(this.scrollable).overflowAnchor)&&void 0!==e?e:"none");for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index"),r=e.target.parentElement.clientHeight,o=e.contentRect.height;if(this.alreadyRenderedIndexes.has(t)||e.target.classList.contains("rendered")){const t=this.getOffset(e.target.parentElement)+r<(null!==(s=null===(i=this.scrollable)||void 0===i?void 0:i.scrollTop)&&void 0!==s?s:0);n&&t&&(this.scrollable.scrollTop+=Math.ceil(o-r)),e.target.parentElement.style.height=o+"px"}}},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.resizeObserver.observe(t.children.item(0)),this.intersectionObserver.observe(t)}))},this.mutationObserver=new MutationObserver(this.onMutation),this.resetVisibleItemsDebouncer=new e(10)}get scrollable(){var t;return null!==(t=this.internalScroll?this.internalScrollable:this.firstScrollableParent)&&void 0!==t?t:document.body}render(){return V`
161
+ `;var Qt=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class Yt extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class te extends Event{constructor(){super("scrolled-to-target")}}class ee extends St{constructor(){super(...arguments),this.items=[],this.renderItem=()=>J``,this.getItemKey=(t,e)=>`${e} - ${JSON.stringify(t)}`,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e(5),this.scrollDoneDebouncer=new e(10),this.onVisibilityChange=t=>{let e=new Set(this.visibleItems),i=new Set;for(let s of t){let t=+s.target.attributes.getNamedItem("data-item-index").value;s.intersectionRect.height>0?(e.add(t),i.add(t)):i.has(t)||e.delete(t)}this.visibleItems=[...e].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let e=this.searchFirstVisibleItem([...this.itemsContainer.children]),i=this.scrollable.scrollTop-this.getOffset(e);for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index");(this.alreadyRenderedIndexes.has(t)||e.target.classList.contains("rendered"))&&setTimeout((()=>e.target.parentElement.style.height=e.target.clientHeight+"px"),0)}setTimeout((()=>{null!=e&&null!=i&&this.scrolledToTarget&&(this.scrollable.scrollTop=this.getOffset(e)+Math.min(i,e.clientHeight))}),0)},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.resizeObserver.observe(t.children.item(0)),this.intersectionObserver.observe(t)}))},this.mutationObserver=new MutationObserver(this.onMutation),this.resetVisibleItemsDebouncer=new e(10)}get scrollable(){var t;return null!==(t=this.internalScroll?this.internalScrollable:this.firstScrollableParent)&&void 0!==t?t:document.body}render(){return J`
158
162
  <div class="items-container ${this.internalScroll?"scrollable":""}"
159
163
  tabindex="-1"
160
164
  @find-scrollable-parent=${this.findScrollableParent}>
161
- ${Zt(this.items,((t,e)=>this.getItemKey(t,e)),((t,e)=>this.renderItemContainer(t,e)))}
165
+ ${Vt(this.items,((t,e)=>this.getItemKey(t,e)),((t,e)=>this.renderItemContainer(t,e)))}
162
166
  </div>
163
- `}renderItemContainer(t,e){const i=this.scrolledToTarget&&this.visibleItems.includes(e),s=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(n=this.visibleItems)?n:[])[(null!=n?n:[]).length-1]+this.renderAfterLast;var n;s&&this.alreadyRenderedIndexes.add(e);return V`
167
+ `}renderItemContainer(t,e){const i=this.scrolledToTarget&&this.visibleItems.includes(e),s=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(n=this.visibleItems)?n:[])[(null!=n?n:[]).length-1]+this.renderAfterLast;var n;s&&this.alreadyRenderedIndexes.add(e);return J`
164
168
  <div id="item-${e}"
165
- class="item-container"
169
+ class="item-container ${i?"visible":""}"
166
170
  data-item-index="${e}">
167
171
  <div class="resizable ${i?"visible":""} ${s?"rendered":""}">
168
- ${s?(()=>{const i=this.renderItem(t,e);return"string"==typeof i?V`${Vt(i)}`:i})():null}
172
+ ${s?(()=>{const i=this.renderItem(t,e);return"string"==typeof i?J`${Jt(i)}`:i})():null}
169
173
  </div>
170
174
  </div>
171
- `}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let e=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;e>=this.items.length&&(e=-1);let i=this.getItem(e);this.scrollToTarget(i),this.onMutation(),this.scrollDoneDebouncer.run((()=>{this.scrolledToTarget=!0}))}))}getItem(t){var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${t}`)}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable&&0===i?this.scrollable.scrollTop=0:t.scrollIntoView({block:"start"})}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.initIntersectionObserver(),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}initIntersectionObserver(){this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{root:this.scrollable,rootMargin:"-8px",threshold:[0,.01,.1,1]})}triggerFindScrollableParent(){var t;null===(t=this.itemsContainer)||void 0===t||t.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){let e,i;t.stopPropagation();for(let s of t.composedPath()){const t=s,n=this.elementCanScroll(t);if(t.clientHeight&&t.clientHeight<t.scrollHeight&&n){e=t;break}n&&(i=t)}let s=e||i;s!==this.firstScrollableParent&&(this.firstScrollableParent=s,this.firstScrollableParent&&(this.firstScrollableParent.style.overflowAnchor="none"),this.initIntersectionObserver(),this.resetScroll())}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)}catch(t){return!1}}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),(t.has("scrollToItem")||t.has("scrollToIndex")&&(null!=this.scrollToItem||null!=this.scrollToIndex))&&this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.onVisibleItemsChange(),t.has("scrolledToTarget")&&this.scrolledToTarget&&(null!=this.scrollToItem||null!=this.scrollToIndex)&&this.dispatchEvent(new te)}onVisibleItemsChange(){const t=this.visibleItems.every(((t,e)=>null==this.visibleItems[e+1]||t+1===this.visibleItems[e+1]));t||l(this.visibleItems,this.lastNotOkVisibleItems)?(this.resetVisibleItemsDebouncer.cancel(),this.dispatchEvent(new Yt(this.visibleItems,this.visibleItems.map((t=>this.items[t]))))):this.resetVisibleItemsDebouncer.run((()=>{this.lastNotOkVisibleItems=[...this.visibleItems],this.visibleItems=[],this.initIntersectionObserver(),this.onMutation()}))}}ee.styles=Gt,Qt([s({type:Array})],ee.prototype,"items",void 0),Qt([s({attribute:!1})],ee.prototype,"renderItem",void 0),Qt([s({attribute:!1})],ee.prototype,"getItemKey",void 0),Qt([s({type:Object})],ee.prototype,"scrollToItem",void 0),Qt([s({type:Number})],ee.prototype,"scrollToIndex",void 0),Qt([s({type:Boolean})],ee.prototype,"internalScroll",void 0),Qt([s({type:Number})],ee.prototype,"renderBeforeFirst",void 0),Qt([s({type:Number})],ee.prototype,"renderAfterLast",void 0),Qt([n({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],ee.prototype,"visibleItems",void 0),Qt([r(".scrollable")],ee.prototype,"internalScrollable",void 0),Qt([r(".items-container")],ee.prototype,"itemsContainer",void 0),Qt([n()],ee.prototype,"scrolledToTarget",void 0),a("ft-infinite-scroll")(ee);const ie=f`
175
+ `}resetScroll(){this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t;let e=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;e>=this.items.length&&(e=-1);let i=this.getItem(e);this.scrollToTarget(i),this.scrollDoneDebouncer.run((()=>{this.onMutation(),this.scrolledToTarget=!0}))}))}getItem(t){var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${t}`)}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable&&0===i?this.scrollable.scrollTop=0:this.scrollable.scrollTop=this.getOffset(t)}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}getBottomOffset(t){var e;return this.getOffset(t)+(null!==(e=null==t?void 0:t.clientHeight)&&void 0!==e?e:0)}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.initIntersectionObserver(),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}initIntersectionObserver(){this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{root:this.scrollable,rootMargin:"-8px",threshold:[0,.01,.1,1]})}triggerFindScrollableParent(){var t;null===(t=this.itemsContainer)||void 0===t||t.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){let e,i;t.stopPropagation();for(let s of t.composedPath()){const t=s,n=this.elementCanScroll(t);if(t.clientHeight&&t.clientHeight<t.scrollHeight&&n){e=t;break}n&&(i=t)}let s=e||i;s!==this.firstScrollableParent&&(this.firstScrollableParent=s,this.initIntersectionObserver(),this.resetScroll())}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)}catch(t){return!1}}searchFirstVisibleItem(t,e,i){if(e=null!=e?e:0,(i=null!=i?i:t.length-1)-e<=0)return t[e];const s=Math.floor((i-e)/2)+e;return this.getOffset(t[s])>this.scrollable.scrollTop?this.searchFirstVisibleItem(t,e,s-1):this.getBottomOffset(t[s])<this.scrollable.scrollTop?this.searchFirstVisibleItem(t,s+1,i):t[s]}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),!t.has("scrollToItem")&&!t.has("scrollToIndex")||null==this.scrollToItem&&null==this.scrollToIndex||this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.onVisibleItemsChange(),t.has("scrolledToTarget")&&this.scrolledToTarget&&(null!=this.scrollToItem||null!=this.scrollToIndex)&&this.dispatchEvent(new te)}onVisibleItemsChange(){const t=this.visibleItems.every(((t,e)=>null==this.visibleItems[e+1]||t+1===this.visibleItems[e+1]));t||l(this.visibleItems,this.lastNotOkVisibleItems)?(this.resetVisibleItemsDebouncer.cancel(),this.dispatchEvent(new Yt(this.visibleItems,this.visibleItems.map((t=>this.items[t]))))):this.resetVisibleItemsDebouncer.run((()=>{this.lastNotOkVisibleItems=[...this.visibleItems],this.visibleItems=[],this.initIntersectionObserver(),this.onMutation()}))}}ee.styles=Gt,Qt([s({type:Array})],ee.prototype,"items",void 0),Qt([s({attribute:!1})],ee.prototype,"renderItem",void 0),Qt([s({attribute:!1})],ee.prototype,"getItemKey",void 0),Qt([s({type:Object})],ee.prototype,"scrollToItem",void 0),Qt([s({type:Number})],ee.prototype,"scrollToIndex",void 0),Qt([s({type:Boolean})],ee.prototype,"internalScroll",void 0),Qt([s({type:Number})],ee.prototype,"renderBeforeFirst",void 0),Qt([s({type:Number})],ee.prototype,"renderAfterLast",void 0),Qt([n({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],ee.prototype,"visibleItems",void 0),Qt([r(".scrollable")],ee.prototype,"internalScrollable",void 0),Qt([r(".items-container")],ee.prototype,"itemsContainer",void 0),Qt([n()],ee.prototype,"scrolledToTarget",void 0),h("ft-infinite-scroll")(ee);const ie=f`
172
176
  `,se=f`
173
- `;var ne=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class re extends It{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return V`
177
+ `;var ne=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class re extends At{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registeredComponents=[]}render(){return J`
174
178
  <article id=${this.tocId}>
175
179
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
176
180
  </article>
177
- `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}re.styles=se,ne([$t({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],re.prototype,"mapId",void 0),ne([s()],re.prototype,"tocId",void 0),ne([s({type:Boolean})],re.prototype,"disableContextInteractions",void 0),ne([n()],re.prototype,"tocNode",void 0),a("ft-reader-topic-context")(re);var oe=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class le extends It{constructor(){super(...arguments),this.renderTopic=()=>V`
181
+ `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode,t.disableContextInteractions=this.disableContextInteractions}updated(t){super.updated(t),["mapId","tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}re.styles=se,ne([$t({selector:t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.id}})],re.prototype,"mapId",void 0),ne([s()],re.prototype,"tocId",void 0),ne([s({type:Boolean})],re.prototype,"disableContextInteractions",void 0),ne([n()],re.prototype,"tocNode",void 0),h("ft-reader-topic-context")(re);var oe=function(t,e,i,s){for(var n,r=arguments.length,o=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,i,o):n(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class le extends At{constructor(){super(...arguments),this.renderTopic=()=>J`
178
182
  <ft-reader-topic-title></ft-reader-topic-title>
179
183
  <ft-reader-topic-content></ft-reader-topic-content>
180
- `,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?X:V`
184
+ `,this.disableContextInteractions=!1,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;const e=(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[];return 0===e.length?X:J`
181
185
  <ft-infinite-scroll class="ft-reader-content"
182
186
  .items=${e}
183
187
  .renderItem=${(t,e)=>this.renderTopicInContext(t,e)}
@@ -190,8 +194,8 @@ class Jt extends Bt{constructor(t){if(super(t),this.et=X,t.type!==jt)throw Error
190
194
  @scrolled-to-target=${this.onScrollDone}
191
195
  >
192
196
  </ft-infinite-scroll>
193
- `}renderTopicInContext(t,e){return V`
197
+ `}renderTopicInContext(t,e){return J`
194
198
  <ft-reader-topic-context tocId="${t}" ?disableContextInteractions=${this.disableContextInteractions}>
195
199
  ${this.renderTopic(t,e)}
196
200
  </ft-reader-topic-context>
197
- `}getScrollTarget(){var t,e,i,s,n;if(this.disableContextInteractions)return null;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}le.elementDefinitions={"ft-infinite-scroll":ee},le.styles=ie,oe([s()],le.prototype,"renderTopic",void 0),oe([s({type:Boolean})],le.prototype,"disableContextInteractions",void 0),oe([$t()],le.prototype,"currentPage",void 0),oe([$t()],le.prototype,"scrollTarget",void 0),oe([$t()],le.prototype,"visibleTopics",void 0),oe([$t({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadBeforeFirstVisibleTopic)&&void 0!==i?i:5}})],le.prototype,"renderBeforeFirst",void 0),oe([$t({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadAfterLastVisibleTopic)&&void 0!==i?i:5}})],le.prototype,"renderAfterLast",void 0),oe([r(".ft-reader-content")],le.prototype,"container",void 0),a("ft-reader-content")(le),t.FtReaderContent=le,t.FtReaderContentCssVariables={},t.styles=ie}({});
201
+ `}getScrollTarget(){var t,e,i,s,n;if(this.disableContextInteractions)return null;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.disableContextInteractions||this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;this.disableContextInteractions||null!=(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)||null===(e=this.stateManager)||void 0===e||e.scrollDone()}}le.elementDefinitions={"ft-infinite-scroll":ee},le.styles=ie,oe([s()],le.prototype,"renderTopic",void 0),oe([s({type:Boolean})],le.prototype,"disableContextInteractions",void 0),oe([$t()],le.prototype,"currentPage",void 0),oe([$t()],le.prototype,"scrollTarget",void 0),oe([$t()],le.prototype,"visibleTopics",void 0),oe([$t({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadBeforeFirstVisibleTopic)&&void 0!==i?i:5}})],le.prototype,"renderBeforeFirst",void 0),oe([$t({selector:t=>{var e,i;return null!==(i=null===(e=t.configuration)||void 0===e?void 0:e.loadAfterLastVisibleTopic)&&void 0!==i?i:5}})],le.prototype,"renderAfterLast",void 0),oe([r(".ft-reader-content")],le.prototype,"container",void 0),h("ft-reader-content")(le),t.FtReaderContent=le,t.FtReaderContentCssVariables={},t.styles=ie}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-content",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Main content for integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-infinite-scroll": "1.0.18",
23
- "@fluid-topics/ft-reader-topic-content": "1.0.18",
24
- "@fluid-topics/ft-reader-topic-context": "1.0.18",
25
- "@fluid-topics/ft-reader-topic-title": "1.0.18",
26
- "@fluid-topics/ft-wc-utils": "1.0.18",
22
+ "@fluid-topics/ft-infinite-scroll": "1.0.19",
23
+ "@fluid-topics/ft-reader-topic-content": "1.0.19",
24
+ "@fluid-topics/ft-reader-topic-context": "1.0.19",
25
+ "@fluid-topics/ft-reader-topic-title": "1.0.19",
26
+ "@fluid-topics/ft-wc-utils": "1.0.19",
27
27
  "lit": "2.7.2"
28
28
  },
29
- "gitHead": "7f240ed8d425dbf18c2fdd53c0d1392e3cb2b036"
29
+ "gitHead": "0521f54933e6b92a8d168144fdd2a3f8d8eee97a"
30
30
  }