@fluid-topics/ft-reader-attachments 1.1.37 → 1.1.39
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.
|
@@ -227,13 +227,13 @@
|
|
|
227
227
|
}
|
|
228
228
|
`;var O;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(O||(O={}));var N=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class v extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const S=Symbol("registerInterval");class w extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=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[S]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[S]):this.dispatchEvent(new v)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=S,N([a.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}const C=e.css`
|
|
229
229
|
`,I=e.css`
|
|
230
|
-
`,U=o.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class E{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=U.getState(),a=null!=t?t:e;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static get(t){var o;return null!=t?E.build(t):null!==(o=E.API)&&void 0!==o?o:E.API=E.build()}static await(t){return new Promise((o=>{let e=E.get(t);if(e)o(e);else{const a=U.subscribe((()=>{e=E.get(t),e&&(a(),o(e))}))}}))}}var
|
|
230
|
+
`,U=o.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class E{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=U.getState(),a=null!=t?t:e;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static get(t){var o;return null!=t?E.build(t):null!==(o=E.API)&&void 0!==o?o:E.API=E.build()}static await(t){return new Promise((o=>{let e=E.get(t);if(e)o(e);else{const a=U.subscribe((()=>{e=E.get(t),e&&(a(),o(e))}))}}))}}class W{constructor(t=!0,e){var a;this.overrideApi=e;let r=this.constructor;r.commonCache=null!==(a=r.commonCache)&&void 0!==a?a:new o.CacheRegistry,this.cache=t?r.commonCache:new o.CacheRegistry}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:E.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:E.await()}clearCache(){this.cache.clearAll()}}var R;const k=Symbol("clearAfterUnitTest");class L extends W{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[R]=()=>{this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var a;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},...e};o.deepEqual(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...a){var r,i,n;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(i=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==i?i:{};return new o.ParametrizedLabelResolver(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},l).resolve(e,...a)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}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=>o.delay(0).then((()=>t())).catch((()=>null)))))}}R=k,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends L{constructor(){super((async(t,o)=>(await this.awaitApi).getFluidTopicsMessageContext(t,o)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends L{constructor(){super((async(t,o)=>(await this.awaitApi).getCustomMessageContext(t,o)))}});const $=window.FluidTopicsI18nService,K=window.FluidTopicsCustomI18nService;var Z=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class z extends o.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>E.get(),this.cache=new o.CacheRegistry,this.cleanSessionDebouncer=new o.Debouncer}render(){return e.html`
|
|
231
231
|
<slot></slot>
|
|
232
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(U.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&U.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&U.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&U.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&U.actions.noCustom(this.noCustom),t.has("editorMode")&&U.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&U.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&U.actions.session(this.session),t.has("availableUiLocales")&&U.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t
|
|
232
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(U.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&U.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&U.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&U.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&U.actions.noCustom(this.noCustom),t.has("editorMode")&&U.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&U.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&U.actions.session(this.session),t.has("availableUiLocales")&&U.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>$.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}z.elementDefinitions={},z.styles=I,Z([a.property()],z.prototype,"baseUrl",void 0),Z([a.property()],z.prototype,"apiIntegrationIdentifier",void 0),Z([a.property()],z.prototype,"uiLocale",void 0),Z([o.jsonProperty(null)],z.prototype,"availableUiLocales",void 0),Z([o.jsonProperty(null)],z.prototype,"metadataConfiguration",void 0),Z([a.property({type:Boolean})],z.prototype,"editorMode",void 0),Z([a.property({type:Boolean})],z.prototype,"noCustom",void 0),Z([a.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],z.prototype,"noCustomComponent",void 0),Z([a.property({type:Boolean})],z.prototype,"withManualResources",void 0),Z([o.jsonProperty([])],z.prototype,"messageContexts",void 0),Z([o.jsonProperty(void 0)],z.prototype,"session",void 0),Z([a.property({type:Object})],z.prototype,"apiProvider",void 0);class B extends W{async listMySearches(){let t=U.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class F extends W{async listMyBookmarks(){let t=U.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const D=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new F,this.savedSearchesService=new B,U.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=U.getState();o.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),D.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),D.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();D.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;D.actions.bookmarks(o)}}},o.customElement("ft-app-context")(z);var A=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};const H=Symbol("i18nAttributes"),G=Symbol("i18nProperties"),M=Symbol("i18nUnsubs");function j(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?K:$}i18n(t,o,...e){var a;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const r=null!==(a=t.args)&&void 0!==a?a:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var o,e;null===(o=this[H])||void 0===o||o.forEach(((o,e)=>{var a;const r=this.getI18nAttributeValue(e);(null===(a=null==r?void 0:r.context)||void 0===a?void 0:a.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(e,r,o)})),null===(e=this[G])||void 0===e||e.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,o,e){this[t]={...o,message:this.i18n({context:o.context,key:o.key,...e})}}update(t){var o,e;super.update(t),null===(o=this[H])||void 0===o||o.forEach(((o,e)=>{const a=this.getI18nAttributeValue(e);(null==a?void 0:a.context)&&a.key&&(t.has(e)||null!=o.argsProvider)&&(t.has(e)&&this.addI18nContext(a.context),this.updateI18nAttributeMessage(e,a,o))})),null===(e=this[G])||void 0===e||e.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,o,e,a;super.connectedCallback(),new Set([...null!==(o=null===(t=this[G])||void 0===t?void 0:t.values())&&void 0!==o?o:[],...[...null!==(a=null===(e=this[H])||void 0===e?void 0:e.keys())&&void 0!==a?a:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[M].has(t)||this[M].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages("string"==typeof t?t:t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[M].forEach((t=>t())),this[M].clear()}}return o=M,A([a.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class P extends(j(o.FtLitElement)){}class T extends(j(o.FtLitElementRedux)){}var _=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class Y extends T{constructor(){super(),this.editorMode=!1,this.addStore(U)}render(){return this.key&&this.context?e.html`
|
|
233
233
|
<span class="ft-i18n">
|
|
234
234
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
235
235
|
</span>
|
|
236
|
-
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){var o;super.update(t),["context","key","defaultMessage"].some((o=>t.has(o)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}Y.elementDefinitions={},Y.styles=C,_([o.redux()],Y.prototype,"editorMode",void 0),_([a.property()],Y.prototype,"context",void 0),_([a.property()],Y.prototype,"key",void 0),_([o.jsonProperty([])],Y.prototype,"args",void 0),_([a.property()],Y.prototype,"defaultMessage",void 0);class q{static build(t){return new q(t)}static fromGwt(t){return new q(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,o)=>(...t)=>L.resolveMessage(this.name,o,...t)})}}o.customElement("ft-i18n")(Y);const V=q.build("designedReaderAttachments"),X={download:"Download “{0}”"};var J,Q;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",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.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(J||(J={})),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=""}(Q||(Q={}));const tt=new Map([...["abw"].map((t=>[t,Q.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,Q.AUDIO])),...["avi"].map((t=>[t,Q.AVI])),...["chm","xhs"].map((t=>[t,Q.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,Q.CODE])),...["csv"].map((t=>[t,Q.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Q.DITA])),...["epub"].map((t=>[t,Q.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Q.EXCEL])),...["flac"].map((t=>[t,Q.FLAC])),...["gif"].map((t=>[t,Q.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Q.GZIP])),...["html","htm","xhtml"].map((t=>[t,Q.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,Q.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Q.JPEG])),...["json"].map((t=>[t,Q.JSON])),...["m4a","m4p"].map((t=>[t,Q.M4A])),...["mov","qt"].map((t=>[t,Q.MOV])),...["mp3"].map((t=>[t,Q.MP3])),...["mp4","m4v"].map((t=>[t,Q.MP4])),...["ogg","oga"].map((t=>[t,Q.OGG])),...["pdf","ps"].map((t=>[t,Q.PDF])),...["png"].map((t=>[t,Q.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Q.POWERPOINT])),...["rar"].map((t=>[t,Q.RAR])),...["stp"].map((t=>[t,Q.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Q.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,Q.VIDEO])),...["wav"].map((t=>[t,Q.WAV])),...["wma"].map((t=>[t,Q.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Q.WORD])),...["xml","xsl","rdf"].map((t=>[t,Q.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Q.YAML])),...["zip"].map((t=>[t,Q.ZIP]))]),ot=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const et={[Q.ABW]:"#91ABC6",[Q.AUDIO]:"#1795E3",[Q.AVI]:"#E63324",[Q.CHM]:"#71C3EB",[Q.CODE]:"#71C3EB",[Q.CSV]:"#1F7345",[Q.DITA]:"#71C3EB",[Q.EPUB]:"#85B926",[Q.EXCEL]:"#1F7345",[Q.FLAC]:"#1795E3",[Q.GIF]:"#59B031",[Q.GZIP]:"#F8AB36",[Q.HTML]:"#71C3EB",[Q.IMAGE]:"#59B031",[Q.JPEG]:"#59B031",[Q.JSON]:"#71C3EB",[Q.M4A]:"#1795E3",[Q.MOV]:"#E63324",[Q.MP3]:"#1795E3",[Q.MP4]:"#E63324",[Q.OGG]:"#1795E3",[Q.PDF]:"#E44948",[Q.PNG]:"#59B031",[Q.POWERPOINT]:"#B54A2B",[Q.RAR]:"#F8AB36",[Q.STP]:"#3764B1",[Q.TEXT]:"#3162AB",[Q.UNKNOWN]:"#999999",[Q.VIDEO]:"#E63324",[Q.WAV]:"#1795E3",[Q.WMA]:"#1795E3",[Q.WORD]:"#3162AB",[Q.XML]:"#71C3EB",[Q.YAML]:"#71C3EB",[Q.ZIP]:"#F8AB36"};var at;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(at||(at={}));var rt=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class it extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(at).includes(this.variant)?this.variant:at.fluid_topics,o=t!==at.material||!!this.value;return e.html`
|
|
236
|
+
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){var o;super.update(t),["context","key","defaultMessage"].some((o=>t.has(o)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}Y.elementDefinitions={},Y.styles=C,_([o.redux()],Y.prototype,"editorMode",void 0),_([a.property()],Y.prototype,"context",void 0),_([a.property()],Y.prototype,"key",void 0),_([o.jsonProperty([])],Y.prototype,"args",void 0),_([a.property()],Y.prototype,"defaultMessage",void 0);class q{static build(t){return new q(t)}static fromGwt(t){return new q(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,o)=>(...t)=>$.resolveMessage(this.name,o,...t)})}}o.customElement("ft-i18n")(Y);const V=q.build("designedReaderAttachments"),X={download:"Download “{0}”"};var J,Q;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",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.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(J||(J={})),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=""}(Q||(Q={}));const tt=new Map([...["abw"].map((t=>[t,Q.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,Q.AUDIO])),...["avi"].map((t=>[t,Q.AVI])),...["chm","xhs"].map((t=>[t,Q.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,Q.CODE])),...["csv"].map((t=>[t,Q.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Q.DITA])),...["epub"].map((t=>[t,Q.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Q.EXCEL])),...["flac"].map((t=>[t,Q.FLAC])),...["gif"].map((t=>[t,Q.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Q.GZIP])),...["html","htm","xhtml"].map((t=>[t,Q.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,Q.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Q.JPEG])),...["json"].map((t=>[t,Q.JSON])),...["m4a","m4p"].map((t=>[t,Q.M4A])),...["mov","qt"].map((t=>[t,Q.MOV])),...["mp3"].map((t=>[t,Q.MP3])),...["mp4","m4v"].map((t=>[t,Q.MP4])),...["ogg","oga"].map((t=>[t,Q.OGG])),...["pdf","ps"].map((t=>[t,Q.PDF])),...["png"].map((t=>[t,Q.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Q.POWERPOINT])),...["rar"].map((t=>[t,Q.RAR])),...["stp"].map((t=>[t,Q.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Q.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,Q.VIDEO])),...["wav"].map((t=>[t,Q.WAV])),...["wma"].map((t=>[t,Q.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Q.WORD])),...["xml","xsl","rdf"].map((t=>[t,Q.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Q.YAML])),...["zip"].map((t=>[t,Q.ZIP]))]),ot=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const et={[Q.ABW]:"#91ABC6",[Q.AUDIO]:"#1795E3",[Q.AVI]:"#E63324",[Q.CHM]:"#71C3EB",[Q.CODE]:"#71C3EB",[Q.CSV]:"#1F7345",[Q.DITA]:"#71C3EB",[Q.EPUB]:"#85B926",[Q.EXCEL]:"#1F7345",[Q.FLAC]:"#1795E3",[Q.GIF]:"#59B031",[Q.GZIP]:"#F8AB36",[Q.HTML]:"#71C3EB",[Q.IMAGE]:"#59B031",[Q.JPEG]:"#59B031",[Q.JSON]:"#71C3EB",[Q.M4A]:"#1795E3",[Q.MOV]:"#E63324",[Q.MP3]:"#1795E3",[Q.MP4]:"#E63324",[Q.OGG]:"#1795E3",[Q.PDF]:"#E44948",[Q.PNG]:"#59B031",[Q.POWERPOINT]:"#B54A2B",[Q.RAR]:"#F8AB36",[Q.STP]:"#3764B1",[Q.TEXT]:"#3162AB",[Q.UNKNOWN]:"#999999",[Q.VIDEO]:"#E63324",[Q.WAV]:"#1795E3",[Q.WMA]:"#1795E3",[Q.WORD]:"#3162AB",[Q.XML]:"#71C3EB",[Q.YAML]:"#71C3EB",[Q.ZIP]:"#F8AB36"};var at;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(at||(at={}));var rt=function(t,o,e,a){for(var r,i=arguments.length,n=i<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(i<3?r(n):i>3?r(o,e,n):r(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class it extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(at).includes(this.variant)?this.variant:at.fluid_topics,o=t!==at.material||!!this.value;return e.html`
|
|
237
237
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
238
238
|
${i.unsafeHTML(this.resolvedIcon)}
|
|
239
239
|
<slot ?hidden=${o}></slot>
|
|
@@ -76,7 +76,7 @@ let we=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2019 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
|
-
*/class Le extends we{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{$e?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),r=We.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Ke,Ae=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const je=Symbol("constructorPrototype"),Fe=Symbol("constructorName"),Ze=Symbol("exportpartsDebouncer");class Me extends Le{constructor(){super(),this[Ke]=new i(5),this[Fe]=this.constructor.name,this[je]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Fe]&&Object.setPrototypeOf(this,this[je])}updated(t){super.updated(t),this.updateComplete.then((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}))}contentAvailableCallback(t){var e
|
|
79
|
+
*/class Le extends we{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{$e?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),r=We.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Ke,Ae=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const je=Symbol("constructorPrototype"),Fe=Symbol("constructorName"),Ze=Symbol("exportpartsDebouncer");class Me extends Le{constructor(){super(),this[Ke]=new i(5),this[Fe]=this.constructor.name,this[je]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Fe]&&Object.setPrototypeOf(this,this[je])}updated(t){super.updated(t),this.updateComplete.then((()=>{this.contentAvailableCallback(t),this.insertCustomStylesheet(),this.scheduleExportpartsUpdate()}))}contentAvailableCallback(t){}insertCustomStylesheet(){var t,e;if((null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).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(){var t,e,o;((null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())||null!==(o=null===(e=this.exportpartsPrefixes)||void 0===e?void 0:e.length)&&void 0!==o&&o)&&this[Ze].run((()=>{var t,e;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&(null===(e=this.exportpartsPrefixes)||void 0===e?void 0:e.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,o,r,i,n,a;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const f=[...l.values()].flatMap((t=>c.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}Ke=Ze,Ae([R()],Me.prototype,"exportpartsPrefix",void 0),Ae([K([])],Me.prototype,"exportpartsPrefixes",void 0),Ae([R()],Me.prototype,"customStylesheet",void 0);const ze=Ce.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");Ct`
|
|
80
80
|
.highlight-html-match {
|
|
81
81
|
background: ${ze};
|
|
82
82
|
}
|
|
@@ -356,13 +356,13 @@ let we=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
356
356
|
* @license
|
|
357
357
|
* Copyright 2017 Google LLC
|
|
358
358
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
359
|
-
*/class wi{static build(t){const{baseUrl:e,apiIntegrationIdentifier:o}=Oi.getState(),r=null!=t?t:o;if(e&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,r,!0)}static get(t){var e;return null!=t?wi.build(t):null!==(e=wi.API)&&void 0!==e?e:wi.API=wi.build()}static await(t){return new Promise((e=>{let o=wi.get(t);if(o)e(o);else{const r=Oi.subscribe((()=>{o=wi.get(t),o&&(r(),e(o))}))}}))}}var
|
|
359
|
+
*/class wi{static build(t){const{baseUrl:e,apiIntegrationIdentifier:o}=Oi.getState(),r=null!=t?t:o;if(e&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,r,!0)}static get(t){var e;return null!=t?wi.build(t):null!==(e=wi.API)&&void 0!==e?e:wi.API=wi.build()}static await(t){return new Promise((e=>{let o=wi.get(t);if(o)e(o);else{const r=Oi.subscribe((()=>{o=wi.get(t),o&&(r(),e(o))}))}}))}}class Si{constructor(t=!0,e){var o;this.overrideApi=e;let i=this.constructor;i.commonCache=null!==(o=i.commonCache)&&void 0!==o?o:new r,this.cache=t?i.commonCache:new r}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:wi.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:wi.await()}clearCache(){this.cache.clearAll()}}var Ni;const Ci=Symbol("clearAfterUnitTest");class Ei extends Si{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ni]=()=>{this.defaultMessages={},this.cache=new r,this.listeners={}},this.currentUiLocale=Oi.getState().uiLocale,Oi.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Oi.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 o;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};$(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var r,i,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(i=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==i?i:{};return new De(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.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})))}}Ni=Ci,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends Ei{constructor(){super((async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends Ei{constructor(){super((async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e)))}});const Ui=window.FluidTopicsI18nService,Ri=window.FluidTopicsCustomI18nService;var Ii=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ki extends Me{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>wi.get(),this.cache=new r,this.cleanSessionDebouncer=new i}render(){return se`
|
|
360
360
|
<slot></slot>
|
|
361
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(Oi.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&Oi.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Oi.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&Oi.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&Oi.actions.noCustom(this.noCustom),t.has("editorMode")&&Oi.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&Oi.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&Oi.actions.session(this.session),t.has("availableUiLocales")&&Oi.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>
|
|
361
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(Oi.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&Oi.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Oi.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&Oi.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&Oi.actions.noCustom(this.noCustom),t.has("editorMode")&&Oi.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&Oi.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&Oi.actions.session(this.session),t.has("availableUiLocales")&&Oi.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Ui.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}ki.elementDefinitions={},ki.styles=xi,Ii([R()],ki.prototype,"baseUrl",void 0),Ii([R()],ki.prototype,"apiIntegrationIdentifier",void 0),Ii([R()],ki.prototype,"uiLocale",void 0),Ii([K(null)],ki.prototype,"availableUiLocales",void 0),Ii([K(null)],ki.prototype,"metadataConfiguration",void 0),Ii([R({type:Boolean})],ki.prototype,"editorMode",void 0),Ii([R({type:Boolean})],ki.prototype,"noCustom",void 0),Ii([R({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ki.prototype,"noCustomComponent",void 0),Ii([R({type:Boolean})],ki.prototype,"withManualResources",void 0),Ii([K([])],ki.prototype,"messageContexts",void 0),Ii([K(void 0)],ki.prototype,"session",void 0),Ii([R({type:Object})],ki.prototype,"apiProvider",void 0);class Wi extends Si{async listMySearches(){let t=Oi.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class $i extends Si{async listMyBookmarks(){let t=Oi.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const Li=Br.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Oi.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new $i,this.savedSearchesService=new Wi,Oi.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Oi.getState();$(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Li.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Li.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();Li.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Li.actions.bookmarks(e)}}},L("ft-app-context")(ki);var Ki=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Ai=Symbol("i18nAttributes"),ji=Symbol("i18nProperties"),Fi=Symbol("i18nUnsubs");function Zi(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Ri:Ui}i18n(t,e,...o){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const i=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...i)}onI18nUpdate(t){var e,o;null===(e=this[Ai])||void 0===e||e.forEach(((e,o)=>{var r;const i=this.getI18nAttributeValue(o);(null===(r=null==i?void 0:i.context)||void 0===r?void 0:r.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,i,e)})),null===(o=this[ji])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[Ai])||void 0===e||e.forEach(((e,o)=>{const r=this.getI18nAttributeValue(o);(null==r?void 0:r.context)&&r.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(r.context),this.updateI18nAttributeMessage(o,r,e))})),null===(o=this[ji])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,r;super.connectedCallback(),new Set([...null!==(e=null===(t=this[ji])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(r=null===(o=this[Ai])||void 0===o?void 0:o.keys())&&void 0!==r?r:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Fi].has(t)||this[Fi].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Fi].forEach((t=>t())),this[Fi].clear()}}return e=Fi,Ki([R({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Mi extends(Zi(Me)){}class zi extends(Zi(Je)){}var Di=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Bi extends zi{constructor(){super(),this.editorMode=!1,this.addStore(Oi)}render(){return this.key&&this.context?se`
|
|
362
362
|
<span class="ft-i18n">
|
|
363
363
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
364
364
|
</span>
|
|
365
|
-
`:this.editorMode?"Select a context and a label key.":le}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}Bi.elementDefinitions={},Bi.styles=vi,Di([Be()],Bi.prototype,"editorMode",void 0),Di([R()],Bi.prototype,"context",void 0),Di([R()],Bi.prototype,"key",void 0),Di([K([])],Bi.prototype,"args",void 0),Di([R()],Bi.prototype,"defaultMessage",void 0);class Pi{static build(t){return new Pi(t)}static fromGwt(t){return new Pi(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>
|
|
365
|
+
`:this.editorMode?"Select a context and a label key.":le}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}Bi.elementDefinitions={},Bi.styles=vi,Di([Be()],Bi.prototype,"editorMode",void 0),Di([R()],Bi.prototype,"context",void 0),Di([R()],Bi.prototype,"key",void 0),Di([K([])],Bi.prototype,"args",void 0),Di([R()],Bi.prototype,"defaultMessage",void 0);class Pi{static build(t){return new Pi(t)}static fromGwt(t){return new Pi(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,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)})}}L("ft-i18n")(Bi);const _i=Pi.build("designedReaderAttachments"),Hi={download:"Download “{0}”"};
|
|
366
366
|
/**
|
|
367
367
|
* @license
|
|
368
368
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-attachments",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.39",
|
|
4
4
|
"description": "Reader component to list map attachments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.1.
|
|
24
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
25
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
26
|
-
"@fluid-topics/ft-ripple": "1.1.
|
|
27
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
29
|
-
"@fluid-topics/public-api": "1.0.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.1.39",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.1.39",
|
|
24
|
+
"@fluid-topics/ft-icon": "1.1.39",
|
|
25
|
+
"@fluid-topics/ft-reader-context": "1.1.39",
|
|
26
|
+
"@fluid-topics/ft-ripple": "1.1.39",
|
|
27
|
+
"@fluid-topics/ft-typography": "1.1.39",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "1.1.39",
|
|
29
|
+
"@fluid-topics/public-api": "1.0.60",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "a9b7f979a6e94b58571a61de90a4b2655800690d"
|
|
33
33
|
}
|