@fluid-topics/ft-reader-context 0.3.58 → 0.3.60

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,6 +1,6 @@
1
1
  import { PropertyValues } from "lit";
2
2
  import { FtLitElementRedux } from "@fluid-topics/ft-wc-utils";
3
- import { FtReaderComponentInterface, FtReaderLabels } from "./registration";
3
+ import { FtReaderComponentInterface } from "./registration";
4
4
  import { FtReaderNavigationData, FtReaderPage, FtReaderScrollTarget, FtReaderTocNode } from "./store/model";
5
5
  import type { FtMap } from "@fluid-topics/public-api";
6
6
  import { FtReaderContextProperties } from "./ft-reader-context.properties";
@@ -49,12 +49,12 @@ export declare class FtReaderContext extends FtLitElementRedux implements FtRead
49
49
  tocId?: string;
50
50
  section?: string;
51
51
  page?: number;
52
- labels: FtReaderLabels;
53
52
  map?: FtMap;
54
53
  toc?: FtReaderTocNode[];
55
54
  visibleTopics: string[];
56
55
  currentPage?: FtReaderPage;
57
56
  scrollTarget?: FtReaderScrollTarget;
57
+ constructor();
58
58
  protected render(): import("lit-html").TemplateResult<1>;
59
59
  private importStyleIfNeeded;
60
60
  private _stateManager?;
@@ -6,9 +6,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, nothing } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
- import { Debouncer, FtLitElementRedux, jsonProperty, redux } from "@fluid-topics/ft-wc-utils";
9
+ import { Debouncer, FtLitElementRedux, redux } from "@fluid-topics/ft-wc-utils";
10
10
  import { FtReaderStateManager } from "./store/FtReaderStateManager";
11
11
  import { styles } from "./ft-reader-context.css";
