@fluid-topics/ft-search-result-abstract 1.2.73 → 1.3.0
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
`)===0?_.substr(1,_.length):_}).forEach(function(_){var k=_.split(":"),R=k.shift().trim();if(R){var lt=k.join(":").trim();try{g.append(R,lt)}catch(Ht){console.warn("Response "+Ht.message)}}}),g}A.call(M.prototype);function G(p,g){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(p)}A.call(G.prototype),G.prototype.clone=function(){return new G(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},G.error=function(){var p=new G(null,{status:200,statusText:""});return p.ok=!1,p.status=0,p.type="error",p};var me=[301,302,303,307,308];G.redirect=function(p,g){if(me.indexOf(g)===-1)throw new RangeError("Invalid status code");return new G(null,{status:g,headers:{location:p}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,C){this.message=g,this.name=C;var _=Error(g);this.stack=_.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Ie(p,g){return new Promise(function(C,_){var k=new M(p,g);if(k.signal&&k.signal.aborted)return _(new o.DOMException("Aborted","AbortError"));var R=new XMLHttpRequest;function lt(){R.abort()}R.onload=function(){var W={statusText:R.statusText,headers:ge(R.getAllResponseHeaders()||"")};k.url.indexOf("file://")===0&&(R.status<200||R.status>599)?W.status=200:W.status=R.status,W.url="responseURL"in R?R.responseURL:W.headers.get("X-Request-URL");var be="response"in R?R.response:R.responseText;setTimeout(function(){C(new G(be,W))},0)},R.onerror=function(){setTimeout(function(){_(new TypeError("Network request failed"))},0)},R.ontimeout=function(){setTimeout(function(){_(new TypeError("Network request timed out"))},0)},R.onabort=function(){setTimeout(function(){_(new o.DOMException("Aborted","AbortError"))},0)};function Ht(W){try{return W===""&&n.location.href?n.location.href:W}catch{return W}}if(R.open(k.method,Ht(k.url),!0),k.credentials==="include"?R.withCredentials=!0:k.credentials==="omit"&&(R.withCredentials=!1),"responseType"in R&&(i.blob?R.responseType="blob":i.arrayBuffer&&(R.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var Wr=[];Object.getOwnPropertyNames(g.headers).forEach(function(W){Wr.push(f(W)),R.setRequestHeader(W,u(g.headers[W]))}),k.headers.forEach(function(W,be){Wr.indexOf(be)===-1&&R.setRequestHeader(be,W)})}else k.headers.forEach(function(W,be){R.setRequestHeader(be,W)});k.signal&&(k.signal.addEventListener("abort",lt),R.onreadystatechange=function(){R.readyState===4&&k.signal.removeEventListener("abort",lt)}),R.send(typeof k._bodyInit>"u"?null:k._bodyInit)})}return Ie.polyfill=!0,n.fetch||(n.fetch=Ie,n.Headers=y,n.Request=M,n.Response=G),o.Headers=y,o.Request=M,o.Response=G,o.fetch=Ie,o}({})})(ut);ut.fetch.ponyfill=!0;delete ut.fetch.polyfill;var Re=dt.fetch?dt:ut;ce=Re.fetch;ce.default=Re.fetch;ce.fetch=Re.fetch;ce.Headers=Re.Headers;ce.Request=Re.Request;ce.Response=Re.Response;Kr.exports=ce});var _n=Ze((vd,Tn)=>{Tn.exports=ftGlobals.litUnsafeHTML});var Ba=I(D());var Mr=I(J());var wn=I(D()),An=I(ee());var _t=I(D());var $r=I(D());var Ka=I(Vr(),1);var Zr;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(Zr||(Zr={}));var qr;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(qr||(qr={}));var Yr;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(Yr||(Yr={}));var Qr;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.MAP_ATTACHMENT="MAP_ATTACHMENT",r.RESOURCE="RESOURCE"})(Qr||(Qr={}));var Xr;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Xr||(Xr={}));var Jr;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Jr||(Jr={}));var eo;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",r.GEN_AI__RATE="GEN_AI__RATE",r.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",r.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(eo||(eo={}));var to;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(to||(to={}));var ro;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(ro||(ro={}));var oo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(oo||(oo={}));var no;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(no||(no={}));var ao;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(ao||(ao={}));var io;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(io||(io={}));var co;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(co||(co={}));var so;(function(r){r.ASC="ASC",r.DESC="DESC"})(so||(so={}));var lo;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(lo||(lo={}));var zt;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(zt||(zt={}));var uo;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(uo||(uo={}));var po;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(po||(po={}));var fo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(fo||(fo={}));var ho;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(ho||(ho={}));var yo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(yo||(yo={}));var Gt;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Gt||(Gt={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var go;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(go||(go={}));var mo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(mo||(mo={}));var bo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(bo||(bo={}));var $a={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function xo(r,t){return r===t||($a[r]??[]).some(o=>xo(o,t))}function vo(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>xo(n,t))}var Cn=I(D());var wo=I(J()),j=I(ee()),q=I(D());var So=I(J());var Oo=So.css`
|
|
3
3
|
`;var pt=I(D()),Va="ft-app-info",jt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Za={session:(r,t)=>{(0,pt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>E.dispatchEvent(new jt(t.payload)),0))}},E=pt.FtReduxStore.get({name:Va,reducers:Za,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Q=I(D());var $t=I(D());var xe=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=E.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=E.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var qe=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:xe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xe.await()}};var te=class extends qe{constructor(t=!0,o){var n;super(o);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new $t.CacheRegistry,this.cache=t?i.commonCache:new $t.CacheRegistry}clearCache(){this.cache.clearAll()}};var Co,qa=Symbol("clearAfterUnitTest"),ft=class extends te{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Co]=()=>{this.defaultMessages={},this.cache=new Q.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=E.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Q.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new Q.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t))}catch(i){!(i instanceof Q.CanceledPromiseError)&&o&&console.error(i)}return o&&await this.notify(t),n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Q.delay)(0).then(()=>o()).catch(()=>null)))}};Co=qa;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ft{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ft{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Eo=window.FluidTopicsI18nService,Ec=window.FluidTopicsCustomI18nService;var H=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},F=class extends q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>xe.get(),this.messageContexts=[],this.cache=new q.CacheRegistry,this.cleanSessionDebouncer=new q.Debouncer}render(){return wo.html`
|
|
4
4
|
<slot></slot>
|
|
5
|
-
`}update(t){var o,n,i,s,l;super.update(t),t.has("baseUrl")&&(E.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&E.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&E.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&E.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&E.actions.noCustom(this.noCustom),t.has("editorMode")&&E.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&E.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&E.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Eo.addContext(d)),t.has("openExternalDocumentInNewTab")&&E.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&E.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&E.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(E.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),E.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),E.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};F.elementDefinitions={};F.styles=Oo;H([(0,j.property)()],F.prototype,"baseUrl",void 0);H([(0,j.property)()],F.prototype,"apiIntegrationIdentifier",void 0);H([(0,j.property)()],F.prototype,"uiLocale",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"editorMode",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"noCustom",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);H([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"withManualResources",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);H([(0,j.property)({type:Object})],F.prototype,"apiProvider",void 0);H([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);H([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);H([(0,j.state)()],F.prototype,"localesConfiguration",void 0);var Di=I(ee());function Ya(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!ht(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!ht(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!ht(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function ht(r,t){try{return Ya(r,t)}catch{return!1}}function yt(r,t){return!ht(r,t)}var Qa=I(ee(),1);var gt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ne=I(ee(),1);var Ao=I(ee(),1);function Io(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Ao.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:yt,...t??{}})}var mt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var No=I(J(),1);var bt=globalThis,Xa=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wc=Symbol();var Ro=(r,t)=>{if(Xa)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=bt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var xt=class extends No.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ro(n,t.elementStyles),n}};function To(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Ye=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ko,_o=Symbol("constructorPrototype"),Po=Symbol("constructorName"),Fo=Symbol("exportpartsDebouncer"),Lo=Symbol("dynamicDependenciesLoaded"),re=class extends xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ko]=new mt(5),this[Po]=this.constructor.name,this[_o]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Po]&&Object.setPrototypeOf(this,this[_o])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Lo]||(t[Lo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=To(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fo].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,s,l,d;let f=m=>m!=null&&m.trim().length>0,u=t.filter(f).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(f).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};ko=Fo;Ye([(0,Ne.property)()],re.prototype,"exportpartsPrefix",void 0);Ye([Io([])],re.prototype,"exportpartsPrefixes",void 0);Ye([(0,Ne.property)()],re.prototype,"customStylesheet",void 0);Ye([(0,Ne.property)()],re.prototype,"elementToFocus",void 0);Ye([(0,Ne.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Qe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Do,Uo,Bo,Xe=Symbol("internalReduxEventsUnsubscribers"),se=Symbol("internalStoresUnsubscribers"),ve=Symbol("internalStores"),Je=class extends re{constructor(){super(...arguments),this[Do]=new Map,this[Uo]=new Map,this[Bo]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ve].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ve].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[ve].get(t)}addStore(t,o){var n;o=(n=o??(Qe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[ve].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[ve].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ve].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[se].has(t.store):this[se].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[se].set(t,o.subscribe(()=>this.updateFromStores())),this[Xe].set(t,[]),Qe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,s)=>{if(typeof this[s]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[s](d);o.addEventListener(i.eventName,l),this[Xe].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[se].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[se].has(t)&&this[se].get(t)(),this[se].delete(t),(o=this[Xe].get(t))===null||o===void 0||o.forEach(n=>n()),this[Xe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Do=se,Uo=ve,Bo=Xe;Je.reduxProperties=new Map;Je.reduxReactiveProperties=new Set;Je.reduxEventListeners=new Map;function K(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oe(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ii}(r)||Array.isArray(r)||!!r[$o]||!!(!((t=r.constructor)===null||t===void 0)&&t[$o])||er(r)||tr(r))}function Se(r,t,o){o===void 0&&(o=!1),Pe(r)===0?(o?Object.keys:_e)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Pe(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:er(r)?2:tr(r)?3:0}function Te(r,t){return Pe(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ja(r,t){return Pe(r)===2?r.get(t):r[t]}function Ko(r,t,o){var n=Pe(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Vo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function er(r){return ni&&r instanceof Map}function tr(r){return ai&&r instanceof Set}function le(r){return r.o||r.t}function rr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Yo(r);delete t[L];for(var o=_e(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function or(r,t){return t===void 0&&(t=!1),nr(r)||oe(r)||!Y(r)||(Pe(r)>1&&(r.set=r.add=r.clear=r.delete=ei),Object.freeze(r),t&&Se(r,function(o,n){return or(n,!0)},!0)),r}function ei(){K(2)}function nr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function X(r){var t=Jt[r];return t||K(18,r),t}function ti(r,t){Jt[r]||(Jt[r]=t)}function Yt(){return tt}function Kt(r,t){t&&(X("Patches"),r.u=[],r.s=[],r.v=t)}function vt(r){Qt(r),r.p.forEach(ri),r.p=null}function Qt(r){r===tt&&(tt=r.l)}function Mo(r){return tt={p:[],l:tt,h:r,m:!0,_:0}}function ri(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function Vt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||X("ES5").S(t,r,n),n?(o[L].P&&(vt(t),K(4)),Y(r)&&(r=St(t,r),t.l||Ot(t,r)),t.u&&X("Patches").M(o[L].t,r,t.u,t.s)):r=St(t,o,[]),vt(t),t.u&&t.v(t.u,t.s),r!==qo?r:void 0}function St(r,t,o){if(nr(t))return t;var n=t[L];if(!n)return Se(t,function(d,f){return Wo(r,n,t,d,f,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Ot(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=rr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Se(s,function(d,f){return Wo(r,n,i,d,f,o,l)}),Ot(r,i,!1),o&&r.u&&X("Patches").N(n,o,r.u,r.s)}return n.o}function Wo(r,t,o,n,i,s,l){if(oe(i)){var d=St(r,i,s&&t&&t.i!==3&&!Te(t.R,n)?s.concat(n):void 0);if(Ko(o,n,d),!oe(d))return;r.m=!1}else l&&o.add(i);if(Y(i)&&!nr(i)){if(!r.h.D&&r._<1)return;St(r,i),t&&t.A.l||Ot(r,i)}}function Ot(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&or(t,o)}function Zt(r,t){var o=r[L];return(o?le(o):r)[t]}function Ho(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function de(r){r.P||(r.P=!0,r.l&&de(r.l))}function qt(r){r.o||(r.o=rr(r.t))}function Xt(r,t,o){var n=er(t)?X("MapSet").F(t,o):tr(t)?X("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:Yt(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},f=d,u=rt;l&&(f=[d],u=et);var h=Proxy.revocable(f,u),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(t,o):X("ES5").J(t,o);return(o?o.A:Yt()).p.push(n),n}function oi(r){return oe(r)||K(22,r),function t(o){if(!Y(o))return o;var n,i=o[L],s=Pe(o);if(i){if(!i.P&&(i.i<4||!X("ES5").K(i)))return i.t;i.I=!0,n=zo(o,s),i.I=!1}else n=zo(o,s);return Se(n,function(l,d){i&&Ja(i.t,l)===d||Ko(n,l,t(d))}),s===3?new Set(n):n}(r)}function zo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return rr(r)}function Zo(){function r(l,d){var f=s[l];return f?f.enumerable=d:s[l]=f={configurable:!0,enumerable:d,get:function(){var u=this[L];return rt.get(u,l)},set:function(u){var h=this[L];rt.set(h,l,u)}},f}function t(l){for(var d=l.length-1;d>=0;d--){var f=l[d][L];if(!f.P)switch(f.i){case 5:n(f)&&de(f);break;case 4:o(f)&&de(f)}}}function o(l){for(var d=l.t,f=l.k,u=_e(f),h=u.length-1;h>=0;h--){var y=u[h];if(y!==L){var m=d[y];if(m===void 0&&!Te(d,y))return!0;var v=f[y],b=v&&v[L];if(b?b.t!==m:!Vo(v,m))return!0}}var S=!!d[L];return u.length!==_e(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(d,d.length-1);if(f&&!f.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&K(3,JSON.stringify(le(l)))}var s={};ti("ES5",{J:function(l,d){var f=Array.isArray(l),u=function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Yo(m);delete S[L];for(var N=_e(S),w=0;w<N.length;w++){var A=N[w];S[A]=r(A,y||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(f,l),h={i:f?5:4,A:d?d.A:Yt(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,L,{value:h,writable:!0}),u},S:function(l,d,f){f?oe(d)&&d[L].A===l&&t(l.p):(l.u&&function u(h){if(h&&typeof h=="object"){var y=h[L];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Se(v,function(T){T!==L&&(m[T]!==void 0||Te(m,T)?b[T]||u(v[T]):(b[T]=!0,de(y)))}),Se(m,function(T){v[T]!==void 0||Te(v,T)||(b[T]=!1,de(y))});else if(S===5){if(n(y)&&(de(y),b.length=!0),v.length<m.length)for(var N=v.length;N<m.length;N++)b[N]=!1;else for(var w=m.length;w<v.length;w++)b[w]=!0;for(var A=Math.min(v.length,m.length),P=0;P<A;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&u(v[P])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Go,tt,ar=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ni=typeof Map<"u",ai=typeof Set<"u",jo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",qo=ar?Symbol.for("immer-nothing"):((Go={})["immer-nothing"]=!0,Go),$o=ar?Symbol.for("immer-draftable"):"__$immer_draftable",L=ar?Symbol.for("immer-state"):"__$immer_state";var ii=""+Object.prototype.constructor,_e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Yo=Object.getOwnPropertyDescriptors||function(r){var t={};return _e(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Jt={},rt={get:function(r,t){if(t===L)return r;var o=le(r);if(!Te(o,t))return function(i,s,l){var d,f=Ho(s,l);return f?"value"in f?f.value:(d=f.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===Zt(r.t,t)?(qt(r),r.o[t]=Xt(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=Ho(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Zt(le(r),t),s=i?.[L];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Vo(o,i)&&(o!==void 0||Te(r.t,t)))return!0;qt(r),de(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Zt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,qt(r),de(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){K(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K(12)}},et={};Se(rt,function(r,t){et[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),et.deleteProperty=function(r,t){return et.set.call(this,r,t,void 0)},et.set=function(r,t,o){return rt.set.call(this,r[0],t,o,r[0])};var ci=function(){function r(o){var n=this;this.O=jo,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var f=n;return function(S){var N=this;S===void 0&&(S=d);for(var w=arguments.length,A=Array(w>1?w-1:0),P=1;P<w;P++)A[P-1]=arguments[P];return f.produce(S,function(T){var M;return(M=s).call.apply(M,[N,T].concat(A))})}}var u;if(typeof s!="function"&&K(6),l!==void 0&&typeof l!="function"&&K(7),Y(i)){var h=Mo(n),y=Xt(n,i,void 0),m=!0;try{u=s(y),m=!1}finally{m?vt(h):Qt(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Kt(h,l),Vt(S,h)},function(S){throw vt(h),S}):(Kt(h,l),Vt(u,h))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===qo&&(u=void 0),n.D&&or(u,!0),l){var v=[],b=[];X("Patches").M(i,u,v,b),l(v,b)}return u}K(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(y))})};var l,d,f=n.produce(i,s,function(u,h){l=u,d=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,l,d]}):[f,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||K(8),oe(o)&&(o=oi(o));var n=Mo(this),i=Xt(this,o,void 0);return i[L].C=!0,Qt(n),i},t.finishDraft=function(o,n){var i=o&&o[L],s=i.A;return Kt(s,n),Vt(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!jo&&K(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=X("Patches").$;return oe(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new ci,si=$.produce,es=$.produceWithPatches.bind($),ts=$.setAutoFreeze.bind($),rs=$.setUseProxies.bind($),os=$.applyPatches.bind($),ns=$.createDraft.bind($),as=$.finishDraft.bind($),Ct=si;function Oe(r){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(r)}function Qo(r,t){if(Oe(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Oe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Xo(r){var t=Qo(r,"string");return Oe(t)=="symbol"?t:t+""}function Jo(r,t,o){return(t=Xo(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function en(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function ir(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?en(Object(o),!0).forEach(function(n){Jo(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):en(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var tn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Et={INIT:"@@redux/INIT"+cr(),REPLACE:"@@redux/REPLACE"+cr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cr()}};function li(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function sr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(sr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,s=t,l=[],d=l,f=!1;function u(){d===l&&(d=l.slice())}function h(){if(f)throw new Error(z(3));return s}function y(S){if(typeof S!="function")throw new Error(z(4));if(f)throw new Error(z(5));var N=!0;return u(),d.push(S),function(){if(N){if(f)throw new Error(z(6));N=!1,u();var A=d.indexOf(S);d.splice(A,1),l=null}}}function m(S){if(!li(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(f)throw new Error(z(9));try{f=!0,s=i(s,S)}finally{f=!1}for(var N=l=d,w=0;w<N.length;w++){var A=N[w];A()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,m({type:Et.REPLACE})}function b(){var S,N=y;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(z(11));function P(){A.next&&A.next(h())}P();var T=N(P);return{unsubscribe:T}}},S[tn]=function(){return this},S}return m({type:Et.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[tn]=b,n}function di(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Et.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Et.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function rn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{di(o)}catch(f){d=f}return function(u,h){if(u===void 0&&(u={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],N=o[S],w=u[S],A=N(w,h);if(typeof A>"u"){var P=h&&h.type;throw new Error(z(14))}v[S]=A,m=m||A!==w}return m=m||s.length!==Object.keys(u).length,m?v:u}}function Le(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function on(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(f){return f(l)});return s=Le.apply(void 0,d)(i.dispatch),ir(ir({},i),{},{dispatch:s})}}}function nn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var an=nn();an.withExtraArgument=nn;var lr=an;var un=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ui=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(h){return f([u,h])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){o.label=u[1];break}if(u[0]===6&&o.label<s[1]){o.label=s[1],s=u;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(u);break}s[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(h){u=[6,h],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ke=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},pi=Object.defineProperty,fi=Object.defineProperties,hi=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,sn=function(r,t,o){return t in r?pi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ue=function(r,t){for(var o in t||(t={}))yi.call(t,o)&&sn(r,o,t[o]);if(cn)for(var n=0,i=cn(t);n<i.length;n++){var o=i[n];gi.call(t,o)&&sn(r,o,t[o])}return r},dr=function(r,t){return fi(r,hi(t))},mi=function(r,t,o){return new Promise(function(n,i){var s=function(f){try{d(o.next(f))}catch(u){i(u)}},l=function(f){try{d(o.throw(f))}catch(u){i(u)}},d=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(s,l)};d((o=o.apply(r,t)).next())})};var bi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Le:Le.apply(null,arguments)},Cs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function xi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var vi=function(r){un(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,ke([void 0],o.concat(this))))},t}(Array),Si=function(r){un(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,ke([void 0],o.concat(this))))},t}(Array);function fr(r){return Y(r)?Ct(r,function(){}):r}function Oi(r){return typeof r=="boolean"}function Ci(){return function(t){return Ei(t)}}function Ei(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new vi;if(o&&(Oi(o)?d.push(lr):d.push(lr.withExtraArgument(o.extraArgument))),0){if(i)var f;if(l)var u}return d}var ur=!0;function pn(r){var t=Ci(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,f=d===void 0?!0:d,u=o.preloadedState,h=u===void 0?void 0:u,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(xi(i))v=rn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!ur&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ur&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=on.apply(void 0,b),N=Le;f&&(N=bi(ue({trace:!ur},typeof f=="object"&&f)));var w=new Si(S),A=w;Array.isArray(m)?A=ke([S],m):typeof m=="function"&&(A=m(w));var P=N.apply(void 0,A);return sr(v,h,P)}function pe(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ue(ue({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function fn(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function wi(r){return typeof r=="function"}function Ai(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?fn(t):[t,o,n],s=i[0],l=i[1],d=i[2],f;if(wi(r))f=function(){return fr(r())};else{var u=fr(r);f=function(){return u}}function h(y,m){y===void 0&&(y=f());var v=ke([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(oe(b)){var N=b,w=S(N,m);return w===void 0?b:w}else{if(Y(b))return Ct(b,function(A){return S(A,m)});var w=S(b,m);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},y)}return h.getInitialState=f,h}function Ii(r,t){return r+"/"+t}function hn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:fr(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],m=Ii(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[m]=v,d[h]=b?pe(m,b):pe(m)});function f(){var h=typeof r.extraReducers=="function"?fn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],N=S===void 0?void 0:S,w=ue(ue({},m),l);return Ai(o,function(A){for(var P in w)A.addCase(P,w[P]);for(var T=0,M=b;T<M.length;T++){var Z=M[T];A.addMatcher(Z.matcher,Z.reducer)}N&&A.addDefaultCase(N)})}var u;return{name:t,reducer:function(h,y){return u||(u=f()),u(h,y)},actions:d,caseReducers:s,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Ri="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ni=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ri[Math.random()*64|0];return t},Ti=["name","message","stack","code"],pr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ln=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),_i=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ti;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Is=function(){function r(t,o,n){var i=pe(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:dr(ue({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=pe(t+"/pending",function(h,y,m){return{payload:void 0,meta:dr(ue({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=pe(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||_i)(h||"Rejected"),meta:dr(ue({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):Ni(),S=new f,N,w=!1;function A(T){N=T,S.abort()}var P=function(){return mi(this,null,function(){var T,M,Z,ge,G,me,Ie;return ui(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),ge=(T=n?.condition)==null?void 0:T.call(n,h,{getState:m,extra:v}),Li(ge)?[4,ge]:[3,2];case 1:ge=p.sent(),p.label=2;case 2:if(ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,G=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:N||"Aborted"})})}),y(s(b,h,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([G,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(g,C){return new pr(g,C)},fulfillWithValue:function(g,C){return new ln(g,C)}})).then(function(g){if(g instanceof pr)throw g;return g instanceof ln?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return Z=p.sent(),[3,5];case 4:return me=p.sent(),Z=me instanceof pr?l(null,b,h,me.payload,me.meta):l(me,b,h),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ie||y(Z),[2,Z]}})})}();return Object.assign(P,{abort:A,requestId:b,arg:h,unwrap:function(){return P.then(Pi)}})}}return Object.assign(u,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Pi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Li(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var yn="listener",gn="completed",mn="cancelled",Rs="task-"+mn,Ns="task-"+gn,Ts=yn+"-"+mn,_s=yn+"-"+gn;var hr="listenerMiddleware";var Ps=pe(hr+"/add"),Ls=pe(hr+"/removeAll"),ks=pe(hr+"/remove");var dn,Fs=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(dn||(dn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},ki=function(r){return function(t){setTimeout(t,r)}},Ds=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ki(10);Zo();function Fi(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var wt=class extends Fi(Object){};window.ftReduxStores||(window.ftReduxStores={});var bn=class r extends wt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Qe(s))return s;if(i==null)return;let l=hn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=pn({reducer:(f,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...u.overwrites}:l.reducer(f,u)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new gt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let f=l,u=s[f];return u?(...h)=>{let y=u(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[f]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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 Nt=I(D());var At=class extends te{async listMySearches(){let{session:t}=E.getState();return vo(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var It=class extends te{async listMyBookmarks(){let t=E.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ui="ft-user-assets",Rt=Nt.FtReduxStore.get({name:Ui,initialState:{savedSearches:void 0,bookmarks:void 0}}),yr=class{constructor(){this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new It,this.savedSearchesService=new At,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=E.getState();(0,Nt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Rt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Rt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Rt.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){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Rt.actions.bookmarks(o)}}},bl=new yr;var gr=class{addCommand(t,o=!1){E.commands.add(t,o)}consumeCommand(t){return E.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gr;var xn=I(D()),mr=class{highlightHtml(t,o,n){(0,xn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new mr;var vn=I(D());var br=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=E.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;return vn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:E.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}};window.FluidTopicsDateService=new br;var Sn=I(D());var ot=class{static get(t,o){var n,i,s,l;let d=E.getState(),{lang:f,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Sn.SearchPlaceConverter(d.baseUrl,(l=(s=window.FluidTopicsClientConfiguration)===null||s===void 0?void 0:s.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${f}-${u}`)}};var xr=class{urlToSearchRequest(t){return ot.get().parse(t)}searchRequestToUrl(t){return ot.get().serialize(t)}};window.FluidTopicsUrlService=new xr;var fe=I(D());var Ce=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ce.eventName="change";var vr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},On=new vr;var Tt=class r extends fe.WithEventBus{static build(){return new r(window.history,On,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ce(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let f=o(),u={...f===this.currentIndex?this.currentState:void 0,...s,index:f,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[u,l,d]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t,o=!1){var n,i,s;let l={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title},d=o?(i=t?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(s=this.currentState.majorState)!==null&&s!==void 0?s:t?.majorState;d!=null&&(l.majorState=d),this.setCurrentState(l)}addHistoryChangeListener(t){this.addEventListener(Ce.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ce.eventName,t)}currentItem(){return(0,fe.deepCopy)(this.currentState)}back(){let t=this.previousMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,fe.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let t=this.currentIndex;for(;t>0&&!this.isMajorState(t);)t--;return this.previousExistingPosition(t)}forward(){let t=this.nextMajorPosition();t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){return(0,fe.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let t=this.currentIndex;do t++;while(t<this.states.length&&!this.isMajorState(t));do t++;while(t<this.states.length&&!this.isMajorState(t));return this.previousExistingPosition(t)}previousExistingPosition(t){let o=t;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isMajorState(t){var o,n;return this.hasState(t)&&((n=(o=this.states[t])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Tt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});(0,Cn.customElement)("ft-app-context")(F);var Sr=class r extends Event{constructor(){super(r.eventName)}};Sr.eventName="search-context-clear-all-filters";var Bi=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Cr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},En=Symbol("registerInterval"),Or=Symbol("registerAttempts"),Mi=40;function Wi(r){class t extends r{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Or]=0,this[En]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Or]>Mi?window.clearInterval(this[En]):(this[Or]++,this.dispatchEvent(new Cr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Bi([(0,An.state)()],t.prototype,"stateManager",void 0),t}var Pt=class extends Wi(wn.FtLitElementRedux){};var nt=I(ee()),Lt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Er=Symbol("registerInterval");function Hi(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Er]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Er]):this.dispatchEvent(new wr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Er,Lt([(0,nt.property)({attribute:!1})],o.prototype,"cluster",void 0),Lt([(0,nt.property)({attribute:!1})],o.prototype,"result",void 0),Lt([(0,nt.property)({attribute:!1,type:Number})],o.prototype,"rank",void 0),Lt([(0,nt.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}var kt=class extends Hi(Pt){};var In=I(J()),Rn=I(D()),zi={highlightBackgroundColor:Rn.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Nn=In.css`
|
|
5
|
+
`}update(t){var o,n,i,s,l;super.update(t),t.has("baseUrl")&&(E.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&E.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&E.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&E.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&E.actions.noCustom(this.noCustom),t.has("editorMode")&&E.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&E.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&E.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Eo.addContext(d)),t.has("openExternalDocumentInNewTab")&&E.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&E.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&E.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(E.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),E.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),E.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};F.elementDefinitions={};F.styles=Oo;H([(0,j.property)()],F.prototype,"baseUrl",void 0);H([(0,j.property)()],F.prototype,"apiIntegrationIdentifier",void 0);H([(0,j.property)()],F.prototype,"uiLocale",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"editorMode",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"noCustom",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);H([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"withManualResources",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);H([(0,j.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);H([(0,j.property)({type:Object})],F.prototype,"apiProvider",void 0);H([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);H([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);H([(0,j.state)()],F.prototype,"localesConfiguration",void 0);var Di=I(ee());function Ya(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!ht(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!ht(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!ht(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function ht(r,t){try{return Ya(r,t)}catch{return!1}}function yt(r,t){return!ht(r,t)}var Qa=I(ee(),1);var gt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ne=I(ee(),1);var Ao=I(ee(),1);function Io(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Ao.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:yt,...t??{}})}var mt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var No=I(J(),1);var bt=globalThis,Xa=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wc=Symbol();var Ro=(r,t)=>{if(Xa)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=bt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var xt=class extends No.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ro(n,t.elementStyles),n}};function To(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Ye=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ko,_o=Symbol("constructorPrototype"),Po=Symbol("constructorName"),Fo=Symbol("exportpartsDebouncer"),Lo=Symbol("dynamicDependenciesLoaded"),re=class extends xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ko]=new mt(5),this[Po]=this.constructor.name,this[_o]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Po]&&Object.setPrototypeOf(this,this[_o])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Lo]||(t[Lo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=To(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fo].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,s,l,d;let f=m=>m!=null&&m.trim().length>0,u=t.filter(f).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(f).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};ko=Fo;Ye([(0,Ne.property)()],re.prototype,"exportpartsPrefix",void 0);Ye([Io([])],re.prototype,"exportpartsPrefixes",void 0);Ye([(0,Ne.property)()],re.prototype,"customStylesheet",void 0);Ye([(0,Ne.property)()],re.prototype,"elementToFocus",void 0);Ye([(0,Ne.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Qe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Do,Uo,Bo,Xe=Symbol("internalReduxEventsUnsubscribers"),se=Symbol("internalStoresUnsubscribers"),ve=Symbol("internalStores"),Je=class extends re{constructor(){super(...arguments),this[Do]=new Map,this[Uo]=new Map,this[Bo]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ve].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ve].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[ve].get(t)}addStore(t,o){var n;o=(n=o??(Qe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[ve].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[ve].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ve].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[se].has(t.store):this[se].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[se].set(t,o.subscribe(()=>this.updateFromStores())),this[Xe].set(t,[]),Qe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,s)=>{if(typeof this[s]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[s](d);o.addEventListener(i.eventName,l),this[Xe].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[se].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[se].has(t)&&this[se].get(t)(),this[se].delete(t),(o=this[Xe].get(t))===null||o===void 0||o.forEach(n=>n()),this[Xe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Do=se,Uo=ve,Bo=Xe;Je.reduxProperties=new Map;Je.reduxReactiveProperties=new Set;Je.reduxEventListeners=new Map;function K(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oe(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ii}(r)||Array.isArray(r)||!!r[$o]||!!(!((t=r.constructor)===null||t===void 0)&&t[$o])||er(r)||tr(r))}function Se(r,t,o){o===void 0&&(o=!1),Pe(r)===0?(o?Object.keys:_e)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Pe(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:er(r)?2:tr(r)?3:0}function Te(r,t){return Pe(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ja(r,t){return Pe(r)===2?r.get(t):r[t]}function Ko(r,t,o){var n=Pe(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Vo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function er(r){return ni&&r instanceof Map}function tr(r){return ai&&r instanceof Set}function le(r){return r.o||r.t}function rr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Yo(r);delete t[L];for(var o=_e(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function or(r,t){return t===void 0&&(t=!1),nr(r)||oe(r)||!Y(r)||(Pe(r)>1&&(r.set=r.add=r.clear=r.delete=ei),Object.freeze(r),t&&Se(r,function(o,n){return or(n,!0)},!0)),r}function ei(){K(2)}function nr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function X(r){var t=Jt[r];return t||K(18,r),t}function ti(r,t){Jt[r]||(Jt[r]=t)}function Yt(){return tt}function Kt(r,t){t&&(X("Patches"),r.u=[],r.s=[],r.v=t)}function vt(r){Qt(r),r.p.forEach(ri),r.p=null}function Qt(r){r===tt&&(tt=r.l)}function Mo(r){return tt={p:[],l:tt,h:r,m:!0,_:0}}function ri(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function Vt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||X("ES5").S(t,r,n),n?(o[L].P&&(vt(t),K(4)),Y(r)&&(r=St(t,r),t.l||Ot(t,r)),t.u&&X("Patches").M(o[L].t,r,t.u,t.s)):r=St(t,o,[]),vt(t),t.u&&t.v(t.u,t.s),r!==qo?r:void 0}function St(r,t,o){if(nr(t))return t;var n=t[L];if(!n)return Se(t,function(d,f){return Wo(r,n,t,d,f,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Ot(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=rr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Se(s,function(d,f){return Wo(r,n,i,d,f,o,l)}),Ot(r,i,!1),o&&r.u&&X("Patches").N(n,o,r.u,r.s)}return n.o}function Wo(r,t,o,n,i,s,l){if(oe(i)){var d=St(r,i,s&&t&&t.i!==3&&!Te(t.R,n)?s.concat(n):void 0);if(Ko(o,n,d),!oe(d))return;r.m=!1}else l&&o.add(i);if(Y(i)&&!nr(i)){if(!r.h.D&&r._<1)return;St(r,i),t&&t.A.l||Ot(r,i)}}function Ot(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&or(t,o)}function Zt(r,t){var o=r[L];return(o?le(o):r)[t]}function Ho(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function de(r){r.P||(r.P=!0,r.l&&de(r.l))}function qt(r){r.o||(r.o=rr(r.t))}function Xt(r,t,o){var n=er(t)?X("MapSet").F(t,o):tr(t)?X("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:Yt(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},f=d,u=rt;l&&(f=[d],u=et);var h=Proxy.revocable(f,u),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(t,o):X("ES5").J(t,o);return(o?o.A:Yt()).p.push(n),n}function oi(r){return oe(r)||K(22,r),function t(o){if(!Y(o))return o;var n,i=o[L],s=Pe(o);if(i){if(!i.P&&(i.i<4||!X("ES5").K(i)))return i.t;i.I=!0,n=zo(o,s),i.I=!1}else n=zo(o,s);return Se(n,function(l,d){i&&Ja(i.t,l)===d||Ko(n,l,t(d))}),s===3?new Set(n):n}(r)}function zo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return rr(r)}function Zo(){function r(l,d){var f=s[l];return f?f.enumerable=d:s[l]=f={configurable:!0,enumerable:d,get:function(){var u=this[L];return rt.get(u,l)},set:function(u){var h=this[L];rt.set(h,l,u)}},f}function t(l){for(var d=l.length-1;d>=0;d--){var f=l[d][L];if(!f.P)switch(f.i){case 5:n(f)&&de(f);break;case 4:o(f)&&de(f)}}}function o(l){for(var d=l.t,f=l.k,u=_e(f),h=u.length-1;h>=0;h--){var y=u[h];if(y!==L){var m=d[y];if(m===void 0&&!Te(d,y))return!0;var v=f[y],b=v&&v[L];if(b?b.t!==m:!Vo(v,m))return!0}}var S=!!d[L];return u.length!==_e(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(d,d.length-1);if(f&&!f.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&K(3,JSON.stringify(le(l)))}var s={};ti("ES5",{J:function(l,d){var f=Array.isArray(l),u=function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Yo(m);delete S[L];for(var N=_e(S),w=0;w<N.length;w++){var A=N[w];S[A]=r(A,y||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(f,l),h={i:f?5:4,A:d?d.A:Yt(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,L,{value:h,writable:!0}),u},S:function(l,d,f){f?oe(d)&&d[L].A===l&&t(l.p):(l.u&&function u(h){if(h&&typeof h=="object"){var y=h[L];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Se(v,function(T){T!==L&&(m[T]!==void 0||Te(m,T)?b[T]||u(v[T]):(b[T]=!0,de(y)))}),Se(m,function(T){v[T]!==void 0||Te(v,T)||(b[T]=!1,de(y))});else if(S===5){if(n(y)&&(de(y),b.length=!0),v.length<m.length)for(var N=v.length;N<m.length;N++)b[N]=!1;else for(var w=m.length;w<v.length;w++)b[w]=!0;for(var A=Math.min(v.length,m.length),P=0;P<A;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&u(v[P])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Go,tt,ar=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ni=typeof Map<"u",ai=typeof Set<"u",jo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",qo=ar?Symbol.for("immer-nothing"):((Go={})["immer-nothing"]=!0,Go),$o=ar?Symbol.for("immer-draftable"):"__$immer_draftable",L=ar?Symbol.for("immer-state"):"__$immer_state";var ii=""+Object.prototype.constructor,_e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Yo=Object.getOwnPropertyDescriptors||function(r){var t={};return _e(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Jt={},rt={get:function(r,t){if(t===L)return r;var o=le(r);if(!Te(o,t))return function(i,s,l){var d,f=Ho(s,l);return f?"value"in f?f.value:(d=f.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===Zt(r.t,t)?(qt(r),r.o[t]=Xt(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=Ho(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Zt(le(r),t),s=i?.[L];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Vo(o,i)&&(o!==void 0||Te(r.t,t)))return!0;qt(r),de(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Zt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,qt(r),de(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){K(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K(12)}},et={};Se(rt,function(r,t){et[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),et.deleteProperty=function(r,t){return et.set.call(this,r,t,void 0)},et.set=function(r,t,o){return rt.set.call(this,r[0],t,o,r[0])};var ci=function(){function r(o){var n=this;this.O=jo,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var f=n;return function(S){var N=this;S===void 0&&(S=d);for(var w=arguments.length,A=Array(w>1?w-1:0),P=1;P<w;P++)A[P-1]=arguments[P];return f.produce(S,function(T){var M;return(M=s).call.apply(M,[N,T].concat(A))})}}var u;if(typeof s!="function"&&K(6),l!==void 0&&typeof l!="function"&&K(7),Y(i)){var h=Mo(n),y=Xt(n,i,void 0),m=!0;try{u=s(y),m=!1}finally{m?vt(h):Qt(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Kt(h,l),Vt(S,h)},function(S){throw vt(h),S}):(Kt(h,l),Vt(u,h))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===qo&&(u=void 0),n.D&&or(u,!0),l){var v=[],b=[];X("Patches").M(i,u,v,b),l(v,b)}return u}K(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(y))})};var l,d,f=n.produce(i,s,function(u,h){l=u,d=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,l,d]}):[f,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||K(8),oe(o)&&(o=oi(o));var n=Mo(this),i=Xt(this,o,void 0);return i[L].C=!0,Qt(n),i},t.finishDraft=function(o,n){var i=o&&o[L],s=i.A;return Kt(s,n),Vt(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!jo&&K(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=X("Patches").$;return oe(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new ci,si=$.produce,es=$.produceWithPatches.bind($),ts=$.setAutoFreeze.bind($),rs=$.setUseProxies.bind($),os=$.applyPatches.bind($),ns=$.createDraft.bind($),as=$.finishDraft.bind($),Ct=si;function Oe(r){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(r)}function Qo(r,t){if(Oe(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Oe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Xo(r){var t=Qo(r,"string");return Oe(t)=="symbol"?t:t+""}function Jo(r,t,o){return(t=Xo(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function en(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function ir(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?en(Object(o),!0).forEach(function(n){Jo(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):en(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var tn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Et={INIT:"@@redux/INIT"+cr(),REPLACE:"@@redux/REPLACE"+cr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cr()}};function li(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function sr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(sr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,s=t,l=[],d=l,f=!1;function u(){d===l&&(d=l.slice())}function h(){if(f)throw new Error(z(3));return s}function y(S){if(typeof S!="function")throw new Error(z(4));if(f)throw new Error(z(5));var N=!0;return u(),d.push(S),function(){if(N){if(f)throw new Error(z(6));N=!1,u();var A=d.indexOf(S);d.splice(A,1),l=null}}}function m(S){if(!li(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(f)throw new Error(z(9));try{f=!0,s=i(s,S)}finally{f=!1}for(var N=l=d,w=0;w<N.length;w++){var A=N[w];A()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,m({type:Et.REPLACE})}function b(){var S,N=y;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(z(11));function P(){A.next&&A.next(h())}P();var T=N(P);return{unsubscribe:T}}},S[tn]=function(){return this},S}return m({type:Et.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[tn]=b,n}function di(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Et.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Et.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function rn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{di(o)}catch(f){d=f}return function(u,h){if(u===void 0&&(u={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],N=o[S],w=u[S],A=N(w,h);if(typeof A>"u"){var P=h&&h.type;throw new Error(z(14))}v[S]=A,m=m||A!==w}return m=m||s.length!==Object.keys(u).length,m?v:u}}function Le(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function on(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(f){return f(l)});return s=Le.apply(void 0,d)(i.dispatch),ir(ir({},i),{},{dispatch:s})}}}function nn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var an=nn();an.withExtraArgument=nn;var lr=an;var un=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),ui=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(h){return f([u,h])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){o.label=u[1];break}if(u[0]===6&&o.label<s[1]){o.label=s[1],s=u;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(u);break}s[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(h){u=[6,h],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ke=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},pi=Object.defineProperty,fi=Object.defineProperties,hi=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,sn=function(r,t,o){return t in r?pi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ue=function(r,t){for(var o in t||(t={}))yi.call(t,o)&&sn(r,o,t[o]);if(cn)for(var n=0,i=cn(t);n<i.length;n++){var o=i[n];gi.call(t,o)&&sn(r,o,t[o])}return r},dr=function(r,t){return fi(r,hi(t))},mi=function(r,t,o){return new Promise(function(n,i){var s=function(f){try{d(o.next(f))}catch(u){i(u)}},l=function(f){try{d(o.throw(f))}catch(u){i(u)}},d=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(s,l)};d((o=o.apply(r,t)).next())})};var bi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Le:Le.apply(null,arguments)},Cs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function xi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var vi=function(r){un(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,ke([void 0],o.concat(this))))},t}(Array),Si=function(r){un(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ke([void 0],o[0].concat(this)))):new(t.bind.apply(t,ke([void 0],o.concat(this))))},t}(Array);function fr(r){return Y(r)?Ct(r,function(){}):r}function Oi(r){return typeof r=="boolean"}function Ci(){return function(t){return Ei(t)}}function Ei(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new vi;if(o&&(Oi(o)?d.push(lr):d.push(lr.withExtraArgument(o.extraArgument))),0){if(i)var f;if(l)var u}return d}var ur=!0;function pn(r){var t=Ci(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,f=d===void 0?!0:d,u=o.preloadedState,h=u===void 0?void 0:u,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(xi(i))v=rn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!ur&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ur&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=on.apply(void 0,b),N=Le;f&&(N=bi(ue({trace:!ur},typeof f=="object"&&f)));var w=new Si(S),A=w;Array.isArray(m)?A=ke([S],m):typeof m=="function"&&(A=m(w));var P=N.apply(void 0,A);return sr(v,h,P)}function pe(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ue(ue({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function fn(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function wi(r){return typeof r=="function"}function Ai(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?fn(t):[t,o,n],s=i[0],l=i[1],d=i[2],f;if(wi(r))f=function(){return fr(r())};else{var u=fr(r);f=function(){return u}}function h(y,m){y===void 0&&(y=f());var v=ke([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(oe(b)){var N=b,w=S(N,m);return w===void 0?b:w}else{if(Y(b))return Ct(b,function(A){return S(A,m)});var w=S(b,m);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},y)}return h.getInitialState=f,h}function Ii(r,t){return r+"/"+t}function hn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:fr(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],m=Ii(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[m]=v,d[h]=b?pe(m,b):pe(m)});function f(){var h=typeof r.extraReducers=="function"?fn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],N=S===void 0?void 0:S,w=ue(ue({},m),l);return Ai(o,function(A){for(var P in w)A.addCase(P,w[P]);for(var T=0,M=b;T<M.length;T++){var Z=M[T];A.addMatcher(Z.matcher,Z.reducer)}N&&A.addDefaultCase(N)})}var u;return{name:t,reducer:function(h,y){return u||(u=f()),u(h,y)},actions:d,caseReducers:s,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Ri="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ni=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ri[Math.random()*64|0];return t},Ti=["name","message","stack","code"],pr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ln=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),_i=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ti;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Is=function(){function r(t,o,n){var i=pe(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:dr(ue({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=pe(t+"/pending",function(h,y,m){return{payload:void 0,meta:dr(ue({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=pe(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||_i)(h||"Rejected"),meta:dr(ue({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):Ni(),S=new f,N,w=!1;function A(T){N=T,S.abort()}var P=function(){return mi(this,null,function(){var T,M,Z,ge,G,me,Ie;return ui(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),ge=(T=n?.condition)==null?void 0:T.call(n,h,{getState:m,extra:v}),Li(ge)?[4,ge]:[3,2];case 1:ge=p.sent(),p.label=2;case 2:if(ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,G=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:N||"Aborted"})})}),y(s(b,h,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([G,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(g,C){return new pr(g,C)},fulfillWithValue:function(g,C){return new ln(g,C)}})).then(function(g){if(g instanceof pr)throw g;return g instanceof ln?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return Z=p.sent(),[3,5];case 4:return me=p.sent(),Z=me instanceof pr?l(null,b,h,me.payload,me.meta):l(me,b,h),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(Z)&&Z.meta.condition,Ie||y(Z),[2,Z]}})})}();return Object.assign(P,{abort:A,requestId:b,arg:h,unwrap:function(){return P.then(Pi)}})}}return Object.assign(u,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Pi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Li(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var yn="listener",gn="completed",mn="cancelled",Rs="task-"+mn,Ns="task-"+gn,Ts=yn+"-"+mn,_s=yn+"-"+gn;var hr="listenerMiddleware";var Ps=pe(hr+"/add"),Ls=pe(hr+"/removeAll"),ks=pe(hr+"/remove");var dn,Fs=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(dn||(dn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},ki=function(r){return function(t){setTimeout(t,r)}},Ds=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ki(10);Zo();function Fi(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var wt=class extends Fi(Object){};window.ftReduxStores||(window.ftReduxStores={});var bn=class r extends wt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Qe(s))return s;if(i==null)return;let l=hn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=pn({reducer:(f,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...u.overwrites}:l.reducer(f,u)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new gt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let f=l,u=s[f];return u?(...h)=>{let y=u(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[f]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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 Nt=I(D());var At=class extends te{async listMySearches(){let{session:t}=E.getState();return vo(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var It=class extends te{async listMyBookmarks(){let t=E.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ui="ft-user-assets",Rt=Nt.FtReduxStore.get({name:Ui,initialState:{savedSearches:void 0,bookmarks:void 0}}),yr=class{constructor(){this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new It,this.savedSearchesService=new At,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=E.getState();(0,Nt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Rt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Rt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Rt.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){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Rt.actions.bookmarks(o)}}},bl=new yr;var gr=class{addCommand(t,o=!1){E.commands.add(t,o)}consumeCommand(t){return E.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gr;var xn=I(D()),mr=class{highlightHtml(t,o,n){(0,xn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new mr;var vn=I(D());var br=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=E.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;return vn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:E.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}};window.FluidTopicsDateService=new br;var Sn=I(D());var ot=class{static get(t,o){var n,i,s,l;let d=E.getState(),{lang:f,region:u}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Sn.SearchPlaceConverter(d.baseUrl,(l=(s=window.FluidTopicsClientConfiguration)===null||s===void 0?void 0:s.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${f}-${u}`)}};var xr=class{urlToSearchRequest(t){return ot.get().parse(t)}searchRequestToUrl(t){return ot.get().serialize(t)}};window.FluidTopicsUrlService=new xr;var fe=I(D());var Ce=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ce.eventName="change";var vr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},On=new vr;var Tt=class r extends fe.WithEventBus{static build(){return new r(window.history,On,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ce(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let f=o(),u={...f===this.currentIndex?this.currentState:void 0,...s,index:f,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[u,l,d]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ce.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ce.eventName,t)}currentItem(){return(0,fe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,fe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,fe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Tt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});(0,Cn.customElement)("ft-app-context")(F);var Sr=class r extends Event{constructor(){super(r.eventName)}};Sr.eventName="search-context-clear-all-filters";var Bi=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Cr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},En=Symbol("registerInterval"),Or=Symbol("registerAttempts"),Mi=40;function Wi(r){class t extends r{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Or]=0,this[En]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Or]>Mi?window.clearInterval(this[En]):(this[Or]++,this.dispatchEvent(new Cr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Bi([(0,An.state)()],t.prototype,"stateManager",void 0),t}var Pt=class extends Wi(wn.FtLitElementRedux){};var nt=I(ee()),Lt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Er=Symbol("registerInterval");function Hi(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Er]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Er]):this.dispatchEvent(new wr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Er,Lt([(0,nt.property)({attribute:!1})],o.prototype,"cluster",void 0),Lt([(0,nt.property)({attribute:!1})],o.prototype,"result",void 0),Lt([(0,nt.property)({attribute:!1,type:Number})],o.prototype,"rank",void 0),Lt([(0,nt.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}var kt=class extends Hi(Pt){};var In=I(J()),Rn=I(D()),zi={highlightBackgroundColor:Rn.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Nn=In.css`
|
|
6
6
|
.kwicmatch {
|
|
7
7
|
font-weight: 700;
|
|
8
8
|
background-color: ${zi.highlightBackgroundColor};
|
|
@@ -72,7 +72,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
72
72
|
`;var ec;(function(r){r.blur="blur",r.blurWithStatusResolutionOnInput="blurWithStatusResolutionOnInput",r.input="input"})(ec||(ec={}));var tc;(function(r){r.default="default",r.warning="warning",r.error="error"})(tc||(tc={}));var ya,ma,ba,xa,fu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((ba=(ma=(ya=window.safari)===null||ya===void 0?void 0:ya.pushNotification)===null||ma===void 0?void 0:ma.toString())!==null&&ba!==void 0?ba:"")==="[object SafariRemoteNotification]",hu="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(xa=window.ftGlobals)!==null&&xa!==void 0?xa:{lit:fo,litDecorators:ho,litRepeat:go,litClassMap:yo,litStyleMap:mo,litUnsafeHTML:xo,wcUtils:{...wo,...vo,...No,...ua,...Io,...Po,...cn,...Co,...On,...ga,...Js,...ia,...sn,...Nn,...da,...An,...ki,..._o,..._n,...Pn,...Xs,...Ui,...Ln,...oa,...fa,...En,...wn,...ca,isSafari:fu,isTouchScreen:hu,setVariable:wr}};var rc=k`
|
|
73
73
|
`;var gu="ft-app-info",va=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},yu={session:(r,e)=>{J(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>P.dispatchEvent(new va(e.payload)),0))}},P=Me.get({name:gu,reducers:yu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var rt=class r{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=r.get(e);if(n)o(n);else{let a=P.subscribe(()=>{n=r.get(e),n&&(a(),o(n))})}})}};var dr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:rt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):rt.await()}};var xe=class extends dr{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new se,this.cache=e?a.commonCache:new se}clearCache(){this.cache.clearAll()}};var oc,mu=Symbol("clearAfterUnitTest"),zr=class extends xe{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[oc]=()=>{this.defaultMessages={},this.cache=new se,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};J(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new nr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(a){!(a instanceof Re)&&o&&console.error(a)}return o&&await this.notify(e),n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Cr(0).then(()=>o()).catch(()=>null)))}};oc=mu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zr{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zr{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});var nc=window.FluidTopicsI18nService,bx=window.FluidTopicsCustomI18nService;var Y=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},j=class extends Z{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>rt.get(),this.messageContexts=[],this.cache=new se,this.cleanSessionDebouncer=new Ne}render(){return Oe`
|
|
74
74
|
<slot></slot>
|
|
75
|
-
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>nc.addContext(l)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),P.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};j.elementDefinitions={};j.styles=rc;Y([F()],j.prototype,"baseUrl",void 0);Y([F()],j.prototype,"apiIntegrationIdentifier",void 0);Y([F()],j.prototype,"uiLocale",void 0);Y([Ie(null)],j.prototype,"availableUiLocales",void 0);Y([Ie(null)],j.prototype,"metadataConfiguration",void 0);Y([F({type:Boolean})],j.prototype,"editorMode",void 0);Y([F({type:Boolean})],j.prototype,"noCustom",void 0);Y([F({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);Y([F({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],j.prototype,"noCustomComponent",void 0);Y([F({type:Boolean})],j.prototype,"withManualResources",void 0);Y([F({type:Boolean})],j.prototype,"navigatorOnline",void 0);Y([F({type:Boolean})],j.prototype,"forcedOffline",void 0);Y([F({type:Object})],j.prototype,"apiProvider",void 0);Y([Ie([])],j.prototype,"messageContexts",void 0);Y([Ie(void 0)],j.prototype,"session",void 0);Y([Ee()],j.prototype,"localesConfiguration",void 0);var jr=class extends xe{async listMySearches(){let{session:e}=P.getState();return qs(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Gr=class extends xe{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var bu="ft-user-assets",Vr=Me.get({name:bu,initialState:{savedSearches:void 0,bookmarks:void 0}}),Sa=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gr,this.savedSearchesService=new jr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();J((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Vr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Vr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Vr.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Vr.actions.bookmarks(o)}}},Vx=new Sa;var Oa=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Oa;var Ea=class{highlightHtml(e,o,n){Tn(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ea;var Ca=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return wt.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ca;var ur=class{static get(e,o){var n,a,i,s;let l=P.getState(),{lang:d,region:p}=(a=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ct(l.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,o??`${d}-${p}`)}};var wa=class{urlToSearchRequest(e){return ur.get().parse(e)}searchRequestToUrl(e){return ur.get().serialize(e)}};window.FluidTopicsUrlService=new wa;var ot=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};ot.eventName="change";var Aa=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},ac=new Aa;var Kr=class r extends fe{static build(){return new r(window.history,ac,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),J(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ot(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var n,a,i;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},l=o?(a=e?.majorState)!==null&&a!==void 0?a:this.currentState.majorState:(i=this.currentState.majorState)!==null&&i!==void 0?i:e?.majorState;l!=null&&(s.majorState=l),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(ot.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ot.eventName,e)}currentItem(){return Kt(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Kt(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return Kt(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,n;return this.hasState(e)&&((n=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});Ze("ft-app-context")(j);var Ra=class r extends Event{constructor(){super(r.eventName)}};Ra.eventName="search-context-clear-all-filters";var xu=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Ia=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ic=Symbol("registerInterval"),Na=Symbol("registerAttempts"),vu=40;function Su(r){class e extends r{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Na]=0,this[ic]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Na]>vu?window.clearInterval(this[ic]):(this[Na]++,this.dispatchEvent(new Ia))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return xu([Ee()],e.prototype,"stateManager",void 0),e}var Zr=class extends Su(Le){};var qr=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},_a=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Ta=Symbol("registerInterval");function Ou(r){var e;class o extends r{constructor(){super(...arguments),this[e]=0}setResultStateManager(a){this.resultStateManager=a}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ta]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Ta]):this.dispatchEvent(new _a)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return e=Ta,qr([F({attribute:!1})],o.prototype,"cluster",void 0),qr([F({attribute:!1})],o.prototype,"result",void 0),qr([F({attribute:!1,type:Number})],o.prototype,"rank",void 0),qr([F({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}var Yr=class extends Ou(Zr){};var Eu={highlightBackgroundColor:t.create("--ft-sra-highlight-background-color","","COLOR","transparent")},sc=k`
|
|
75
|
+
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>nc.addContext(l)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),P.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};j.elementDefinitions={};j.styles=rc;Y([F()],j.prototype,"baseUrl",void 0);Y([F()],j.prototype,"apiIntegrationIdentifier",void 0);Y([F()],j.prototype,"uiLocale",void 0);Y([Ie(null)],j.prototype,"availableUiLocales",void 0);Y([Ie(null)],j.prototype,"metadataConfiguration",void 0);Y([F({type:Boolean})],j.prototype,"editorMode",void 0);Y([F({type:Boolean})],j.prototype,"noCustom",void 0);Y([F({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);Y([F({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],j.prototype,"noCustomComponent",void 0);Y([F({type:Boolean})],j.prototype,"withManualResources",void 0);Y([F({type:Boolean})],j.prototype,"navigatorOnline",void 0);Y([F({type:Boolean})],j.prototype,"forcedOffline",void 0);Y([F({type:Object})],j.prototype,"apiProvider",void 0);Y([Ie([])],j.prototype,"messageContexts",void 0);Y([Ie(void 0)],j.prototype,"session",void 0);Y([Ee()],j.prototype,"localesConfiguration",void 0);var jr=class extends xe{async listMySearches(){let{session:e}=P.getState();return qs(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Gr=class extends xe{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var bu="ft-user-assets",Vr=Me.get({name:bu,initialState:{savedSearches:void 0,bookmarks:void 0}}),Sa=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gr,this.savedSearchesService=new jr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();J((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Vr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Vr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Vr.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Vr.actions.bookmarks(o)}}},Vx=new Sa;var Oa=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Oa;var Ea=class{highlightHtml(e,o,n){Tn(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ea;var Ca=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return wt.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ca;var ur=class{static get(e,o){var n,a,i,s;let l=P.getState(),{lang:d,region:p}=(a=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ct(l.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,o??`${d}-${p}`)}};var wa=class{urlToSearchRequest(e){return ur.get().parse(e)}searchRequestToUrl(e){return ur.get().serialize(e)}};window.FluidTopicsUrlService=new wa;var ot=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};ot.eventName="change";var Aa=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},ac=new Aa;var Kr=class r extends fe{static build(){return new r(window.history,ac,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),J(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ot(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(ot.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ot.eventName,e)}currentItem(){return Kt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Kt(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Kt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});Ze("ft-app-context")(j);var Ra=class r extends Event{constructor(){super(r.eventName)}};Ra.eventName="search-context-clear-all-filters";var xu=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Ia=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ic=Symbol("registerInterval"),Na=Symbol("registerAttempts"),vu=40;function Su(r){class e extends r{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Na]=0,this[ic]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Na]>vu?window.clearInterval(this[ic]):(this[Na]++,this.dispatchEvent(new Ia))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return xu([Ee()],e.prototype,"stateManager",void 0),e}var Zr=class extends Su(Le){};var qr=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},_a=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Ta=Symbol("registerInterval");function Ou(r){var e;class o extends r{constructor(){super(...arguments),this[e]=0}setResultStateManager(a){this.resultStateManager=a}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ta]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Ta]):this.dispatchEvent(new _a)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return e=Ta,qr([F({attribute:!1})],o.prototype,"cluster",void 0),qr([F({attribute:!1})],o.prototype,"result",void 0),qr([F({attribute:!1,type:Number})],o.prototype,"rank",void 0),qr([F({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}var Yr=class extends Ou(Zr){};var Eu={highlightBackgroundColor:t.create("--ft-sra-highlight-background-color","","COLOR","transparent")},sc=k`
|
|
76
76
|
.kwicmatch {
|
|
77
77
|
font-weight: 700;
|
|
78
78
|
background-color: ${Eu.highlightBackgroundColor};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-abstract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Search result abstract for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-search-result-context": "1.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.
|
|
22
|
+
"@fluid-topics/ft-search-result-context": "1.3.0",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.3.0",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.3.0",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluid-topics/public-api": "1.0.98"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "cc982effbf27c0483e03961ad450fd2057a108b2"
|
|
31
31
|
}
|