@fluid-topics/ft-search-result-abstract 1.1.101 → 1.1.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";(()=>{var sa=Object.create;var Ar=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var ua=Object.getOwnPropertyNames;var da=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty;var Me=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var fa=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ua(t))!pa.call(r,a)&&a!==o&&Ar(r,a,{get:()=>t[a],enumerable:!(n=la(t,a))||n.enumerable});return r};var N=(r,t,o)=>(o=r!=null?sa(da(r)):{},fa(t||!r||!r.__esModule?Ar(o,"default",{value:r,enumerable:!0}):o,r));var B=Me((gi,Nr)=>{Nr.exports=ftGlobals.wcUtils});var Q=Me((mi,Ir)=>{Ir.exports=ftGlobals.lit});var J=Me((bi,Rr)=>{Rr.exports=ftGlobals.litDecorators});var Tr=Me(Pr=>{(function(r){var t=function(o){var n={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function a(p){return p&&DataView.prototype.isPrototypeOf(p)}if(n.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(p){return p&&c.indexOf(Object.prototype.toString.call(p))>-1};function u(p){if(typeof p!="string"&&(p=String(p)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(p))throw new TypeError("Invalid character in header field name");return p.toLowerCase()}function f(p){return typeof p!="string"&&(p=String(p)),p}function d(p){var m={next:function(){var O=p.shift();return{done:O===void 0,value:O}}};return n.iterable&&(m[Symbol.iterator]=function(){return m}),m}function h(p){this.map={},p instanceof h?p.forEach(function(m,O){this.append(O,m)},this):Array.isArray(p)?p.forEach(function(m){this.append(m[0],m[1])},this):p&&Object.getOwnPropertyNames(p).forEach(function(m){this.append(m,p[m])},this)}h.prototype.append=function(p,m){p=u(p),m=f(m);var O=this.map[p];this.map[p]=O?O+", "+m:m},h.prototype.delete=function(p){delete this.map[u(p)]},h.prototype.get=function(p){return p=u(p),this.has(p)?this.map[p]:null},h.prototype.has=function(p){return this.map.hasOwnProperty(u(p))},h.prototype.set=function(p,m){this.map[u(p)]=f(m)},h.prototype.forEach=function(p,m){for(var O in this.map)this.map.hasOwnProperty(O)&&p.call(m,this.map[O],O,this)},h.prototype.keys=function(){var p=[];return this.forEach(function(m,O){p.push(O)}),d(p)},h.prototype.values=function(){var p=[];return this.forEach(function(m){p.push(m)}),d(p)},h.prototype.entries=function(){var p=[];return this.forEach(function(m,O){p.push([O,m])}),d(p)},n.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function y(p){if(p.bodyUsed)return Promise.reject(new TypeError("Already read"));p.bodyUsed=!0}function g(p){return new Promise(function(m,O){p.onload=function(){m(p.result)},p.onerror=function(){O(p.error)}})}function v(p){var m=new FileReader,O=g(m);return m.readAsArrayBuffer(p),O}function b(p){var m=new FileReader,O=g(m);return m.readAsText(p),O}function S(p){for(var m=new Uint8Array(p),O=new Array(m.length),k=0;k<m.length;k++)O[k]=String.fromCharCode(m[k]);return O.join("")}function R(p){if(p.slice)return p.slice(0);var m=new Uint8Array(p.byteLength);return m.set(new Uint8Array(p)),m.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(p){this._bodyInit=p,p?typeof p=="string"?this._bodyText=p:n.blob&&Blob.prototype.isPrototypeOf(p)?this._bodyBlob=p:n.formData&&FormData.prototype.isPrototypeOf(p)?this._bodyFormData=p:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)?this._bodyText=p.toString():n.arrayBuffer&&n.blob&&a(p)?(this._bodyArrayBuffer=R(p.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(p)||l(p))?this._bodyArrayBuffer=R(p):this._bodyText=p=Object.prototype.toString.call(p):this._bodyText="",this.headers.get("content-type")||(typeof p=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var p=y(this);if(p)return p;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var p=y(this);if(p)return p;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function T(p){var m=p.toUpperCase();return w.indexOf(m)>-1?m:p}function I(p,m){m=m||{};var O=m.body;if(p instanceof I){if(p.bodyUsed)throw new TypeError("Already read");this.url=p.url,this.credentials=p.credentials,m.headers||(this.headers=new h(p.headers)),this.method=p.method,this.mode=p.mode,this.signal=p.signal,!O&&p._bodyInit!=null&&(O=p._bodyInit,p.bodyUsed=!0)}else this.url=String(p);if(this.credentials=m.credentials||this.credentials||"same-origin",(m.headers||!this.headers)&&(this.headers=new h(m.headers)),this.method=T(m.method||this.method||"GET"),this.mode=m.mode||this.mode||null,this.signal=m.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&O)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(O)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function q(p){var m=new FormData;return p.trim().split("&").forEach(function(O){if(O){var k=O.split("="),D=k.shift().replace(/\+/g," "),P=k.join("=").replace(/\+/g," ");m.append(decodeURIComponent(D),decodeURIComponent(P))}}),m}function G(p){var m=new h,O=p.replace(/\r?\n[\t ]+/g," ");return O.split(/\r?\n/).forEach(function(k){var D=k.split(":"),P=D.shift().trim();if(P){var Qe=D.join(":").trim();m.append(P,Qe)}}),m}E.call(I.prototype);function W(p,m){m||(m={}),this.type="default",this.status=m.status===void 0?200:m.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in m?m.statusText:"OK",this.headers=new h(m.headers),this.url=m.url||"",this._initBody(p)}E.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},W.error=function(){var p=new W(null,{status:0,statusText:""});return p.type="error",p};var Xe=[301,302,303,307,308];W.redirect=function(p,m){if(Xe.indexOf(m)===-1)throw new RangeError("Invalid status code");return new W(null,{status:m,headers:{location:p}})},o.DOMException=r.DOMException;try{new o.DOMException}catch{o.DOMException=function(m,O){this.message=m,this.name=O;var k=Error(m);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function X(p,m){return new Promise(function(O,k){var D=new I(p,m);if(D.signal&&D.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var P=new XMLHttpRequest;function Qe(){P.abort()}P.onload=function(){var We={status:P.status,statusText:P.statusText,headers:G(P.getAllResponseHeaders()||"")};We.url="responseURL"in P?P.responseURL:We.headers.get("X-Request-URL");var Nt="response"in P?P.response:P.responseText;O(new W(Nt,We))},P.onerror=function(){k(new TypeError("Network request failed"))},P.ontimeout=function(){k(new TypeError("Network request failed"))},P.onabort=function(){k(new o.DOMException("Aborted","AbortError"))},P.open(D.method,D.url,!0),D.credentials==="include"?P.withCredentials=!0:D.credentials==="omit"&&(P.withCredentials=!1),"responseType"in P&&n.blob&&(P.responseType="blob"),D.headers.forEach(function(We,Nt){P.setRequestHeader(Nt,We)}),D.signal&&(D.signal.addEventListener("abort",Qe),P.onreadystatechange=function(){P.readyState===4&&D.signal.removeEventListener("abort",Qe)}),P.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return X.polyfill=!0,r.fetch||(r.fetch=X,r.Headers=h,r.Request=I,r.Response=W),o.Headers=h,o.Request=I,o.Response=W,o.fetch=X,Object.defineProperty(o,"__esModule",{value:!0}),o}({})})(typeof self<"u"?self:Pr)});var Xo=Me((yl,Yo)=>{Yo.exports=ftGlobals.litUnsafeHTML});var ca=N(B());var wr=N(Q());var Ko=N(B()),Go=N(J());var lr=N(B());var ha=N(B());var Ri=N(Tr(),1);var Lr;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(Lr||(Lr={}));var kr;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(kr||(kr={}));var Fr;(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"})(Fr||(Fr={}));var Ur;(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"})(Ur||(Ur={}));var _r;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(_r||(_r={}));var Dr;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Dr||(Dr={}));var Br;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(Br||(Br={}));var Wr;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Wr||(Wr={}));var Mr;(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"})(Mr||(Mr={}));var zr;(function(r){r.ASC="ASC",r.DESC="DESC"})(zr||(zr={}));var Hr;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Hr||(Hr={}));var It;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(It||(It={}));var $r;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})($r||($r={}));var jr;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(jr||(jr={}));var Kr;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Kr||(Kr={}));var Gr;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(Gr||(Gr={}));var Rt;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS"})(Rt||(Rt={}));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.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.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN",r.DEVELOPER="DEVELOPER"})(U||(U={}));var Zr;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Zr||(Zr={}));var wi={[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.DEVELOPER]:[U.BETA_USER,U.DEBUG_USER]};var jo=N(B());var Qr=N(Q()),$=N(J()),Z=N(B());var Vr=N(Q());var qr=Vr.css`
|
|
2
|
-
`;var Je=N(B()),ya="ft-app-info",Pt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},ga={session:(r,t)=>{(0,Je.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>A.eventBus.dispatchEvent(new Pt(t.payload)),0))}},A=Je.FtReduxStore.get({name:ya,reducers:ga,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ae=N(B());var Tt=N(B());var ye=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=A.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let a=A.subscribe(()=>{n=r.get(t),n&&(a(),o(n))})}})}};var ee=class{constructor(t=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Tt.CacheRegistry,this.cache=t?a.commonCache:new Tt.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ye.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ye.await()}clearCache(){this.cache.clearAll()}};var Yr,ma=Symbol("clearAfterUnitTest"),et=class extends ee{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Yr]=()=>{this.defaultMessages={},this.cache=new ae.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.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(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ae.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}
|
|
2
|
+
`;var Je=N(B()),ya="ft-app-info",Pt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},ga={session:(r,t)=>{(0,Je.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>A.eventBus.dispatchEvent(new Pt(t.payload)),0))}},A=Je.FtReduxStore.get({name:ya,reducers:ga,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ae=N(B());var Tt=N(B());var ye=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=A.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let a=A.subscribe(()=>{n=r.get(t),n&&(a(),o(n))})}})}};var ee=class{constructor(t=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Tt.CacheRegistry,this.cache=t?a.commonCache:new Tt.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ye.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ye.await()}clearCache(){this.cache.clearAll()}};var Yr,ma=Symbol("clearAfterUnitTest"),et=class extends ee{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Yr]=()=>{this.defaultMessages={},this.cache=new ae.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.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(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ae.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await 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 a;let c=t.toLowerCase(),l=this.resolveContext(c);return new ae.ParametrizedLabelResolver((a=this.defaultMessages[c])!==null&&a!==void 0?a:{},l).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.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,ae.delay)(0).then(()=>o()).catch(()=>null)))}};Yr=ma;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends et{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends et{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Xr=window.FluidTopicsI18nService,ji=window.FluidTopicsCustomI18nService;var z=function(r,t,o,n){var a=arguments.length,c=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(c=(a<3?l(c):a>3?l(t,o,c):l(t,o))||c);return a>3&&c&&Object.defineProperty(t,o,c),c},F=class extends Z.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=()=>ye.get(),this.messageContexts=[],this.cache=new Z.CacheRegistry,this.cleanSessionDebouncer=new Z.Debouncer}render(){return Qr.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}update(t){super.update(t),t.has("baseUrl")&&(A.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&A.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&A.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&A.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&A.actions.noCustom(this.noCustom),t.has("editorMode")&&A.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&A.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&A.actions.session(this.session),t.has("availableUiLocales")&&A.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Xr.addContext(o)),t.has("openExternalDocumentInNewTab")&&A.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&A.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&A.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}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 updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};F.elementDefinitions={};F.styles=qr;z([(0,$.property)()],F.prototype,"baseUrl",void 0);z([(0,$.property)()],F.prototype,"apiIntegrationIdentifier",void 0);z([(0,$.property)()],F.prototype,"uiLocale",void 0);z([(0,Z.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);z([(0,Z.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"editorMode",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"noCustom",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);z([(0,$.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"withManualResources",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);z([(0,$.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);z([(0,$.property)({type:Object})],F.prototype,"apiProvider",void 0);z([(0,Z.jsonProperty)([])],F.prototype,"messageContexts",void 0);z([(0,Z.jsonProperty)(void 0)],F.prototype,"session",void 0);var oi=N(J());function ba(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,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!tt(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(!tt(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();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var c=a[n];if(!tt(r[c],t[c]))return!1}return!0}return r!==r&&t!==t}function tt(r,t){try{return ba(r,t)}catch{return!1}}function Lt(r,t){return!tt(r,t)}var xa=N(J(),1);var rt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==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}};var ze=N(J(),1);var Jr=N(J(),1);function eo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Jr.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:Lt,...t??{}})}var ot=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(u){a(u);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ro=N(Q(),1);var nt=window,va=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ic=Symbol();var to=(r,t)=>{va?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=nt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var at=class extends ro.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,c])=>t.registry.define(a,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return to(n,t.elementStyles),n}};var it=function(r,t,o,n){var a=arguments.length,c=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(c=(a<3?l(c):a>3?l(t,o,c):l(t,o))||c);return a>3&&c&&Object.defineProperty(t,o,c),c},io,oo=Symbol("constructorPrototype"),no=Symbol("constructorName"),co=Symbol("exportpartsDebouncer"),ao=Symbol("dynamicDependenciesLoaded"),ie=class extends at{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[io]=new ot(5),this[no]=this.constructor.name,this[oo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[no]&&Object.setPrototypeOf(this,this[oo])}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[ao]||(t[ao]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}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[co].run(()=>{var a,c;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,c,l,u;let f=g=>g!=null&&g.trim().length>0,d=t.filter(f).map(g=>g.trim());if(d.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&c!==void 0?c:[],b=(u=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&u!==void 0?u:[];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(g=>d.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};io=co;it([(0,ze.property)()],ie.prototype,"exportpartsPrefix",void 0);it([eo([])],ie.prototype,"exportpartsPrefixes",void 0);it([(0,ze.property)()],ie.prototype,"customStylesheet",void 0);it([(0,ze.state)()],ie.prototype,"useAdoptedStyleSheets",void 0);function He(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var so,lo,uo,ct=Symbol("internalReduxEventsUnsubscribers"),ce=Symbol("internalStoresUnsubscribers"),ge=Symbol("internalStores"),$e=class extends ie{constructor(){super(...arguments),this[so]=new Map,this[lo]=new Map,this[uo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ge].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ge].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[ge].get(t)}addStore(t,o){var n;o=(n=o??(He(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[ge].delete(o)}setupStore(t,o){this[ge].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[ge].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 a=this.getStore(t.store);a&&(t.store?this[ce].has(t.store):this[ce].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[ce].set(t,o.subscribe(()=>this.updateFromStores())),He(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,c)=>{if(typeof this[c]=="function"&&(!a.store||o.name===a.store)){let l=u=>this[c](u);o.eventBus.addEventListener(a.eventName,l),this[ct].push(()=>o.eventBus.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ce].forEach((t,o)=>this.unsubscribeFromStore(o)),this[ct].forEach(t=>t()),this[ct]=[]}unsubscribeFromStore(t){this[ce].has(t)&&this[ce].get(t)(),this[ce].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};so=ce,lo=ge,uo=ct;$e.reduxProperties=new Map;$e.reduxReactiveProperties=new Set;$e.reduxEventListeners=new Map;function j(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 a,c;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 te(r){return!!r&&!!r[L]}function V(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 a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ia}(r)||Array.isArray(r)||!!r[bo]||!!(!((t=r.constructor)===null||t===void 0)&&t[bo])||zt(r)||Ht(r))}function me(r,t,o){o===void 0&&(o=!1),Ce(r)===0?(o?Object.keys:Oe)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function Ce(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:zt(r)?2:Ht(r)?3:0}function Se(r,t){return Ce(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Sa(r,t){return Ce(r)===2?r.get(t):r[t]}function xo(r,t,o){var n=Ce(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 zt(r){return Aa&&r instanceof Map}function Ht(r){return Na&&r instanceof Set}function se(r){return r.o||r.t}function $t(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Co(r);delete t[L];for(var o=Oe(t),n=0;n<o.length;n++){var a=o[n],c=t[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function jt(r,t){return t===void 0&&(t=!1),Kt(r)||te(r)||!V(r)||(Ce(r)>1&&(r.set=r.add=r.clear=r.delete=Oa),Object.freeze(r),t&&me(r,function(o,n){return jt(n,!0)},!0)),r}function Oa(){j(2)}function Kt(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function Y(r){var t=Mt[r];return t||j(18,r),t}function Ca(r,t){Mt[r]||(Mt[r]=t)}function Dt(){return Ke}function kt(r,t){t&&(Y("Patches"),r.u=[],r.s=[],r.v=t)}function st(r){Bt(r),r.p.forEach(Ea),r.p=null}function Bt(r){r===Ke&&(Ke=r.l)}function po(r){return Ke={p:[],l:Ke,h:r,m:!0,_:0}}function Ea(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function Ft(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||Y("ES5").S(t,r,n),n?(o[L].P&&(st(t),j(4)),V(r)&&(r=lt(t,r),t.l||ut(t,r)),t.u&&Y("Patches").M(o[L].t,r,t.u,t.s)):r=lt(t,o,[]),st(t),t.u&&t.v(t.u,t.s),r!==Oo?r:void 0}function lt(r,t,o){if(Kt(t))return t;var n=t[L];if(!n)return me(t,function(u,f){return fo(r,n,t,u,f,o)},!0),t;if(n.A!==r)return t;if(!n.P)return ut(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=$t(n.k):n.o,c=a,l=!1;n.i===3&&(c=new Set(a),a.clear(),l=!0),me(c,function(u,f){return fo(r,n,a,u,f,o,l)}),ut(r,a,!1),o&&r.u&&Y("Patches").N(n,o,r.u,r.s)}return n.o}function fo(r,t,o,n,a,c,l){if(te(a)){var u=lt(r,a,c&&t&&t.i!==3&&!Se(t.R,n)?c.concat(n):void 0);if(xo(o,n,u),!te(u))return;r.m=!1}else l&&o.add(a);if(V(a)&&!Kt(a)){if(!r.h.D&&r._<1)return;lt(r,a),t&&t.A.l||ut(r,a)}}function ut(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&jt(t,o)}function Ut(r,t){var o=r[L];return(o?se(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 le(r){r.P||(r.P=!0,r.l&&le(r.l))}function _t(r){r.o||(r.o=$t(r.t))}function Wt(r,t,o){var n=zt(t)?Y("MapSet").F(t,o):Ht(t)?Y("MapSet").T(t,o):r.O?function(a,c){var l=Array.isArray(a),u={i:l?1:0,A:c?c.A:Dt(),P:!1,I:!1,R:{},l:c,t:a,k:null,o:null,j:null,C:!1},f=u,d=Ge;l&&(f=[u],d=je);var h=Proxy.revocable(f,d),y=h.revoke,g=h.proxy;return u.k=g,u.j=y,g}(t,o):Y("ES5").J(t,o);return(o?o.A:Dt()).p.push(n),n}function wa(r){return te(r)||j(22,r),function t(o){if(!V(o))return o;var n,a=o[L],c=Ce(o);if(a){if(!a.P&&(a.i<4||!Y("ES5").K(a)))return a.t;a.I=!0,n=yo(o,c),a.I=!1}else n=yo(o,c);return me(n,function(l,u){a&&Sa(a.t,l)===u||xo(n,l,t(u))}),c===3?new Set(n):n}(r)}function yo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return $t(r)}function So(){function r(l,u){var f=c[l];return f?f.enumerable=u:c[l]=f={configurable:!0,enumerable:u,get:function(){var d=this[L];return Ge.get(d,l)},set:function(d){var h=this[L];Ge.set(h,l,d)}},f}function t(l){for(var u=l.length-1;u>=0;u--){var f=l[u][L];if(!f.P)switch(f.i){case 5:n(f)&&le(f);break;case 4:o(f)&&le(f)}}}function o(l){for(var u=l.t,f=l.k,d=Oe(f),h=d.length-1;h>=0;h--){var y=d[h];if(y!==L){var g=u[y];if(g===void 0&&!Se(u,y))return!0;var v=f[y],b=v&&v[L];if(b?b.t!==g:!vo(v,g))return!0}}var S=!!u[L];return d.length!==Oe(u).length+(S?0:1)}function n(l){var u=l.k;if(u.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(u,u.length-1);if(f&&!f.get)return!0;for(var d=0;d<u.length;d++)if(!u.hasOwnProperty(d))return!0;return!1}function a(l){l.g&&j(3,JSON.stringify(se(l)))}var c={};Ca("ES5",{J:function(l,u){var f=Array.isArray(l),d=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Co(g);delete S[L];for(var R=Oe(S),E=0;E<R.length;E++){var w=R[E];S[w]=r(w,y||!!S[w].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(f,l),h={i:f?5:4,A:u?u.A:Dt(),P:!1,I:!1,R:{},l:u,t:l,k:d,o:null,g:!1,C:!1};return Object.defineProperty(d,L,{value:h,writable:!0}),d},S:function(l,u,f){f?te(u)&&u[L].A===l&&t(l.p):(l.u&&function d(h){if(h&&typeof h=="object"){var y=h[L];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)me(v,function(I){I!==L&&(g[I]!==void 0||Se(g,I)?b[I]||d(v[I]):(b[I]=!0,le(y)))}),me(g,function(I){v[I]!==void 0||Se(v,I)||(b[I]=!1,le(y))});else if(S===5){if(n(y)&&(le(y),b.length=!0),v.length<g.length)for(var R=v.length;R<g.length;R++)b[R]=!1;else for(var E=g.length;E<v.length;E++)b[E]=!0;for(var w=Math.min(v.length,g.length),T=0;T<w;T++)v.hasOwnProperty(T)||(b[T]=!0),b[T]===void 0&&d(v[T])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var go,Ke,Gt=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Aa=typeof Map<"u",Na=typeof Set<"u",mo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Oo=Gt?Symbol.for("immer-nothing"):((go={})["immer-nothing"]=!0,go),bo=Gt?Symbol.for("immer-draftable"):"__$immer_draftable",L=Gt?Symbol.for("immer-state"):"__$immer_state";var Ia=""+Object.prototype.constructor,Oe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Co=Object.getOwnPropertyDescriptors||function(r){var t={};return Oe(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Mt={},Ge={get:function(r,t){if(t===L)return r;var o=se(r);if(!Se(o,t))return function(a,c,l){var u,f=ho(c,l);return f?"value"in f?f.value:(u=f.get)===null||u===void 0?void 0:u.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!V(n)?n:n===Ut(r.t,t)?(_t(r),r.o[t]=Wt(r.A.h,n,r)):n},has:function(r,t){return t in se(r)},ownKeys:function(r){return Reflect.ownKeys(se(r))},set:function(r,t,o){var n=ho(se(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=Ut(se(r),t),c=a?.[L];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(vo(o,a)&&(o!==void 0||Se(r.t,t)))return!0;_t(r),le(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 Ut(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,_t(r),le(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=se(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){j(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){j(12)}},je={};me(Ge,function(r,t){je[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),je.deleteProperty=function(r,t){return je.set.call(this,r,t,void 0)},je.set=function(r,t,o){return Ge.set.call(this,r[0],t,o,r[0])};var Ra=function(){function r(o){var n=this;this.O=mo,this.D=!0,this.produce=function(a,c,l){if(typeof a=="function"&&typeof c!="function"){var u=c;c=a;var f=n;return function(S){var R=this;S===void 0&&(S=u);for(var E=arguments.length,w=Array(E>1?E-1:0),T=1;T<E;T++)w[T-1]=arguments[T];return f.produce(S,function(I){var q;return(q=c).call.apply(q,[R,I].concat(w))})}}var d;if(typeof c!="function"&&j(6),l!==void 0&&typeof l!="function"&&j(7),V(a)){var h=po(n),y=Wt(n,a,void 0),g=!0;try{d=c(y),g=!1}finally{g?st(h):Bt(h)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(S){return kt(h,l),Ft(S,h)},function(S){throw st(h),S}):(kt(h,l),Ft(d,h))}if(!a||typeof a!="object"){if((d=c(a))===void 0&&(d=a),d===Oo&&(d=void 0),n.D&&jt(d,!0),l){var v=[],b=[];Y("Patches").M(a,d,v,b),l(v,b)}return d}j(21,a)},this.produceWithPatches=function(a,c){if(typeof a=="function")return function(d){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(d,function(v){return a.apply(void 0,[v].concat(y))})};var l,u,f=n.produce(a,c,function(d,h){l=d,u=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(d){return[d,l,u]}):[f,l,u]},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){V(o)||j(8),te(o)&&(o=wa(o));var n=po(this),a=Wt(this,o,void 0);return a[L].C=!0,Bt(n),a},t.finishDraft=function(o,n){var a=o&&o[L],c=a.A;return kt(c,n),Ft(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!mo&&j(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var c=n[a];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}a>-1&&(n=n.slice(a+1));var l=Y("Patches").$;return te(o)?l(o,n):this.produce(o,function(u){return l(u,n)})},r}(),H=new Ra,Pa=H.produce,bc=H.produceWithPatches.bind(H),xc=H.setAutoFreeze.bind(H),vc=H.setUseProxies.bind(H),Sc=H.applyPatches.bind(H),Oc=H.createDraft.bind(H),Cc=H.finishDraft.bind(H),dt=Pa;function ue(r){"@babel/helpers - typeof";return ue=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},ue(r)}function Zt(r,t){if(ue(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(ue(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Vt(r){var t=Zt(r,"string");return ue(t)==="symbol"?t:String(t)}function qt(r,t,o){return t=Vt(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Eo(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function pt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Eo(Object(o),!0).forEach(function(n){qt(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Eo(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function M(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 wo=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yt=function(){return Math.random().toString(36).substring(7).split("").join(".")},ft={INIT:"@@redux/INIT"+Yt(),REPLACE:"@@redux/REPLACE"+Yt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yt()}};function Ta(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 Xt(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(M(1));return o(Xt)(r,t)}if(typeof r!="function")throw new Error(M(2));var a=r,c=t,l=[],u=l,f=!1;function d(){u===l&&(u=l.slice())}function h(){if(f)throw new Error(M(3));return c}function y(S){if(typeof S!="function")throw new Error(M(4));if(f)throw new Error(M(5));var R=!0;return d(),u.push(S),function(){if(R){if(f)throw new Error(M(6));R=!1,d();var w=u.indexOf(S);u.splice(w,1),l=null}}}function g(S){if(!Ta(S))throw new Error(M(7));if(typeof S.type>"u")throw new Error(M(8));if(f)throw new Error(M(9));try{f=!0,c=a(c,S)}finally{f=!1}for(var R=l=u,E=0;E<R.length;E++){var w=R[E];w()}return S}function v(S){if(typeof S!="function")throw new Error(M(10));a=S,g({type:ft.REPLACE})}function b(){var S,R=y;return S={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(M(11));function T(){w.next&&w.next(h())}T();var I=R(T);return{unsubscribe:I}}},S[wo]=function(){return this},S}return g({type:ft.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[wo]=b,n}function La(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:ft.INIT});if(typeof n>"u")throw new Error(M(12));if(typeof o(void 0,{type:ft.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Ao(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var c=Object.keys(o),l,u;try{La(o)}catch(f){u=f}return function(d,h){if(d===void 0&&(d={}),u)throw u;if(0)var y;for(var g=!1,v={},b=0;b<c.length;b++){var S=c[b],R=o[S],E=d[S],w=R(E,h);if(typeof w>"u"){var T=h&&h.type;throw new Error(M(14))}v[S]=w,g=g||w!==E}return g=g||c.length!==Object.keys(d).length,g?v:d}}function Ee(){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,a){return function(){return n(a.apply(void 0,arguments))}})}function No(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),c=function(){throw new Error(M(15))},l={getState:a.getState,dispatch:function(){return c.apply(void 0,arguments)}},u=t.map(function(f){return f(l)});return c=Ee.apply(void 0,u)(a.dispatch),pt(pt({},a),{},{dispatch:c})}}}function Io(r){var t=function(n){var a=n.dispatch,c=n.getState;return function(l){return function(u){return typeof u=="function"?u(a,c,r):l(u)}}};return t}var Ro=Io();Ro.withExtraArgument=Io;var Qt=Ro;var Fo=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(n[c]=a[c])},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)}}(),ka=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,a,c,l;return l={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function u(d){return function(h){return f([d,h])}}function f(d){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(c=d[0]&2?a.return:d[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,d[1])).done)return c;switch(a=0,c&&(d=[d[0]&2,c.value]),d[0]){case 0:case 1:c=d;break;case 4:return o.label++,{value:d[1],done:!1};case 5:o.label++,a=d[1],d=[0];continue;case 7:d=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!c||d[1]>c[0]&&d[1]<c[3])){o.label=d[1];break}if(d[0]===6&&o.label<c[1]){o.label=c[1],c=d;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(d);break}c[2]&&o.ops.pop(),o.trys.pop();continue}d=t.call(r,o)}catch(h){d=[6,h],a=0}finally{n=c=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},we=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},Fa=Object.defineProperty,Ua=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,Po=Object.getOwnPropertySymbols,Da=Object.prototype.hasOwnProperty,Ba=Object.prototype.propertyIsEnumerable,To=function(r,t,o){return t in r?Fa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},de=function(r,t){for(var o in t||(t={}))Da.call(t,o)&&To(r,o,t[o]);if(Po)for(var n=0,a=Po(t);n<a.length;n++){var o=a[n];Ba.call(t,o)&&To(r,o,t[o])}return r},Jt=function(r,t){return Ua(r,_a(t))},Wa=function(r,t,o){return new Promise(function(n,a){var c=function(f){try{u(o.next(f))}catch(d){a(d)}},l=function(f){try{u(o.throw(f))}catch(d){a(d)}},u=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(c,l)};u((o=o.apply(r,t)).next())})};var Ma=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ee:Ee.apply(null,arguments)},zc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function za(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 Ha=function(r){Fo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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,we([void 0],o[0].concat(this)))):new(t.bind.apply(t,we([void 0],o.concat(this))))},t}(Array),$a=function(r){Fo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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,we([void 0],o[0].concat(this)))):new(t.bind.apply(t,we([void 0],o.concat(this))))},t}(Array);function rr(r){return V(r)?dt(r,function(){}):r}function ja(r){return typeof r=="boolean"}function Ka(){return function(t){return Ga(t)}}function Ga(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,u=new Ha;if(o&&(ja(o)?u.push(Qt):u.push(Qt.withExtraArgument(o.extraArgument))),0){if(a)var f;if(l)var d}return u}var er=!0;function Uo(r){var t=Ka(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,u=o.devTools,f=u===void 0?!0:u,d=o.preloadedState,h=d===void 0?void 0:d,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(za(a))v=Ao(a);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),!er&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!er&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=No.apply(void 0,b),R=Ee;f&&(R=Ma(de({trace:!er},typeof f=="object"&&f)));var E=new $a(S),w=E;Array.isArray(g)?w=we([S],g):typeof g=="function"&&(w=g(E));var T=R.apply(void 0,w);return Xt(v,h,T)}function pe(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return de(de({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.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 _o(r){var t={},o=[],n,a={addCase:function(c,l){var u=typeof c=="string"?c:c.type;if(u in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[u]=l,a},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),a},addDefaultCase:function(c){return n=c,a}};return r(a),[t,o,n]}function Za(r){return typeof r=="function"}function Va(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?_o(t):[t,o,n],c=a[0],l=a[1],u=a[2],f;if(Za(r))f=function(){return rr(r())};else{var d=rr(r);f=function(){return d}}function h(y,g){y===void 0&&(y=f());var v=we([c[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[u]),v.reduce(function(b,S){if(S)if(te(b)){var R=b,E=S(R,g);return E===void 0?b:E}else{if(V(b))return dt(b,function(w){return S(w,g)});var E=S(b,g);if(E===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return b},y)}return h.getInitialState=f,h}function qa(r,t){return r+"/"+t}function Do(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:rr(r.initialState),n=r.reducers||{},a=Object.keys(n),c={},l={},u={};a.forEach(function(h){var y=n[h],g=qa(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,c[h]=v,l[g]=v,u[h]=b?pe(g,b):pe(g)});function f(){var h=typeof r.extraReducers=="function"?_o(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],R=S===void 0?void 0:S,E=de(de({},g),l);return Va(o,function(w){for(var T in E)w.addCase(T,E[T]);for(var I=0,q=b;I<q.length;I++){var G=q[I];w.addMatcher(G.matcher,G.reducer)}R&&w.addDefaultCase(R)})}var d;return{name:t,reducer:function(h,y){return d||(d=f()),d(h,y)},actions:u,caseReducers:c,getInitialState:function(){return d||(d=f()),d.getInitialState()}}}var Ya="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xa=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ya[Math.random()*64|0];return t},Qa=["name","message","stack","code"],tr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Lo=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Ja=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Qa;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},Kc=function(){function r(t,o,n){var a=pe(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Jt(de({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),c=pe(t+"/pending",function(h,y,g){return{payload:void 0,meta:Jt(de({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=pe(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||Ja)(h||"Rejected"),meta:Jt(de({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),u=!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 d(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):Xa(),S=new f,R,E=!1;function w(I){R=I,S.abort()}var T=function(){return Wa(this,null,function(){var I,q,G,W,Xe,X,p;return ka(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),W=(I=n?.condition)==null?void 0:I.call(n,h,{getState:g,extra:v}),ti(W)?[4,W]:[3,2];case 1:W=m.sent(),m.label=2;case 2:if(W===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Xe=new Promise(function(O,k){return S.signal.addEventListener("abort",function(){return k({name:"AbortError",message:R||"Aborted"})})}),y(c(b,h,(q=n?.getPendingMeta)==null?void 0:q.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([Xe,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:w,rejectWithValue:function(O,k){return new tr(O,k)},fulfillWithValue:function(O,k){return new Lo(O,k)}})).then(function(O){if(O instanceof tr)throw O;return O instanceof Lo?a(O.payload,b,h,O.meta):a(O,b,h)})])];case 3:return G=m.sent(),[3,5];case 4:return X=m.sent(),G=X instanceof tr?l(null,b,h,X.payload,X.meta):l(X,b,h),[3,5];case 5:return p=n&&!n.dispatchConditionRejection&&l.match(G)&&G.meta.condition,p||y(G),[2,G]}})})}();return Object.assign(T,{abort:w,requestId:b,arg:h,unwrap:function(){return T.then(ei)}})}}return Object.assign(d,{pending:c,rejected:l,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function ei(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function ti(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Bo="listener",Wo="completed",Mo="cancelled",Gc="task-"+Mo,Zc="task-"+Wo,Vc=Bo+"-"+Mo,qc=Bo+"-"+Wo;var or="listenerMiddleware";var Yc=pe(or+"/add"),Xc=pe(or+"/removeAll"),Qc=pe(or+"/remove");var ko,Jc=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(ko||(ko=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},ri=function(r){return function(t){setTimeout(t,r)}},es=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ri(10);So();window.ftReduxStores||(window.ftReduxStores={});var zo=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(He(c))return c;if(a==null)return;let l=Do({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),u=Uo({reducer:(f,d)=>d.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...d.overwrites}:l.reducer(f,d)});return window.ftReduxStores[a.name]=new r(l,u)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new rt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,c)=>{let l=a,u=n[l];return u?(...f)=>{let d=u(...f);return this.reduxStore.dispatch(d),d}:f=>{this.setState({[l]:f})}}})}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 mt=N(B());var ht=class extends ee{async listMySearches(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var yt=class extends ee{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ni="ft-user-assets",gt=mt.FtReduxStore.get({name:ni,initialState:{savedSearches:void 0,bookmarks:void 0}}),nr=class{constructor(){this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new yt,this.savedSearchesService=new ht,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=A.getState();(0,mt.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(),gt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),gt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();gt.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;gt.actions.bookmarks(o)}}},Rs=new nr;var ar=class{addCommand(t,o=!1){A.commands.add(t,o)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ar;var Ho=N(B()),ir=class{highlightHtml(t,o,n){(0,Ho.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ir;var $o=N(B());var cr=class{isDate(t){var o,n,a,c;return(c=(a=((n=(o=A.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===t))===null||a===void 0?void 0:a.date)!==null&&c!==void 0?c:!1}format(t,o){var n,a,c;return $o.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:A.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new cr;(0,jo.customElement)("ft-app-context")(F);var sr=class r extends Event{constructor(){super(r.eventName)}};sr.eventName="search-context-clear-all-filters";var ai=function(r,t,o,n){var a=arguments.length,c=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(c=(a<3?l(c):a>3?l(t,o,c):l(t,o))||c);return a>3&&c&&Object.defineProperty(t,o,c),c},dr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ur=Symbol("registerInterval");function ii(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setSearchStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ur]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ur]):this.dispatchEvent(new dr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=ur,ai([(0,Go.state)()],o.prototype,"stateManager",void 0),o}var bt=class extends ii(Ko.FtLitElementRedux){};var xt=N(J()),pr=function(r,t,o,n){var a=arguments.length,c=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(l=r[u])&&(c=(a<3?l(c):a>3?l(t,o,c):l(t,o))||c);return a>3&&c&&Object.defineProperty(t,o,c),c},hr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},fr=Symbol("registerInterval");function ci(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setResultStateManager(a){this.resultStateManager=a}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[fr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[fr]):this.dispatchEvent(new hr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=fr,pr([(0,xt.property)({attribute:!1})],o.prototype,"cluster",void 0),pr([(0,xt.property)({attribute:!1})],o.prototype,"result",void 0),pr([(0,xt.property)({attribute:!1,type:Number})],o.prototype,"rank",void 0),o}var vt=class extends ci(bt){};var Zo=N(Q()),Vo=N(B()),si={highlightBackgroundColor:Vo.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},qo=Zo.css`
|
|
5
5
|
.kwicmatch {
|