12
+ import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
12
13
  export class MapLoadedEvent extends CustomEvent {
13
14
  constructor(map, toc) {
14
15
  super("ft-reader-map-loaded", { detail: { map, toc } });
@@ -42,11 +43,11 @@ export class UnauthorizedErrorEvent extends Event {
42
43
  const fromNumberAttribute = (defaultValue) => (value) => +(value !== null && value !== void 0 ? value : "NaN") > 0 ? +value : defaultValue;
43
44
  export class FtReaderContext extends FtLitElementRedux {
44
45
  constructor() {
45
- super(...arguments);
46
+ super();
46
47
  this.apiIntegrationIdentifier = "ft-reader";
47
- this.labels = {};
48
48
  this.visibleTopics = [];
49
49
  this.navigationDebouncer = new Debouncer(5);
50
+ this.addStore(ftAppInfoStore);
50
51
  }
51
52
  render() {
52
53
  return html `
@@ -69,7 +70,7 @@ export class FtReaderContext extends FtLitElementRedux {
69
70
  if (this._stateManager == null) {
70
71
  this._stateManager = FtReaderStateManager.build(this.id || ("" + Math.round(Math.random() * 999000)).padStart(6, "0"));
71
72
  this._stateManager.errorHandler = (e) => this.handleLoadError(e);
72
- this.addStore(this.stateManager.store);
73
+ this.addStore(this.stateManager.store, "reader");
73
74
  }
74
75
  return this._stateManager;
75
76
  }
@@ -87,11 +88,8 @@ export class FtReaderContext extends FtLitElementRedux {
87
88
  }
88
89
  updated(props) {
89
90
  super.updated(props);
90
- if (props.has("baseUrl")) {
91
- this.stateManager.setBaseUrl(this.baseUrl);
92
- }
93
- if (props.has("apiIntegrationIdentifier")) {
94
- this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier);
91
+ if (props.has("baseUrl") || props.has("apiIntegrationIdentifier")) {
92
+ this.stateManager.initService(this.baseUrl, this.apiIntegrationIdentifier);
95
93
  }
96
94
  if (props.has("mapId")) {
97
95
  this.stateManager.setMapId(this.mapId);
@@ -105,9 +103,6 @@ export class FtReaderContext extends FtLitElementRedux {
105
103
  else if (props.has("mapId") && this.mapId) {
106
104
  this.navigateToTarget();
107
105
  }
108
- if (props.has("labels")) {
109
- this.stateManager.setLabels(this.labels);
110
- }
111
106
  }
112
107
  contentAvailableCallback(props) {
113
108
  var _a;
@@ -188,10 +183,16 @@ export class FtReaderContext extends FtLitElementRedux {
188
183
  // language=CSS
189
184
  FtReaderContext.styles = styles;
190
185
  __decorate([
191
- property()
186
+ redux({
187
+ attribute: true,
188
+ store: ftAppInfoStore.name
189
+ })
192
190
  ], FtReaderContext.prototype, "baseUrl", void 0);
193
191
  __decorate([
194
- property()
192
+ redux({
193
+ attribute: true,
194
+ store: ftAppInfoStore.name
195
+ })
195
196
  ], FtReaderContext.prototype, "apiIntegrationIdentifier", void 0);
196
197
  __decorate([
197
198
  property()
@@ -206,21 +207,18 @@ __decorate([
206
207
  property({ type: Number, converter: { fromAttribute: fromNumberAttribute() } })
207
208
  ], FtReaderContext.prototype, "page", void 0);
208
209
  __decorate([
209
- jsonProperty({})
210
- ], FtReaderContext.prototype, "labels", void 0);
211
- __decorate([
212
- redux()
210
+ redux({ store: "reader" })
213
211
  ], FtReaderContext.prototype, "map", void 0);
214
212
  __decorate([
215
- redux()
213
+ redux({ store: "reader" })
216
214
  ], FtReaderContext.prototype, "toc", void 0);
217
215
  __decorate([
218
- redux()
216
+ redux({ store: "reader" })
219
217
  ], FtReaderContext.prototype, "visibleTopics", void 0);
220
218
  __decorate([
221
- redux()
219
+ redux({ store: "reader" })
222
220
  ], FtReaderContext.prototype, "currentPage", void 0);
223
221
  __decorate([
224
- redux()
222
+ redux({ store: "reader" })
225
223
  ], FtReaderContext.prototype, "scrollTarget", void 0);
226
224
  //# sourceMappingURL=ft-reader-context.js.map
@@ -1,9 +1,12 @@
1
- !function(t,i,s,e){const n={setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setMapId:(t,i)=>{t.mapId=i.payload},setTocId:(t,i)=>{t.tocId=i.payload},setMap:(t,i)=>{t.map=i.payload},setToc:(t,i)=>{t.toc=i.payload},setPagesToc:(t,i)=>{t.pagesToc=i.payload},setPaginationConfiguration:(t,i)=>{t.paginationConfiguration=i.payload},setCurrentPage:(t,i)=>{t.currentPage=i.payload},setScrollTarget:(t,i)=>{t.scrollTarget=i.payload},setVisibleTopics:(t,i)=>{t.visibleTopics=i.payload},setLabels:(t,i)=>{t.labels=i.payload},setConfiguration:(t,i)=>{t.configuration=i.payload}},r={topicMissingAdvice:"Sorry, this topic is missing",somethingWentWrong:"Oops, something went wrong"};class o{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,i,s){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,s)),null==t.tocId?this.extractPagesToc(t.children,i,s):[{tocId:t.tocId,title:t.title,depth:i,children:this.extractPagesToc(t.children,i+1,t.tocId)}])))}convertNodes(t,i,s){return t.flatMap((t=>{var e,n,r;if(null==t.tocId)return[...this.convertSectionNodes(null!==(e=t.pageToc)&&void 0!==e?e:[],i,t.tocId),...this.convertNodes(t.children,i,t.tocId)];let o=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const h={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:o,depth:i,parentTocId:s,children:[]};this.register(h);const a=this.convertSectionNodes(null!==(r=t.pageToc)&&void 0!==r?r:[],i+1,t.tocId),l=this.convertNodes(t.children,i+1,h.tocId);return h.children=[...a,...l],[h]}))}convertSectionNodes(t,i,s){return t.flatMap((t=>{var e;let n=null===(e=t.prettyUrl)||void 0===e?void 0:e.replace(/^\//,"");const r={...t,prettyUrl:n,depth:i,parentTocId:s,children:[]};return this.register(r),r.children=this.convertSectionNodes(t.children,i+1,t.tocId),[r]}))}buildPage(t,i){var s,e,n,r,o,h;const a={number:this.pages.length+1,title:null!==(s=t.title)&&void 0!==s?s:"",rootTocId:null!==(e=t.tocId)&&void 0!==e?e:"root",toc:(null!==(n=t.pageToc)&&void 0!==n?n:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:i?this.buildBreadcrumb(this.nodeByTocId[i]):[]},l=(t,i)=>(i?a.topics:a.hiddenTopics).push(t),c=null!==(o=null===(r=t.pageConfiguration)||void 0===r?void 0:r.parentsVisibility)&&void 0!==o?o:[];return a.breadcrumb.forEach(((t,i)=>{l(t,c[i])})),t.tocId&&l(t.tocId,t.pageConfiguration.isVisible),a.topics.push(...this.tocIds(null!==(h=t.pageToc)&&void 0!==h?h:[])),a}registerPage(t){for(let i of[...t.topics,...t.hiddenTopics])this.pageByTocId[i]||(this.pageByTocId[i]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const i=[t.tocId];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return i}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class h{convertPaginatedToc(t){return new o(t).build()}}class a{constructor(t,s,e,n,o,h){this.converter=t,this.api=s,this.cache=e,this.baseUrl=n,this.cleanSessionDebouncer=new i.Debouncer,this.labelResolver=new i.ParametrizedLabelResolver(r,{}),n.endsWith("/")||(this.baseUrl=n+"/"),this.mapId=o,this.labels=null!=h?h:{},this.initCache()}static build(t,s,e,n){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");const r=new window.fluidtopics.FluidTopicsApi(t,s,!0);return new a(new h,r,new i.CacheRegistry,t,e,n)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.api.getMap(this.mapId))),this.cache.register("enrichedToc",(()=>this.api.getPages(this.mapId).then((t=>this.converter.convertPaginatedToc(t))))),this.cache.register("session",(async()=>{const t=await this.api.getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>this.cache.clear("session")),t.idleTimeoutInMillis),t})),this.cache.register("ratingSummary",(()=>this.api.getMapRating(this.mapId)))}clear(){this.cache.clearAll(),this.cleanSessionDebouncer.cancel()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getSession(){return this.cache.get("session")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var i;return null===(i=this.enrichedToc)||void 0===i?void 0:i.nodeByTocId[t]}async getPage(t){const i=await this.getEnrichedToc();return i.pages[t-1]||i.pages[0]}async getPageByTocId(t){const i=await this.getEnrichedToc();return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,i,s){const e=this.getNavigationData(t,i,s),n="r/"+(e.prettyUrl?e.prettyUrl:`${e.mapId}/${e.tocId}`),r=new URL(n,this.baseUrl);return null!=e.page&&r.searchParams.set("page",`${e.page}`),e.prettyUrlDuplicated&&r.searchParams.set("tocId",e.tocId),null!=e.section&&r.searchParams.set("section",e.section),r.href}getNavigationData(t,i,s){var e,n;t=t||"root";const r=this.enrichedToc,o=null==r?void 0:r.pageByTocId[t],h=null==r?void 0:r.nodeByTocId[t],a=null==h?void 0:h.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(e=null==h?void 0:h.title)&&void 0!==e?e:"",page:i&&o&&o.number!==i?i:void 0,prettyUrl:null!=a?a.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(n=null==r?void 0:r.duplicatedPrettyUrls.has(null!=a?a:""))&&void 0!==n&&n,section:s}}async getAccurateNavigationData(t,i,s){return await this.getEnrichedToc(),this.getNavigationData(t,i,s)}set labels(t){this.labelResolver=new i.ParametrizedLabelResolver(r,t)}resolveLabel(t,...i){return this.labelResolver.resolve(t,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>t.publication))}getTopicRating(t){return this.getRatingSummary().then((i=>{var s;return{type:i.topics.type,rating:null===(s=i.topics)||void 0===s?void 0:s.ratings.find((i=>i.tocId===t))}}))}rateMap(t,i){return this.api.rateMap(this.mapId,t,i).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,i,s){return this.api.rateTopic(this.mapId,t,i,s).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){(await this.getSession()).sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,i){return this.api.sendTopicFeedback(this.mapId,t,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class l{constructor(t){this.store=t,this.reloadDebouncer=new i.Debouncer(10)}static build(t){return new l((t=>i.FtReduxStore.get({name:"ft-reader-"+t,initialState:{baseUrl:void 0,apiIntegrationIdentifier:"ft-reader",mapId:void 0,visibleTopics:[],labels:{}},reducers:n}))(t.trim()||"context"))}setBaseUrl(t){this.store.actions.setBaseUrl(t),this.initService()}setApiIntegrationIdentifier(t){this.store.actions.setApiIntegrationIdentifier(t),this.initService()}initService(){const t=this.store.getState();t.baseUrl&&t.apiIntegrationIdentifier?this.service=a.build(t.baseUrl,t.apiIntegrationIdentifier,t.mapId,t.labels):this.service=void 0,this.reload()}setMapId(t){this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),this.reload()}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}setLabels(t){this.store.actions.setLabels(t),this.service&&(this.service.labels=t)}async awaitService(){for(;null==this.service;)await i.delay(5);return this.service}async navigateToTopic(t,i,s){const e=await this.awaitService();let n=await(null!=s?e.getPage(s):e.getPageByTocId(t));this.store.actions.setCurrentPage(n),this.store.actions.setScrollTarget({tocId:t,section:i})}async navigateToPage(t){const i=await this.awaitService();let s=await i.getPage(t);this.store.actions.setCurrentPage(s)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,i;null===(t=this.service)||void 0===t||t.clear(),this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),(null===(i=this.service)||void 0===i?void 0:i.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,s,e,n;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.setMap(t))),null===(s=this.service)||void 0===s?void 0:s.getToc().then((t=>this.store.actions.setToc(t))),null===(e=this.service)||void 0===e?void 0:e.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){this.errorHandler&&this.errorHandler(t)}}}const c=s.css`
2
- `;var d=function(t,i,s,e){for(var n,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,s,o):n(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class u extends CustomEvent{constructor(t,i){super("ft-reader-map-loaded",{detail:{map:t,toc:i}})}}class v extends CustomEvent{constructor(t,i){super("ft-reader-visible-topics-change",{detail:{visibleTopics:i}})}}class p extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class g extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class w extends Event{constructor(){super("ft-reader-map-not-found")}}class f extends Event{constructor(){super("ft-reader-map-unauthorized")}}class m extends i.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-reader",this.labels={},this.visibleTopics=[],this.navigationDebouncer=new i.Debouncer(5)}render(){return s.html`
1
+ !function(t,i,s,e){const o={setMapId:(t,i)=>{t.mapId=i.payload},setTocId:(t,i)=>{t.tocId=i.payload},setMap:(t,i)=>{t.map=i.payload},setToc:(t,i)=>{t.toc=i.payload},setPagesToc:(t,i)=>{t.pagesToc=i.payload},setPaginationConfiguration:(t,i)=>{t.paginationConfiguration=i.payload},setCurrentPage:(t,i)=>{t.currentPage=i.payload},setScrollTarget:(t,i)=>{t.scrollTarget=i.payload},setVisibleTopics:(t,i)=>{t.visibleTopics=i.payload},setConfiguration:(t,i)=>{t.configuration=i.payload}};class n{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,i,s){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,s)),null==t.tocId?this.extractPagesToc(t.children,i,s):[{tocId:t.tocId,title:t.title,depth:i,children:this.extractPagesToc(t.children,i+1,t.tocId)}])))}convertNodes(t,i,s){return t.flatMap((t=>{var e,o,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(e=t.pageToc)&&void 0!==e?e:[],i,t.tocId),...this.convertNodes(t.children,i,t.tocId)];let r=null===(o=t.prettyUrl)||void 0===o?void 0:o.replace(/^\//,"");const a={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:r,depth:i,parentTocId:s,children:[]};this.register(a);const h=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],i+1,t.tocId),l=this.convertNodes(t.children,i+1,a.tocId);return a.children=[...h,...l],[a]}))}convertSectionNodes(t,i,s){return t.flatMap((t=>{var e;let o=null===(e=t.prettyUrl)||void 0===e?void 0:e.replace(/^\//,"");const n={...t,prettyUrl:o,depth:i,parentTocId:s,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,i+1,t.tocId),[n]}))}buildPage(t,i){var s,e,o,n,r,a;const h={number:this.pages.length+1,title:null!==(s=t.title)&&void 0!==s?s:"",rootTocId:null!==(e=t.tocId)&&void 0!==e?e:"root",toc:(null!==(o=t.pageToc)&&void 0!==o?o:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:i?this.buildBreadcrumb(this.nodeByTocId[i]):[]},l=(t,i)=>(i?h.topics:h.hiddenTopics).push(t),d=null!==(r=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==r?r:[];return h.breadcrumb.forEach(((t,i)=>{l(t,d[i])})),t.tocId&&l(t.tocId,t.pageConfiguration.isVisible),h.topics.push(...this.tocIds(null!==(a=t.pageToc)&&void 0!==a?a:[])),h}registerPage(t){for(let i of[...t.topics,...t.hiddenTopics])this.pageByTocId[i]||(this.pageByTocId[i]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const i=[t.tocId];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return i}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class r{convertPaginatedToc(t){return new n(t).build()}}const a=s.css`
2
+ `,h=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});var l;const d=Symbol("clearAfterUnitTest");class c{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentBaseUrl="",this.currentUiLocale="",this[l]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},h.subscribe((()=>this.updateApi())),this.updateApi()}updateApi(){const{baseUrl:t,apiIntegrationIdentifier:i,uiLocale:s}=h.getState();t&&i?(this.api=this.apiProvider(t,i),(this.api&&this.currentBaseUrl!==t||this.currentUiLocale!==s)&&(this.currentBaseUrl=t,this.currentUiLocale=s,this.cache.clearAll(),this.notifyAll())):this.api=void 0}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,s){var e;if(t=t.toLowerCase(),Object.keys(s).length>0){const o={...null!==(e=this.defaultMessages[t])&&void 0!==e?e:{},...s};i.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,s,...e){var o,n,r;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},a).resolve(s,...e)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var i;return await(null===(i=this.api)||void 0===i?void 0:i.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var s;return t=t.toLowerCase(),this.listeners[t]=null!==(s=this.listeners[t])&&void 0!==s?s:new Set,this.listeners[t].add(i),()=>{var s;return null===(s=this.listeners[t])||void 0===s?void 0:s.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}l=d,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new c(((t,i)=>window.fluidtopics?new window.fluidtopics.FluidTopicsApi(t,i,!0):void 0)));const u=window.FluidTopicsI18nService;var v=function(t,i,s,e){for(var o,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,s,r):o(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};class p extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>window.fluidtopics&&this.baseUrl?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return s.html`
3
+ <slot></slot>
4
+ `}updated(t){super.updated(t),t.has("baseUrl")&&h.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&h.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&h.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&h.actions.setNoCustom(this.noCustom),t.has("editorMode")&&h.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&h.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&h.actions.setSession(this.session),t.has("availableUiLocales")&&h.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>u.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}p.elementDefinitions={},p.styles=a,v([e.property()],p.prototype,"baseUrl",void 0),v([e.property()],p.prototype,"apiIntegrationIdentifier",void 0),v([e.property()],p.prototype,"uiLocale",void 0),v([i.jsonProperty([])],p.prototype,"availableUiLocales",void 0),v([e.property({type:Boolean})],p.prototype,"editorMode",void 0),v([e.property({type:Boolean})],p.prototype,"noCustom",void 0),v([e.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],p.prototype,"noCustomComponent",void 0),v([e.property({type:Boolean})],p.prototype,"withManualResources",void 0),v([i.jsonProperty([])],p.prototype,"messageContexts",void 0),v([i.jsonProperty(void 0)],p.prototype,"session",void 0),v([e.property({type:Object})],p.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(p);class g{constructor(t,i,s,e,o){this.converter=t,this.api=i,this.cache=s,this.baseUrl=e,e.endsWith("/")||(this.baseUrl=e+"/"),this.mapId=o,this.initCache()}static build(t,s,e){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");const o=new window.fluidtopics.FluidTopicsApi(t,s,!0);return new g(new r,o,new i.CacheRegistry,t,e)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.api.getMap(this.mapId))),this.cache.register("enrichedToc",(()=>this.api.getPages(this.mapId).then((t=>this.converter.convertPaginatedToc(t))))),this.cache.register("ratingSummary",(()=>this.api.getMapRating(this.mapId)))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var i;return null===(i=this.enrichedToc)||void 0===i?void 0:i.nodeByTocId[t]}async getPage(t){const i=await this.getEnrichedToc();return i.pages[t-1]||i.pages[0]}async getPageByTocId(t){const i=await this.getEnrichedToc();return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,i,s){const e=this.getNavigationData(t,i,s),o="r/"+(e.prettyUrl?e.prettyUrl:`${e.mapId}/${e.tocId}`),n=new URL(o,this.baseUrl);return null!=e.page&&n.searchParams.set("page",`${e.page}`),e.prettyUrlDuplicated&&n.searchParams.set("tocId",e.tocId),null!=e.section&&n.searchParams.set("section",e.section),n.href}getNavigationData(t,i,s){var e,o;t=t||"root";const n=this.enrichedToc,r=null==n?void 0:n.pageByTocId[t],a=null==n?void 0:n.nodeByTocId[t],h=null==a?void 0:a.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(e=null==a?void 0:a.title)&&void 0!==e?e:"",page:i&&r&&r.number!==i?i:void 0,prettyUrl:null!=h?h.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(o=null==n?void 0:n.duplicatedPrettyUrls.has(null!=h?h:""))&&void 0!==o&&o,section:s}}async getAccurateNavigationData(t,i,s){return await this.getEnrichedToc(),this.getNavigationData(t,i,s)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>t.publication))}getTopicRating(t){return this.getRatingSummary().then((i=>{var s;return{type:i.topics.type,rating:null===(s=i.topics)||void 0===s?void 0:s.ratings.find((i=>i.tocId===t))}}))}rateMap(t,i){return this.api.rateMap(this.mapId,t,i).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,i,s){return this.api.rateTopic(this.mapId,t,i,s).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=h.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,i){return this.api.sendTopicFeedback(this.mapId,t,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class w{constructor(t){this.store=t,this.reloadDebouncer=new i.Debouncer(10)}static build(t){return new w((t=>i.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[]},reducers:o}))(t.trim()||"context"))}initService(t,i){const s=this.store.getState();this.service=t&&i?g.build(t,i,s.mapId):void 0,this.reload()}setMapId(t){this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),this.reload()}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}async awaitService(){for(;null==this.service;)await i.delay(5);return this.service}async navigateToTopic(t,i,s){const e=await this.awaitService();let o=await(null!=s?e.getPage(s):e.getPageByTocId(t));this.store.actions.setCurrentPage(o),this.store.actions.setScrollTarget({tocId:t,section:i})}async navigateToPage(t){const i=await this.awaitService();let s=await i.getPage(t);this.store.actions.setCurrentPage(s)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,i;null===(t=this.service)||void 0===t||t.clear(),this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),(null===(i=this.service)||void 0===i?void 0:i.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,s,e,o;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.setMap(t))),null===(s=this.service)||void 0===s?void 0:s.getToc().then((t=>this.store.actions.setToc(t))),null===(e=this.service)||void 0===e?void 0:e.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(o=this.service)||void 0===o?void 0:o.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){this.errorHandler&&this.errorHandler(t)}}}const m=s.css`
5
+ `;var f=function(t,i,s,e){for(var o,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(i,s,r):o(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};class b extends CustomEvent{constructor(t,i){super("ft-reader-map-loaded",{detail:{map:t,toc:i}})}}class y extends CustomEvent{constructor(t,i){super("ft-reader-visible-topics-change",{detail:{visibleTopics:i}})}}class T extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class I extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class C extends Event{constructor(){super("ft-reader-map-not-found")}}class U extends Event{constructor(){super("ft-reader-map-unauthorized")}}class P extends i.FtLitElementRedux{constructor(){super(),this.apiIntegrationIdentifier="ft-reader",this.visibleTopics=[],this.navigationDebouncer=new i.Debouncer(5),this.addStore(h)}render(){return s.html`
3
6
  ${this.importStyleIfNeeded()}
4
7
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
5
8
  `}importStyleIfNeeded(){var t,i;return!this.stateManager.service||window.location.href.startsWith(null!==(t=this.baseUrl)&&void 0!==t?t:"")?s.nothing:s.html`
6
9
  <style>
7
10
  @import "${null===(i=this.stateManager.service)||void 0===i?void 0:i.themeStylesheet()}"
8
11
  </style>
9
- `}get stateManager(){return null==this._stateManager&&(this._stateManager=l.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store)),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.awaitService().then((t=>{const i=t.fontsStylesheet();if(!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${i}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),document.head.append(t)}}))}updated(t){super.updated(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("mapId")&&this.stateManager.setMapId(this.mapId),(t.has("tocId")||t.has("section")||t.has("page"))&&this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):t.has("page")&&!this.tocId&&null!=this.page?this.stateManager.navigateToPage(this.page):t.has("mapId")&&this.mapId&&this.navigateToTarget(),t.has("labels")&&this.stateManager.setLabels(this.labels)}contentAvailableCallback(t){var i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new u(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(i=this.scrollTarget)||void 0===i?void 0:i.tocId)){const i=t.get("scrollTarget");null!=(null==i?void 0:i.tocId)&&this.navigationDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(i.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,i.section).then((t=>this.dispatchEvent(new p(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var i;return this.stateManager.service.getAccurateNavigationData(t,null===(i=this.currentPage)||void 0===i?void 0:i.number)}))).then((t=>{let i=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new v(this.map,i))}))}buildBreadcrumb(t){var i,s,e,n;let r=[],o=null===(s=null===(i=this.stateManager.service)||void 0===i?void 0:i.getTocNodeNow(t))||void 0===s?void 0:s.parentTocId,h=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(o);for(;h;)r.unshift({tocId:h.tocId,title:h.title}),h=null===(n=this.stateManager.service)||void 0===n?void 0:n.getTocNodeNow(h.parentTocId);return r}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}registerComponent(t){t.stopPropagation();const i=t.composedPath()[0];this.register(i)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const i=t;404===i.status?this.dispatchEvent(new w):401===i.status?this.dispatchEvent(new f):this.dispatchEvent(new g(t))}}var b;m.styles=c,d([e.property()],m.prototype,"baseUrl",void 0),d([e.property()],m.prototype,"apiIntegrationIdentifier",void 0),d([e.property()],m.prototype,"mapId",void 0),d([e.property()],m.prototype,"tocId",void 0),d([e.property()],m.prototype,"section",void 0),d([e.property({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:b}})],m.prototype,"page",void 0),d([i.jsonProperty({})],m.prototype,"labels",void 0),d([i.redux()],m.prototype,"map",void 0),d([i.redux()],m.prototype,"toc",void 0),d([i.redux()],m.prototype,"visibleTopics",void 0),d([i.redux()],m.prototype,"currentPage",void 0),d([i.redux()],m.prototype,"scrollTarget",void 0),i.customElement("ft-reader-context")(m),t.FtReaderContext=m,t.FtReaderContextCssVariables={},t.LoadErrorEvent=g,t.MapLoadedEvent=u,t.NavigationDoneEvent=p,t.NotFoundErrorEvent=w,t.UnauthorizedErrorEvent=f,t.VisibleTopicsChangeEvent=v,t.styles=c,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
12
+ `}get stateManager(){return null==this._stateManager&&(this._stateManager=w.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.awaitService().then((t=>{const i=t.fontsStylesheet();if(!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${i}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),document.head.append(t)}}))}updated(t){super.updated(t),(t.has("baseUrl")||t.has("apiIntegrationIdentifier"))&&this.stateManager.initService(this.baseUrl,this.apiIntegrationIdentifier),t.has("mapId")&&this.stateManager.setMapId(this.mapId),(t.has("tocId")||t.has("section")||t.has("page"))&&this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):t.has("page")&&!this.tocId&&null!=this.page?this.stateManager.navigateToPage(this.page):t.has("mapId")&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new b(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(i=this.scrollTarget)||void 0===i?void 0:i.tocId)){const i=t.get("scrollTarget");null!=(null==i?void 0:i.tocId)&&this.navigationDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(i.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,i.section).then((t=>this.dispatchEvent(new T(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var i;return this.stateManager.service.getAccurateNavigationData(t,null===(i=this.currentPage)||void 0===i?void 0:i.number)}))).then((t=>{let i=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new y(this.map,i))}))}buildBreadcrumb(t){var i,s,e,o;let n=[],r=null===(s=null===(i=this.stateManager.service)||void 0===i?void 0:i.getTocNodeNow(t))||void 0===s?void 0:s.parentTocId,a=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(r);for(;a;)n.unshift({tocId:a.tocId,title:a.title}),a=null===(o=this.stateManager.service)||void 0===o?void 0:o.getTocNodeNow(a.parentTocId);return n}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}registerComponent(t){t.stopPropagation();const i=t.composedPath()[0];this.register(i)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const i=t;404===i.status?this.dispatchEvent(new C):401===i.status?this.dispatchEvent(new U):this.dispatchEvent(new I(t))}}var S;P.styles=m,f([i.redux({attribute:!0,store:h.name})],P.prototype,"baseUrl",void 0),f([i.redux({attribute:!0,store:h.name})],P.prototype,"apiIntegrationIdentifier",void 0),f([e.property()],P.prototype,"mapId",void 0),f([e.property()],P.prototype,"tocId",void 0),f([e.property()],P.prototype,"section",void 0),f([e.property({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:S}})],P.prototype,"page",void 0),f([i.redux({store:"reader"})],P.prototype,"map",void 0),f([i.redux({store:"reader"})],P.prototype,"toc",void 0),f([i.redux({store:"reader"})],P.prototype,"visibleTopics",void 0),f([i.redux({store:"reader"})],P.prototype,"currentPage",void 0),f([i.redux({store:"reader"})],P.prototype,"scrollTarget",void 0),i.customElement("ft-reader-context")(P),t.FtReaderContext=P,t.FtReaderContextCssVariables={},t.LoadErrorEvent=I,t.MapLoadedEvent=b,t.NavigationDoneEvent=T,t.NotFoundErrorEvent=C,t.UnauthorizedErrorEvent=U,t.VisibleTopicsChangeEvent=y,t.styles=m,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
16
16
  */
