@fluid-topics/ft-reader-topic-content 0.3.58 → 0.3.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-reader-topic-content.d.ts +0 -1
- package/build/ft-reader-topic-content.js +8 -9
- package/build/ft-reader-topic-content.light.js +26 -18
- package/build/ft-reader-topic-content.min.js +47 -40
- package/build/i18n/TopicContentMessages.d.ts +8 -0
- package/build/i18n/TopicContentMessages.js +3 -0
- package/package.json +9 -8
|
@@ -4,7 +4,6 @@ import { FtReaderTopicComponent } from "@fluid-topics/ft-reader-topic-context/bu
|
|
|
4
4
|
import "@fluid-topics/ft-icon";
|
|
5
5
|
export declare class FtReaderTopicContent extends FtReaderTopicComponent implements FtReaderTopicContentProperties {
|
|
6
6
|
static styles: import("lit").CSSResult;
|
|
7
|
-
private contentLocale?;
|
|
8
7
|
private map?;
|
|
9
8
|
private scrollTarget?;
|
|
10
9
|
private content?;
|
|
@@ -11,9 +11,10 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
|
11
11
|
import { redux } from "@fluid-topics/ft-wc-utils";
|
|
12
12
|
import { state } from "lit/decorators.js";
|
|
13
13
|
import "@fluid-topics/ft-icon";
|
|
14
|
+
import { context } from "./i18n/TopicContentMessages";
|
|
14
15
|
export class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
15
16
|
render() {
|
|
16
|
-
var _a;
|
|
17
|
+
var _a, _b;
|
|
17
18
|
if (!this.map || (!this.error && !this.content)) {
|
|
18
19
|
return html `
|
|
19
20
|
<section class="topic-loading"></section>
|
|
@@ -23,7 +24,7 @@ export class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
23
24
|
<style>
|
|
24
25
|
@import "${(_a = this.map) === null || _a === void 0 ? void 0 : _a.contentStyles.topicStylesheetUrl}";
|
|
25
26
|
</style>
|
|
26
|
-
<section class="topic" lang="${this.
|
|
27
|
+
<section class="topic" lang="${(_b = this.map) === null || _b === void 0 ? void 0 : _b.lang}">
|
|
27
28
|
${this.renderTopicContent()}
|
|
28
29
|
</section>
|
|
29
30
|
`;
|
|
@@ -58,17 +59,18 @@ export class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
58
59
|
renderTopicContent() {
|
|
59
60
|
var _a, _b, _c, _d;
|
|
60
61
|
if (this.error) {
|
|
61
|
-
let errorLabelkey = this.is404Error() ? "topicMissingAdvice" : "somethingWentWrong";
|
|
62
62
|
return html `
|
|
63
63
|
<div class="topic-on-error">
|
|
64
64
|
<ft-icon>WARNING</ft-icon>
|
|
65
|
-
<div
|
|
65
|
+
<div>
|
|
66
|
+
${this.is404Error() ? context.messages.topicMissingAdvice() : context.messages.somethingWentWrong()}
|
|
67
|
+
</div>
|
|
66
68
|
</div>
|
|
67
69
|
`;
|
|
68
70
|
}
|
|
69
|
-
const customClasses = (
|
|
71
|
+
const customClasses = (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.contentStyles.customCssClasses.join(" ")) !== null && _b !== void 0 ? _b : "";
|
|
70
72
|
return html `
|
|
71
|
-
<div class="depth-${(
|
|
73
|
+
<div class="depth-${(_c = this.tocNode) === null || _c === void 0 ? void 0 : _c.depth} content-locale-${(_d = this.map) === null || _d === void 0 ? void 0 : _d.lang} ${customClasses}">
|
|
72
74
|
${unsafeHTML(`${this.content}`)}
|
|
73
75
|
</div>
|
|
74
76
|
`;
|
|
@@ -78,9 +80,6 @@ export class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
FtReaderTopicContent.styles = styles;
|
|
81
|
-
__decorate([
|
|
82
|
-
redux((state) => { var _a; return (_a = state.map) === null || _a === void 0 ? void 0 : _a.lang; })
|
|
83
|
-
], FtReaderTopicContent.prototype, "contentLocale", void 0);
|
|
84
83
|
__decorate([
|
|
85
84
|
redux()
|
|
86
85
|
], FtReaderTopicContent.prototype, "map", void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(t,e,i,s,o){const n={colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),fontFamily:e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system")},a=i.css`
|
|
2
2
|
.topic {
|
|
3
3
|
font-family: ${n.fontFamily};
|
|
4
4
|
overflow-x: auto;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
.topic-loading {
|
|
16
16
|
height: 100vh;
|
|
17
17
|
}
|
|
18
|
-
`;var
|
|
18
|
+
`;var r=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class c extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return r([s.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}var x,d,h=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class u extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class v extends(function(t){class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registerIntervalTopic=0}connectedCallback(){super.connectedCallback(),this.registerIntervalTopic=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this.registerIntervalTopic):this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return h([s.state()],e.prototype,"tocNode",void 0),h([s.state()],e.prototype,"disableContextInteractions",void 0),e}(c)){}!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(x||(x={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(d||(d={})),new Map([...["abw"].map((t=>[t,d.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,d.AUDIO])),...["avi"].map((t=>[t,d.AVI])),...["chm","xhs"].map((t=>[t,d.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,d.CODE])),...["csv"].map((t=>[t,d.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,d.DITA])),...["epub"].map((t=>[t,d.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,d.EXCEL])),...["flac"].map((t=>[t,d.FLAC])),...["gif"].map((t=>[t,d.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,d.GZIP])),...["html","htm","xhtml"].map((t=>[t,d.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,d.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,d.JPEG])),...["json"].map((t=>[t,d.JSON])),...["m4a","m4p"].map((t=>[t,d.M4A])),...["mov","qt"].map((t=>[t,d.MOV])),...["mp3"].map((t=>[t,d.MP3])),...["mp4","m4v"].map((t=>[t,d.MP4])),...["ogg","oga"].map((t=>[t,d.OGG])),...["pdf","ps"].map((t=>[t,d.PDF])),...["png"].map((t=>[t,d.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,d.POWERPOINT])),...["rar"].map((t=>[t,d.RAR])),...["stp"].map((t=>[t,d.STP])),...["txt","rtf","md","mdown"].map((t=>[t,d.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,d.VIDEO])),...["wav"].map((t=>[t,d.WAV])),...["wma"].map((t=>[t,d.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,d.WORD])),...["xml","xsl","rdf"].map((t=>[t,d.XML])),...["yaml","yml","x-yaml"].map((t=>[t,d.YAML])),...["zip"].map((t=>[t,d.ZIP]))]);const p=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),f=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),m=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),b=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),g=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),w=i.css`
|
|
19
19
|
:host, i.ft-icon {
|
|
20
20
|
display: inline-flex;
|
|
21
21
|
align-items: center;
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
:host {
|
|
27
|
-
width: ${
|
|
28
|
-
height: ${
|
|
27
|
+
width: ${p};
|
|
28
|
+
height: ${p};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
i.ft-icon {
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
|
-
font-size: ${
|
|
34
|
+
font-size: ${p};
|
|
35
35
|
line-height: 1;
|
|
36
36
|
font-weight: normal;
|
|
37
37
|
text-transform: none;
|
|
@@ -46,43 +46,51 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
i.ft-icon.ft-icon--fluid-topics {
|
|
49
|
-
font-family: ${
|
|
49
|
+
font-family: ${f}, ft-icons, fticons, sans-serif;
|
|
50
50
|
|
|
51
51
|
/* Ugly fix because font is broken */
|
|
52
|
-
font-size: calc(0.9 * ${
|
|
52
|
+
font-size: calc(0.9 * ${p});
|
|
53
53
|
position: relative;
|
|
54
54
|
top: -5%;
|
|
55
55
|
justify-content: center;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.ft-icon--file-format {
|
|
59
|
-
font-family: ${
|
|
59
|
+
font-family: ${m}, ft-mime, sans-serif;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.ft-icon--material {
|
|
63
63
|
font-family: ${b}, "Material Icons", sans-serif;
|
|
64
64
|
}
|
|
65
|
-
`;var y;!function(
|
|
66
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
65
|
+
`;var y;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(y||(y={}));var C=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class j extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:y.fluid_topics,s="material"!==e||this.value;return i.html`
|
|
66
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
67
67
|
${o.unsafeHTML(this.resolvedIcon)}
|
|
68
68
|
<slot ?hidden=${s}></slot>
|
|
69
69
|
</i>
|
|
70
|
-
`}get textContent(){var e
|
|
70
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let s=this.value||this.textContent;switch(this.variant){case y.file_format:this.resolvedIcon=null!==(t=d[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case y.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=x[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}j.elementDefinitions={},j.styles=w,C([s.property()],j.prototype,"variant",void 0),C([s.property()],j.prototype,"value",void 0),C([s.state()],j.prototype,"resolvedIcon",void 0),C([s.query("slot")],j.prototype,"slottedContent",void 0),e.customElement("ft-icon")(j);const $=i.css`
|
|
71
|
+
`,U=i.css`
|
|
72
|
+
`,k=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class O{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=k.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?O.build(t):null!==(e=O.API)&&void 0!==e?e:O.API=O.build()}static await(t){return new Promise((e=>{let i=O.get(t);if(i)e(i);else{const s=k.subscribe((()=>{i=O.get(t),i&&(s(),e(i))}))}}))}}var I;const N=Symbol("clearAfterUnitTest");class M{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[I]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=k.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,a;t=t.toLowerCase(),this.fetchContext(t);const r=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},r).resolve(i,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}I=N,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new M(O.get));const S=window.FluidTopicsI18nService;var T=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class z extends e.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=()=>O.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
|
|
73
|
+
<slot></slot>
|
|
74
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&k.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&k.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&k.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&k.actions.setNoCustom(this.noCustom),t.has("editorMode")&&k.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&k.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&k.actions.setSession(this.session),t.has("availableUiLocales")&&k.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>S.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()))))}}z.elementDefinitions={},z.styles=U,T([s.property()],z.prototype,"baseUrl",void 0),T([s.property()],z.prototype,"apiIntegrationIdentifier",void 0),T([s.property()],z.prototype,"uiLocale",void 0),T([e.jsonProperty([])],z.prototype,"availableUiLocales",void 0),T([s.property({type:Boolean})],z.prototype,"editorMode",void 0),T([s.property({type:Boolean})],z.prototype,"noCustom",void 0),T([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],z.prototype,"noCustomComponent",void 0),T([s.property({type:Boolean})],z.prototype,"withManualResources",void 0),T([e.jsonProperty([])],z.prototype,"messageContexts",void 0),T([e.jsonProperty(void 0)],z.prototype,"session",void 0),T([s.property({type:Object})],z.prototype,"apiProvider",void 0),e.customElement("ft-app-context")(z);const A=Symbol("i18nProperties"),L=Symbol("i18nUnsubs");function P(t){var e;return e=L,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var s;if("string"==typeof t)return S.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return S.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[A])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[A])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[A]&&new Set([...this[A].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[L].has(t)||this[L].set(t,S.subscribe(t,(()=>this.onI18nUpdate(t)))),S.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[L].forEach((t=>t())),this[L].clear()}}}class E extends(P(e.FtLitElement)){}class G extends(P(e.FtLitElementRedux)){}var R=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class W extends E{render(){return this.key&&this.context?i.html`
|
|
75
|
+
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
76
|
+
`:i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}W.elementDefinitions={},W.styles=$,R([s.property()],W.prototype,"context",void 0),R([s.property()],W.prototype,"key",void 0),R([e.jsonProperty([])],W.prototype,"args",void 0),R([s.property()],W.prototype,"defaultMessage",void 0);class B{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>S.resolveMessage(this.name,e,...t)})}static build(t){return new B(t)}static fromGwt(t){return new B(t)}}e.customElement("ft-i18n")(W);const K=B.build("designedReaderTopicContent");var _=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class q extends v{render(){var t,e;return this.map&&(this.error||this.content)?i.html`
|
|
71
77
|
<style>
|
|
72
|
-
@import "${null===(
|
|
78
|
+
@import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
73
79
|
</style>
|
|
74
|
-
<section class="topic" lang="${this.
|
|
80
|
+
<section class="topic" lang="${null===(e=this.map)||void 0===e?void 0:e.lang}">
|
|
75
81
|
${this.renderTopicContent()}
|
|
76
82
|
</section>
|
|
77
83
|
`:i.html`
|
|
78
84
|
<section class="topic-loading"></section>
|
|
79
|
-
`}updated(
|
|
85
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
|
|
80
86
|
<div class="topic-on-error">
|
|
81
87
|
<ft-icon>WARNING</ft-icon>
|
|
82
|
-
<div
|
|
88
|
+
<div>
|
|
89
|
+
${this.is404Error()?K.messages.topicMissingAdvice():K.messages.somethingWentWrong()}
|
|
90
|
+
</div>
|
|
83
91
|
</div>
|
|
84
|
-
|
|
85
|
-
<div class="depth-${null===(
|
|
92
|
+
`;const a=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return i.html`
|
|
93
|
+
<div class="depth-${null===(s=this.tocNode)||void 0===s?void 0:s.depth} content-locale-${null===(n=this.map)||void 0===n?void 0:n.lang} ${a}">
|
|
86
94
|
${o.unsafeHTML(`${this.content}`)}
|
|
87
95
|
</div>
|
|
88
|
-
`}is404Error(){return 404===this.error.status}}
|
|
96
|
+
`}is404Error(){return 404===this.error.status}}q.styles=a,_([e.redux()],q.prototype,"map",void 0),_([e.redux()],q.prototype,"scrollTarget",void 0),_([s.state()],q.prototype,"content",void 0),_([s.state()],q.prototype,"error",void 0),e.customElement("ft-reader-topic-content")(q),t.FtReaderTopicContent=q,t.FtReaderTopicContentCssVariables=n,t.styles=a,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
@@ -14,17 +14,17 @@
|
|
|
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,
|
|
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 c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,c=new Set(r.observedAttributes||[]);f(r,c,a);const u={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:c};this._definitionsByTag.set(t,u),this._definitionsByClass.set(r,u);let l=i.call(n,t);l||(l=h(t),e.call(n,t,l)),this===window.customElements&&(s.set(r,u),u.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,u,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){x.push(this),n.upgrade.apply(n,arguments),x.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let n=this._awaitingUpgrade.get(e);n||this._awaitingUpgrade.set(e,n=new Set),i?n.add(t):n.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const u=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!u(e)){const t=x[x.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),u(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)}},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),c=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let x=[document];const b=(t,e,i)=>{const n=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){x.push(this);const t=n.apply(i||this,arguments);return void 0!==t&&a.set(t,this),x.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){x.push(this),i.set.call(this,t),x.pop()}})};if(m(Element,"innerHTML"),m(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(fi){const t=window.customElements.define;window.customElements.define=(e,i,n)=>{try{t.bind(window.customElements)(e,i,n)}catch(t){console.info(e,i,n,t)}}}class e extends Promise{constructor(t){super(((e,i)=>t((t=>{this.isCanceled?i(new Error("Promise has been canceled")):e(t)}),(t=>{this.isCanceled?i(new Error("Promise has been canceled")):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.content[t]instanceof e&&this.content[t].cancel(),delete this.content[t]}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,i){if(void 0===this.content[t]){if(null==(i=null!=i?i:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(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
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const
|
|
22
|
+
*/const r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/}function
|
|
27
|
+
*/}function s(t){return o({...t,state:!0})}
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
@@ -35,40 +35,39 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
35
35
|
* Copyright 2021 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
37
|
*/
|
|
38
|
-
var
|
|
38
|
+
var a;function c(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(!c(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(!c(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(!c(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(a=window.HTMLSlotElement)||void 0===a||a.prototype.assignedElements;const u=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function l(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)=>!c(t,e),...null!=e?e:{}})}const h=window,f=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),v=new WeakMap;
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2019 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/
|
|
44
|
-
const l=window,c=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),u=new WeakMap;class d{constructor(t,e,i){if(this._$cssResult$=!0,i!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const p=t=>new d("string"==typeof t?t:t+"",void 0,h),f=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new d(i,t,h)},v=(t,e)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=l.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))},x=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return p(e)})(t):t
|
|
43
|
+
*/class p{constructor(t,e,i){if(this._$cssResult$=!0,i!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(f&&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 x=t=>new p("string"==typeof t?t:t+"",void 0,d),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 p(i,t,d)},m=(t,e)=>{f?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)}))},y=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return x(e)})(t):t
|
|
45
44
|
/**
|
|
46
45
|
* @license
|
|
47
46
|
* Copyright 2017 Google LLC
|
|
48
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/;var
|
|
48
|
+
*/;var w;const g=window,O=g.trustedTypes,S=O?O.emptyScript:"",j=g.reactiveElementPolyfillSupport,C={toAttribute(t,e){switch(e){case Boolean:t=t?S: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}},E=(t,e)=>e!==t&&(e==e||t==t),N={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:E};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(y(t))}else void 0!==t&&e.push(y(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 m(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:C).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:C;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||E)(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){}}
|
|
50
49
|
/**
|
|
51
50
|
* @license
|
|
52
51
|
* Copyright 2017 Google LLC
|
|
53
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
53
|
*/
|
|
55
|
-
var
|
|
54
|
+
var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==j||j({ReactiveElement:R}),(null!==(w=g.reactiveElementVersions)&&void 0!==w?w:g.reactiveElementVersions=[]).push("1.4.1");const $=window,k=$.trustedTypes,U=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,P="?"+A,F=`<${P}>`,L=document,_=(t="")=>L.createComment(t),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=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"),z=/'/g,H=/"/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=L.createTreeWalker(L,129,null,!1);class Q{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[c,u]=((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,c,u=-1,l=0;for(;l<i.length&&(s.lastIndex=l,c=s.exec(i),null!==c);)l=s.lastIndex,s===B?"!--"===c[1]?s=D:void 0!==c[1]?s=W:void 0!==c[2]?(V.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=K):void 0!==c[3]&&(s=K):s===K?">"===c[0]?(s=null!=r?r:B,u=-1):void 0===c[1]?u=-2:(u=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?K:'"'===c[3]?H:z):s===H||s===z?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+F:u>=0?(n.push(a),i.slice(0,u)+"$lit$"+i.slice(u)+A+h):i+A+(-2===u?(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!==U?U.createHTML(a):a,n]})(t,e);if(this.el=Q.createElement(c,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(A)){const i=u[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(A),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(A),e=t.length-1;if(e>0){n.textContent=k?k.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],_()),G.nextNode(),a.push({type:2,index:++r});n.append(t[e],_())}}}else if(8===n.nodeType)if(n.data===P)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(A,t+1));)a.push({type:7,index:r}),t+=A.length-1}r++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,n){var r,o,s,a;if(e===Z)return e;let c=void 0!==n?null===(r=i._$Co)||void 0===r?void 0:r[n]:i._$Cl;const u=T(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==u&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===u?c=void 0:(c=new u(t),c._$AT(t,i,n)),void 0!==n?(null!==(s=(a=i)._$Co)&&void 0!==s?s:a._$Co=[])[n]=c:i._$Cl=c),void 0!==c&&(e=Y(t,c._$AS(t,e.values),c,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:L).importNode(i,!0);G.currentNode=r;let o=G.nextNode(),s=0,a=0,c=n[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new et(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new at(o,this,t)),this.u.push(e),c=n[++a]}s!==(null==c?void 0:c.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=Y(this,t,e),T(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=>I(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&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(L.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=Q.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 Q(t)),e}k(t){I(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(_()),this.O(_()),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=Y(this,t,e,0),o=!T(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=Y(this,n[i+s],e,s),a===Z&&(a=this._$AH[s]),o||(o=!T(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=k?k.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=Y(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){Y(this,t)}}const ct=$.litHtmlPolyfillSupport;null==ct||ct(Q,et),(null!==(M=$.litHtmlVersions)&&void 0!==M?M:$.litHtmlVersions=[]).push("2.4.0");
|
|
56
55
|
/**
|
|
57
56
|
* @license
|
|
58
57
|
* Copyright 2017 Google LLC
|
|
59
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
59
|
*/
|
|
61
|
-
var
|
|
60
|
+
var ut,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(_(),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===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:ht});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:ht}),(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.2.2");class dt{static create(t,e,i){let n=t=>x(null!=t?t:i),r=b`var(${x(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>b`var(${x(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(${x(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(${x(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):x(null!=e?e:t.defaultValue),n=b`var(${x(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(${x(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}}const vt={colorPrimary:dt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:dt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:dt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:dt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:dt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:dt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:dt.create("--ft-color-error","COLOR","#B00020"),colorOutline:dt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:dt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:dt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:dt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:dt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:dt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:dt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:dt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:dt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:dt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:dt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:dt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:dt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:dt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:dt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:dt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:dt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:dt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:dt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:dt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:dt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:dt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:dt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:dt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:dt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:dt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:dt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:dt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:dt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:dt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:dt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:dt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:dt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:dt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:dt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:dt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:dt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:dt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:dt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:dt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:dt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:dt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:dt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:dt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:dt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:dt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:dt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:dt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:dt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:dt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:dt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:dt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:dt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:dt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:dt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
62
61
|
/**
|
|
63
62
|
* @license
|
|
64
63
|
* Copyright 2021 Google LLC
|
|
65
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/var pt=function(t,e,i,
|
|
67
|
-
${t.map((t=>
|
|
65
|
+
*/var pt=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 xt extends(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 m(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`
|
|
66
|
+
${t.map((t=>J`
|
|
68
67
|
<style>${t}</style>
|
|
69
68
|
`))}
|
|
70
69
|
${this.getTemplate()}
|
|
71
|
-
`}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,
|
|
70
|
+
`}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,c=t.filter(a).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const u=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=>u.add(t)))}if(0===u.size)return void this.removeAttribute("exportparts");const l=[...u.values()].flatMap((t=>c.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}pt([o()],xt.prototype,"exportpartsPrefix",void 0),pt([l([])],xt.prototype,"exportpartsPrefixes",void 0),pt([o()],xt.prototype,"customStylesheet",void 0),b`
|
|
72
71
|
.ft-no-text-select {
|
|
73
72
|
-webkit-touch-callout: none;
|
|
74
73
|
-webkit-user-select: none;
|
|
@@ -77,7 +76,7 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
77
76
|
-ms-user-select: none;
|
|
78
77
|
user-select: none;
|
|
79
78
|
}
|
|
80
|
-
`,
|
|
79
|
+
`,b`
|
|
81
80
|
.ft-word-wrap {
|
|
82
81
|
white-space: normal;
|
|
83
82
|
word-wrap: break-word;
|
|
@@ -89,7 +88,7 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
89
88
|
-webkit-hyphens: auto;
|
|
90
89
|
hyphens: auto
|
|
91
90
|
}
|
|
92
|
-
`,
|
|
91
|
+
`,b`
|
|
93
92
|
.ft-safari-ellipsis-fix {
|
|
94
93
|
margin-right: 0;
|
|
95
94
|
|
|
@@ -100,9 +99,9 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
100
99
|
display: inline-block;
|
|
101
100
|
width: 0;
|
|
102
101
|
}
|
|
103
|
-
`;const vt=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),xt=(t,e)=>{var i;const s=vt(t)?t:{};return e=null!==(i=null!=e?e:s.hasChanged)&&void 0!==i?i:(t,e)=>!r(t,e),(i,o)=>{var n,r;i.constructor.createProperty(o,{hasChanged:e,attribute:null!==(n=s.attribute)&&void 0!==n&&n});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(r=vt(t)?s.selector:t)&&void 0!==r?r:t=>t[o];a.reduxProperties.set(o,{selector:l,store:s.store})}};class mt extends ft{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:bt(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:bt(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 bt(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var yt,gt;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(gt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===gt||gt.toString());const wt={colorError:ut.external(dt.colorError,"Design system"),fontFamily:ut.external(dt.contentFont,"Design system")},Ot=f`
|
|
102
|
+
`;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 mt(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[oe]}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)===se}(t)||Array.isArray(t)||!!t[re]||!!t.constructor[re]||Et(t)||Nt(t))}function gt(t,e,i){void 0===i&&(i=!1),0===Ot(t)?(i?Object.keys:ae)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Ot(t){var e=t[oe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Et(t)?2:Nt(t)?3:0}function St(t,e){return 2===Ot(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function jt(t,e,i){var n=Ot(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function Ct(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Et(t){return te&&t instanceof Map}function Nt(t){return ee&&t instanceof Set}function Rt(t){return t.o||t.t}function Mt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ce(t);delete e[oe];for(var i=ae(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 $t(t,e){return void 0===e&&(e=!1),Ut(t)||yt(t)||!wt(t)||(Ot(t)>1&&(t.set=t.add=t.clear=t.delete=kt),Object.freeze(t),e&>(t,(function(t,e){return $t(e,!0)}),!0)),t}function kt(){mt(2)}function Ut(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function At(t){var e=ue[t];return e||mt(18,t),e}function Pt(){return Qt}function Ft(t,e){e&&(At("Patches"),t.u=[],t.s=[],t.v=e)}function Lt(t){_t(t),t.p.forEach(It),t.p=null}function _t(t){t===Qt&&(Qt=t.l)}function Tt(t){return Qt={p:[],l:Qt,h:t,m:!0,_:0}}function It(t){var e=t[oe];0===e.i||1===e.i?e.j():e.O=!0}function Bt(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[oe].P&&(Lt(e),mt(4)),wt(t)&&(t=Dt(e,t),e.l||Kt(e,t)),e.u&&At("Patches").M(i[oe].t,t,e.u,e.s)):t=Dt(e,i,[]),Lt(e),e.u&&e.v(e.u,e.s),t!==ne?t:void 0}function Dt(t,e,i){if(Ut(e))return e;var n=e[oe];if(!n)return gt(e,(function(r,o){return Wt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Kt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Mt(n.k):n.o;gt(3===n.i?new Set(r):r,(function(e,o){return Wt(t,n,r,e,o,i)})),Kt(t,r,!1),i&&t.u&&At("Patches").R(n,i,t.u,t.s)}return n.o}function Wt(t,e,i,n,r,o){if(yt(r)){var s=Dt(t,r,o&&e&&3!==e.i&&!St(e.D,n)?o.concat(n):void 0);if(jt(i,n,s),!yt(s))return;t.m=!1}if(wt(r)&&!Ut(r)){if(!t.h.F&&t._<1)return;Dt(t,r),e&&e.A.l||Kt(t,r)}}function Kt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&$t(e,i)}function zt(t,e){var i=t[oe];return(i?Rt(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 Vt(t){t.P||(t.P=!0,t.l&&Vt(t.l))}function Jt(t){t.o||(t.o=Mt(t.t))}function Zt(t,e,i){var n=Et(e)?At("MapSet").N(e,i):Nt(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:Pt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=le;i&&(r=[n],o=he);var s=Proxy.revocable(r,o),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(e,i):At("ES5").J(e,i);return(i?i.A:Pt()).p.push(n),n}function qt(t){return yt(t)||mt(22,t),function t(e){if(!wt(e))return e;var i,n=e[oe],r=Ot(e);if(n){if(!n.P&&(n.i<4||!At("ES5").K(n)))return n.t;n.I=!0,i=Xt(e,r),n.I=!1}else i=Xt(e,r);return gt(i,(function(e,r){n&&function(t,e){return 2===Ot(t)?t.get(e):t[e]}(n.t,e)===r||jt(i,e,t(r))})),3===r?new Set(i):i}(t)}function Xt(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Mt(t)}var Gt,Qt,Yt="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),te="undefined"!=typeof Map,ee="undefined"!=typeof Set,ie="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ne=Yt?Symbol.for("immer-nothing"):((Gt={})["immer-nothing"]=!0,Gt),re=Yt?Symbol.for("immer-draftable"):"__$immer_draftable",oe=Yt?Symbol.for("immer-state"):"__$immer_state",se=""+Object.prototype.constructor,ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ce=Object.getOwnPropertyDescriptors||function(t){var e={};return ae(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},ue={},le={get:function(t,e){if(e===oe)return t;var i=Rt(t);if(!St(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||!wt(n)?n:n===zt(t.t,e)?(Jt(t),t.o[e]=Zt(t.A.h,n,t)):n},has:function(t,e){return e in Rt(t)},ownKeys:function(t){return Reflect.ownKeys(Rt(t))},set:function(t,e,i){var n=Ht(Rt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=zt(Rt(t),e),o=null==r?void 0:r[oe];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Ct(i,r)&&(void 0!==i||St(t.t,e)))return!0;Jt(t),Vt(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!==zt(t.t,e)||e in t.t?(t.D[e]=!1,Jt(t),Vt(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Rt(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(){mt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){mt(12)}},he={};gt(le,(function(t,e){he[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),he.deleteProperty=function(t,e){return he.set.call(this,t,e,void 0)},he.set=function(t,e,i){return le.set.call(this,t[0],e,i,t[0])};var fe=function(){function t(t){var e=this;this.g=ie,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&&mt(6),void 0!==n&&"function"!=typeof n&&mt(7),wt(t)){var a=Tt(e),c=Zt(e,t,void 0),u=!0;try{s=i(c),u=!1}finally{u?Lt(a):_t(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Ft(a,n),Bt(t,a)}),(function(t){throw Lt(a),t})):(Ft(a,n),Bt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===ne&&(s=void 0),e.F&&$t(s,!0),n){var l=[],h=[];At("Patches").M(t,s,l,h),n(l,h)}return s}mt(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)||mt(8),yt(t)&&(t=qt(t));var e=Tt(this),i=Zt(this,t,void 0);return i[oe].C=!0,_t(e),i},e.finishDraft=function(t,e){var i=(t&&t[oe]).A;return Ft(i,e),Bt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ie&&mt(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}(),de=new fe,ve=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 pe=ve;function xe(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 me(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){xe(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 we="function"==typeof Symbol&&Symbol.observable||"@@observable",ge=function(){return Math.random().toString(36).substring(7).split("").join(".")},Oe={INIT:"@@redux/INIT"+ge(),REPLACE:"@@redux/REPLACE"+ge(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ge()}};function Se(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 je(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(je)(t,e)}if("function"!=typeof t)throw new Error(ye(2));var r=t,o=e,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function l(){if(c)throw new Error(ye(3));return o}function h(t){if("function"!=typeof t)throw new Error(ye(4));if(c)throw new Error(ye(5));var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error(ye(6));e=!1,u();var i=a.indexOf(t);a.splice(i,1),s=null}}}function f(t){if(!Se(t))throw new Error(ye(7));if(void 0===t.type)throw new Error(ye(8));if(c)throw new Error(ye(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}function d(t){if("function"!=typeof t)throw new Error(ye(10));r=t,f({type:Oe.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:Oe.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:d})[we]=v,n}function Ce(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:Oe.INIT}))throw new Error(ye(12));if(void 0===i(void 0,{type:Oe.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 c=s[a],u=i[c],l=t[c],h=u(l,e);if(void 0===h)throw e&&e.type,new Error(ye(14));r[c]=h,n=n||h!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function Ee(){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 Ne(){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=Ee.apply(void 0,o)(i.dispatch),me(me({},i),{},{dispatch:n})}}}function Re(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 Me=Re();Me.withExtraArgument=Re;var $e,ke=Me,Ue=($e=function(t,e){return $e=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])},$e(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}$e(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},Pe=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Te=function(t,e,i){return e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ie=function(t,e){for(var i in e||(e={}))Le.call(e,i)&&Te(t,i,e[i]);if(Fe)for(var n=0,r=Fe(e);n<r.length;n++){i=r[n];_e.call(e,i)&&Te(t,i,e[i])}return t},Be="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ee:Ee.apply(null,arguments)};var De=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 Ue(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 We(t){return wt(t)?pe(t,(function(){})):t}function Ke(){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 De;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(ke.withExtraArgument(i.extraArgument)):n.push(ke));return n}(t)}}function ze(t){var e,i=Ke(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,c=n.devTools,u=void 0===c||c,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=Ce(o)}var v=a;"function"==typeof v&&(v=v(i));var p=Ne.apply(void 0,v),x=Ee;u&&(x=Be(Ie({trace:!1},"object"==typeof u&&u)));var b=[p];return Array.isArray(d)?b=Ae([p],d):"function"==typeof d&&(b=d(b)),je(e,h,x.apply(void 0,b))}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 Ie(Ie({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 Ve(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 Je(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:We(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},c={};function u(){var e="function"==typeof t.extraReducers?Ve(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,c=e[2],u=void 0===c?void 0:c,l=Ie(Ie({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?Ve(e):[e,i,n],s=o[0],a=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return We(t())};else{var u=We(t);r=function(){return u}}function l(t,e){void 0===t&&(t=r());var i=Ae([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=[c]),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 pe(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,u)}return o.forEach((function(t){var i,n,o=r[t],u=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[u]=i,c[t]=n?He(u,n):He(u)})),{name:e,reducer:function(t,e){return i||(i=u()),i(t,e)},actions:c,caseReducers:s,getInitialState:function(){return i||(i=u()),i.getInitialState()}}}var Ze="listenerMiddleware";He(Ze+"/add"),He(Ze+"/removeAll"),He(Ze+"/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[oe];return le.get(e,t)},set:function(e){var i=this[oe];le.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][oe];if(!r.P)switch(r.i){case 5:n(r)&&Vt(r);break;case 4:i(r)&&Vt(r)}}}function i(t){for(var e=t.t,i=t.k,n=ae(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==oe){var s=e[o];if(void 0===s&&!St(e,o))return!0;var a=i[o],c=a&&a[oe];if(c?c.t!==s:!Ct(a,s))return!0}}var u=!!e[oe];return n.length!==ae(e).length+(u?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=ce(i);delete o[oe];for(var s=ae(o),a=0;a<s.length;a++){var c=s[a];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Pt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,oe,{value:o,writable:!0}),r},S:function(t,i,r){r?yt(i)&&i[oe].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[oe];if(i){var r=i.t,o=i.k,s=i.D,a=i.i;if(4===a)gt(o,(function(e){e!==oe&&(void 0!==r[e]||St(r,e)?s[e]||t(o[e]):(s[e]=!0,Vt(i)))})),gt(r,(function(t){void 0!==o[t]||St(o,t)||(s[t]=!1,Vt(i))}));else if(5===a){if(n(i)&&(Vt(i),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var u=r.length;u<o.length;u++)s[u]=!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 qe=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),Xe=(t,e)=>{var i;const n=qe(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!c(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 c=null!==(s=qe(t)?n.selector:t)&&void 0!==s?s:t=>t[r];a.reduxProperties.set(r,{selector:c,store:n.store})}};class Ge extends xt{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:Qe(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Qe(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 Qe(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(Qe(n))return n;if(null==i)return;const r=Je(i);if(n)return new Ye(r,n);const o=ze({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 ti,ei;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ei=null===(ti=window.safari)||void 0===ti?void 0:ti.pushNotification)||void 0===ei||ei.toString());const ii={colorError:dt.external(vt.colorError,"Design system"),fontFamily:dt.external(vt.contentFont,"Design system")},ni=b`
|
|
104
103
|
.topic {
|
|
105
|
-
font-family: ${
|
|
104
|
+
font-family: ${ii.fontFamily};
|
|
106
105
|
overflow-x: auto;
|
|
107
106
|
}
|
|
108
107
|
|
|
@@ -111,23 +110,23 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
.topic-on-error ft-icon {
|
|
114
|
-
color: ${
|
|
113
|
+
color: ${ii.colorError}
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
.topic-loading {
|
|
118
117
|
height: 100vh;
|
|
119
118
|
}
|
|
120
|
-
`;var
|
|
119
|
+
`;var ri=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 oi extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class si extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new oi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ri([s()],e.prototype,"stateManager",void 0),e}(Ge)){}var ai=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 ci extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class ui extends(function(t){class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registerIntervalTopic=0}connectedCallback(){super.connectedCallback(),this.registerIntervalTopic=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this.registerIntervalTopic):this.dispatchEvent(new ci)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return ai([s()],e.prototype,"tocNode",void 0),ai([s()],e.prototype,"disableContextInteractions",void 0),e}(si)){}
|
|
121
120
|
/**
|
|
122
121
|
* @license
|
|
123
122
|
* Copyright 2017 Google LLC
|
|
124
123
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
125
|
-
*/const
|
|
124
|
+
*/const li=2;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
126
125
|
/**
|
|
127
126
|
* @license
|
|
128
127
|
* Copyright 2017 Google LLC
|
|
129
128
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
130
|
-
*/class
|
|
129
|
+
*/class fi extends hi{constructor(t){if(super(t),this.it=q,t.type!==li)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this._t=void 0,this.it=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}fi.directiveName="unsafeHTML",fi.resultType=1;const di=(t=>(...e)=>({_$litDirective$:t,values:e}))(fi);var vi,pi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(vi||(vi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(pi||(pi={})),new Map([...["abw"].map((t=>[t,pi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,pi.AUDIO])),...["avi"].map((t=>[t,pi.AVI])),...["chm","xhs"].map((t=>[t,pi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,pi.CODE])),...["csv"].map((t=>[t,pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,pi.DITA])),...["epub"].map((t=>[t,pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,pi.EXCEL])),...["flac"].map((t=>[t,pi.FLAC])),...["gif"].map((t=>[t,pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,pi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,pi.JPEG])),...["json"].map((t=>[t,pi.JSON])),...["m4a","m4p"].map((t=>[t,pi.M4A])),...["mov","qt"].map((t=>[t,pi.MOV])),...["mp3"].map((t=>[t,pi.MP3])),...["mp4","m4v"].map((t=>[t,pi.MP4])),...["ogg","oga"].map((t=>[t,pi.OGG])),...["pdf","ps"].map((t=>[t,pi.PDF])),...["png"].map((t=>[t,pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,pi.POWERPOINT])),...["rar"].map((t=>[t,pi.RAR])),...["stp"].map((t=>[t,pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,pi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,pi.VIDEO])),...["wav"].map((t=>[t,pi.WAV])),...["wma"].map((t=>[t,pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,pi.YAML])),...["zip"].map((t=>[t,pi.ZIP]))]);const xi=dt.create("--ft-icon-font-size","SIZE","24px"),bi=dt.extend("--ft-icon-fluid-topics-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),mi=dt.extend("--ft-icon-file-format-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),yi=dt.extend("--ft-icon-material-font-family",dt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),wi=dt.create("--ft-icon-vertical-align","UNKNOWN","unset"),gi=b`
|
|
131
130
|
:host, i.ft-icon {
|
|
132
131
|
display: inline-flex;
|
|
133
132
|
align-items: center;
|
|
@@ -136,14 +135,14 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
:host {
|
|
139
|
-
width: ${
|
|
140
|
-
height: ${
|
|
138
|
+
width: ${xi};
|
|
139
|
+
height: ${xi};
|
|
141
140
|
}
|
|
142
141
|
|
|
143
142
|
i.ft-icon {
|
|
144
143
|
width: 100%;
|
|
145
144
|
height: 100%;
|
|
146
|
-
font-size: ${
|
|
145
|
+
font-size: ${xi};
|
|
147
146
|
line-height: 1;
|
|
148
147
|
font-weight: normal;
|
|
149
148
|
text-transform: none;
|
|
@@ -154,53 +153,61 @@ var at,lt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
154
153
|
text-rendering: auto;
|
|
155
154
|
-webkit-font-smoothing: antialiased;
|
|
156
155
|
-moz-osx-font-smoothing: grayscale;
|
|
157
|
-
vertical-align: ${
|
|
156
|
+
vertical-align: ${wi};
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
i.ft-icon.ft-icon--fluid-topics {
|
|
161
|
-
font-family: ${
|
|
160
|
+
font-family: ${bi}, ft-icons, fticons, sans-serif;
|
|
162
161
|
|
|
163
162
|
/* Ugly fix because font is broken */
|
|
164
|
-
font-size: calc(0.9 * ${
|
|
163
|
+
font-size: calc(0.9 * ${xi});
|
|
165
164
|
position: relative;
|
|
166
165
|
top: -5%;
|
|
167
166
|
justify-content: center;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
.ft-icon--file-format {
|
|
171
|
-
font-family: ${
|
|
170
|
+
font-family: ${mi}, ft-mime, sans-serif;
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
.ft-icon--material {
|
|
175
|
-
font-family: ${
|
|
174
|
+
font-family: ${yi}, "Material Icons", sans-serif;
|
|
176
175
|
}
|
|
177
|
-
`;var
|
|
176
|
+
`;var Oi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oi||(Oi={}));var Si=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 ji extends xt{constructor(){super(...arguments),this.resolvedIcon=q}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Oi.fluid_topics,i="material"!==e||this.value;return J`
|
|
178
177
|
<i class="ft-icon ${"ft-icon--"+e}">
|
|
179
|
-
${
|
|
178
|
+
${di(this.resolvedIcon)}
|
|
180
179
|
<slot ?hidden=${i}></slot>
|
|
181
180
|
</i>
|
|
182
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
181
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Oi.file_format:this.resolvedIcon=null!==(t=pi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Oi.material:this.resolvedIcon=this.value||q;break;default:this.resolvedIcon=null!==(e=vi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}ji.elementDefinitions={},ji.styles=gi,Si([o()],ji.prototype,"variant",void 0),Si([o()],ji.prototype,"value",void 0),Si([s()],ji.prototype,"resolvedIcon",void 0),Si([
|
|
183
182
|
/**
|
|
184
183
|
* @license
|
|
185
184
|
* Copyright 2017 Google LLC
|
|
186
185
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
187
186
|
*/
|
|
188
|
-
function(t,e){return(({finisher:t,descriptor:e})=>(i,
|
|
187
|
+
function(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var r;if(void 0===n){const n=null!==(r=i.originalKey)&&void 0!==r?r:i.key,o=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(o.finisher=function(e){t(e,n)}),o}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(r,n)}})({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})}("slot")],ji.prototype,"slottedContent",void 0),u("ft-icon")(ji);const Ci=b`
|
|
188
|
+
`,Ei=b`
|
|
189
|
+
`,Ni=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}});class Ri{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Ni.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?Ri.build(t):null!==(e=Ri.API)&&void 0!==e?e:Ri.API=Ri.build()}static await(t){return new Promise((e=>{let i=Ri.get(t);if(i)e(i);else{const n=Ni.subscribe((()=>{i=Ri.get(t),i&&(n(),e(i))}))}}))}}var Mi;const $i=Symbol("clearAfterUnitTest");class ki{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[Mi]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=Ni.getState().uiLocale,Ni.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Ni.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};c(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.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}Mi=$i,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ki(Ri.get));const Ui=window.FluidTopicsI18nService;var Ai=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 Pi extends xt{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=()=>Ri.get(),this.cache=new i,this.cleanSessionDebouncer=new n}render(){return J`
|
|
190
|
+
<slot></slot>
|
|
191
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Ni.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Ni.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Ni.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Ni.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Ni.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Ni.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Ni.actions.setSession(this.session),t.has("availableUiLocales")&&Ni.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Ui.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()))))}}Pi.elementDefinitions={},Pi.styles=Ei,Ai([o()],Pi.prototype,"baseUrl",void 0),Ai([o()],Pi.prototype,"apiIntegrationIdentifier",void 0),Ai([o()],Pi.prototype,"uiLocale",void 0),Ai([l([])],Pi.prototype,"availableUiLocales",void 0),Ai([o({type:Boolean})],Pi.prototype,"editorMode",void 0),Ai([o({type:Boolean})],Pi.prototype,"noCustom",void 0),Ai([o({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Pi.prototype,"noCustomComponent",void 0),Ai([o({type:Boolean})],Pi.prototype,"withManualResources",void 0),Ai([l([])],Pi.prototype,"messageContexts",void 0),Ai([l(void 0)],Pi.prototype,"session",void 0),Ai([o({type:Object})],Pi.prototype,"apiProvider",void 0),u("ft-app-context")(Pi);const Fi=Symbol("i18nProperties"),Li=Symbol("i18nUnsubs");function _i(t){var e;return e=Li,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var n;if("string"==typeof t)return Ui.resolveMessage(t,e,...i);const r=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return Ui.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Fi])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[Fi])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Fi]&&new Set([...this[Fi].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Li].has(t)||this[Li].set(t,Ui.subscribe(t,(()=>this.onI18nUpdate(t)))),Ui.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Li].forEach((t=>t())),this[Li].clear()}}}class Ti extends(_i(xt)){}class Ii extends(_i(Ge)){}var Bi=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 Di extends Ti{render(){return this.key&&this.context?J`
|
|
192
|
+
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
193
|
+
`:q}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Di.elementDefinitions={},Di.styles=Ci,Bi([o()],Di.prototype,"context",void 0),Bi([o()],Di.prototype,"key",void 0),Bi([l([])],Di.prototype,"args",void 0),Bi([o()],Di.prototype,"defaultMessage",void 0);class Wi{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>Ui.resolveMessage(this.name,e,...t)})}static build(t){return new Wi(t)}static fromGwt(t){return new Wi(t)}}u("ft-i18n")(Di);const Ki=Wi.build("designedReaderTopicContent");var zi=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 ui{render(){var t,e;return this.map&&(this.error||this.content)?J`
|
|
189
194
|
<style>
|
|
190
195
|
@import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
191
196
|
</style>
|
|
192
|
-
<section class="topic" lang="${this.
|
|
197
|
+
<section class="topic" lang="${null===(e=this.map)||void 0===e?void 0:e.lang}">
|
|
193
198
|
${this.renderTopicContent()}
|
|
194
199
|
</section>
|
|
195
|
-
`:
|
|
200
|
+
`:J`
|
|
196
201
|
<section class="topic-loading"></section>
|
|
197
|
-
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,
|
|
202
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,n,r,o,s;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,i,n;if(this.error)return J`
|
|
198
203
|
<div class="topic-on-error">
|
|
199
204
|
<ft-icon>WARNING</ft-icon>
|
|
200
|
-
<div
|
|
205
|
+
<div>
|
|
206
|
+
${this.is404Error()?Ki.messages.topicMissingAdvice():Ki.messages.somethingWentWrong()}
|
|
207
|
+
</div>
|
|
201
208
|
</div>
|
|
202
|
-
|
|
203
|
-
<div class="depth-${null===(
|
|
204
|
-
${
|
|
209
|
+
`;const r=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return J`
|
|
210
|
+
<div class="depth-${null===(i=this.tocNode)||void 0===i?void 0:i.depth} content-locale-${null===(n=this.map)||void 0===n?void 0:n.lang} ${r}">
|
|
211
|
+
${di(`${this.content}`)}
|
|
205
212
|
</div>
|
|
206
|
-
`}is404Error(){return 404===this.error.status}}
|
|
213
|
+
`}is404Error(){return 404===this.error.status}}Hi.styles=ni,zi([Xe()],Hi.prototype,"map",void 0),zi([Xe()],Hi.prototype,"scrollTarget",void 0),zi([s()],Hi.prototype,"content",void 0),zi([s()],Hi.prototype,"error",void 0),u("ft-reader-topic-content")(Hi),t.FtReaderTopicContent=Hi,t.FtReaderTopicContentCssVariables=ii,t.styles=ni,Object.defineProperty(t,"U",{value:!0})}({});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { I18nMessageContext, I18nMessages } from "@fluid-topics/ft-i18n";
|
|
2
|
+
interface TopicContentMessages extends I18nMessages {
|
|
3
|
+
topicMissingAdvice(): string;
|
|
4
|
+
somethingWentWrong(): string;
|
|
5
|
+
}
|
|
6
|
+
export declare const context: I18nMessageContext<TopicContentMessages>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TopicContentMessages.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-content",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.61",
|
|
4
4
|
"description": "Content of a topic in integrated reader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "0.3.
|
|
23
|
-
"@fluid-topics/ft-
|
|
24
|
-
"@fluid-topics/ft-reader-
|
|
25
|
-
"@fluid-topics/ft-
|
|
26
|
-
"@fluid-topics/ft-
|
|
27
|
-
"@fluid-topics/
|
|
22
|
+
"@fluid-topics/ft-chip": "0.3.61",
|
|
23
|
+
"@fluid-topics/ft-i18n": "0.3.61",
|
|
24
|
+
"@fluid-topics/ft-reader-context": "0.3.61",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-context": "0.3.61",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "0.3.61",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "0.3.61",
|
|
28
|
+
"@fluid-topics/public-api": "1.0.32",
|
|
28
29
|
"lit": "2.2.8"
|
|
29
30
|
},
|
|
30
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "12a4024fb3084b17772a3aef10723d22ae56c877"
|
|
31
32
|
}
|