17
- if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,n=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,u=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const u=r.prototype.attributeChangedCallback,a=new Set(r.observedAttributes||[]);f(r,a,u);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:u,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let l=i.call(n,t);l||(l=h(t),e.call(n,t,l)),this===window.customElements&&(s.set(r,c),c.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,c,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!c(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=u.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):o.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o,r),i.call(this,o,t,r)}else n.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),a=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const y=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&u.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const w=(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(w(Element,"innerHTML"),w(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const n=e.call(this,...i);return t.set(n,this),n},i.forEach((e=>{const i=window.ElementInternals.prototype,n=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${n} on 'ElementInternals': The target element is not a form-associated custom element.`);n?.call(this,...e)}}));class n extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,i)=>{const n=t.getAttribute("name"),r=e.get(n)||[];this[+i]=t,r.push(t),e.set(n,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new n(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,i,n)=>{try{e.bind(window.customElements)(t,i,n)}catch(e){console.info(t,i,n,e)}}}class e extends Promise{constructor(t){super(((e,i)=>t((t=>{this.isCanceled?i(new Error("Promise has been canceled")):e(t)}),(t=>{this.isCanceled?i(new Error("Promise has been canceled")):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.content[t]instanceof e&&this.content[t].cancel(),delete this.content[t]}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,i){if(void 0===this.content[t]){if(null==(i=null!=i?i:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(n=i(),new e(((t,e)=>n.then(t).catch(e))));return this.content[t]=r,r.then((e=>(this.content[t]=e,e)))}var n;if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class n{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 n=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void n(t)}r(!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,n=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap;let u;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,u=new Set(r.observedAttributes||[]);d(r,u,a);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:u};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let l=i.call(n,t);l||(l=h(t),e.call(n,t,l)),this===window.customElements&&(s.set(r,c),c.standInClass=l);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)o.delete(t),v(t,c,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),n.upgrade.apply(n,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=u;if(e)return u=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!c(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const n=l(i)||window.customElements,r=n._getDefinition(e);return r?v(i,r):o.set(i,n),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){r.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const n=t.prototype.setAttribute;n&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o,r),i.call(this,o,t,r)}else n.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);r.call(this,n),i.call(this,n,t,null)}else r.call(this,n)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},v=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),u=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const w=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};w(ShadowRoot,"createElement",document),w(ShadowRoot,"importNode",document),w(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const n=e.call(this,...i);return t.set(n,this),n},i.forEach((e=>{const i=window.ElementInternals.prototype,n=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==r.get(i).formAssociated)throw new DOMException(`Failed to execute ${n} on 'ElementInternals': The target element is not a form-associated custom element.`);n?.call(this,...e)}}));class n extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,i)=>{const n=t.getAttribute("name"),r=e.get(n)||[];this[+i]=t,r.push(t),e.set(n,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new n(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,i,n)=>{try{e.bind(window.customElements)(t,i,n)}catch(e){console.info(t,i,n,e)}}}class e extends Promise{constructor(t){super(((e,i)=>t((t=>{this.isCanceled?i(new Error("Promise has been canceled")):e(t)}),(t=>{this.isCanceled?i(new Error("Promise has been canceled")):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.content[t]instanceof e&&this.content[t].cancel(),delete this.content[t]}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,i){if(void 0===this.content[t]){if(null==(i=null!=i?i:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(n=i(),new e(((t,e)=>n.then(t).catch(e))));return this.content[t]=r,r.then((e=>(this.content[t]=e,e)))}var n;if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class n{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 n=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void n(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
@@ -24,40 +24,40 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
24
24
  * @license
25
25
  * Copyright 2021 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */}var s;function u(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,n,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;0!=n--;)if(!u(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!u(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!u(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(s=window.HTMLSlotElement)||void 0===s||s.prototype.assignedElements;function a(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!u(t,e),...null!=e?e:{}})}const c=t=>new Promise((e=>setTimeout(e,t)))
27
+ */}var s;function a(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,n,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;0!=n--;)if(!a(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!a(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!a(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(s=window.HTMLSlotElement)||void 0===s||s.prototype.assignedElements;const u=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function c(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({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)=>!a(t,e),...null!=e?e:{}})}const l=t=>new Promise((e=>setTimeout(e,t)))
28
28
  /**
29
29
  * @license
30
30
  * Copyright 2019 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */,l=window,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),d=new WeakMap;class v{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)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(h&&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 p=t=>new v("string"==typeof t?t:t+"",void 0,f),b=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new v(i,t,f)},y=(t,e)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=l.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},w=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return p(e)})(t):t
32
+ */,h=window,d=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),v=new WeakMap;class p{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)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(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=v.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&v.set(e,t))}return t}toString(){return this.cssText}}const b=t=>new p("string"==typeof t?t:t+"",void 0,f),w=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new p(i,t,f)},y=(t,e)=>{d?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=h.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},m=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return b(e)})(t):t
33
33
  /**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */;var m;const g=window,x=g.trustedTypes,O=x?x.emptyScript:"",E=g.reactiveElementPolyfillSupport,S={toAttribute(t,e){switch(e){case Boolean:t=t?O:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},j=(t,e)=>e!==t&&(e==e||t==t),N={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:j};class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=N){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||N}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(w(t))}else void 0!==t&&e.push(w(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return y(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=N){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:S).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:S;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||j)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
37
+ */;var g;const x=window,O=x.trustedTypes,E=O?O.emptyScript:"",S=x.reactiveElementPolyfillSupport,j={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},C=(t,e)=>e!==t&&(e==e||t==t),N={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:C};class R extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=N){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||N}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return y(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=N){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:j).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:j;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||C)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
38
38
  /**
39
39
  * @license
40
40
  * Copyright 2017 Google LLC
41
41
  * SPDX-License-Identifier: BSD-3-Clause
42
42
  */
43
- var R;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:C}),(null!==(m=g.reactiveElementVersions)&&void 0!==m?m:g.reactiveElementVersions=[]).push("1.4.1");const M=window,T=M.trustedTypes,A=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,$="?"+U,k=`<${$}>`,I=document,P=(t="")=>I.createComment(t),F=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,D=/>/g,W=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),K=/'/g,H=/"/g,z=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),J=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),q=new WeakMap,X=I.createTreeWalker(I,129,null,!1);class G{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,u=this.parts,[a,c]=((t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=_;for(let e=0;e<i;e++){const i=t[e];let u,a,c=-1,l=0;for(;l<i.length&&(s.lastIndex=l,a=s.exec(i),null!==a);)l=s.lastIndex,s===_?"!--"===a[1]?s=B:void 0!==a[1]?s=D:void 0!==a[2]?(z.test(a[2])&&(r=RegExp("</"+a[2],"g")),s=W):void 0!==a[3]&&(s=W):s===W?">"===a[0]?(s=null!=r?r:_,c=-1):void 0===a[1]?c=-2:(c=s.lastIndex-a[2].length,u=a[1],s=void 0===a[3]?W:'"'===a[3]?H:K):s===H||s===K?s=W:s===B||s===D?s=_:(s=W,r=void 0);const h=s===W&&t[e+1].startsWith("/>")?" ":"";o+=s===_?i+k:c>=0?(n.push(u),i.slice(0,c)+"$lit$"+i.slice(c)+U+h):i+U+(-2===c?(n.push(void 0),e):h)}const u=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==A?A.createHTML(u):u,n]})(t,e);if(this.el=G.createElement(a,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=X.nextNode())&&u.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(U)){const i=c[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(U),e=/([.?@])?(.*)/.exec(i);u.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?it:"?"===e[1]?rt:"@"===e[1]?ot:et})}else u.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(z.test(n.tagName)){const t=n.textContent.split(U),e=t.length-1;if(e>0){n.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],P()),X.nextNode(),u.push({type:2,index:++r});n.append(t[e],P())}}}else if(8===n.nodeType)if(n.data===$)u.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(U,t+1));)u.push({type:7,index:r}),t+=U.length-1}r++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,n){var r,o,s,u;if(e===J)return e;let a=void 0!==n?null===(r=i._$Co)||void 0===r?void 0:r[n]:i._$Cl;const c=F(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(o=null==a?void 0:a._$AO)||void 0===o||o.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,n)),void 0!==n?(null!==(s=(u=i)._$Co)&&void 0!==s?s:u._$Co=[])[n]=a:i._$Cl=a),void 0!==a&&(e=Y(t,a._$AS(t,e.values),a,n)),e}class Q{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);X.currentNode=r;let o=X.nextNode(),s=0,u=0,a=n[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new tt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new st(o,this,t)),this.u.push(e),a=n[++u]}s!==(null==a?void 0:a.index)&&(o=X.nextNode(),s++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{constructor(t,e,i,n){var r;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=null===(r=null==n?void 0:n.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),F(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==J&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>L(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Z&&F(this._$AH)?this._$AA.nextSibling.data=t:this.T(I.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=G.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new Q(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}k(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new tt(this.O(P()),this.O(P()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,i,n,r){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=Y(this,t,e,0),o=!F(t)||t!==this._$AH&&t!==J,o&&(this._$AH=t);else{const n=t;let s,u;for(t=r[0],s=0;s<r.length-1;s++)u=Y(this,n[i+s],e,s),u===J&&(u=this._$AH[s]),o||(o=!F(u)||u!==this._$AH[s]),u===Z?t=Z:t!==Z&&(t+=(null!=u?u:"")+r[s+1]),this._$AH[s]=u}o&&!n&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const nt=T?T.emptyScript:"";class rt extends et{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,nt):this.element.removeAttribute(this.name)}}class ot extends et{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Y(this,t,e,0))&&void 0!==i?i:Z)===J)return;const n=this._$AH,r=t===Z&&n!==Z||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==Z&&(n===Z||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class st{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){Y(this,t)}}const ut=M.litHtmlPolyfillSupport;null==ut||ut(G,tt),(null!==(R=M.litHtmlVersions)&&void 0!==R?R:M.litHtmlVersions=[]).push("2.4.0");
43
+ var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:R}),(null!==(g=x.reactiveElementVersions)&&void 0!==g?g:x.reactiveElementVersions=[]).push("1.4.1");const U=window,A=U.trustedTypes,T=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,I=`lit$${(Math.random()+"").slice(9)}$`,$="?"+I,k=`<${$}>`,P=document,F=(t="")=>P.createComment(t),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,W=/>/g,K=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),H=/'/g,z=/"/g,V=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Z=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),X=new WeakMap,G=P.createTreeWalker(P,129,null,!1);class Y{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[u,c]=((t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=B;for(let e=0;e<i;e++){const i=t[e];let a,u,c=-1,l=0;for(;l<i.length&&(s.lastIndex=l,u=s.exec(i),null!==u);)l=s.lastIndex,s===B?"!--"===u[1]?s=D:void 0!==u[1]?s=W:void 0!==u[2]?(V.test(u[2])&&(r=RegExp("</"+u[2],"g")),s=K):void 0!==u[3]&&(s=K):s===K?">"===u[0]?(s=null!=r?r:B,c=-1):void 0===u[1]?c=-2:(c=s.lastIndex-u[2].length,a=u[1],s=void 0===u[3]?K:'"'===u[3]?z:H):s===z||s===H?s=K:s===D||s===W?s=B:(s=K,r=void 0);const h=s===K&&t[e+1].startsWith("/>")?" ":"";o+=s===B?i+k:c>=0?(n.push(a),i.slice(0,c)+"$lit$"+i.slice(c)+I+h):i+I+(-2===c?(n.push(void 0),e):h)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==T?T.createHTML(a):a,n]})(t,e);if(this.el=Y.createElement(u,i),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=G.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(I)){const i=c[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(I),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?nt:"?"===e[1]?ot:"@"===e[1]?st:it})}else a.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(V.test(n.tagName)){const t=n.textContent.split(I),e=t.length-1;if(e>0){n.textContent=A?A.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],F()),G.nextNode(),a.push({type:2,index:++r});n.append(t[e],F())}}}else if(8===n.nodeType)if(n.data===$)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(I,t+1));)a.push({type:7,index:r}),t+=I.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,n){var r,o,s,a;if(e===Z)return e;let u=void 0!==n?null===(r=i._$Co)||void 0===r?void 0:r[n]:i._$Cl;const c=L(e)?void 0:e._$litDirective$;return(null==u?void 0:u.constructor)!==c&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===c?u=void 0:(u=new c(t),u._$AT(t,i,n)),void 0!==n?(null!==(s=(a=i)._$Co)&&void 0!==s?s:a._$Co=[])[n]=u:i._$Cl=u),void 0!==u&&(e=Q(t,u._$AS(t,e.values),u,n)),e}class tt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);G.currentNode=r;let o=G.nextNode(),s=0,a=0,u=n[0];for(;void 0!==u;){if(s===u.index){let e;2===u.type?e=new et(o,o.nextSibling,this,t):1===u.type?e=new u.ctor(o,u.name,u.strings,this,t):6===u.type&&(e=new at(o,this,t)),this.u.push(e),u=n[++a]}s!==(null==u?void 0:u.index)&&(o=G.nextNode(),s++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,n){var r;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=null===(r=null==n?void 0:n.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),L(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==Z&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==q&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Y.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new tt(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new Y(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new et(this.O(F()),this.O(F()),this,this.options)):i=e[n],i._$AI(r),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,n,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=Q(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==Z,o&&(this._$AH=t);else{const n=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=Q(this,n[i+s],e,s),a===Z&&(a=this._$AH[s]),o||(o=!L(a)||a!==this._$AH[s]),a===q?t=q:t!==q&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}o&&!n&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class nt extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const rt=A?A.emptyScript:"";class ot extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class st extends it{constructor(t,e,i,n,r){super(t,e,i,n,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:q)===Z)return;const n=this._$AH,r=t===q&&n!==q||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==q&&(n===q||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class 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){Q(this,t)}}const ut=U.litHtmlPolyfillSupport;null==ut||ut(Y,et),(null!==(M=U.litHtmlVersions)&&void 0!==M?M:U.litHtmlVersions=[]).push("2.4.0");
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2017 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- var at,ct;class lt extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new tt(e.insertBefore(P(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return J}}lt.finalized=!0,lt._$litElement$=!0,null===(at=globalThis.litElementHydrateSupport)||void 0===at||at.call(globalThis,{LitElement:lt});const ht=globalThis.litElementPolyfillSupport;null==ht||ht({LitElement:lt}),(null!==(ct=globalThis.litElementVersions)&&void 0!==ct?ct:globalThis.litElementVersions=[]).push("3.2.2");class ft{static create(t,e,i){let n=t=>p(null!=t?t:i),r=b`var(${p(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>b`var(${p(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=b`var(${p(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>b`var(${p(t)}, ${n(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):p(null!=e?e:t.defaultValue),n=b`var(${p(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>b`var(${p(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}ft.create("--ft-color-primary","COLOR","#2196F3"),ft.create("--ft-color-primary-variant","COLOR","#1976D2"),ft.create("--ft-color-secondary","COLOR","#FFCC80"),ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),ft.create("--ft-color-surface","COLOR","#FFFFFF"),ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-error","COLOR","#B00020"),ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),ft.create("--ft-color-opacity-high","NUMBER","1"),ft.create("--ft-color-opacity-medium","NUMBER","0.74"),ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),ft.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),ft.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-border-radius-S","SIZE","4px"),ft.create("--ft-border-radius-M","SIZE","8px"),ft.create("--ft-border-radius-L","SIZE","12px"),ft.create("--ft-border-radius-XL","SIZE","16px"),ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),ft.create("--ft-transition-duration","UNKNOWN","250ms"),ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");var dt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class vt extends(
49
+ var ct,lt;class ht extends R{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new et(e.insertBefore(F(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}ht.finalized=!0,ht._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:ht});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ht}),(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.2.2");class ft{static create(t,e,i){let n=t=>b(null!=t?t:i),r=w`var(${b(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${b(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=w`var(${b(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${b(t)}, ${n(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):b(null!=e?e:t.defaultValue),n=w`var(${b(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>w`var(${b(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}ft.create("--ft-color-primary","COLOR","#2196F3"),ft.create("--ft-color-primary-variant","COLOR","#1976D2"),ft.create("--ft-color-secondary","COLOR","#FFCC80"),ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),ft.create("--ft-color-surface","COLOR","#FFFFFF"),ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-error","COLOR","#B00020"),ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),ft.create("--ft-color-opacity-high","NUMBER","1"),ft.create("--ft-color-opacity-medium","NUMBER","0.74"),ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),ft.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),ft.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),ft.create("--ft-border-radius-S","SIZE","4px"),ft.create("--ft-border-radius-M","SIZE","8px"),ft.create("--ft-border-radius-L","SIZE","12px"),ft.create("--ft-border-radius-XL","SIZE","16px"),ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),ft.create("--ft-transition-duration","UNKNOWN","250ms"),ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");var vt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class pt extends(
50
50
  /**
51
51
  * @license
52
52
  * Copyright 2021 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
54
  */
55
- function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return y(r,this.constructor.elementStyles),r}}}(lt)){constructor(){super(),this.exportpartsDebouncer=new n(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
56
- ${t.map((t=>V`
55
+ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const r=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return y(r,this.constructor.elementStyles),r}}}(ht)){constructor(){super(),this.exportpartsDebouncer=new n(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),J`
56
+ ${t.map((t=>J`
57
57
  <style>${t}</style>
58
58
  `))}
59
59
  ${this.getTemplate()}
60
- `}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,o,s;const u=t=>null!=t&&t.trim().length>0,a=t.filter(u).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(u).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}dt([o()],vt.prototype,"exportpartsPrefix",void 0),dt([a([])],vt.prototype,"exportpartsPrefixes",void 0),dt([o()],vt.prototype,"customStylesheet",void 0),b`
60
+ `}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,o,s;const a=t=>null!=t&&t.trim().length>0,u=t.filter(a).map((t=>t.trim()));if(0===u.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>u.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}vt([o()],pt.prototype,"exportpartsPrefix",void 0),vt([c([])],pt.prototype,"exportpartsPrefixes",void 0),vt([o()],pt.prototype,"customStylesheet",void 0),w`
61
61
  .ft-no-text-select {
62
62
  -webkit-touch-callout: none;
63
63
  -webkit-user-select: none;
@@ -66,7 +66,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
66
66
  -ms-user-select: none;
67
67
  user-select: none;
68
68
  }
69
- `,b`
69
+ `,w`
70
70
  .ft-word-wrap {
71
71
  white-space: normal;
72
72
  word-wrap: break-word;
@@ -78,7 +78,7 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
78
78
  -webkit-hyphens: auto;
79
79
  hyphens: auto
80
80
  }
81
- `,b`
81
+ `,w`
82
82
  .ft-safari-ellipsis-fix {
83
83
  margin-right: 0;
84
84
 
@@ -89,12 +89,15 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
89
89
  display: inline-block;
90
90
  width: 0;
91
91
  }
92
- `;class pt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:t;return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):t}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function bt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function yt(t){return!!t&&!!t[ne]}function wt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===re}(t)||Array.isArray(t)||!!t[ie]||!!t.constructor[ie]||St(t)||jt(t))}function mt(t,e,i){void 0===i&&(i=!1),0===gt(t)?(i?Object.keys:oe)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function gt(t){var e=t[ne];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:St(t)?2:jt(t)?3:0}function xt(t,e){return 2===gt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ot(t,e,i){var n=gt(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function Et(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function St(t){return Yt&&t instanceof Map}function jt(t){return Qt&&t instanceof Set}function Nt(t){return t.o||t.t}function Ct(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=se(t);delete e[ne];for(var i=oe(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Rt(t,e){return void 0===e&&(e=!1),Tt(t)||yt(t)||!wt(t)||(gt(t)>1&&(t.set=t.add=t.clear=t.delete=Mt),Object.freeze(t),e&&mt(t,(function(t,e){return Rt(e,!0)}),!0)),t}function Mt(){bt(2)}function Tt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function At(t){var e=ue[t];return e||bt(18,t),e}function Ut(){return Xt}function $t(t,e){e&&(At("Patches"),t.u=[],t.s=[],t.v=e)}function kt(t){It(t),t.p.forEach(Ft),t.p=null}function It(t){t===Xt&&(Xt=t.l)}function Pt(t){return Xt={p:[],l:Xt,h:t,m:!0,_:0}}function Ft(t){var e=t[ne];0===e.i||1===e.i?e.j():e.O=!0}function Lt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||At("ES5").S(e,t,n),n?(i[ne].P&&(kt(e),bt(4)),wt(t)&&(t=_t(e,t),e.l||Dt(e,t)),e.u&&At("Patches").M(i[ne].t,t,e.u,e.s)):t=_t(e,i,[]),kt(e),e.u&&e.v(e.u,e.s),t!==ee?t:void 0}function _t(t,e,i){if(Tt(e))return e;var n=e[ne];if(!n)return mt(e,(function(r,o){return Bt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Dt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Ct(n.k):n.o;mt(3===n.i?new Set(r):r,(function(e,o){return Bt(t,n,r,e,o,i)})),Dt(t,r,!1),i&&t.u&&At("Patches").R(n,i,t.u,t.s)}return n.o}function Bt(t,e,i,n,r,o){if(yt(r)){var s=_t(t,r,o&&e&&3!==e.i&&!xt(e.D,n)?o.concat(n):void 0);if(Ot(i,n,s),!yt(s))return;t.m=!1}if(wt(r)&&!Tt(r)){if(!t.h.F&&t._<1)return;_t(t,r),e&&e.A.l||Dt(t,r)}}function Dt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&Rt(e,i)}function Wt(t,e){var i=t[ne];return(i?Nt(i):t)[e]}function Kt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Ht(t){t.P||(t.P=!0,t.l&&Ht(t.l))}function zt(t){t.o||(t.o=Ct(t.t))}function Vt(t,e,i){var n=St(e)?At("MapSet").N(e,i):jt(e)?At("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Ut(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ae;i&&(r=[n],o=ce);var s=Proxy.revocable(r,o),u=s.revoke,a=s.proxy;return n.k=a,n.j=u,a}(e,i):At("ES5").J(e,i);return(i?i.A:Ut()).p.push(n),n}function Jt(t){return yt(t)||bt(22,t),function t(e){if(!wt(e))return e;var i,n=e[ne],r=gt(e);if(n){if(!n.P&&(n.i<4||!At("ES5").K(n)))return n.t;n.I=!0,i=Zt(e,r),n.I=!1}else i=Zt(e,r);return mt(i,(function(e,r){n&&function(t,e){return 2===gt(t)?t.get(e):t[e]}(n.t,e)===r||Ot(i,e,t(r))})),3===r?new Set(i):i}(t)}function Zt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ct(t)}var qt,Xt,Gt="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Yt="undefined"!=typeof Map,Qt="undefined"!=typeof Set,te="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ee=Gt?Symbol.for("immer-nothing"):((qt={})["immer-nothing"]=!0,qt),ie=Gt?Symbol.for("immer-draftable"):"__$immer_draftable",ne=Gt?Symbol.for("immer-state"):"__$immer_state",re=""+Object.prototype.constructor,oe="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,se=Object.getOwnPropertyDescriptors||function(t){var e={};return oe(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},ue={},ae={get:function(t,e){if(e===ne)return t;var i=Nt(t);if(!xt(i,e))return function(t,e,i){var n,r=Kt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!wt(n)?n:n===Wt(t.t,e)?(zt(t),t.o[e]=Vt(t.A.h,n,t)):n},has:function(t,e){return e in Nt(t)},ownKeys:function(t){return Reflect.ownKeys(Nt(t))},set:function(t,e,i){var n=Kt(Nt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=Wt(Nt(t),e),o=null==r?void 0:r[ne];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Et(i,r)&&(void 0!==i||xt(t.t,e)))return!0;zt(t),Ht(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==Wt(t.t,e)||e in t.t?(t.D[e]=!1,zt(t),Ht(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Nt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){bt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){bt(12)}},ce={};mt(ae,(function(t,e){ce[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ce.deleteProperty=function(t,e){return ce.set.call(this,t,e,void 0)},ce.set=function(t,e,i){return ae.set.call(this,t[0],e,i,t[0])};var le=function(){function t(t){var e=this;this.g=te,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),u=1;u<n;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&bt(6),void 0!==n&&"function"!=typeof n&&bt(7),wt(t)){var u=Pt(e),a=Vt(e,t,void 0),c=!0;try{s=i(a),c=!1}finally{c?kt(u):It(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return $t(u,n),Lt(t,u)}),(function(t){throw kt(u),t})):($t(u,n),Lt(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===ee&&(s=void 0),e.F&&Rt(s,!0),n){var l=[],h=[];At("Patches").M(t,s,l,h),n(l,h)}return s}bt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){wt(t)||bt(8),yt(t)&&(t=Jt(t));var e=Pt(this),i=Vt(this,t,void 0);return i[ne].C=!0,It(e),i},e.finishDraft=function(t,e){var i=(t&&t[ne]).A;return $t(i,e),Lt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!te&&bt(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=At("Patches").$;return yt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),he=new le,fe=he.produce;he.produceWithPatches.bind(he),he.setAutoFreeze.bind(he),he.setUseProxies.bind(he),he.applyPatches.bind(he),he.createDraft.bind(he),he.finishDraft.bind(he);var de=fe;function ve(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function pe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function be(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?pe(Object(i),!0).forEach((function(e){ve(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var we="function"==typeof Symbol&&Symbol.observable||"@@observable",me=function(){return Math.random().toString(36).substring(7).split("").join(".")},ge={INIT:"@@redux/INIT"+me(),REPLACE:"@@redux/REPLACE"+me(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+me()}};function xe(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Oe(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(ye(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(ye(1));return i(Oe)(t,e)}if("function"!=typeof t)throw new Error(ye(2));var r=t,o=e,s=[],u=s,a=!1;function c(){u===s&&(u=s.slice())}function l(){if(a)throw new Error(ye(3));return o}function h(t){if("function"!=typeof t)throw new Error(ye(4));if(a)throw new Error(ye(5));var e=!0;return c(),u.push(t),function(){if(e){if(a)throw new Error(ye(6));e=!1,c();var i=u.indexOf(t);u.splice(i,1),s=null}}}function f(t){if(!xe(t))throw new Error(ye(7));if(void 0===t.type)throw new Error(ye(8));if(a)throw new Error(ye(9));try{a=!0,o=r(o,t)}finally{a=!1}for(var e=s=u,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(ye(10));r=t,f({type:ge.REPLACE})}function v(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ye(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[we]=function(){return this},t}return f({type:ge.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:d})[we]=v,n}function Ee(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:ge.INIT}))throw new Error(ye(12));if(void 0===i(void 0,{type:ge.PROBE_UNKNOWN_ACTION()}))throw new Error(ye(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},u=0;u<s.length;u++){var a=s[u],c=i[a],l=t[a],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(ye(14));r[a]=h,n=n||h!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function Se(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function je(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(ye(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=Se.apply(void 0,o)(i.dispatch),be(be({},i),{},{dispatch:n})}}}function Ne(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var Ce=Ne();Ce.withExtraArgument=Ne;var Re,Me=Ce,Te=(Re=function(t,e){return Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Re(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Re(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Ae=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Ue=Object.defineProperty,$e=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Pe=function(t,e,i){return e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Fe=function(t,e){for(var i in e||(e={}))ke.call(e,i)&&Pe(t,i,e[i]);if($e)for(var n=0,r=$e(e);n<r.length;n++){i=r[n];Ie.call(e,i)&&Pe(t,i,e[i])}return t},Le="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Se:Se.apply(null,arguments)};var _e=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Te(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ae([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ae([void 0],t.concat(this))))},e}(Array);function Be(t){return wt(t)?de(t,(function(){})):t}function De(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new _e;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Me.withExtraArgument(i.extraArgument)):n.push(Me));return n}(t)}}function We(t){var e,i=De(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,u=void 0===s?i():s,a=n.devTools,c=void 0===a||a,l=n.preloadedState,h=void 0===l?void 0:l,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Ee(o)}var v=u;"function"==typeof v&&(v=v(i));var p=je.apply(void 0,v),b=Se;c&&(b=Le(Fe({trace:!1},"object"==typeof c&&c)));var y=[p];return Array.isArray(d)?y=Ae([p],d):"function"==typeof d&&(y=d(y)),Oe(e,h,b.apply(void 0,y))}function Ke(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Fe(Fe({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function He(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function ze(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:Be(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},u={},a={};function c(){var e="function"==typeof t.extraReducers?He(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,a=e[2],c=void 0===a?void 0:a,l=Fe(Fe({},r),u);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?He(e):[e,i,n],s=o[0],u=o[1],a=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return Be(t())};else{var c=Be(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=Ae([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[a]),i.reduce((function(t,i){if(i){var n;if(yt(t))return void 0===(n=i(t,e))?t:n;if(wt(t))return de(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,s,c)}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,u[c]=i,a[t]=n?Ke(c,n):Ke(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:a,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Ve="listenerMiddleware";Ke(Ve+"/add"),Ke(Ve+"/removeAll"),Ke(Ve+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[ne];return ae.get(e,t)},set:function(e){var i=this[ne];ae.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][ne];if(!r.P)switch(r.i){case 5:n(r)&&Ht(r);break;case 4:i(r)&&Ht(r)}}}function i(t){for(var e=t.t,i=t.k,n=oe(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==ne){var s=e[o];if(void 0===s&&!xt(e,o))return!0;var u=i[o],a=u&&u[ne];if(a?a.t!==s:!Et(u,s))return!0}}var c=!!e[ne];return n.length!==oe(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){ue[t]||(ue[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=se(i);delete o[ne];for(var s=oe(o),u=0;u<s.length;u++){var a=s[u];o[a]=t(a,e||!!o[a].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Ut(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,ne,{value:o,writable:!0}),r},S:function(t,i,r){r?yt(i)&&i[ne].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[ne];if(i){var r=i.t,o=i.k,s=i.D,u=i.i;if(4===u)mt(o,(function(e){e!==ne&&(void 0!==r[e]||xt(r,e)?s[e]||t(o[e]):(s[e]=!0,Ht(i)))})),mt(r,(function(t){void 0!==o[t]||xt(o,t)||(s[t]=!1,Ht(i))}));else if(5===u){if(n(i)&&(Ht(i),s.length=!0),o.length<r.length)for(var a=o.length;a<r.length;a++)s[a]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var l=Math.min(o.length,r.length),h=0;h<l;h++)o.hasOwnProperty(h)||(s[h]=!0),void 0===s[h]&&t(o[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Je=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),Ze=(t,e)=>{var i;const n=Je(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!u(t,e),(i,r)=>{var o,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(o=n.attribute)&&void 0!==o&&o});const u=i;u.reduxProperties=u.reduxProperties||new Map;const a=null!==(s=Je(t)?n.selector:t)&&void 0!==s?s:t=>t[r];u.reduxProperties.set(r,{selector:a,store:n.store})}};class qe extends vt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Xe(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Xe(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Xe(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class Ge{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Xe(n))return n;if(null==i)return;const r=ze(i);if(n)return new Ge(r,n);const o=We({reducer:r.reducer});return window.ftReduxStores[i.name]=new Ge(r,o)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var Ye,Qe;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Qe=null===(Ye=window.safari)||void 0===Ye?void 0:Ye.pushNotification)||void 0===Qe||Qe.toString());const ti={setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setPagesToc:(t,e)=>{t.pagesToc=e.payload},setPaginationConfiguration:(t,e)=>{t.paginationConfiguration=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setLabels:(t,e)=>{t.labels=e.payload},setConfiguration:(t,e)=>{t.configuration=e.payload}},ei={topicMissingAdvice:"Sorry, this topic is missing",somethingWentWrong:"Oops, something went wrong"};class ii{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var n,r,o;if(null==t.tocId)return[...this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let s=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const u={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:s,depth:e,parentTocId:i,children:[]};this.register(u);const a=this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,u.tocId);return u.children=[...a,...c],[u]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var n;let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const o={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(o),o.children=this.convertSectionNodes(t.children,e+1,t.tocId),[o]}))}buildPage(t,e){var i,n,r,o,s,u;const a={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(n=t.tocId)&&void 0!==n?n:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?a.topics:a.hiddenTopics).push(t),l=null!==(s=null===(o=t.pageConfiguration)||void 0===o?void 0:o.parentsVisibility)&&void 0!==s?s:[];return a.breadcrumb.forEach(((t,e)=>{c(t,l[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),a.topics.push(...this.tocIds(null!==(u=t.pageToc)&&void 0!==u?u:[])),a}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class ni{convertPaginatedToc(t){return new ii(t).build()}}class ri{constructor(t,e,i,r,o,s){this.converter=t,this.api=e,this.cache=i,this.baseUrl=r,this.cleanSessionDebouncer=new n,this.labelResolver=new pt(ei,{}),r.endsWith("/")||(this.baseUrl=r+"/"),this.mapId=o,this.labels=null!=s?s:{},this.initCache()}static build(t,e,n,r){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");const o=new window.fluidtopics.FluidTopicsApi(t,e,!0);return new ri(new ni,o,new i,t,n,r)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.api.getMap(this.mapId))),this.cache.register("enrichedToc",(()=>this.api.getPages(this.mapId).then((t=>this.converter.convertPaginatedToc(t))))),this.cache.register("session",(async()=>{const t=await this.api.getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>this.cache.clear("session")),t.idleTimeoutInMillis),t})),this.cache.register("ratingSummary",(()=>this.api.getMapRating(this.mapId)))}clear(){this.cache.clearAll(),this.cleanSessionDebouncer.cancel()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getSession(){return this.cache.get("session")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.baseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o=this.enrichedToc,s=null==o?void 0:o.pageByTocId[t],u=null==o?void 0:o.nodeByTocId[t],a=null==u?void 0:u.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==u?void 0:u.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=a?a.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=a?a:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}set labels(t){this.labelResolver=new pt(ei,t)}resolveLabel(t,...e){return this.labelResolver.resolve(t,e)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}}))}rateMap(t,e){return this.api.rateMap(this.mapId,t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,e,i){return this.api.rateTopic(this.mapId,t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){(await this.getSession()).sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e){return this.api.sendTopicFeedback(this.mapId,t,e)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class oi{constructor(t){this.store=t,this.reloadDebouncer=new n(10)}static build(t){return new oi((t=>Ge.get({name:"ft-reader-"+t,initialState:{baseUrl:void 0,apiIntegrationIdentifier:"ft-reader",mapId:void 0,visibleTopics:[],labels:{}},reducers:ti}))(t.trim()||"context"))}setBaseUrl(t){this.store.actions.setBaseUrl(t),this.initService()}setApiIntegrationIdentifier(t){this.store.actions.setApiIntegrationIdentifier(t),this.initService()}initService(){const t=this.store.getState();t.baseUrl&&t.apiIntegrationIdentifier?this.service=ri.build(t.baseUrl,t.apiIntegrationIdentifier,t.mapId,t.labels):this.service=void 0,this.reload()}setMapId(t){this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),this.reload()}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}setLabels(t){this.store.actions.setLabels(t),this.service&&(this.service.labels=t)}async awaitService(){for(;null==this.service;)await c(5);return this.service}async navigateToTopic(t,e,i){const n=await this.awaitService();let r=await(null!=i?n.getPage(i):n.getPageByTocId(t));this.store.actions.setCurrentPage(r),this.store.actions.setScrollTarget({tocId:t,section:e})}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.setCurrentPage(i)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,e;null===(t=this.service)||void 0===t||t.clear(),this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,e,i,n,r;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.setMap(t))),null===(i=this.service)||void 0===i?void 0:i.getToc().then((t=>this.store.actions.setToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){this.errorHandler&&this.errorHandler(t)}}}const si=b`
93
- `;var ui=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ai extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class ci extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class li extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class hi extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class fi extends Event{constructor(){super("ft-reader-map-not-found")}}class di extends Event{constructor(){super("ft-reader-map-unauthorized")}}class vi extends qe{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-reader",this.labels={},this.visibleTopics=[],this.navigationDebouncer=new n(5)}render(){return V`
92
+ `;class bt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function wt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function yt(t){return!!t&&!!t[re]}function mt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===oe}(t)||Array.isArray(t)||!!t[ne]||!!t.constructor[ne]||jt(t)||Ct(t))}function gt(t,e,i){void 0===i&&(i=!1),0===xt(t)?(i?Object.keys:se)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function xt(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:jt(t)?2:Ct(t)?3:0}function Ot(t,e){return 2===xt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Et(t,e,i){var n=xt(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function St(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function jt(t){return Qt&&t instanceof Map}function Ct(t){return te&&t instanceof Set}function Nt(t){return t.o||t.t}function Rt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ae(t);delete e[re];for(var i=se(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Mt(t,e){return void 0===e&&(e=!1),At(t)||yt(t)||!mt(t)||(xt(t)>1&&(t.set=t.add=t.clear=t.delete=Ut),Object.freeze(t),e&&gt(t,(function(t,e){return Mt(e,!0)}),!0)),t}function Ut(){wt(2)}function At(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Tt(t){var e=ue[t];return e||wt(18,t),e}function It(){return Gt}function $t(t,e){e&&(Tt("Patches"),t.u=[],t.s=[],t.v=e)}function kt(t){Pt(t),t.p.forEach(Lt),t.p=null}function Pt(t){t===Gt&&(Gt=t.l)}function Ft(t){return Gt={p:[],l:Gt,h:t,m:!0,_:0}}function Lt(t){var e=t[re];0===e.i||1===e.i?e.j():e.O=!0}function _t(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||Tt("ES5").S(e,t,n),n?(i[re].P&&(kt(e),wt(4)),mt(t)&&(t=Bt(e,t),e.l||Wt(e,t)),e.u&&Tt("Patches").M(i[re].t,t,e.u,e.s)):t=Bt(e,i,[]),kt(e),e.u&&e.v(e.u,e.s),t!==ie?t:void 0}function Bt(t,e,i){if(At(e))return e;var n=e[re];if(!n)return gt(e,(function(r,o){return Dt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Wt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Rt(n.k):n.o;gt(3===n.i?new Set(r):r,(function(e,o){return Dt(t,n,r,e,o,i)})),Wt(t,r,!1),i&&t.u&&Tt("Patches").R(n,i,t.u,t.s)}return n.o}function Dt(t,e,i,n,r,o){if(yt(r)){var s=Bt(t,r,o&&e&&3!==e.i&&!Ot(e.D,n)?o.concat(n):void 0);if(Et(i,n,s),!yt(s))return;t.m=!1}if(mt(r)&&!At(r)){if(!t.h.F&&t._<1)return;Bt(t,r),e&&e.A.l||Wt(t,r)}}function Wt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&Mt(e,i)}function Kt(t,e){var i=t[re];return(i?Nt(i):t)[e]}function Ht(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function zt(t){t.P||(t.P=!0,t.l&&zt(t.l))}function Vt(t){t.o||(t.o=Rt(t.t))}function Jt(t,e,i){var n=jt(e)?Tt("MapSet").N(e,i):Ct(e)?Tt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:It(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ce;i&&(r=[n],o=le);var s=Proxy.revocable(r,o),a=s.revoke,u=s.proxy;return n.k=u,n.j=a,u}(e,i):Tt("ES5").J(e,i);return(i?i.A:It()).p.push(n),n}function Zt(t){return yt(t)||wt(22,t),function t(e){if(!mt(e))return e;var i,n=e[re],r=xt(e);if(n){if(!n.P&&(n.i<4||!Tt("ES5").K(n)))return n.t;n.I=!0,i=qt(e,r),n.I=!1}else i=qt(e,r);return gt(i,(function(e,r){n&&function(t,e){return 2===xt(t)?t.get(e):t[e]}(n.t,e)===r||Et(i,e,t(r))})),3===r?new Set(i):i}(t)}function qt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Rt(t)}var Xt,Gt,Yt="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Qt="undefined"!=typeof Map,te="undefined"!=typeof Set,ee="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ie=Yt?Symbol.for("immer-nothing"):((Xt={})["immer-nothing"]=!0,Xt),ne=Yt?Symbol.for("immer-draftable"):"__$immer_draftable",re=Yt?Symbol.for("immer-state"):"__$immer_state",oe=""+Object.prototype.constructor,se="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ae=Object.getOwnPropertyDescriptors||function(t){var e={};return se(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},ue={},ce={get:function(t,e){if(e===re)return t;var i=Nt(t);if(!Ot(i,e))return function(t,e,i){var n,r=Ht(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!mt(n)?n:n===Kt(t.t,e)?(Vt(t),t.o[e]=Jt(t.A.h,n,t)):n},has:function(t,e){return e in Nt(t)},ownKeys:function(t){return Reflect.ownKeys(Nt(t))},set:function(t,e,i){var n=Ht(Nt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=Kt(Nt(t),e),o=null==r?void 0:r[re];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(St(i,r)&&(void 0!==i||Ot(t.t,e)))return!0;Vt(t),zt(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==Kt(t.t,e)||e in t.t?(t.D[e]=!1,Vt(t),zt(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Nt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){wt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){wt(12)}},le={};gt(ce,(function(t,e){le[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),le.deleteProperty=function(t,e){return le.set.call(this,t,e,void 0)},le.set=function(t,e,i){return ce.set.call(this,t[0],e,i,t[0])};var he=function(){function t(t){var e=this;this.g=ee,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&wt(6),void 0!==n&&"function"!=typeof n&&wt(7),mt(t)){var a=Ft(e),u=Jt(e,t,void 0),c=!0;try{s=i(u),c=!1}finally{c?kt(a):Pt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return $t(a,n),_t(t,a)}),(function(t){throw kt(a),t})):($t(a,n),_t(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===ie&&(s=void 0),e.F&&Mt(s,!0),n){var l=[],h=[];Tt("Patches").M(t,s,l,h),n(l,h)}return s}wt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){mt(t)||wt(8),yt(t)&&(t=Zt(t));var e=Ft(this),i=Jt(this,t,void 0);return i[re].C=!0,Pt(e),i},e.finishDraft=function(t,e){var i=(t&&t[re]).A;return $t(i,e),_t(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ee&&wt(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Tt("Patches").$;return yt(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),de=new he,fe=de.produce;de.produceWithPatches.bind(de),de.setAutoFreeze.bind(de),de.setUseProxies.bind(de),de.applyPatches.bind(de),de.createDraft.bind(de),de.finishDraft.bind(de);var ve=fe;function pe(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function be(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function we(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?be(Object(i),!0).forEach((function(e){pe(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var me="function"==typeof Symbol&&Symbol.observable||"@@observable",ge=function(){return Math.random().toString(36).substring(7).split("").join(".")},xe={INIT:"@@redux/INIT"+ge(),REPLACE:"@@redux/REPLACE"+ge(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ge()}};function Oe(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ee(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(ye(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(ye(1));return i(Ee)(t,e)}if("function"!=typeof t)throw new Error(ye(2));var r=t,o=e,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function l(){if(u)throw new Error(ye(3));return o}function h(t){if("function"!=typeof t)throw new Error(ye(4));if(u)throw new Error(ye(5));var e=!0;return c(),a.push(t),function(){if(e){if(u)throw new Error(ye(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function d(t){if(!Oe(t))throw new Error(ye(7));if(void 0===t.type)throw new Error(ye(8));if(u)throw new Error(ye(9));try{u=!0,o=r(o,t)}finally{u=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}function f(t){if("function"!=typeof t)throw new Error(ye(10));r=t,d({type:xe.REPLACE})}function v(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ye(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[me]=function(){return this},t}return d({type:xe.INIT}),(n={dispatch:d,subscribe:h,getState:l,replaceReducer:f})[me]=v,n}function Se(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:xe.INIT}))throw new Error(ye(12));if(void 0===i(void 0,{type:xe.PROBE_UNKNOWN_ACTION()}))throw new Error(ye(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},a=0;a<s.length;a++){var u=s[a],c=i[u],l=t[u],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(ye(14));r[u]=h,n=n||h!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function je(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ce(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(ye(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=je.apply(void 0,o)(i.dispatch),we(we({},i),{},{dispatch:n})}}}function Ne(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var Re=Ne();Re.withExtraArgument=Ne;var Me,Ue=Re,Ae=(Me=function(t,e){return Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Me(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Me(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Te=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Ie=Object.defineProperty,$e=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Fe=function(t,e,i){return e in t?Ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Le=function(t,e){for(var i in e||(e={}))ke.call(e,i)&&Fe(t,i,e[i]);if($e)for(var n=0,r=$e(e);n<r.length;n++){i=r[n];Pe.call(e,i)&&Fe(t,i,e[i])}return t},_e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?je:je.apply(null,arguments)};var Be=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ae(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Te([void 0],t[0].concat(this)))):new(e.bind.apply(e,Te([void 0],t.concat(this))))},e}(Array);function De(t){return mt(t)?ve(t,(function(){})):t}function We(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Be;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Ue.withExtraArgument(i.extraArgument)):n.push(Ue));return n}(t)}}function Ke(t){var e,i=We(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,u=n.devTools,c=void 0===u||u,l=n.preloadedState,h=void 0===l?void 0:l,d=n.enhancers,f=void 0===d?void 0:d;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Se(o)}var v=a;"function"==typeof v&&(v=v(i));var p=Ce.apply(void 0,v),b=je;c&&(b=_e(Le({trace:!1},"object"==typeof c&&c)));var w=[p];return Array.isArray(f)?w=Te([p],f):"function"==typeof f&&(w=f(w)),Ee(e,h,b.apply(void 0,w))}function He(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Le(Le({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function ze(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Ve(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:De(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},u={};function c(){var e="function"==typeof t.extraReducers?ze(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,u=e[2],c=void 0===u?void 0:u,l=Le(Le({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?ze(e):[e,i,n],s=o[0],a=o[1],u=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return De(t())};else{var c=De(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=Te([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[u]),i.reduce((function(t,i){if(i){var n;if(yt(t))return void 0===(n=i(t,e))?t:n;if(mt(t))return ve(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,l,s,c)}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[c]=i,u[t]=n?He(c,n):He(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:u,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Je="listenerMiddleware";He(Je+"/add"),He(Je+"/removeAll"),He(Je+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[re];return ce.get(e,t)},set:function(e){var i=this[re];ce.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][re];if(!r.P)switch(r.i){case 5:n(r)&&zt(r);break;case 4:i(r)&&zt(r)}}}function i(t){for(var e=t.t,i=t.k,n=se(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==re){var s=e[o];if(void 0===s&&!Ot(e,o))return!0;var a=i[o],u=a&&a[re];if(u?u.t!==s:!St(a,s))return!0}}var c=!!e[re];return n.length!==se(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){ue[t]||(ue[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=ae(i);delete o[re];for(var s=se(o),a=0;a<s.length;a++){var u=s[a];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:It(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,re,{value:o,writable:!0}),r},S:function(t,i,r){r?yt(i)&&i[re].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[re];if(i){var r=i.t,o=i.k,s=i.D,a=i.i;if(4===a)gt(o,(function(e){e!==re&&(void 0!==r[e]||Ot(r,e)?s[e]||t(o[e]):(s[e]=!0,zt(i)))})),gt(r,(function(t){void 0!==o[t]||Ot(o,t)||(s[t]=!1,zt(i))}));else if(5===a){if(n(i)&&(zt(i),s.length=!0),o.length<r.length)for(var u=o.length;u<r.length;u++)s[u]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var l=Math.min(o.length,r.length),h=0;h<l;h++)o.hasOwnProperty(h)||(s[h]=!0),void 0===s[h]&&t(o[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const Ze=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),qe=(t,e)=>{var i;const n=Ze(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!a(t,e),(i,r)=>{var o,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(o=n.attribute)&&void 0!==o&&o});const a=i;a.reduxProperties=a.reduxProperties||new Map;const u=null!==(s=Ze(t)?n.selector:t)&&void 0!==s?s:t=>t[r];a.reduxProperties.set(r,{selector:u,store:n.store})}};class Xe extends pt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Ge(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Ge(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Ge(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class Ye{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Ge(n))return n;if(null==i)return;const r=Ve(i);if(n)return new Ye(r,n);const o=Ke({reducer:r.reducer});return window.ftReduxStores[i.name]=new Ye(r,o)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var Qe,ti;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ti=null===(Qe=window.safari)||void 0===Qe?void 0:Qe.pushNotification)||void 0===ti||ti.toString());const ei={setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setPagesToc:(t,e)=>{t.pagesToc=e.payload},setPaginationConfiguration:(t,e)=>{t.paginationConfiguration=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setConfiguration:(t,e)=>{t.configuration=e.payload}};class ii{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var n,r,o;if(null==t.tocId)return[...this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let s=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const a={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:s,depth:e,parentTocId:i,children:[]};this.register(a);const u=this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,a.tocId);return a.children=[...u,...c],[a]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var n;let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const o={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(o),o.children=this.convertSectionNodes(t.children,e+1,t.tocId),[o]}))}buildPage(t,e){var i,n,r,o,s,a;const u={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(n=t.tocId)&&void 0!==n?n:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?u.topics:u.hiddenTopics).push(t),l=null!==(s=null===(o=t.pageConfiguration)||void 0===o?void 0:o.parentsVisibility)&&void 0!==s?s:[];return u.breadcrumb.forEach(((t,e)=>{c(t,l[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),u.topics.push(...this.tocIds(null!==(a=t.pageToc)&&void 0!==a?a:[])),u}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class ni{convertPaginatedToc(t){return new ii(t).build()}}const ri=w`
93
+ `,oi=Ye.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});var si;const ai=Symbol("clearAfterUnitTest");class ui{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentBaseUrl="",this.currentUiLocale="",this[si]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},oi.subscribe((()=>this.updateApi())),this.updateApi()}updateApi(){const{baseUrl:t,apiIntegrationIdentifier:e,uiLocale:i}=oi.getState();t&&e?(this.api=this.apiProvider(t,e),(this.api&&this.currentBaseUrl!==t||this.currentUiLocale!==i)&&(this.currentBaseUrl=t,this.currentUiLocale=i,this.cache.clearAll(),this.notifyAll())):this.api=void 0}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};a(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new bt(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.api)||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>l(0).then((()=>t())).catch((()=>null)))))}}si=ai,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ui(((t,e)=>window.fluidtopics?new window.fluidtopics.FluidTopicsApi(t,e,!0):void 0)));const ci=window.FluidTopicsI18nService;var li=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class hi extends pt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>window.fluidtopics&&this.baseUrl?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,this.cache=new i,this.cleanSessionDebouncer=new n}render(){return J`
94
+ <slot></slot>
95
+ `}updated(t){super.updated(t),t.has("baseUrl")&&oi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&oi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&oi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&oi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&oi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&oi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&oi.actions.setSession(this.session),t.has("availableUiLocales")&&oi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ci.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}hi.elementDefinitions={},hi.styles=ri,li([o()],hi.prototype,"baseUrl",void 0),li([o()],hi.prototype,"apiIntegrationIdentifier",void 0),li([o()],hi.prototype,"uiLocale",void 0),li([c([])],hi.prototype,"availableUiLocales",void 0),li([o({type:Boolean})],hi.prototype,"editorMode",void 0),li([o({type:Boolean})],hi.prototype,"noCustom",void 0),li([o({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],hi.prototype,"noCustomComponent",void 0),li([o({type:Boolean})],hi.prototype,"withManualResources",void 0),li([c([])],hi.prototype,"messageContexts",void 0),li([c(void 0)],hi.prototype,"session",void 0),li([o({type:Object})],hi.prototype,"apiProvider",void 0),u("ft-app-context")(hi);class di{constructor(t,e,i,n,r){this.converter=t,this.api=e,this.cache=i,this.baseUrl=n,n.endsWith("/")||(this.baseUrl=n+"/"),this.mapId=r,this.initCache()}static build(t,e,n){if(null==window.fluidtopics)throw console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api"),new Error("Fluid Topics public API not found");const r=new window.fluidtopics.FluidTopicsApi(t,e,!0);return new di(new ni,r,new i,t,n)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.api.getMap(this.mapId))),this.cache.register("enrichedToc",(()=>this.api.getPages(this.mapId).then((t=>this.converter.convertPaginatedToc(t))))),this.cache.register("ratingSummary",(()=>this.api.getMapRating(this.mapId)))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.baseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o=this.enrichedToc,s=null==o?void 0:o.pageByTocId[t],a=null==o?void 0:o.nodeByTocId[t],u=null==a?void 0:a.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==a?void 0:a.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=u?u.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=u?u:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}}))}rateMap(t,e){return this.api.rateMap(this.mapId,t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,e,i){return this.api.rateTopic(this.mapId,t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=oi.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e){return this.api.sendTopicFeedback(this.mapId,t,e)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class fi{constructor(t){this.store=t,this.reloadDebouncer=new n(10)}static build(t){return new fi((t=>Ye.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[]},reducers:ei}))(t.trim()||"context"))}initService(t,e){const i=this.store.getState();this.service=t&&e?di.build(t,e,i.mapId):void 0,this.reload()}setMapId(t){this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),this.reload()}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}async awaitService(){for(;null==this.service;)await l(5);return this.service}async navigateToTopic(t,e,i){const n=await this.awaitService();let r=await(null!=i?n.getPage(i):n.getPageByTocId(t));this.store.actions.setCurrentPage(r),this.store.actions.setScrollTarget({tocId:t,section:e})}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.setCurrentPage(i)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,e;null===(t=this.service)||void 0===t||t.clear(),this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,e,i,n,r;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.setMap(t))),null===(i=this.service)||void 0===i?void 0:i.getToc().then((t=>this.store.actions.setToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){this.errorHandler&&this.errorHandler(t)}}}const vi=w`
96
+ `;var pi=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class bi extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class wi extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class yi extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class mi extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class gi extends Event{constructor(){super("ft-reader-map-not-found")}}class xi extends Event{constructor(){super("ft-reader-map-unauthorized")}}class Oi extends Xe{constructor(){super(),this.apiIntegrationIdentifier="ft-reader",this.visibleTopics=[],this.navigationDebouncer=new n(5),this.addStore(oi)}render(){return J`
94
97
  ${this.importStyleIfNeeded()}
95
98
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
96
- `}importStyleIfNeeded(){var t,e;return!this.stateManager.service||window.location.href.startsWith(null!==(t=this.baseUrl)&&void 0!==t?t:"")?Z:V`
99
+ `}importStyleIfNeeded(){var t,e;return!this.stateManager.service||window.location.href.startsWith(null!==(t=this.baseUrl)&&void 0!==t?t:"")?q:J`
97
100
  <style>
98
101
  @import "${null===(e=this.stateManager.service)||void 0===e?void 0:e.themeStylesheet()}"
99
102
  </style>
100
- `}get stateManager(){return null==this._stateManager&&(this._stateManager=oi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store)),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}updated(t){super.updated(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("mapId")&&this.stateManager.setMapId(this.mapId),(t.has("tocId")||t.has("section")||t.has("page"))&&this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):t.has("page")&&!this.tocId&&null!=this.page?this.stateManager.navigateToPage(this.page):t.has("mapId")&&this.mapId&&this.navigateToTarget(),t.has("labels")&&this.stateManager.setLabels(this.labels)}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new ai(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.navigationDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new li(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new ci(this.map,e))}))}buildBreadcrumb(t){var e,i,n,r;let o=[],s=null===(i=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId,u=null===(n=this.stateManager.service)||void 0===n?void 0:n.getTocNodeNow(s);for(;u;)o.unshift({tocId:u.tocId,title:u.title}),u=null===(r=this.stateManager.service)||void 0===r?void 0:r.getTocNodeNow(u.parentTocId);return o}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new fi):401===e.status?this.dispatchEvent(new di):this.dispatchEvent(new hi(t))}}var pi,bi;vi.styles=si,ui([o()],vi.prototype,"baseUrl",void 0),ui([o()],vi.prototype,"apiIntegrationIdentifier",void 0),ui([o()],vi.prototype,"mapId",void 0),ui([o()],vi.prototype,"tocId",void 0),ui([o()],vi.prototype,"section",void 0),ui([o({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:pi}})],vi.prototype,"page",void 0),ui([a({})],vi.prototype,"labels",void 0),ui([Ze()],vi.prototype,"map",void 0),ui([Ze()],vi.prototype,"toc",void 0),ui([Ze()],vi.prototype,"visibleTopics",void 0),ui([Ze()],vi.prototype,"currentPage",void 0),ui([Ze()],vi.prototype,"scrollTarget",void 0),(bi="ft-reader-context",t=>{window.customElements.get(bi)||window.customElements.define(bi,t)})(vi),t.FtReaderContext=vi,t.FtReaderContextCssVariables={},t.LoadErrorEvent=hi,t.MapLoadedEvent=ai,t.NavigationDoneEvent=li,t.NotFoundErrorEvent=fi,t.UnauthorizedErrorEvent=di,t.VisibleTopicsChangeEvent=ci,t.styles=si,Object.defineProperty(t,"U",{value:!0})}({});
103
+ `}get stateManager(){return null==this._stateManager&&(this._stateManager=fi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}updated(t){super.updated(t),(t.has("baseUrl")||t.has("apiIntegrationIdentifier"))&&this.stateManager.initService(this.baseUrl,this.apiIntegrationIdentifier),t.has("mapId")&&this.stateManager.setMapId(this.mapId),(t.has("tocId")||t.has("section")||t.has("page"))&&this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):t.has("page")&&!this.tocId&&null!=this.page?this.stateManager.navigateToPage(this.page):t.has("mapId")&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new bi(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.navigationDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new yi(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new wi(this.map,e))}))}buildBreadcrumb(t){var e,i,n,r;let o=[],s=null===(i=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId,a=null===(n=this.stateManager.service)||void 0===n?void 0:n.getTocNodeNow(s);for(;a;)o.unshift({tocId:a.tocId,title:a.title}),a=null===(r=this.stateManager.service)||void 0===r?void 0:r.getTocNodeNow(a.parentTocId);return o}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new gi):401===e.status?this.dispatchEvent(new xi):this.dispatchEvent(new mi(t))}}var Ei;Oi.styles=vi,pi([qe({attribute:!0,store:oi.name})],Oi.prototype,"baseUrl",void 0),pi([qe({attribute:!0,store:oi.name})],Oi.prototype,"apiIntegrationIdentifier",void 0),pi([o()],Oi.prototype,"mapId",void 0),pi([o()],Oi.prototype,"tocId",void 0),pi([o()],Oi.prototype,"section",void 0),pi([o({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:Ei}})],Oi.prototype,"page",void 0),pi([qe({store:"reader"})],Oi.prototype,"map",void 0),pi([qe({store:"reader"})],Oi.prototype,"toc",void 0),pi([qe({store:"reader"})],Oi.prototype,"visibleTopics",void 0),pi([qe({store:"reader"})],Oi.prototype,"currentPage",void 0),pi([qe({store:"reader"})],Oi.prototype,"scrollTarget",void 0),u("ft-reader-context")(Oi),t.FtReaderContext=Oi,t.FtReaderContextCssVariables={},t.LoadErrorEvent=mi,t.MapLoadedEvent=bi,t.NavigationDoneEvent=yi,t.NotFoundErrorEvent=gi,t.UnauthorizedErrorEvent=xi,t.VisibleTopicsChangeEvent=wi,t.styles=vi,Object.defineProperty(t,"U",{value:!0})}({});
@@ -21,11 +21,11 @@ export function toFtReaderComponent(ReduxClass) {
21
21
  setReaderStateManager(stateManager) {
22
22
  this.clearStateManager();
23
23
  this.stateManager = stateManager;
24
- this.addStore(stateManager.store);
24
+ this.addStore(stateManager.store, "reader");
25
25
  }
26
26
  clearStateManager() {
27
27
  if (this.stateManager) {
28
- this.removeStore(this.stateManager.store);
28
+ this.removeStore("reader");
29
29
  this.stateManager = undefined;
30
30
  }
31
31
  }
@@ -1,4 +1,4 @@
1
- import { FtReaderLabels, FtReaderState } from "./model";
1
+ import { FtReaderState } from "./model";
2
2
  import { FtReduxStore } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtReaderStateReducers } from "./redux";
4
4
  import { FtReaderService } from "./utils/FtReaderService";
@@ -8,12 +8,9 @@ export declare class FtReaderStateManager {
8
8
  service?: FtReaderService;
9
9
  errorHandler?: (e: Error) => void;
10
10
  constructor(store: FtReduxStore<FtReaderState, FtReaderStateReducers>);
11
- setBaseUrl(baseUrl?: string): void;
12
- setApiIntegrationIdentifier(apiIntegrationIdentifier?: string): void;
13
- private initService;
11
+ initService(baseUrl?: string, apiIntegrationIdentifier?: string): void;
14
12
  setMapId(mapId?: string): void;
15
13
  setVisibleTopics(tocIds: string[]): void;
16
- setLabels(labels: FtReaderLabels): void;
17
14
  awaitService(): Promise<FtReaderService>;
18
15
  navigateToTopic(tocId: string, section?: string, pageNumber?: number): Promise<void>;
19
16
  navigateToPage(pageNumber: number): Promise<void>;
@@ -9,18 +9,10 @@ export class FtReaderStateManager {
9
9
  static build(id) {
10
10
  return new FtReaderStateManager(createReaderStore(id.trim() || "context"));
11
11
  }
12
- setBaseUrl(baseUrl) {
13
- this.store.actions.setBaseUrl(baseUrl);
14
- this.initService();
15
- }
16
- setApiIntegrationIdentifier(apiIntegrationIdentifier) {
17
- this.store.actions.setApiIntegrationIdentifier(apiIntegrationIdentifier);
18
- this.initService();
19
- }
20
- initService() {
12
+ initService(baseUrl, apiIntegrationIdentifier) {
21
13
  const state = this.store.getState();
22
- if (state.baseUrl && state.apiIntegrationIdentifier) {
23
- this.service = FtReaderService.build(state.baseUrl, state.apiIntegrationIdentifier, state.mapId, state.labels);
14
+ if (baseUrl && apiIntegrationIdentifier) {
15
+ this.service = FtReaderService.build(baseUrl, apiIntegrationIdentifier, state.mapId);
24
16
  }
25
17
  else {
26
18
  this.service = undefined;
@@ -37,12 +29,6 @@ export class FtReaderStateManager {
37
29
  setVisibleTopics(tocIds) {
38
30
  this.store.actions.setVisibleTopics(tocIds);
39
31
  }
40
- setLabels(labels) {
41
- this.store.actions.setLabels(labels);
42
- if (this.service) {
43
- this.service.labels = labels;
44
- }
45
- }
46
32
  async awaitService() {
47
33
  while (this.service == null) {
48
34
  await delay(5);
@@ -1,6 +1,5 @@
1
1
  import { Store } from "@reduxjs/toolkit";
2
- import { FtMap, FtRatingType, FtTocNode, FtTopic, FtTopicRating, FtReaderConfiguration, FtPaginationConfiguration } from "@fluid-topics/public-api";
3
- import { ParametrizedLabels } from "@fluid-topics/ft-wc-utils";
2
+ import { FtMap, FtPaginationConfiguration, FtRatingType, FtReaderConfiguration, FtTocNode, FtTopic, FtTopicRating } from "@fluid-topics/public-api";
4
3
  export declare type FtReaderStore = Store<FtReaderState>;
5
4
  export interface FtPagesTocNode {
6
5
  depth: number;
@@ -30,8 +29,6 @@ export declare type FtReaderScrollTarget = {
30
29
  section?: string;
31
30
  };
32
31
  export interface FtReaderState {
33
- baseUrl: string | undefined;
34
- apiIntegrationIdentifier: string | undefined;
35
32
  mapId: string | undefined;
36
33
  tocId?: string;
37
34
  map?: FtMap;
@@ -41,14 +38,8 @@ export interface FtReaderState {
41
38
  currentPage?: FtReaderPage;
42
39
  scrollTarget?: FtReaderScrollTarget;
43
40
  visibleTopics: string[];
44
- labels: FtReaderLabels;
45
41
  configuration?: FtReaderConfiguration;
46
42
  }
47
- export interface FtReaderLabels extends ParametrizedLabels {
48
- topicMissingAdvice?: string;
49
- somethingWentWrong?: string;
50
- }
51
- export declare const ftReaderDefaultLabels: FtReaderLabels;
52
43
  export interface FtReaderNavigationData {
53
44
  mapId: string;
54
45
  tocId: string;
@@ -1,5 +1,2 @@
1
- export const ftReaderDefaultLabels = {
2
- topicMissingAdvice: "Sorry, this topic is missing",
3
- somethingWentWrong: "Oops, something went wrong"
4
- };
1
+ export {};
5
2
  //# sourceMappingURL=model.js.map
@@ -2,8 +2,6 @@ import { PayloadAction } from "@reduxjs/toolkit";
2
2
  import { FtReaderState } from "./model";
3
3
  import { FtReduxStore } from "@fluid-topics/ft-wc-utils";
4
4
  declare const readerStateReducers: {
5
- setBaseUrl: (state: FtReaderState, action: PayloadAction<FtReaderState["baseUrl"]>) => void;
6
- setApiIntegrationIdentifier: (state: FtReaderState, action: PayloadAction<FtReaderState["apiIntegrationIdentifier"]>) => void;
7
5
  setMapId: (state: FtReaderState, action: PayloadAction<FtReaderState["mapId"]>) => void;
8
6
  setTocId: (state: FtReaderState, action: PayloadAction<FtReaderState["tocId"]>) => void;
9
7
  setMap: (state: FtReaderState, action: PayloadAction<FtReaderState["map"]>) => void;
@@ -13,13 +11,10 @@ declare const readerStateReducers: {
13
11
  setCurrentPage: (state: FtReaderState, action: PayloadAction<FtReaderState["currentPage"]>) => void;
14
12
  setScrollTarget: (state: FtReaderState, action: PayloadAction<FtReaderState["scrollTarget"]>) => void;
15
13
  setVisibleTopics: (state: FtReaderState, action: PayloadAction<FtReaderState["visibleTopics"]>) => void;
16
- setLabels: (state: FtReaderState, action: PayloadAction<FtReaderState["labels"]>) => void;
17
14
  setConfiguration: (state: FtReaderState, action: PayloadAction<FtReaderState["configuration"]>) => void;
18
15
  };
19
16
  export declare type FtReaderStateReducers = typeof readerStateReducers;
20
17
  export declare const createReaderStore: (id: string) => FtReduxStore<FtReaderState, {
21
- setBaseUrl: (state: FtReaderState, action: PayloadAction<FtReaderState["baseUrl"]>) => void;
22
- setApiIntegrationIdentifier: (state: FtReaderState, action: PayloadAction<FtReaderState["apiIntegrationIdentifier"]>) => void;
23
18
  setMapId: (state: FtReaderState, action: PayloadAction<FtReaderState["mapId"]>) => void;
24
19
  setTocId: (state: FtReaderState, action: PayloadAction<FtReaderState["tocId"]>) => void;
25
20
  setMap: (state: FtReaderState, action: PayloadAction<FtReaderState["map"]>) => void;
@@ -29,7 +24,6 @@ export declare const createReaderStore: (id: string) => FtReduxStore<FtReaderSta
29
24
  setCurrentPage: (state: FtReaderState, action: PayloadAction<FtReaderState["currentPage"]>) => void;
30
25
  setScrollTarget: (state: FtReaderState, action: PayloadAction<FtReaderState["scrollTarget"]>) => void;
31
26
  setVisibleTopics: (state: FtReaderState, action: PayloadAction<FtReaderState["visibleTopics"]>) => void;
32
- setLabels: (state: FtReaderState, action: PayloadAction<FtReaderState["labels"]>) => void;
33
27
  setConfiguration: (state: FtReaderState, action: PayloadAction<FtReaderState["configuration"]>) => void;
34
28
  }, import("redux").AnyAction>;
35
29
  export {};
@@ -1,11 +1,5 @@
1
1
  import { FtReduxStore } from "@fluid-topics/ft-wc-utils";
2
2
  const readerStateReducers = {
3
- setBaseUrl: (state, action) => {
4
- state.baseUrl = action.payload;
5
- },
6
- setApiIntegrationIdentifier: (state, action) => {
7
- state.apiIntegrationIdentifier = action.payload;
8
- },
9
3
  setMapId: (state, action) => {
10
4
  state.mapId = action.payload;
11
5
  },
@@ -33,9 +27,6 @@ const readerStateReducers = {
33
27
  setVisibleTopics: (state, action) => {
34
28
  state.visibleTopics = action.payload;
35
29
  },
36
- setLabels: (state, action) => {
37
- state.labels = action.payload;
38
- },
39
30
  setConfiguration: (state, action) => {
40
31
  state.configuration = action.payload;
41
32
  },
@@ -43,11 +34,8 @@ const readerStateReducers = {
43
34
  export const createReaderStore = (id) => FtReduxStore.get({
44
35
  name: "ft-reader-" + id,
45
36
  initialState: {
46
- baseUrl: undefined,
47
- apiIntegrationIdentifier: "ft-reader",
48
37
  mapId: undefined,
49
- visibleTopics: [],
50
- labels: {}
38
+ visibleTopics: []
51
39
  },
52
40
  reducers: readerStateReducers
53
41
  });
@@ -1,6 +1,6 @@
1
- import type { FluidTopicsApi, FtMap, FtPaginationConfiguration, FtPublicationRatingSummary, FtRatingType, FtReaderConfiguration, FtSession, FtTopic } from "@fluid-topics/public-api";
1
+ import type { FluidTopicsApi, FtMap, FtPaginationConfiguration, FtPublicationRatingSummary, FtRatingType, FtReaderConfiguration, FtTopic } from "@fluid-topics/public-api";
2
2
  import { CacheRegistry } from "@fluid-topics/ft-wc-utils";
3
- import { FtPagesTocNode, FtReaderLabels, FtReaderNavigationData, FtReaderPage, FtReaderTocNode, FtTopicRatingSummary } from "../model";
3
+ import { FtPagesTocNode, FtReaderNavigationData, FtReaderPage, FtReaderTocNode, FtTopicRatingSummary } from "../model";
4
4
  import { EnrichedToc, FtReaderConverter } from "./FtReaderConverter";
5
5
  declare global {
6
6
  interface Window {
@@ -14,17 +14,15 @@ export declare class FtReaderService {
14
14
  private api;
15
15
  private cache;
16
16
  private baseUrl;
17
- static build(baseUrl: string, apiIntegrationIdentifier: string, mapId?: string, labels?: FtReaderLabels): FtReaderService;
17
+ static build(baseUrl: string, apiIntegrationIdentifier: string, mapId?: string): FtReaderService;
18
18
  private _mapId;
19
19
  get mapId(): string;
20
20
  set mapId(value: string | undefined);
21
- constructor(converter: FtReaderConverter, api: FluidTopicsApi, cache: CacheRegistry, baseUrl: string, mapId?: string, labels?: FtReaderLabels);
22
- private cleanSessionDebouncer;
21
+ constructor(converter: FtReaderConverter, api: FluidTopicsApi, cache: CacheRegistry, baseUrl: string, mapId?: string);
23
22
  private initCache;
24
23
  clear(): void;
25
24
  getMap(): Promise<FtMap>;
26
25
  getConfiguration(): Promise<FtReaderConfiguration>;
27
- getSession(): Promise<FtSession>;
28
26
  private getEnrichedToc;
29
27
  get enrichedToc(): EnrichedToc | undefined;
30
28
  getPaginationConfiguration(): Promise<FtPaginationConfiguration>;
@@ -39,9 +37,6 @@ export declare class FtReaderService {
39
37
  getLink(tocId?: string, pageNumber?: number, section?: string): string;
40
38
  getNavigationData(tocId?: string, pageNumber?: number, section?: string): FtReaderNavigationData;
41
39
  getAccurateNavigationData(tocId?: string, pageNumber?: number, section?: string): Promise<FtReaderNavigationData>;
42
- set labels(labels: FtReaderLabels);
43
- private labelResolver;
44
- resolveLabel(key: keyof FtReaderLabels, ...args: any[]): string;
45
40
  private getRatingSummary;
46
41
  getMapRating(): Promise<FtPublicationRatingSummary>;
47
42
  getTopicRating(tocId: string): Promise<FtTopicRatingSummary>;
@@ -1,28 +1,25 @@
1
- import { CacheRegistry, Debouncer, ParametrizedLabelResolver } from "@fluid-topics/ft-wc-utils";
2
- import { ftReaderDefaultLabels } from "../model";
1
+ import { CacheRegistry } from "@fluid-topics/ft-wc-utils";
3
2
  import { FtReaderConverter } from "./FtReaderConverter";
3
+ import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
4
4
  export class FtReaderService {
5
- constructor(converter, api, cache, baseUrl, mapId, labels) {
5
+ constructor(converter, api, cache, baseUrl, mapId) {
6
6
  this.converter = converter;
7
7
  this.api = api;
8
8
  this.cache = cache;
9
9
  this.baseUrl = baseUrl;
10
- this.cleanSessionDebouncer = new Debouncer();
11
- this.labelResolver = new ParametrizedLabelResolver(ftReaderDefaultLabels, {});
12
10
  if (!baseUrl.endsWith("/")) {
13
11
  this.baseUrl = baseUrl + "/";
14
12
  }
15
13
  this.mapId = mapId;
16
- this.labels = labels !== null && labels !== void 0 ? labels : {};
17
14
  this.initCache();
18
15
  }
19
- static build(baseUrl, apiIntegrationIdentifier, mapId, labels) {
16
+ static build(baseUrl, apiIntegrationIdentifier, mapId) {
20
17
  if (window.fluidtopics == null) {
21
18
  console.error("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");
22
19
  throw new Error("Fluid Topics public API not found");
23
20
  }
24
21
  const api = new window.fluidtopics.FluidTopicsApi(baseUrl, apiIntegrationIdentifier, true);
25
- return new FtReaderService(new FtReaderConverter(), api, new CacheRegistry(), baseUrl, mapId, labels);
22
+ return new FtReaderService(new FtReaderConverter(), api, new CacheRegistry(), baseUrl, mapId);
26
23
  }
27
24
  get mapId() {
28
25
  return this._mapId;
@@ -37,18 +34,10 @@ export class FtReaderService {
37
34
  this.cache.registerFinal("configuration", () => this.api.getReaderConfiguration());
38
35
  this.cache.register("map", () => this.api.getMap(this.mapId));
39
36
  this.cache.register("enrichedToc", () => this.api.getPages(this.mapId).then(toc => this.converter.convertPaginatedToc(toc)));
40
- this.cache.register("session", async () => {
41
- const currentSession = await this.api.getCurrentSession();
42
- if (currentSession.idleTimeoutInMillis > 0) {
43
- this.cleanSessionDebouncer.run(() => this.cache.clear("session"), currentSession.idleTimeoutInMillis);
44
- }
45
- return currentSession;
46
- });
47
37
  this.cache.register("ratingSummary", () => this.api.getMapRating(this.mapId));
48
38
  }
49
39
  clear() {
50
40
  this.cache.clearAll();
51
- this.cleanSessionDebouncer.cancel();
52
41
  }
53
42
  getMap() {
54
43
  return this.cache.get("map");
@@ -56,9 +45,6 @@ export class FtReaderService {
56
45
  getConfiguration() {
57
46
  return this.cache.get("configuration");
58
47
  }
59
- getSession() {
60
- return this.cache.get("session");
61
- }
62
48
  getEnrichedToc() {
63
49
  return this.cache.get("enrichedToc");
64
50
  }
@@ -135,12 +121,6 @@ export class FtReaderService {
135
121
  await this.getEnrichedToc();
136
122
  return this.getNavigationData(tocId, pageNumber, section);
137
123
  }
138
- set labels(labels) {
139
- this.labelResolver = new ParametrizedLabelResolver(ftReaderDefaultLabels, labels);
140
- }
141
- resolveLabel(key, ...args) {
142
- return this.labelResolver.resolve(key, args);
143
- }
144
124
  getRatingSummary() {
145
125
  return this.cache.get("ratingSummary");
146
126
  }
@@ -172,8 +152,8 @@ export class FtReaderService {
172
152
  return this.api.unrateTopic(this.mapId, tocId).then(() => this.clearRatingIfNecessary());
173
153
  }
174
154
  async clearRatingIfNecessary() {
175
- const ftSession = await this.getSession();
176
- if (ftSession.sessionAuthenticated) {
155
+ const session = ftAppInfoStore.getState().session;
156
+ if (session === null || session === void 0 ? void 0 : session.sessionAuthenticated) {
177
157
  this.cache.clear("ratingSummary");
178
158
  }
179
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "0.3.58",
3
+ "version": "0.3.60",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,15 +19,16 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "0.3.58",
22
+ "@fluid-topics/ft-app-context": "0.3.60",
23
+ "@fluid-topics/ft-wc-utils": "0.3.60",
23
24
  "@reduxjs/toolkit": "^1.6.2",
24
25
  "lit": "2.2.8"
25
26
  },
26
27
  "devDependencies": {
27
- "@fluid-topics/public-api": "1.0.31"
28
+ "@fluid-topics/public-api": "1.0.32"
28
29
  },
29
30
  "peerDependencies": {
30
- "@fluid-topics/public-api": "1.0.31"
31
+ "@fluid-topics/public-api": "1.0.32"
31
32
  },
32
- "gitHead": "c053ee1216238ba6b2c62e5add329343f735c77e"
33
+ "gitHead": "43e7dcf7c9d88ea2c23f4425629f013d704c5111"
33
34
  }