@fluid-topics/ft-reader-topic-content 1.3.16 → 1.3.17

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,7 +1,7 @@
1
- "use strict";(()=>{var Si=Object.create;var mr=Object.defineProperty;var xi=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var _i=Object.getPrototypeOf,Ti=Object.prototype.hasOwnProperty;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var wi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oi(t))!Ti.call(e,i)&&i!==r&&mr(e,i,{get:()=>t[i],enumerable:!(n=xi(t,i))||n.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Si(_i(e)):{},wi(t||!e||!e.__esModule?mr(r,"default",{value:e,enumerable:!0}):r,e));var N=Ue((Pa,vr)=>{vr.exports=ftGlobals.wcUtils});var ee=Ue((La,yr)=>{yr.exports=ftGlobals.lit});var q=Ue((Da,Ar)=>{Ar.exports=ftGlobals.litDecorators});var kt=Ue((Ba,Tr)=>{Tr.exports=ftGlobals.litUnsafeHTML});var Br=Ue((ue,jr)=>{var it=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,at=function(){function e(){this.fetch=!1,this.DOMException=it.DOMException}return e.prototype=it,new e}();(function(e){var t=function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function a(l){return l&&DataView.prototype.isPrototypeOf(l)}if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(l){return l&&s.indexOf(Object.prototype.toString.call(l))>-1};function u(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l)||l==="")throw new TypeError('Invalid character in header field name: "'+l+'"');return l.toLowerCase()}function c(l){return typeof l!="string"&&(l=String(l)),l}function d(l){var f={next:function(){var E=l.shift();return{done:E===void 0,value:E}}};return i.iterable&&(f[Symbol.iterator]=function(){return f}),f}function h(l){this.map={},l instanceof h?l.forEach(function(f,E){this.append(E,f)},this):Array.isArray(l)?l.forEach(function(f){if(f.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+f.length);this.append(f[0],f[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(f){this.append(f,l[f])},this)}h.prototype.append=function(l,f){l=u(l),f=c(f);var E=this.map[l];this.map[l]=E?E+", "+f:f},h.prototype.delete=function(l){delete this.map[u(l)]},h.prototype.get=function(l){return l=u(l),this.has(l)?this.map[l]:null},h.prototype.has=function(l){return this.map.hasOwnProperty(u(l))},h.prototype.set=function(l,f){this.map[u(l)]=c(f)},h.prototype.forEach=function(l,f){for(var E in this.map)this.map.hasOwnProperty(E)&&l.call(f,this.map[E],E,this)},h.prototype.keys=function(){var l=[];return this.forEach(function(f,E){l.push(E)}),d(l)},h.prototype.values=function(){var l=[];return this.forEach(function(f){l.push(f)}),d(l)},h.prototype.entries=function(){var l=[];return this.forEach(function(f,E){l.push([E,f])}),d(l)},i.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function p(l){if(!l._noBody){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}}function g(l){return new Promise(function(f,E){l.onload=function(){f(l.result)},l.onerror=function(){E(l.error)}})}function v(l){var f=new FileReader,E=g(f);return f.readAsArrayBuffer(l),E}function y(l){var f=new FileReader,E=g(f),w=/charset=([A-Za-z0-9_-]+)/.exec(l.type),L=w?w[1]:"utf-8";return f.readAsText(l,L),E}function _(l){for(var f=new Uint8Array(l),E=new Array(f.length),w=0;w<f.length;w++)E[w]=String.fromCharCode(f[w]);return E.join("")}function S(l){if(l.slice)return l.slice(0);var f=new Uint8Array(l.byteLength);return f.set(new Uint8Array(l)),f.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(l){this.bodyUsed=this.bodyUsed,this._bodyInit=l,l?typeof l=="string"?this._bodyText=l:i.blob&&Blob.prototype.isPrototypeOf(l)?this._bodyBlob=l:i.formData&&FormData.prototype.isPrototypeOf(l)?this._bodyFormData=l:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)?this._bodyText=l.toString():i.arrayBuffer&&i.blob&&a(l)?(this._bodyArrayBuffer=S(l.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(l)||o(l))?this._bodyArrayBuffer=S(l):this._bodyText=l=Object.prototype.toString.call(l):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof l=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var l=p(this);if(l)return l;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(){if(this._bodyArrayBuffer){var l=p(this);return l||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var l=p(this);if(l)return l;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function T(l){var f=l.toUpperCase();return C.indexOf(f)>-1?f:l}function k(l,f){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');f=f||{};var E=f.body;if(l instanceof k){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,f.headers||(this.headers=new h(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!E&&l._bodyInit!=null&&(E=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=f.credentials||this.credentials||"same-origin",(f.headers||!this.headers)&&(this.headers=new h(f.headers)),this.method=T(f.method||this.method||"GET"),this.mode=f.mode||this.mode||null,this.signal=f.signal||this.signal||function(){if("AbortController"in n){var O=new AbortController;return O.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(f.cache==="no-store"||f.cache==="no-cache")){var w=/([?&])_=[^&]*/;if(w.test(this.url))this.url=this.url.replace(w,"$1_="+new Date().getTime());else{var L=/\?/;this.url+=(L.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function $(l){var f=new FormData;return l.trim().split("&").forEach(function(E){if(E){var w=E.split("="),L=w.shift().replace(/\+/g," "),O=w.join("=").replace(/\+/g," ");f.append(decodeURIComponent(L),decodeURIComponent(O))}}),f}function ye(l){var f=new h,E=l.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(w){return w.indexOf(`
2
- `)===0?w.substr(1,w.length):w}).forEach(function(w){var L=w.split(":"),O=L.shift().trim();if(O){var ze=L.join(":").trim();try{f.append(O,ze)}catch(Pt){console.warn("Response "+Pt.message)}}}),f}x.call(k.prototype);function K(l,f){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(f||(f={}),this.type="default",this.status=f.status===void 0?200:f.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=f.statusText===void 0?"":""+f.statusText,this.headers=new h(f.headers),this.url=f.url||"",this._initBody(l)}x.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},K.error=function(){var l=new K(null,{status:200,statusText:""});return l.ok=!1,l.status=0,l.type="error",l};var ge=[301,302,303,307,308];K.redirect=function(l,f){if(ge.indexOf(f)===-1)throw new RangeError("Invalid status code");return new K(null,{status:f,headers:{location:l}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(f,E){this.message=f,this.name=E;var w=Error(f);this.stack=w.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function we(l,f){return new Promise(function(E,w){var L=new k(l,f);if(L.signal&&L.signal.aborted)return w(new r.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function ze(){O.abort()}O.onload=function(){var U={statusText:O.statusText,headers:ye(O.getAllResponseHeaders()||"")};L.url.indexOf("file://")===0&&(O.status<200||O.status>599)?U.status=200:U.status=O.status,U.url="responseURL"in O?O.responseURL:U.headers.get("X-Request-URL");var be="response"in O?O.response:O.responseText;setTimeout(function(){E(new K(be,U))},0)},O.onerror=function(){setTimeout(function(){w(new TypeError("Network request failed"))},0)},O.ontimeout=function(){setTimeout(function(){w(new TypeError("Network request timed out"))},0)},O.onabort=function(){setTimeout(function(){w(new r.DOMException("Aborted","AbortError"))},0)};function Pt(U){try{return U===""&&n.location.href?n.location.href:U}catch{return U}}if(O.open(L.method,Pt(L.url),!0),L.credentials==="include"?O.withCredentials=!0:L.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&(i.blob?O.responseType="blob":i.arrayBuffer&&(O.responseType="arraybuffer")),f&&typeof f.headers=="object"&&!(f.headers instanceof h||n.Headers&&f.headers instanceof n.Headers)){var hr=[];Object.getOwnPropertyNames(f.headers).forEach(function(U){hr.push(u(U)),O.setRequestHeader(U,c(f.headers[U]))}),L.headers.forEach(function(U,be){hr.indexOf(be)===-1&&O.setRequestHeader(be,U)})}else L.headers.forEach(function(U,be){O.setRequestHeader(be,U)});L.signal&&(L.signal.addEventListener("abort",ze),O.onreadystatechange=function(){O.readyState===4&&L.signal.removeEventListener("abort",ze)}),O.send(typeof L._bodyInit>"u"?null:L._bodyInit)})}return we.polyfill=!0,n.fetch||(n.fetch=we,n.Headers=h,n.Request=k,n.Response=K),r.Headers=h,r.Request=k,r.Response=K,r.fetch=we,r}({})})(at);at.fetch.ponyfill=!0;delete at.fetch.polyfill;var Pe=it.fetch?it:at;ue=Pe.fetch;ue.default=Pe.fetch;ue.fetch=Pe.fetch;ue.Headers=Pe.Headers;ue.Request=Pe.Request;ue.Response=Pe.Response;jr.exports=ue});var Ai=A(N());var me=A(ee());var br=A(ee()),Ce=A(N()),gr={colorError:Ce.FtCssVariableFactory.external(Ce.designSystemVariables.colorError,"Design system"),fontFamily:Ce.FtCssVariableFactory.external(Ce.designSystemVariables.contentFont,"Design system")},Er=br.css`
1
+ "use strict";(()=>{var Oi=Object.create;var vr=Object.defineProperty;var _i=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,wi=Object.prototype.hasOwnProperty;var je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ri=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ti(t))!wi.call(e,i)&&i!==r&&vr(e,i,{get:()=>t[i],enumerable:!(n=_i(t,i))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?Oi(Ci(e)):{},Ri(t||!e||!e.__esModule?vr(r,"default",{value:e,enumerable:!0}):r,e));var N=je((Na,yr)=>{yr.exports=ftGlobals.wcUtils});var te=je((Da,gr)=>{gr.exports=ftGlobals.lit});var q=je((Ma,Sr)=>{Sr.exports=ftGlobals.litDecorators});var Ut=je((Ka,Cr)=>{Cr.exports=ftGlobals.litUnsafeHTML});var Hr=je((ue,Br)=>{var at=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,st=function(){function e(){this.fetch=!1,this.DOMException=at.DOMException}return e.prototype=at,new e}();(function(e){var t=function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function a(l){return l&&DataView.prototype.isPrototypeOf(l)}if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(l){return l&&s.indexOf(Object.prototype.toString.call(l))>-1};function u(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l)||l==="")throw new TypeError('Invalid character in header field name: "'+l+'"');return l.toLowerCase()}function c(l){return typeof l!="string"&&(l=String(l)),l}function d(l){var f={next:function(){var A=l.shift();return{done:A===void 0,value:A}}};return i.iterable&&(f[Symbol.iterator]=function(){return f}),f}function h(l){this.map={},l instanceof h?l.forEach(function(f,A){this.append(A,f)},this):Array.isArray(l)?l.forEach(function(f){if(f.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+f.length);this.append(f[0],f[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(f){this.append(f,l[f])},this)}h.prototype.append=function(l,f){l=u(l),f=c(f);var A=this.map[l];this.map[l]=A?A+", "+f:f},h.prototype.delete=function(l){delete this.map[u(l)]},h.prototype.get=function(l){return l=u(l),this.has(l)?this.map[l]:null},h.prototype.has=function(l){return this.map.hasOwnProperty(u(l))},h.prototype.set=function(l,f){this.map[u(l)]=c(f)},h.prototype.forEach=function(l,f){for(var A in this.map)this.map.hasOwnProperty(A)&&l.call(f,this.map[A],A,this)},h.prototype.keys=function(){var l=[];return this.forEach(function(f,A){l.push(A)}),d(l)},h.prototype.values=function(){var l=[];return this.forEach(function(f){l.push(f)}),d(l)},h.prototype.entries=function(){var l=[];return this.forEach(function(f,A){l.push([A,f])}),d(l)},i.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function p(l){if(!l._noBody){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}}function g(l){return new Promise(function(f,A){l.onload=function(){f(l.result)},l.onerror=function(){A(l.error)}})}function v(l){var f=new FileReader,A=g(f);return f.readAsArrayBuffer(l),A}function y(l){var f=new FileReader,A=g(f),C=/charset=([A-Za-z0-9_-]+)/.exec(l.type),P=C?C[1]:"utf-8";return f.readAsText(l,P),A}function _(l){for(var f=new Uint8Array(l),A=new Array(f.length),C=0;C<f.length;C++)A[C]=String.fromCharCode(f[C]);return A.join("")}function S(l){if(l.slice)return l.slice(0);var f=new Uint8Array(l.byteLength);return f.set(new Uint8Array(l)),f.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(l){this.bodyUsed=this.bodyUsed,this._bodyInit=l,l?typeof l=="string"?this._bodyText=l:i.blob&&Blob.prototype.isPrototypeOf(l)?this._bodyBlob=l:i.formData&&FormData.prototype.isPrototypeOf(l)?this._bodyFormData=l:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)?this._bodyText=l.toString():i.arrayBuffer&&i.blob&&a(l)?(this._bodyArrayBuffer=S(l.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(l)||o(l))?this._bodyArrayBuffer=S(l):this._bodyText=l=Object.prototype.toString.call(l):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof l=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var l=p(this);if(l)return l;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(){if(this._bodyArrayBuffer){var l=p(this);return l||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var l=p(this);if(l)return l;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function T(l){var f=l.toUpperCase();return w.indexOf(f)>-1?f:l}function k(l,f){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');f=f||{};var A=f.body;if(l instanceof k){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,f.headers||(this.headers=new h(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!A&&l._bodyInit!=null&&(A=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=f.credentials||this.credentials||"same-origin",(f.headers||!this.headers)&&(this.headers=new h(f.headers)),this.method=T(f.method||this.method||"GET"),this.mode=f.mode||this.mode||null,this.signal=f.signal||this.signal||function(){if("AbortController"in n){var O=new AbortController;return O.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&A)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(A),(this.method==="GET"||this.method==="HEAD")&&(f.cache==="no-store"||f.cache==="no-cache")){var C=/([?&])_=[^&]*/;if(C.test(this.url))this.url=this.url.replace(C,"$1_="+new Date().getTime());else{var P=/\?/;this.url+=(P.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function z(l){var f=new FormData;return l.trim().split("&").forEach(function(A){if(A){var C=A.split("="),P=C.shift().replace(/\+/g," "),O=C.join("=").replace(/\+/g," ");f.append(decodeURIComponent(P),decodeURIComponent(O))}}),f}function ye(l){var f=new h,A=l.replace(/\r?\n[\t ]+/g," ");return A.split("\r").map(function(C){return C.indexOf(`
2
+ `)===0?C.substr(1,C.length):C}).forEach(function(C){var P=C.split(":"),O=P.shift().trim();if(O){var Ye=P.join(":").trim();try{f.append(O,Ye)}catch(Pt){console.warn("Response "+Pt.message)}}}),f}x.call(k.prototype);function K(l,f){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(f||(f={}),this.type="default",this.status=f.status===void 0?200:f.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=f.statusText===void 0?"":""+f.statusText,this.headers=new h(f.headers),this.url=f.url||"",this._initBody(l)}x.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},K.error=function(){var l=new K(null,{status:200,statusText:""});return l.ok=!1,l.status=0,l.type="error",l};var ge=[301,302,303,307,308];K.redirect=function(l,f){if(ge.indexOf(f)===-1)throw new RangeError("Invalid status code");return new K(null,{status:f,headers:{location:l}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(f,A){this.message=f,this.name=A;var C=Error(f);this.stack=C.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Ce(l,f){return new Promise(function(A,C){var P=new k(l,f);if(P.signal&&P.signal.aborted)return C(new r.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function Ye(){O.abort()}O.onload=function(){var U={statusText:O.statusText,headers:ye(O.getAllResponseHeaders()||"")};P.url.indexOf("file://")===0&&(O.status<200||O.status>599)?U.status=200:U.status=O.status,U.url="responseURL"in O?O.responseURL:U.headers.get("X-Request-URL");var be="response"in O?O.response:O.responseText;setTimeout(function(){A(new K(be,U))},0)},O.onerror=function(){setTimeout(function(){C(new TypeError("Network request failed"))},0)},O.ontimeout=function(){setTimeout(function(){C(new TypeError("Network request timed out"))},0)},O.onabort=function(){setTimeout(function(){C(new r.DOMException("Aborted","AbortError"))},0)};function Pt(U){try{return U===""&&n.location.href?n.location.href:U}catch{return U}}if(O.open(P.method,Pt(P.url),!0),P.credentials==="include"?O.withCredentials=!0:P.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&(i.blob?O.responseType="blob":i.arrayBuffer&&(O.responseType="arraybuffer")),f&&typeof f.headers=="object"&&!(f.headers instanceof h||n.Headers&&f.headers instanceof n.Headers)){var mr=[];Object.getOwnPropertyNames(f.headers).forEach(function(U){mr.push(u(U)),O.setRequestHeader(U,c(f.headers[U]))}),P.headers.forEach(function(U,be){mr.indexOf(be)===-1&&O.setRequestHeader(be,U)})}else P.headers.forEach(function(U,be){O.setRequestHeader(be,U)});P.signal&&(P.signal.addEventListener("abort",Ye),O.onreadystatechange=function(){O.readyState===4&&P.signal.removeEventListener("abort",Ye)}),O.send(typeof P._bodyInit>"u"?null:P._bodyInit)})}return Ce.polyfill=!0,n.fetch||(n.fetch=Ce,n.Headers=h,n.Request=k,n.Response=K),r.Headers=h,r.Request=k,r.Response=K,r.fetch=Ce,r}({})})(st);st.fetch.ponyfill=!0;delete st.fetch.polyfill;var Pe=at.fetch?at:st;ue=Pe.fetch;ue.default=Pe.fetch;ue.fetch=Pe.fetch;ue.Headers=Pe.Headers;ue.Request=Pe.Request;ue.Response=Pe.Response;Br.exports=ue});var xi=E(N());var me=E(te());var Ar=E(te()),we=E(N()),br={colorError:we.FtCssVariableFactory.external(we.designSystemVariables.colorError,"Design system"),fontFamily:we.FtCssVariableFactory.external(we.designSystemVariables.contentFont,"Design system")},Er=Ar.css`
3
3
  .topic {
4
- font-family: ${gr.fontFamily};
4
+ font-family: ${br.fontFamily};
5
5
  overflow-x: auto;
6
6
  }
7
7
 
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  .topic-on-error ft-icon {
14
- color: ${gr.colorError}
14
+ color: ${br.colorError}
15
15
  }
16
16
 
17
17
  .topic-loading {
@@ -26,7 +26,7 @@
26
26
  ft-skeleton {
27
27
  height: 100px;
28
28
  }
29
- `;var Xe=A(q());var Or=A(N()),_r=A(q());var Sr;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change"})(Sr||(Sr={}));var xr;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(xr||(xr={}));var Ci=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Nt=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Lt=Symbol("registerInterval");function Ri(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[Lt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Lt]):this.dispatchEvent(new Nt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Lt,Ci([(0,_r.state)()],r.prototype,"stateManager",void 0),r}var Ye=class extends Ri(Or.FtLitElementRedux){};var Dt=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Mt=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},It=Symbol("registerInterval");function Pi(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[It]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[It]):this.dispatchEvent(new Mt)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=It,Dt([(0,Xe.state)()],r.prototype,"tocNode",void 0),Dt([(0,Xe.state)()],r.prototype,"disableContextInteractions",void 0),Dt([(0,Xe.state)()],r.prototype,"headingLevelsShift",void 0),r}var Je=class extends Pi(Ye){};var Ei=A(kt()),H=A(N()),ve=A(q());var Lr=A(N());var je=A(ee()),oe=A(q()),Rr=A(N()),Pr=A(kt());var Qe;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;"})(Qe||(Qe={}));var m;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(m||(m={}));var Ha=new Map([...["abw"].map(e=>[e,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,m.AUDIO]),...["avi"].map(e=>[e,m.AVI]),...["chm","xhs"].map(e=>[e,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,m.CODE]),...["csv"].map(e=>[e,m.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,m.DITA]),...["epub"].map(e=>[e,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,m.EXCEL]),...["flac"].map(e=>[e,m.FLAC]),...["gif"].map(e=>[e,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,m.GZIP]),...["html","htm","xhtml"].map(e=>[e,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,m.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,m.JPEG]),...["json"].map(e=>[e,m.JSON]),...["m4a","m4p"].map(e=>[e,m.M4A]),...["mov","qt"].map(e=>[e,m.MOV]),...["mp3"].map(e=>[e,m.MP3]),...["mp4","m4v"].map(e=>[e,m.MP4]),...["ogg","oga"].map(e=>[e,m.OGG]),...["pdf","ps"].map(e=>[e,m.PDF]),...["png"].map(e=>[e,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,m.POWERPOINT]),...["rar"].map(e=>[e,m.RAR]),...["stp"].map(e=>[e,m.STP]),...["txt","rtf","md","mdown"].map(e=>[e,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,m.VIDEO]),...["wav"].map(e=>[e,m.WAV]),...["wma"].map(e=>[e,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,m.WORD]),...["xml","xsl","rdf"].map(e=>[e,m.XML]),...["yaml","yml","x-yaml"].map(e=>[e,m.YAML]),...["zip"].map(e=>[e,m.ZIP])]);var Ka={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var wr=A(ee()),z=A(N()),ne={size:z.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:z.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:z.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:z.FtCssVariableFactory.extend("--ft-icon-material-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:z.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Cr=[wr.css`
29
+ `;var Je=E(q());var _r=E(N()),Tr=E(q());var xr;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change"})(xr||(xr={}));var Or;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Or||(Or={}));var Li=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Dt=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Nt=Symbol("registerInterval");function Pi(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[Nt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Nt]):this.dispatchEvent(new Dt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Nt,Li([(0,Tr.state)()],r.prototype,"stateManager",void 0),r}var Xe=class extends Pi(_r.FtLitElementRedux){};var It=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},kt=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},Mt=Symbol("registerInterval");function Ni(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[Mt]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[Mt]):this.dispatchEvent(new kt)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=Mt,It([(0,Je.state)()],r.prototype,"tocNode",void 0),It([(0,Je.state)()],r.prototype,"disableContextInteractions",void 0),It([(0,Je.state)()],r.prototype,"headingLevelsShift",void 0),r}var Qe=class extends Ni(Xe){};var Si=E(Ut()),H=E(N()),ve=E(q());var Nr=E(N());var Be=E(te()),oe=E(q()),Lr=E(N()),Pr=E(Ut());var Ze;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;"})(Ze||(Ze={}));var m;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(m||(m={}));var Va=new Map([...["abw"].map(e=>[e,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,m.AUDIO]),...["avi"].map(e=>[e,m.AVI]),...["chm","xhs"].map(e=>[e,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,m.CODE]),...["csv"].map(e=>[e,m.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,m.DITA]),...["epub"].map(e=>[e,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,m.EXCEL]),...["flac"].map(e=>[e,m.FLAC]),...["gif"].map(e=>[e,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,m.GZIP]),...["html","htm","xhtml"].map(e=>[e,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,m.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,m.JPEG]),...["json"].map(e=>[e,m.JSON]),...["m4a","m4p"].map(e=>[e,m.M4A]),...["mov","qt"].map(e=>[e,m.MOV]),...["mp3"].map(e=>[e,m.MP3]),...["mp4","m4v"].map(e=>[e,m.MP4]),...["ogg","oga"].map(e=>[e,m.OGG]),...["pdf","ps"].map(e=>[e,m.PDF]),...["png"].map(e=>[e,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,m.POWERPOINT]),...["rar"].map(e=>[e,m.RAR]),...["stp"].map(e=>[e,m.STP]),...["txt","rtf","md","mdown"].map(e=>[e,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,m.VIDEO]),...["wav"].map(e=>[e,m.WAV]),...["wma"].map(e=>[e,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,m.WORD]),...["xml","xsl","rdf"].map(e=>[e,m.XML]),...["yaml","yml","x-yaml"].map(e=>[e,m.YAML]),...["zip"].map(e=>[e,m.ZIP])]);var Ga={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var wr=E(te()),Y=E(N()),ne={size:Y.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Y.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Y.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Y.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Y.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Y.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Y.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Y.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Rr=[wr.css`
30
30
  :host, i.ft-icon {
31
31
  display: inline-flex;
32
32
  align-items: center;
@@ -74,20 +74,20 @@
74
74
  .ft-icon--material {
75
75
  font-family: ${ne.materialFontFamily}, "Material Icons", sans-serif;
76
76
  }
77
- `,z.noTextSelect];var se;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(se||(se={}));var Be=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Y=class extends Rr.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=je.nothing}render(){let t=this.variant&&Object.values(se).includes(this.variant)?this.variant:se.fluid_topics,r=t!==se.material||!!this.value;return je.html`
77
+ `,Y.noTextSelect];var se;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(se||(se={}));var He=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},X=class extends Lr.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Be.nothing}render(){let t=this.variant&&Object.values(se).includes(this.variant)?this.variant:se.fluid_topics,r=t!==se.material||!!this.value;return Be.html`
78
78
  <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
79
79
  ${(0,Pr.unsafeHTML)(this.resolvedIcon)}
80
80
  <slot ?hidden=${r}></slot>
81
81
  </i>
82
- `}get textContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.textContent;switch(this.variant){case se.file_format:this.resolvedIcon=(t=m[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case se.material:this.resolvedIcon=this.value||je.nothing;break;default:this.resolvedIcon=(r=Qe[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};Y.elementDefinitions={};Y.styles=Cr;Be([(0,oe.property)()],Y.prototype,"variant",void 0);Be([(0,oe.property)()],Y.prototype,"value",void 0);Be([(0,oe.property)({reflect:!0,attribute:"aria-hidden"})],Y.prototype,"ariaHidden",void 0);Be([(0,oe.state)()],Y.prototype,"resolvedIcon",void 0);Be([(0,oe.query)("slot")],Y.prototype,"slottedContent",void 0);(0,Lr.customElement)("ft-icon")(Y);var bi=A(N());var Tt=A(ee()),wt=A(q()),Ct=A(N());var Nr=A(ee());var Dr=Nr.css`
83
- `;var _t=A(N());var di=A(N());var En=A(ee()),j=A(q()),J=A(N());var Ir=A(ee());var Mr=Ir.css`
84
- `;var Ze=A(N()),Li="ft-app-info",Ee=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ee.eventName="authentication-change";var Ni={session:(e,t)=>{(0,Ze.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>b.dispatchEvent(new Ee(t.payload)),0))}},b=Ze.FtReduxStore.get({name:Li,reducers:Ni,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var Ut=A(N());var Ae=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=b.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var et=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ae.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ae.await()}};var X=class extends et{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Ut.CacheRegistry,this.cache=t?i.commonCache:new Ut.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var tt=class extends X{async listMyBookmarks(){let t=b.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var jt=class{addCommand(t,r=!1){b.commands.add(t,r)}consumeCommand(t){return b.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new jt;var te=A(N());var kr,Di=Symbol("clearAfterUnitTest"),rt=class extends X{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[kr]=()=>{this.defaultMessages={},this.cache=new te.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=b.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,te.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let a=t.toLowerCase(),s=this.resolveContext(a);return new te.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof te.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}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(r=>(0,te.delay)(0).then(()=>r()).catch(()=>null)))}};kr=Di;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends rt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends rt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Re=window.FluidTopicsI18nService,nt=window.FluidTopicsCustomI18nService;var Ur=A(N()),Bt=class{highlightHtml(t,r,n){(0,Ur.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Bt;var Mi=A(Br(),1);var Hr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Hr||(Hr={}));var Kr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Kr||(Kr={}));var Vr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE"})(Vr||(Vr={}));var Gr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE"})(Gr||(Gr={}));var qr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(qr||(qr={}));var Wr;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Wr||(Wr={}));var Fr;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Fr||(Fr={}));var $r;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})($r||($r={}));var zr;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT"})(zr||(zr={}));var Yr;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Yr||(Yr={}));var Xr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Xr||(Xr={}));var Jr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Jr||(Jr={}));var Qr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Qr||(Qr={}));var Zr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Zr||(Zr={}));var en;(function(e){e.ASC="ASC",e.DESC="DESC"})(en||(en={}));var tn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(tn||(tn={}));var rn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(rn||(rn={}));var nn;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(nn||(nn={}));var an;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(an||(an={}));var sn;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(sn||(sn={}));var on;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(on||(on={}));var un;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(un||(un={}));var ln;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ln||(ln={}));var D;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(D||(D={}));var Se;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Se||(Se={}));var cn;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(cn||(cn={}));var dn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(dn||(dn={}));var fn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(fn||(fn={}));var Ii={[D.PERSONAL_BOOK_SHARE_USER]:[D.PERSONAL_BOOK_USER],[D.HTML_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.PDF_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.KHUB_ADMIN]:[D.CONTENT_PUBLISHER],[D.ADMIN]:[D.KHUB_ADMIN,D.USERS_ADMIN,D.PORTAL_ADMIN],[D.GENERATIVE_AI_EXPORT_USER]:[D.GENERATIVE_AI_USER]};function pn(e,t){return e===t||(Ii[e]??[]).some(r=>pn(r,t))}function hn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>pn(n,t))}var st=class extends X{async listMySearches(){let{session:t}=b.getState();return hn(t,D.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var mn=A(N());var Ht=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return mn.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Ht;var vn=A(N());var He=class{static get(t,r){var n,i,a,s;let o=b.getState(),{lang:u,region:c}=(i=(n=o.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new vn.SearchPlaceConverter(o.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},t??20,o.searchInAllLanguagesAllowed,r??`${u}-${c}`)}};var Kt=class{urlToSearchRequest(t){return He.get().parse(t)}searchRequestToUrl(t){return He.get().serialize(t)}};window.FluidTopicsUrlService=new Kt;var le=A(N());var xe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};xe.eventName="change";var Vt=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},yn=new Vt;var ot=class e extends le.WithEventBus{static build(){return new e(window.history,yn,()=>window.location,!1)}constructor(t,r,n,i){var a,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(a=t.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&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,le.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new xe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[a,s,o])=>{let u=r(),c={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[c,s,o]),this.setCurrentState(c,!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 r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(xe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(xe.eventName,t)}currentItem(){return(0,le.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,le.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,le.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 r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,a=t+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ot.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var gn=b;function bn(e,t){var r;return gn.getState().authenticationRequired&&!(!((r=gn.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(t):e()}var I=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},R=class extends J.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",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=()=>Ae.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new J.CacheRegistry,this.cleanSessionDebouncer=new J.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return En.html`
82
+ `}get textContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.textContent;switch(this.variant){case se.file_format:this.resolvedIcon=(t=m[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case se.material:this.resolvedIcon=this.value||Be.nothing;break;default:this.resolvedIcon=(r=Ze[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};X.elementDefinitions={};X.styles=Rr;He([(0,oe.property)()],X.prototype,"variant",void 0);He([(0,oe.property)()],X.prototype,"value",void 0);He([(0,oe.property)({reflect:!0,attribute:"aria-hidden"})],X.prototype,"ariaHidden",void 0);He([(0,oe.state)()],X.prototype,"resolvedIcon",void 0);He([(0,oe.query)("slot")],X.prototype,"slottedContent",void 0);(0,Nr.customElement)("ft-icon")(X);var Ei=E(N());var Ct=E(te()),wt=E(q()),Rt=E(N());var Dr=E(te());var Ir=Dr.css`
83
+ `;var Tt=E(N());var pi=E(N());var Sn=E(te()),j=E(q()),Q=E(N());var Mr=E(te());var kr=Mr.css`
84
+ `;var et=E(N()),Di="ft-app-info",Ae=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ae.eventName="authentication-change";var Ii={session:(e,t)=>{(0,et.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>b.dispatchEvent(new Ae(t.payload)),0))}},b=et.FtReduxStore.get({name:Di,reducers:Ii,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var jt=E(N());var Ee=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=b.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var tt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ee.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ee.await()}};var J=class extends tt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new jt.CacheRegistry,this.cache=t?i.commonCache:new jt.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var rt=class extends J{async listMyBookmarks(){let t=b.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Bt=class{addCommand(t,r=!1){b.commands.add(t,r)}consumeCommand(t){return b.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Bt;var W=E(N());var Ur,Re=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Mi=Symbol("clearAfterUnitTest"),nt=class extends(0,W.withEventBus)(J){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ur]=()=>{this.defaultMessages={},this.cache=new W.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=b.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,W.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let a=t.toLowerCase(),s=this.resolveContext(a);return new W.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof W.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Re({loadedContexts:t})),this.dispatchEvent(new Re({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Re({loadedContexts:[t]})),this.dispatchEvent(new Re({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,W.delay)(0).then(()=>n()).catch(()=>null)))}};Ur=Mi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends nt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends nt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Le=window.FluidTopicsI18nService,it=window.FluidTopicsCustomI18nService;var jr=E(N()),Ht=class{highlightHtml(t,r,n){(0,jr.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ht;var Ui=E(Hr(),1);var Kr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Kr||(Kr={}));var Vr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Vr||(Vr={}));var Gr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE"})(Gr||(Gr={}));var qr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE"})(qr||(qr={}));var Wr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Wr||(Wr={}));var Fr;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Fr||(Fr={}));var $r;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})($r||($r={}));var zr;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(zr||(zr={}));var Yr;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT"})(Yr||(Yr={}));var Xr;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Xr||(Xr={}));var Jr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Jr||(Jr={}));var Qr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Qr||(Qr={}));var Zr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Zr||(Zr={}));var en;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(en||(en={}));var tn;(function(e){e.ASC="ASC",e.DESC="DESC"})(tn||(tn={}));var rn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(rn||(rn={}));var nn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(nn||(nn={}));var an;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(an||(an={}));var sn;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(sn||(sn={}));var on;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(on||(on={}));var un;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(un||(un={}));var ln;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(ln||(ln={}));var cn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(cn||(cn={}));var dn;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(dn||(dn={}));var D;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(D||(D={}));var Se;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Se||(Se={}));var fn;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(fn||(fn={}));var pn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(pn||(pn={}));var hn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(hn||(hn={}));var ki={[D.PERSONAL_BOOK_SHARE_USER]:[D.PERSONAL_BOOK_USER],[D.HTML_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.PDF_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.KHUB_ADMIN]:[D.CONTENT_PUBLISHER],[D.ADMIN]:[D.KHUB_ADMIN,D.USERS_ADMIN,D.PORTAL_ADMIN],[D.GENERATIVE_AI_EXPORT_USER]:[D.GENERATIVE_AI_USER]};function mn(e,t){return e===t||(ki[e]??[]).some(r=>mn(r,t))}function vn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>mn(n,t))}var ot=class extends J{async listMySearches(){let{session:t}=b.getState();return vn(t,D.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var yn=E(N());var Kt=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return yn.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Kt;var gn=E(N());var Ke=class{static get(t,r){var n,i;let a=b.getState(),{lang:s,region:o}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new gn.SearchPlaceConverter(a.baseUrl,t??20,a.searchInAllLanguagesAllowed,r??`${s}-${o}`)}};var Vt=class{urlToSearchRequest(t){return Ke.get().parse(t)}searchRequestToUrl(t){return Ke.get().serialize(t)}};window.FluidTopicsUrlService=new Vt;var le=E(N());var xe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};xe.eventName="change";var Gt=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},bn=new Gt;var ut=class e extends le.WithEventBus{static build(){return new e(window.history,bn,()=>window.location,!1)}constructor(t,r,n,i){var a,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(a=t.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&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,le.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new xe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[a,s,o])=>{let u=r(),c={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[c,s,o]),this.setCurrentState(c,!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 r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(xe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(xe.eventName,t)}currentItem(){return(0,le.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,le.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,le.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 r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,a=t+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ut.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var An=b;function En(e,t){var r;return An.getState().authenticationRequired&&!(!((r=An.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(t):e()}var I=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},R=class extends Q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",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=()=>Ee.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Q.CacheRegistry,this.cleanSessionDebouncer=new Q.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Sn.html`
85
85
  <slot></slot>
86
- `}connectedCallback(){super.connectedCallback(),b.addEventListener(Ee.eventName,this.reloadConfiguration)}disconnectedCallback(){b.addEventListener(Ee.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,i,a,s,o,u;super.update(t),t.has("baseUrl")&&(b.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&b.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&b.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&b.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&b.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&b.actions.noCustom(this.noCustom),t.has("editorMode")&&b.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&b.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&b.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Re.addContext(c)),t.has("openExternalDocumentInNewTab")&&b.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&b.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&b.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(b.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),b.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),b.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&b.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&b.actions.availableContentLocales((u=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}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())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>bn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};R.elementDefinitions={};R.styles=Mr;I([(0,j.property)()],R.prototype,"baseUrl",void 0);I([(0,j.property)()],R.prototype,"apiIntegrationIdentifier",void 0);I([(0,j.property)()],R.prototype,"apiIntegrationAppVersion",void 0);I([(0,j.property)()],R.prototype,"uiLocale",void 0);I([(0,J.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);I([(0,J.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"editorMode",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"noCustom",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);I([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"withManualResources",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);I([(0,j.property)({type:Object})],R.prototype,"apiProvider",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);I([(0,J.jsonProperty)([])],R.prototype,"messageContexts",void 0);I([(0,J.jsonProperty)(void 0)],R.prototype,"session",void 0);I([(0,j.state)()],R.prototype,"localesConfiguration",void 0);I([(0,j.state)()],R.prototype,"availableContentLocales",void 0);var xa=A(q());function ki(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ut(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ut(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(o=>s[o]!=null);if(i=a(e),r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ut(e,t){try{return ki(e,t)}catch{return!1}}function lt(e,t){return!ut(e,t)}var Ui=A(q(),1);var ct=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Le=A(q(),1);var An=A(q(),1);function Sn(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,An.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:lt,...t??{}})}var dt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(o){i(o);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var On=A(ee(),1);var ft=globalThis,ji=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Po=Symbol();var xn=(e,t)=>{if(ji)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=ft.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var pt=class extends On.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return xn(n,t.elementStyles),n}};function _n(e,t,...r){var n;let i=e.querySelector(t);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Ke=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Rn,Tn=Symbol("constructorPrototype"),wn=Symbol("constructorName"),Pn=Symbol("exportpartsDebouncer"),Cn=Symbol("dynamicDependenciesLoaded"),ie=class extends pt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Rn]=new dt(5),this[wn]=this.constructor.name,this[Tn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wn]&&Object.setPrototypeOf(this,this[Tn])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let t=this.constructor;t[Cn]||(t[Cn]=!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:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];r=_n(this.shadowRoot,...a)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Pn].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var r,n,i,a,s,o;let u=p=>p!=null&&p.trim().length>0,c=t.filter(u).map(p=>p.trim());if(c.length===0){this.removeAttribute("exportparts");return}let d=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(o=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[];new Array(...g,...v).filter(u).map(y=>y.trim()).forEach(y=>d.add(y))}if(d.size===0){this.removeAttribute("exportparts");return}let h=[...d.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Rn=Pn;Ke([(0,Le.property)()],ie.prototype,"exportpartsPrefix",void 0);Ke([Sn([])],ie.prototype,"exportpartsPrefixes",void 0);Ke([(0,Le.property)()],ie.prototype,"customStylesheet",void 0);Ke([(0,Le.property)()],ie.prototype,"elementToFocus",void 0);Ke([(0,Le.state)()],ie.prototype,"useAdoptedStyleSheets",void 0);function ht(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ve=Symbol("internalReduxEventsUnsubscribers"),ce=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores");function Bi(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Oe].get(s)}addStore(s,o){var u;o=(u=o??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[Oe].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let c=this.getStore(s.store);c&&(s.store?this[ce].has(s.store):this[ce].size>0)&&(this[o]=s.selector(c.getState(),this))}})}subscribeToStore(s,o){var u;this[ce].set(s,o.subscribe(()=>this.updateFromStores())),this[Ve].set(s,[]),ht(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||o.name===c.store)){let h=p=>this[d](p);o.addEventListener(c.eventName,h),this[Ve].get(s).push(()=>o.removeEventListener(c.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ce].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[ce].has(s)&&this[ce].get(s)(),this[ce].delete(s),(o=this[Ve].get(s))===null||o===void 0||o.forEach(u=>u()),this[Ve].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ce,r=Oe,n=Ve,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var Ln=class extends Bi(ie){};function W(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(e){return!!e&&!!e[P]}function Q(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===$i}(e)||Array.isArray(e)||!!e[jn]||!!(!((t=e.constructor)===null||t===void 0)&&t[jn])||Jt(e)||Qt(e))}function _e(e,t,r){r===void 0&&(r=!1),Ie(e)===0?(r?Object.keys:De)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Ie(e){var t=e[P];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Jt(e)?2:Qt(e)?3:0}function Ne(e,t){return Ie(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hi(e,t){return Ie(e)===2?e.get(t):e[t]}function Bn(e,t,r){var n=Ie(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Hn(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Jt(e){return Wi&&e instanceof Map}function Qt(e){return Fi&&e instanceof Set}function de(e){return e.o||e.t}function Zt(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Gn(e);delete t[P];for(var r=De(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function er(e,t){return t===void 0&&(t=!1),tr(e)||ae(e)||!Q(e)||(Ie(e)>1&&(e.set=e.add=e.clear=e.delete=Ki),Object.freeze(e),t&&_e(e,function(r,n){return er(n,!0)},!0)),e}function Ki(){W(2)}function tr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function re(e){var t=Xt[e];return t||W(18,e),t}function Vi(e,t){Xt[e]||(Xt[e]=t)}function $t(){return qe}function Gt(e,t){t&&(re("Patches"),e.u=[],e.s=[],e.v=t)}function mt(e){zt(e),e.p.forEach(Gi),e.p=null}function zt(e){e===qe&&(qe=e.l)}function Nn(e){return qe={p:[],l:qe,h:e,m:!0,_:0}}function Gi(e){var t=e[P];t.i===0||t.i===1?t.j():t.g=!0}function qt(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||re("ES5").S(t,e,n),n?(r[P].P&&(mt(t),W(4)),Q(e)&&(e=vt(t,e),t.l||yt(t,e)),t.u&&re("Patches").M(r[P].t,e,t.u,t.s)):e=vt(t,r,[]),mt(t),t.u&&t.v(t.u,t.s),e!==Vn?e:void 0}function vt(e,t,r){if(tr(t))return t;var n=t[P];if(!n)return _e(t,function(o,u){return Dn(e,n,t,o,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return yt(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Zt(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),_e(a,function(o,u){return Dn(e,n,i,o,u,r,s)}),yt(e,i,!1),r&&e.u&&re("Patches").N(n,r,e.u,e.s)}return n.o}function Dn(e,t,r,n,i,a,s){if(ae(i)){var o=vt(e,i,a&&t&&t.i!==3&&!Ne(t.R,n)?a.concat(n):void 0);if(Bn(r,n,o),!ae(o))return;e.m=!1}else s&&r.add(i);if(Q(i)&&!tr(i)){if(!e.h.D&&e._<1)return;vt(e,i),t&&t.A.l||yt(e,i)}}function yt(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&er(t,r)}function Wt(e,t){var r=e[P];return(r?de(r):e)[t]}function In(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function fe(e){e.P||(e.P=!0,e.l&&fe(e.l))}function Ft(e){e.o||(e.o=Zt(e.t))}function Yt(e,t,r){var n=Jt(t)?re("MapSet").F(t,r):Qt(t)?re("MapSet").T(t,r):e.O?function(i,a){var s=Array.isArray(i),o={i:s?1:0,A:a?a.A:$t(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=o,c=We;s&&(u=[o],c=Ge);var d=Proxy.revocable(u,c),h=d.revoke,p=d.proxy;return o.k=p,o.j=h,p}(t,r):re("ES5").J(t,r);return(r?r.A:$t()).p.push(n),n}function qi(e){return ae(e)||W(22,e),function t(r){if(!Q(r))return r;var n,i=r[P],a=Ie(r);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=Mn(r,a),i.I=!1}else n=Mn(r,a);return _e(n,function(s,o){i&&Hi(i.t,s)===o||Bn(n,s,t(o))}),a===3?new Set(n):n}(e)}function Mn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Zt(e)}function Kn(){function e(s,o){var u=a[s];return u?u.enumerable=o:a[s]=u={configurable:!0,enumerable:o,get:function(){var c=this[P];return We.get(c,s)},set:function(c){var d=this[P];We.set(d,s,c)}},u}function t(s){for(var o=s.length-1;o>=0;o--){var u=s[o][P];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:r(u)&&fe(u)}}}function r(s){for(var o=s.t,u=s.k,c=De(u),d=c.length-1;d>=0;d--){var h=c[d];if(h!==P){var p=o[h];if(p===void 0&&!Ne(o,h))return!0;var g=u[h],v=g&&g[P];if(v?v.t!==p:!Hn(g,p))return!0}}var y=!!o[P];return c.length!==De(o).length+(y?0:1)}function n(s){var o=s.k;if(o.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var c=0;c<o.length;c++)if(!o.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&W(3,JSON.stringify(de(s)))}var a={};Vi("ES5",{J:function(s,o){var u=Array.isArray(s),c=function(h,p){if(h){for(var g=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(g,""+v,e(v,!0));return g}var y=Gn(p);delete y[P];for(var _=De(y),S=0;S<_.length;S++){var x=_[S];y[x]=e(x,h||!!y[x].enumerable)}return Object.create(Object.getPrototypeOf(p),y)}(u,s),d={i:u?5:4,A:o?o.A:$t(),P:!1,I:!1,R:{},l:o,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,P,{value:d,writable:!0}),c},S:function(s,o,u){u?ae(o)&&o[P].A===s&&t(s.p):(s.u&&function c(d){if(d&&typeof d=="object"){var h=d[P];if(h){var p=h.t,g=h.k,v=h.R,y=h.i;if(y===4)_e(g,function(T){T!==P&&(p[T]!==void 0||Ne(p,T)?v[T]||c(g[T]):(v[T]=!0,fe(h)))}),_e(p,function(T){g[T]!==void 0||Ne(g,T)||(v[T]=!1,fe(h))});else if(y===5){if(n(h)&&(fe(h),v.length=!0),g.length<p.length)for(var _=g.length;_<p.length;_++)v[_]=!1;else for(var S=p.length;S<g.length;S++)v[S]=!0;for(var x=Math.min(g.length,p.length),C=0;C<x;C++)g.hasOwnProperty(C)||(v[C]=!0),v[C]===void 0&&c(g[C])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var kn,qe,rr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Wi=typeof Map<"u",Fi=typeof Set<"u",Un=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Vn=rr?Symbol.for("immer-nothing"):((kn={})["immer-nothing"]=!0,kn),jn=rr?Symbol.for("immer-draftable"):"__$immer_draftable",P=rr?Symbol.for("immer-state"):"__$immer_state";var $i=""+Object.prototype.constructor,De=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Gn=Object.getOwnPropertyDescriptors||function(e){var t={};return De(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Xt={},We={get:function(e,t){if(t===P)return e;var r=de(e);if(!Ne(r,t))return function(i,a,s){var o,u=In(a,s);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!Q(n)?n:n===Wt(e.t,t)?(Ft(e),e.o[t]=Yt(e.A.h,n,e)):n},has:function(e,t){return t in de(e)},ownKeys:function(e){return Reflect.ownKeys(de(e))},set:function(e,t,r){var n=In(de(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Wt(de(e),t),a=i?.[P];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Hn(r,i)&&(r!==void 0||Ne(e.t,t)))return!0;Ft(e),fe(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Wt(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Ft(e),fe(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=de(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){W(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){W(12)}},Ge={};_e(We,function(e,t){Ge[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ge.deleteProperty=function(e,t){return Ge.set.call(this,e,t,void 0)},Ge.set=function(e,t,r){return We.set.call(this,e[0],t,r,e[0])};var zi=function(){function e(r){var n=this;this.O=Un,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var u=n;return function(y){var _=this;y===void 0&&(y=o);for(var S=arguments.length,x=Array(S>1?S-1:0),C=1;C<S;C++)x[C-1]=arguments[C];return u.produce(y,function(T){var k;return(k=a).call.apply(k,[_,T].concat(x))})}}var c;if(typeof a!="function"&&W(6),s!==void 0&&typeof s!="function"&&W(7),Q(i)){var d=Nn(n),h=Yt(n,i,void 0),p=!0;try{c=a(h),p=!1}finally{p?mt(d):zt(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return Gt(d,s),qt(y,d)},function(y){throw mt(d),y}):(Gt(d,s),qt(c,d))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===Vn&&(c=void 0),n.D&&er(c,!0),s){var g=[],v=[];re("Patches").M(i,c,g,v),s(g,v)}return c}W(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var d=arguments.length,h=Array(d>1?d-1:0),p=1;p<d;p++)h[p-1]=arguments[p];return n.produceWithPatches(c,function(g){return i.apply(void 0,[g].concat(h))})};var s,o,u=n.produce(i,a,function(c,d){s=c,o=d});return typeof Promise<"u"&&u instanceof Promise?u.then(function(c){return[c,s,o]}):[u,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Q(r)||W(8),ae(r)&&(r=qi(r));var n=Nn(this),i=Yt(this,r,void 0);return i[P].C=!0,zt(n),i},t.finishDraft=function(r,n){var i=r&&r[P],a=i.A;return Gt(a,n),qt(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Un&&W(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=re("Patches").$;return ae(r)?s(r,n):this.produce(r,function(o){return s(o,n)})},e}(),V=new zi,Yi=V.produce,qo=V.produceWithPatches.bind(V),Wo=V.setAutoFreeze.bind(V),Fo=V.setUseProxies.bind(V),$o=V.applyPatches.bind(V),zo=V.createDraft.bind(V),Yo=V.finishDraft.bind(V),gt=Yi;function Te(e){"@babel/helpers - typeof";return Te=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},Te(e)}function qn(e,t){if(Te(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Te(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wn(e){var t=qn(e,"string");return Te(t)=="symbol"?t:t+""}function Fn(e,t,r){return(t=Wn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$n(Object(r),!0).forEach(function(n){Fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$n(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var zn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ir=function(){return Math.random().toString(36).substring(7).split("").join(".")},bt={INIT:"@@redux/INIT"+ir(),REPLACE:"@@redux/REPLACE"+ir(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ir()}};function Xi(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ar(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(B(1));return r(ar)(e,t)}if(typeof e!="function")throw new Error(B(2));var i=e,a=t,s=[],o=s,u=!1;function c(){o===s&&(o=s.slice())}function d(){if(u)throw new Error(B(3));return a}function h(y){if(typeof y!="function")throw new Error(B(4));if(u)throw new Error(B(5));var _=!0;return c(),o.push(y),function(){if(_){if(u)throw new Error(B(6));_=!1,c();var x=o.indexOf(y);o.splice(x,1),s=null}}}function p(y){if(!Xi(y))throw new Error(B(7));if(typeof y.type>"u")throw new Error(B(8));if(u)throw new Error(B(9));try{u=!0,a=i(a,y)}finally{u=!1}for(var _=s=o,S=0;S<_.length;S++){var x=_[S];x()}return y}function g(y){if(typeof y!="function")throw new Error(B(10));i=y,p({type:bt.REPLACE})}function v(){var y,_=h;return y={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(B(11));function C(){x.next&&x.next(d())}C();var T=_(C);return{unsubscribe:T}}},y[zn]=function(){return this},y}return p({type:bt.INIT}),n={dispatch:p,subscribe:h,getState:d,replaceReducer:g},n[zn]=v,n}function Ji(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:bt.INIT});if(typeof n>"u")throw new Error(B(12));if(typeof r(void 0,{type:bt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function Yn(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),s,o;try{Ji(r)}catch(u){o=u}return function(c,d){if(c===void 0&&(c={}),o)throw o;if(0)var h;for(var p=!1,g={},v=0;v<a.length;v++){var y=a[v],_=r[y],S=c[y],x=_(S,d);if(typeof x>"u"){var C=d&&d.type;throw new Error(B(14))}g[y]=x,p=p||x!==S}return p=p||a.length!==Object.keys(c).length,p?g:c}}function Me(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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 Xn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(B(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},o=t.map(function(u){return u(s)});return a=Me.apply(void 0,o)(i.dispatch),nr(nr({},i),{},{dispatch:a})}}}function Jn(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(o){return typeof o=="function"?o(i,a,e):s(o)}}};return t}var Qn=Jn();Qn.withExtraArgument=Jn;var sr=Qn;var ni=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qi=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ke=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},Zi=Object.defineProperty,ea=Object.defineProperties,ta=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,na=Object.prototype.propertyIsEnumerable,ei=function(e,t,r){return t in e?Zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},pe=function(e,t){for(var r in t||(t={}))ra.call(t,r)&&ei(e,r,t[r]);if(Zn)for(var n=0,i=Zn(t);n<i.length;n++){var r=i[n];na.call(t,r)&&ei(e,r,t[r])}return e},or=function(e,t){return ea(e,ta(t))},ia=function(e,t,r){return new Promise(function(n,i){var a=function(u){try{o(r.next(u))}catch(c){i(c)}},s=function(u){try{o(r.throw(u))}catch(c){i(c)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};o((r=r.apply(e,t)).next())})};var aa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Me:Me.apply(null,arguments)},pu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function sa(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var oa=function(e){ni(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ke([void 0],r[0].concat(this)))):new(t.bind.apply(t,ke([void 0],r.concat(this))))},t}(Array),ua=function(e){ni(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ke([void 0],r[0].concat(this)))):new(t.bind.apply(t,ke([void 0],r.concat(this))))},t}(Array);function cr(e){return Q(e)?gt(e,function(){}):e}function la(e){return typeof e=="boolean"}function ca(){return function(t){return da(t)}}function da(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,o=new oa;if(r&&(la(r)?o.push(sr):o.push(sr.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var c}return o}var ur=!0;function ii(e){var t=ca(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?t():a,o=r.devTools,u=o===void 0?!0:o,c=r.preloadedState,d=c===void 0?void 0:c,h=r.enhancers,p=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(sa(i))g=Yn(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 v=s;if(typeof v=="function"&&(v=v(t),!ur&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ur&&v.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Xn.apply(void 0,v),_=Me;u&&(_=aa(pe({trace:!ur},typeof u=="object"&&u)));var S=new ua(y),x=S;Array.isArray(p)?x=ke([y],p):typeof p=="function"&&(x=p(S));var C=_.apply(void 0,x);return ar(g,d,C)}function he(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return pe(pe({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function ai(e){var t={},r=[],n,i={addCase:function(a,s){var o=typeof a=="string"?a:a.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function fa(e){return typeof e=="function"}function pa(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?ai(t):[t,r,n],a=i[0],s=i[1],o=i[2],u;if(fa(e))u=function(){return cr(e())};else{var c=cr(e);u=function(){return c}}function d(h,p){h===void 0&&(h=u());var g=ke([a[p.type]],s.filter(function(v){var y=v.matcher;return y(p)}).map(function(v){var y=v.reducer;return y}));return g.filter(function(v){return!!v}).length===0&&(g=[o]),g.reduce(function(v,y){if(y)if(ae(v)){var _=v,S=y(_,p);return S===void 0?v:S}else{if(Q(v))return gt(v,function(x){return y(x,p)});var S=y(v,p);if(S===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return v},h)}return d.getInitialState=u,d}function ha(e,t){return e+"/"+t}function si(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:cr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},o={};i.forEach(function(d){var h=n[d],p=ha(t,d),g,v;"reducer"in h?(g=h.reducer,v=h.prepare):g=h,a[d]=g,s[p]=g,o[d]=v?he(p,v):he(p)});function u(){var d=typeof e.extraReducers=="function"?ai(e.extraReducers):[e.extraReducers],h=d[0],p=h===void 0?{}:h,g=d[1],v=g===void 0?[]:g,y=d[2],_=y===void 0?void 0:y,S=pe(pe({},p),s);return pa(r,function(x){for(var C in S)x.addCase(C,S[C]);for(var T=0,k=v;T<k.length;T++){var $=k[T];x.addMatcher($.matcher,$.reducer)}_&&x.addDefaultCase(_)})}var c;return{name:t,reducer:function(d,h){return c||(c=u()),c(d,h)},actions:o,caseReducers:a,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var ma="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",va=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=ma[Math.random()*64|0];return t},ya=["name","message","stack","code"],lr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),ti=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),ga=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=ya;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},yu=function(){function e(t,r,n){var i=he(t+"/fulfilled",function(d,h,p,g){return{payload:d,meta:or(pe({},g||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),a=he(t+"/pending",function(d,h,p){return{payload:void 0,meta:or(pe({},p||{}),{arg:h,requestId:d,requestStatus:"pending"})}}),s=he(t+"/rejected",function(d,h,p,g,v){return{payload:g,error:(n&&n.serializeError||ga)(d||"Rejected"),meta:or(pe({},v||{}),{arg:p,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function c(d){return function(h,p,g){var v=n?.idGenerator?n.idGenerator(d):va(),y=new u,_,S=!1;function x(T){_=T,y.abort()}var C=function(){return ia(this,null,function(){var T,k,$,ye,K,ge,we;return Qi(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),ye=(T=n?.condition)==null?void 0:T.call(n,d,{getState:p,extra:g}),Ea(ye)?[4,ye]:[3,2];case 1:ye=l.sent(),l.label=2;case 2:if(ye===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,K=new Promise(function(f,E){return y.signal.addEventListener("abort",function(){return E({name:"AbortError",message:_||"Aborted"})})}),h(a(v,d,(k=n?.getPendingMeta)==null?void 0:k.call(n,{requestId:v,arg:d},{getState:p,extra:g}))),[4,Promise.race([K,Promise.resolve(r(d,{dispatch:h,getState:p,extra:g,requestId:v,signal:y.signal,abort:x,rejectWithValue:function(f,E){return new lr(f,E)},fulfillWithValue:function(f,E){return new ti(f,E)}})).then(function(f){if(f instanceof lr)throw f;return f instanceof ti?i(f.payload,v,d,f.meta):i(f,v,d)})])];case 3:return $=l.sent(),[3,5];case 4:return ge=l.sent(),$=ge instanceof lr?s(null,v,d,ge.payload,ge.meta):s(ge,v,d),[3,5];case 5:return we=n&&!n.dispatchConditionRejection&&s.match($)&&$.meta.condition,we||h($),[2,$]}})})}();return Object.assign(C,{abort:x,requestId:v,arg:d,unwrap:function(){return C.then(ba)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function ba(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ea(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var oi="listener",ui="completed",li="cancelled",gu="task-"+li,bu="task-"+ui,Eu=oi+"-"+li,Au=oi+"-"+ui;var dr="listenerMiddleware";var Su=he(dr+"/add"),xu=he(dr+"/removeAll"),Ou=he(dr+"/remove");var ri,_u=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ri||(ri=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Aa=function(e){return function(t){setTimeout(t,e)}},Tu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Aa(10);Kn();function Sa(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var Et=class extends Sa(Object){};window.ftReduxStores||(window.ftReduxStores={});var ci=class e extends Et{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(ht(a))return a;if(i==null)return;let s=si({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=ii({reducer:(u,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...c.overwrites}:s.reducer(u,c)});return window.ftReduxStores[i.name]=new e(s,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ct;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,o)=>{let u=s,c=a[u];return c?(...d)=>{let h=c(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{this.setState({[u]:i(d)})}}}),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 St=A(N());var At=class extends X{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var Oa="ft-user-assets",_a={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Se).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}}},F=St.FtReduxStore.get({name:Oa,reducers:_a,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Se).map(e=>[e,void 0])),bookmarkByMap:{}}}}),fr=class{constructor(t=new At){this.assetCountsService=t,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new tt,this.savedSearchesService=new st,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=b.getState();(0,St.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){F.actions.clearAssetCount(),F.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),F.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),F.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();F.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&F.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&F.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(F.getState().assetCounts.bookmarkByMap).length!==0;t===Se.BOOKMARKS&&r&&F.actions.clearBookmarkCountByMap(),F.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;F.actions.bookmarks(r)}}},Ta=new fr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ta);(0,di.customElement)("ft-app-context")(R);var vi=A(q());var wa=A(N());function fi(e){return e.match(/^[\w-]+\.[\w-]+$/)}var Ca=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},pi=Symbol("i18nAttributes"),hi=Symbol("i18nListAttributes"),yi=Symbol("i18nProperties"),xt=Symbol("i18nContexts"),Fe=Symbol("i18nUnsubs");function gi(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?nt:Re}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let o=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...o)}customI18n(a,s){if(fi(a)){let[o,u]=a.split(".");return this.i18n({custom:!0,context:o,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,o,u)=>a.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,o,u)=>{var c;return((c=u?.context)===null||c===void 0?void 0:c.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,o;let u=this,c=(d,h,p)=>p?.context&&p.key&&a(d,h,p)?{...p,message:this.i18n({context:p.context,key:p.key,...d})}:p;(s=this[pi])===null||s===void 0||s.forEach((d,h)=>u[h]=c(d,h,u[h])),(o=this[hi])===null||o===void 0||o.forEach((d,h)=>{var p;return u[h]=(p=u[h])===null||p===void 0?void 0:p.map(g=>c(d,h,g))})}updateI18nProperties(a){var s;(s=this[yi])===null||s===void 0||s.forEach((o,u)=>{a(o,u)&&(this[u]=this.i18n(o))})}addI18nMessages(a,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,o)}addI18nContext(a,s,o){let u=(typeof a=="string"?a:a.name).toLowerCase();o=typeof a=="string"?o:a.custom,this[xt].set(u,{isCustomContext:o}),this[Fe].has(u)||this[Fe].set(u,this.getI18nService(o).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(o).prepareContext(u,s)}hasI18nContext(a){return this[xt].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[xt].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Fe].forEach(a=>a()),this[Fe].clear()}}return t=xt,r=Fe,Ca([(0,vi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var mi=class extends gi(_t.FtLitElement){},Ot=class extends gi(_t.FtLitElementRedux){};var $e=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Z=class extends Ot{constructor(){super(),this.editorMode=!1,this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Tt.nothing:Tt.html`
86
+ `}connectedCallback(){super.connectedCallback(),b.addEventListener(Ae.eventName,this.reloadConfiguration)}disconnectedCallback(){b.addEventListener(Ae.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,i,a,s,o,u;super.update(t),t.has("baseUrl")&&(b.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&b.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&b.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&b.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&b.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&b.actions.noCustom(this.noCustom),t.has("editorMode")&&b.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&b.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&b.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Le.addContext(c)),t.has("openExternalDocumentInNewTab")&&b.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&b.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&b.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(b.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),b.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),b.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&b.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&b.actions.availableContentLocales((u=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}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())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>En(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};R.elementDefinitions={};R.styles=kr;I([(0,j.property)()],R.prototype,"baseUrl",void 0);I([(0,j.property)()],R.prototype,"apiIntegrationIdentifier",void 0);I([(0,j.property)()],R.prototype,"apiIntegrationAppVersion",void 0);I([(0,j.property)()],R.prototype,"uiLocale",void 0);I([(0,Q.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);I([(0,Q.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"editorMode",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"noCustom",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);I([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"withManualResources",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);I([(0,j.property)({type:Object})],R.prototype,"apiProvider",void 0);I([(0,j.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);I([(0,Q.jsonProperty)([])],R.prototype,"messageContexts",void 0);I([(0,Q.jsonProperty)(void 0)],R.prototype,"session",void 0);I([(0,j.state)()],R.prototype,"localesConfiguration",void 0);I([(0,j.state)()],R.prototype,"availableContentLocales",void 0);var _a=E(q());function ji(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!lt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!lt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(o=>s[o]!=null);if(i=a(e),r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!lt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function lt(e,t){try{return ji(e,t)}catch{return!1}}function ct(e,t){return!lt(e,t)}var Bi=E(q(),1);var dt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Ne=E(q(),1);var xn=E(q(),1);function On(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,xn.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:ct,...t??{}})}var ft=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(o){i(o);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Tn=E(te(),1);var pt=globalThis,Hi=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,No=Symbol();var _n=(e,t)=>{if(Hi)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=pt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var ht=class extends Tn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return _n(n,t.elementStyles),n}};function Cn(e,t,...r){var n;let i=e.querySelector(t);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Ve=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Pn,wn=Symbol("constructorPrototype"),Rn=Symbol("constructorName"),Nn=Symbol("exportpartsDebouncer"),Ln=Symbol("dynamicDependenciesLoaded"),ie=class extends ht{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pn]=new ft(5),this[Rn]=this.constructor.name,this[wn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Rn]&&Object.setPrototypeOf(this,this[wn])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let t=this.constructor;t[Ln]||(t[Ln]=!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:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];r=Cn(this.shadowRoot,...a)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Nn].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var r,n,i,a,s,o;let u=p=>p!=null&&p.trim().length>0,c=t.filter(u).map(p=>p.trim());if(c.length===0){this.removeAttribute("exportparts");return}let d=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(o=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[];new Array(...g,...v).filter(u).map(y=>y.trim()).forEach(y=>d.add(y))}if(d.size===0){this.removeAttribute("exportparts");return}let h=[...d.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Pn=Nn;Ve([(0,Ne.property)()],ie.prototype,"exportpartsPrefix",void 0);Ve([On([])],ie.prototype,"exportpartsPrefixes",void 0);Ve([(0,Ne.property)()],ie.prototype,"customStylesheet",void 0);Ve([(0,Ne.property)()],ie.prototype,"elementToFocus",void 0);Ve([(0,Ne.state)()],ie.prototype,"useAdoptedStyleSheets",void 0);function mt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ge=Symbol("internalReduxEventsUnsubscribers"),ce=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores");function Ki(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Oe].get(s)}addStore(s,o){var u;o=(u=o??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[Oe].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let c=this.getStore(s.store);c&&(s.store?this[ce].has(s.store):this[ce].size>0)&&(this[o]=s.selector(c.getState(),this))}})}subscribeToStore(s,o){var u;this[ce].set(s,o.subscribe(()=>this.updateFromStores())),this[Ge].set(s,[]),mt(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||o.name===c.store)){let h=p=>this[d](p);o.addEventListener(c.eventName,h),this[Ge].get(s).push(()=>o.removeEventListener(c.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ce].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[ce].has(s)&&this[ce].get(s)(),this[ce].delete(s),(o=this[Ge].get(s))===null||o===void 0||o.forEach(u=>u()),this[Ge].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ce,r=Oe,n=Ge,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var Dn=class extends Ki(ie){};function F(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(e){return!!e&&!!e[L]}function Z(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Yi}(e)||Array.isArray(e)||!!e[Hn]||!!(!((t=e.constructor)===null||t===void 0)&&t[Hn])||Qt(e)||Zt(e))}function _e(e,t,r){r===void 0&&(r=!1),Me(e)===0?(r?Object.keys:Ie)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Me(e){var t=e[L];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Qt(e)?2:Zt(e)?3:0}function De(e,t){return Me(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Vi(e,t){return Me(e)===2?e.get(t):e[t]}function Kn(e,t,r){var n=Me(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Vn(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Qt(e){return $i&&e instanceof Map}function Zt(e){return zi&&e instanceof Set}function de(e){return e.o||e.t}function er(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Wn(e);delete t[L];for(var r=Ie(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function tr(e,t){return t===void 0&&(t=!1),rr(e)||ae(e)||!Z(e)||(Me(e)>1&&(e.set=e.add=e.clear=e.delete=Gi),Object.freeze(e),t&&_e(e,function(r,n){return tr(n,!0)},!0)),e}function Gi(){F(2)}function rr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function re(e){var t=Jt[e];return t||F(18,e),t}function qi(e,t){Jt[e]||(Jt[e]=t)}function zt(){return We}function qt(e,t){t&&(re("Patches"),e.u=[],e.s=[],e.v=t)}function vt(e){Yt(e),e.p.forEach(Wi),e.p=null}function Yt(e){e===We&&(We=e.l)}function In(e){return We={p:[],l:We,h:e,m:!0,_:0}}function Wi(e){var t=e[L];t.i===0||t.i===1?t.j():t.g=!0}function Wt(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||re("ES5").S(t,e,n),n?(r[L].P&&(vt(t),F(4)),Z(e)&&(e=yt(t,e),t.l||gt(t,e)),t.u&&re("Patches").M(r[L].t,e,t.u,t.s)):e=yt(t,r,[]),vt(t),t.u&&t.v(t.u,t.s),e!==qn?e:void 0}function yt(e,t,r){if(rr(t))return t;var n=t[L];if(!n)return _e(t,function(o,u){return Mn(e,n,t,o,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return gt(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=er(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),_e(a,function(o,u){return Mn(e,n,i,o,u,r,s)}),gt(e,i,!1),r&&e.u&&re("Patches").N(n,r,e.u,e.s)}return n.o}function Mn(e,t,r,n,i,a,s){if(ae(i)){var o=yt(e,i,a&&t&&t.i!==3&&!De(t.R,n)?a.concat(n):void 0);if(Kn(r,n,o),!ae(o))return;e.m=!1}else s&&r.add(i);if(Z(i)&&!rr(i)){if(!e.h.D&&e._<1)return;yt(e,i),t&&t.A.l||gt(e,i)}}function gt(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&tr(t,r)}function Ft(e,t){var r=e[L];return(r?de(r):e)[t]}function kn(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function fe(e){e.P||(e.P=!0,e.l&&fe(e.l))}function $t(e){e.o||(e.o=er(e.t))}function Xt(e,t,r){var n=Qt(t)?re("MapSet").F(t,r):Zt(t)?re("MapSet").T(t,r):e.O?function(i,a){var s=Array.isArray(i),o={i:s?1:0,A:a?a.A:zt(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=o,c=Fe;s&&(u=[o],c=qe);var d=Proxy.revocable(u,c),h=d.revoke,p=d.proxy;return o.k=p,o.j=h,p}(t,r):re("ES5").J(t,r);return(r?r.A:zt()).p.push(n),n}function Fi(e){return ae(e)||F(22,e),function t(r){if(!Z(r))return r;var n,i=r[L],a=Me(r);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=Un(r,a),i.I=!1}else n=Un(r,a);return _e(n,function(s,o){i&&Vi(i.t,s)===o||Kn(n,s,t(o))}),a===3?new Set(n):n}(e)}function Un(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return er(e)}function Gn(){function e(s,o){var u=a[s];return u?u.enumerable=o:a[s]=u={configurable:!0,enumerable:o,get:function(){var c=this[L];return Fe.get(c,s)},set:function(c){var d=this[L];Fe.set(d,s,c)}},u}function t(s){for(var o=s.length-1;o>=0;o--){var u=s[o][L];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:r(u)&&fe(u)}}}function r(s){for(var o=s.t,u=s.k,c=Ie(u),d=c.length-1;d>=0;d--){var h=c[d];if(h!==L){var p=o[h];if(p===void 0&&!De(o,h))return!0;var g=u[h],v=g&&g[L];if(v?v.t!==p:!Vn(g,p))return!0}}var y=!!o[L];return c.length!==Ie(o).length+(y?0:1)}function n(s){var o=s.k;if(o.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var c=0;c<o.length;c++)if(!o.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&F(3,JSON.stringify(de(s)))}var a={};qi("ES5",{J:function(s,o){var u=Array.isArray(s),c=function(h,p){if(h){for(var g=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(g,""+v,e(v,!0));return g}var y=Wn(p);delete y[L];for(var _=Ie(y),S=0;S<_.length;S++){var x=_[S];y[x]=e(x,h||!!y[x].enumerable)}return Object.create(Object.getPrototypeOf(p),y)}(u,s),d={i:u?5:4,A:o?o.A:zt(),P:!1,I:!1,R:{},l:o,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,L,{value:d,writable:!0}),c},S:function(s,o,u){u?ae(o)&&o[L].A===s&&t(s.p):(s.u&&function c(d){if(d&&typeof d=="object"){var h=d[L];if(h){var p=h.t,g=h.k,v=h.R,y=h.i;if(y===4)_e(g,function(T){T!==L&&(p[T]!==void 0||De(p,T)?v[T]||c(g[T]):(v[T]=!0,fe(h)))}),_e(p,function(T){g[T]!==void 0||De(g,T)||(v[T]=!1,fe(h))});else if(y===5){if(n(h)&&(fe(h),v.length=!0),g.length<p.length)for(var _=g.length;_<p.length;_++)v[_]=!1;else for(var S=p.length;S<g.length;S++)v[S]=!0;for(var x=Math.min(g.length,p.length),w=0;w<x;w++)g.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&c(g[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var jn,We,nr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$i=typeof Map<"u",zi=typeof Set<"u",Bn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",qn=nr?Symbol.for("immer-nothing"):((jn={})["immer-nothing"]=!0,jn),Hn=nr?Symbol.for("immer-draftable"):"__$immer_draftable",L=nr?Symbol.for("immer-state"):"__$immer_state";var Yi=""+Object.prototype.constructor,Ie=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Wn=Object.getOwnPropertyDescriptors||function(e){var t={};return Ie(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Jt={},Fe={get:function(e,t){if(t===L)return e;var r=de(e);if(!De(r,t))return function(i,a,s){var o,u=kn(a,s);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!Z(n)?n:n===Ft(e.t,t)?($t(e),e.o[t]=Xt(e.A.h,n,e)):n},has:function(e,t){return t in de(e)},ownKeys:function(e){return Reflect.ownKeys(de(e))},set:function(e,t,r){var n=kn(de(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Ft(de(e),t),a=i?.[L];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Vn(r,i)&&(r!==void 0||De(e.t,t)))return!0;$t(e),fe(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ft(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,$t(e),fe(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=de(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){F(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){F(12)}},qe={};_e(Fe,function(e,t){qe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qe.deleteProperty=function(e,t){return qe.set.call(this,e,t,void 0)},qe.set=function(e,t,r){return Fe.set.call(this,e[0],t,r,e[0])};var Xi=function(){function e(r){var n=this;this.O=Bn,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var u=n;return function(y){var _=this;y===void 0&&(y=o);for(var S=arguments.length,x=Array(S>1?S-1:0),w=1;w<S;w++)x[w-1]=arguments[w];return u.produce(y,function(T){var k;return(k=a).call.apply(k,[_,T].concat(x))})}}var c;if(typeof a!="function"&&F(6),s!==void 0&&typeof s!="function"&&F(7),Z(i)){var d=In(n),h=Xt(n,i,void 0),p=!0;try{c=a(h),p=!1}finally{p?vt(d):Yt(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return qt(d,s),Wt(y,d)},function(y){throw vt(d),y}):(qt(d,s),Wt(c,d))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===qn&&(c=void 0),n.D&&tr(c,!0),s){var g=[],v=[];re("Patches").M(i,c,g,v),s(g,v)}return c}F(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var d=arguments.length,h=Array(d>1?d-1:0),p=1;p<d;p++)h[p-1]=arguments[p];return n.produceWithPatches(c,function(g){return i.apply(void 0,[g].concat(h))})};var s,o,u=n.produce(i,a,function(c,d){s=c,o=d});return typeof Promise<"u"&&u instanceof Promise?u.then(function(c){return[c,s,o]}):[u,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Z(r)||F(8),ae(r)&&(r=Fi(r));var n=In(this),i=Xt(this,r,void 0);return i[L].C=!0,Yt(n),i},t.finishDraft=function(r,n){var i=r&&r[L],a=i.A;return qt(a,n),Wt(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Bn&&F(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=re("Patches").$;return ae(r)?s(r,n):this.produce(r,function(o){return s(o,n)})},e}(),V=new Xi,Ji=V.produce,Fo=V.produceWithPatches.bind(V),$o=V.setAutoFreeze.bind(V),zo=V.setUseProxies.bind(V),Yo=V.applyPatches.bind(V),Xo=V.createDraft.bind(V),Jo=V.finishDraft.bind(V),bt=Ji;function Te(e){"@babel/helpers - typeof";return Te=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},Te(e)}function Fn(e,t){if(Te(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Te(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $n(e){var t=Fn(e,"string");return Te(t)=="symbol"?t:t+""}function zn(e,t,r){return(t=$n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yn(Object(r),!0).forEach(function(n){zn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Xn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ar=function(){return Math.random().toString(36).substring(7).split("").join(".")},At={INIT:"@@redux/INIT"+ar(),REPLACE:"@@redux/REPLACE"+ar(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ar()}};function Qi(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(B(1));return r(sr)(e,t)}if(typeof e!="function")throw new Error(B(2));var i=e,a=t,s=[],o=s,u=!1;function c(){o===s&&(o=s.slice())}function d(){if(u)throw new Error(B(3));return a}function h(y){if(typeof y!="function")throw new Error(B(4));if(u)throw new Error(B(5));var _=!0;return c(),o.push(y),function(){if(_){if(u)throw new Error(B(6));_=!1,c();var x=o.indexOf(y);o.splice(x,1),s=null}}}function p(y){if(!Qi(y))throw new Error(B(7));if(typeof y.type>"u")throw new Error(B(8));if(u)throw new Error(B(9));try{u=!0,a=i(a,y)}finally{u=!1}for(var _=s=o,S=0;S<_.length;S++){var x=_[S];x()}return y}function g(y){if(typeof y!="function")throw new Error(B(10));i=y,p({type:At.REPLACE})}function v(){var y,_=h;return y={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(B(11));function w(){x.next&&x.next(d())}w();var T=_(w);return{unsubscribe:T}}},y[Xn]=function(){return this},y}return p({type:At.INIT}),n={dispatch:p,subscribe:h,getState:d,replaceReducer:g},n[Xn]=v,n}function Zi(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:At.INIT});if(typeof n>"u")throw new Error(B(12));if(typeof r(void 0,{type:At.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function Jn(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),s,o;try{Zi(r)}catch(u){o=u}return function(c,d){if(c===void 0&&(c={}),o)throw o;if(0)var h;for(var p=!1,g={},v=0;v<a.length;v++){var y=a[v],_=r[y],S=c[y],x=_(S,d);if(typeof x>"u"){var w=d&&d.type;throw new Error(B(14))}g[y]=x,p=p||x!==S}return p=p||a.length!==Object.keys(c).length,p?g:c}}function ke(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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 Qn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(B(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},o=t.map(function(u){return u(s)});return a=ke.apply(void 0,o)(i.dispatch),ir(ir({},i),{},{dispatch:a})}}}function Zn(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(o){return typeof o=="function"?o(i,a,e):s(o)}}};return t}var ei=Zn();ei.withExtraArgument=Zn;var or=ei;var ai=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ea=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ue=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},ta=Object.defineProperty,ra=Object.defineProperties,na=Object.getOwnPropertyDescriptors,ti=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,ri=function(e,t,r){return t in e?ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},pe=function(e,t){for(var r in t||(t={}))ia.call(t,r)&&ri(e,r,t[r]);if(ti)for(var n=0,i=ti(t);n<i.length;n++){var r=i[n];aa.call(t,r)&&ri(e,r,t[r])}return e},ur=function(e,t){return ra(e,na(t))},sa=function(e,t,r){return new Promise(function(n,i){var a=function(u){try{o(r.next(u))}catch(c){i(c)}},s=function(u){try{o(r.throw(u))}catch(c){i(c)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};o((r=r.apply(e,t)).next())})};var oa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ke:ke.apply(null,arguments)},mu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function ua(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var la=function(e){ai(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Ue([void 0],r[0].concat(this)))):new(t.bind.apply(t,Ue([void 0],r.concat(this))))},t}(Array),ca=function(e){ai(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Ue([void 0],r[0].concat(this)))):new(t.bind.apply(t,Ue([void 0],r.concat(this))))},t}(Array);function dr(e){return Z(e)?bt(e,function(){}):e}function da(e){return typeof e=="boolean"}function fa(){return function(t){return pa(t)}}function pa(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,o=new la;if(r&&(da(r)?o.push(or):o.push(or.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var c}return o}var lr=!0;function si(e){var t=fa(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?t():a,o=r.devTools,u=o===void 0?!0:o,c=r.preloadedState,d=c===void 0?void 0:c,h=r.enhancers,p=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(ua(i))g=Jn(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 v=s;if(typeof v=="function"&&(v=v(t),!lr&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!lr&&v.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Qn.apply(void 0,v),_=ke;u&&(_=oa(pe({trace:!lr},typeof u=="object"&&u)));var S=new ca(y),x=S;Array.isArray(p)?x=Ue([y],p):typeof p=="function"&&(x=p(S));var w=_.apply(void 0,x);return sr(g,d,w)}function he(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return pe(pe({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function oi(e){var t={},r=[],n,i={addCase:function(a,s){var o=typeof a=="string"?a:a.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function ha(e){return typeof e=="function"}function ma(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?oi(t):[t,r,n],a=i[0],s=i[1],o=i[2],u;if(ha(e))u=function(){return dr(e())};else{var c=dr(e);u=function(){return c}}function d(h,p){h===void 0&&(h=u());var g=Ue([a[p.type]],s.filter(function(v){var y=v.matcher;return y(p)}).map(function(v){var y=v.reducer;return y}));return g.filter(function(v){return!!v}).length===0&&(g=[o]),g.reduce(function(v,y){if(y)if(ae(v)){var _=v,S=y(_,p);return S===void 0?v:S}else{if(Z(v))return bt(v,function(x){return y(x,p)});var S=y(v,p);if(S===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return v},h)}return d.getInitialState=u,d}function va(e,t){return e+"/"+t}function ui(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:dr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},o={};i.forEach(function(d){var h=n[d],p=va(t,d),g,v;"reducer"in h?(g=h.reducer,v=h.prepare):g=h,a[d]=g,s[p]=g,o[d]=v?he(p,v):he(p)});function u(){var d=typeof e.extraReducers=="function"?oi(e.extraReducers):[e.extraReducers],h=d[0],p=h===void 0?{}:h,g=d[1],v=g===void 0?[]:g,y=d[2],_=y===void 0?void 0:y,S=pe(pe({},p),s);return ma(r,function(x){for(var w in S)x.addCase(w,S[w]);for(var T=0,k=v;T<k.length;T++){var z=k[T];x.addMatcher(z.matcher,z.reducer)}_&&x.addDefaultCase(_)})}var c;return{name:t,reducer:function(d,h){return c||(c=u()),c(d,h)},actions:o,caseReducers:a,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var ya="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ga=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=ya[Math.random()*64|0];return t},ba=["name","message","stack","code"],cr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),ni=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Aa=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=ba;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},bu=function(){function e(t,r,n){var i=he(t+"/fulfilled",function(d,h,p,g){return{payload:d,meta:ur(pe({},g||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),a=he(t+"/pending",function(d,h,p){return{payload:void 0,meta:ur(pe({},p||{}),{arg:h,requestId:d,requestStatus:"pending"})}}),s=he(t+"/rejected",function(d,h,p,g,v){return{payload:g,error:(n&&n.serializeError||Aa)(d||"Rejected"),meta:ur(pe({},v||{}),{arg:p,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function c(d){return function(h,p,g){var v=n?.idGenerator?n.idGenerator(d):ga(),y=new u,_,S=!1;function x(T){_=T,y.abort()}var w=function(){return sa(this,null,function(){var T,k,z,ye,K,ge,Ce;return ea(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),ye=(T=n?.condition)==null?void 0:T.call(n,d,{getState:p,extra:g}),Sa(ye)?[4,ye]:[3,2];case 1:ye=l.sent(),l.label=2;case 2:if(ye===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,K=new Promise(function(f,A){return y.signal.addEventListener("abort",function(){return A({name:"AbortError",message:_||"Aborted"})})}),h(a(v,d,(k=n?.getPendingMeta)==null?void 0:k.call(n,{requestId:v,arg:d},{getState:p,extra:g}))),[4,Promise.race([K,Promise.resolve(r(d,{dispatch:h,getState:p,extra:g,requestId:v,signal:y.signal,abort:x,rejectWithValue:function(f,A){return new cr(f,A)},fulfillWithValue:function(f,A){return new ni(f,A)}})).then(function(f){if(f instanceof cr)throw f;return f instanceof ni?i(f.payload,v,d,f.meta):i(f,v,d)})])];case 3:return z=l.sent(),[3,5];case 4:return ge=l.sent(),z=ge instanceof cr?s(null,v,d,ge.payload,ge.meta):s(ge,v,d),[3,5];case 5:return Ce=n&&!n.dispatchConditionRejection&&s.match(z)&&z.meta.condition,Ce||h(z),[2,z]}})})}();return Object.assign(w,{abort:x,requestId:v,arg:d,unwrap:function(){return w.then(Ea)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ea(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Sa(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var li="listener",ci="completed",di="cancelled",Au="task-"+di,Eu="task-"+ci,Su=li+"-"+di,xu=li+"-"+ci;var fr="listenerMiddleware";var Ou=he(fr+"/add"),_u=he(fr+"/removeAll"),Tu=he(fr+"/remove");var ii,Cu=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ii||(ii=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},xa=function(e){return function(t){setTimeout(t,e)}},wu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xa(10);Gn();function Oa(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var Et=class extends Oa(Object){};window.ftReduxStores||(window.ftReduxStores={});var fi=class e extends Et{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(mt(a))return a;if(i==null)return;let s=ui({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=si({reducer:(u,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...c.overwrites}:s.reducer(u,c)});return window.ftReduxStores[i.name]=new e(s,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new dt;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,o)=>{let u=s,c=a[u];return c?(...d)=>{let h=c(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{this.setState({[u]:i(d)})}}}),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 xt=E(N());var St=class extends J{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var Ta="ft-user-assets",Ca={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Se).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}}},$=xt.FtReduxStore.get({name:Ta,reducers:Ca,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Se).map(e=>[e,void 0])),bookmarkByMap:{}}}}),pr=class{constructor(t=new St){this.assetCountsService=t,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new rt,this.savedSearchesService=new ot,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=b.getState();(0,xt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){$.actions.clearAssetCount(),$.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();$.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&$.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&$.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys($.getState().assetCounts.bookmarkByMap).length!==0;t===Se.BOOKMARKS&&r&&$.actions.clearBookmarkCountByMap(),$.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$.actions.bookmarks(r)}}},wa=new pr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=wa);(0,pi.customElement)("ft-app-context")(R);var gi=E(q());var Ra=E(N());function hi(e){return e.match(/^[\w-]+\.[\w-]+$/)}var La=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},mi=Symbol("i18nAttributes"),vi=Symbol("i18nListAttributes"),bi=Symbol("i18nProperties"),Ot=Symbol("i18nContexts"),$e=Symbol("i18nUnsubs");function Ai(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?it:Le}i18n(a){let{context:s,key:o,message:u}=a,{custom:c,args:d,argsProvider:h}=a;if(s&&o){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=d??(h?h(this):[]);return this.getI18nService(c).resolveMessage(s,o,...p)}return u}customI18n(a,s){if(hi(a)){let[o,u]=a.split(".");return this.i18n({custom:!0,context:o,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,o,u)=>a.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,o,u)=>{var c;return((c=u?.context)===null||c===void 0?void 0:c.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,o;let u=this,c=(d,h,p)=>p?.context&&p.key&&a(d,h,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...d})}:p;(s=this[mi])===null||s===void 0||s.forEach((d,h)=>u[h]=c(d,h,u[h])),(o=this[vi])===null||o===void 0||o.forEach((d,h)=>{var p;return u[h]=(p=u[h])===null||p===void 0?void 0:p.map(g=>c(d,h,g))})}updateI18nProperties(a){var s;(s=this[bi])===null||s===void 0||s.forEach((o,u)=>{a(o,u)&&(this[u]=this.i18n(o))})}addI18nMessages(a,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,o)}addI18nContext(a,s,o){let u=(typeof a=="string"?a:a.name).toLowerCase();o=typeof a=="string"?o:a.custom,this[Ot].set(u,{isCustomContext:o}),this[$e].has(u)||this[$e].set(u,this.getI18nService(o).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(o).prepareContext(u,s)}hasI18nContext(a){return this[Ot].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ot].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[$e].forEach(a=>a()),this[$e].clear()}}return t=Ot,r=$e,La([(0,gi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var yi=class extends Ai(Tt.FtLitElement){},_t=class extends Ai(Tt.FtLitElementRedux){};var ze=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},ee=class extends _t{constructor(){super(),this.editorMode=!1,this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Ct.nothing:Ct.html`
87
87
  <span class="ft-i18n">
88
88
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
89
89
  </span>
90
- `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Z.elementDefinitions={};Z.styles=Dr;$e([(0,Ct.redux)()],Z.prototype,"editorMode",void 0);$e([(0,wt.property)()],Z.prototype,"context",void 0);$e([(0,wt.property)()],Z.prototype,"key",void 0);$e([(0,Ct.jsonProperty)([])],Z.prototype,"args",void 0);$e([(0,wt.property)()],Z.prototype,"defaultMessage",void 0);var Rt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?nt:Re}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)})}};(0,bi.customElement)("ft-i18n")(Z);var pr=Rt.build("designedReaderTopicContent");var G=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},M=class extends Je{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,r,n;return!this.map||!this.error&&!this.content&&((t=this.translationSourceLanguage)===null||t===void 0?void 0:t.code)==((r=this.translationDestinationLanguage)===null||r===void 0?void 0:r.code)?me.html`
90
+ `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};ee.elementDefinitions={};ee.styles=Ir;ze([(0,Rt.redux)()],ee.prototype,"editorMode",void 0);ze([(0,wt.property)()],ee.prototype,"context",void 0);ze([(0,wt.property)()],ee.prototype,"key",void 0);ze([(0,Rt.jsonProperty)([])],ee.prototype,"args",void 0);ze([(0,wt.property)()],ee.prototype,"defaultMessage",void 0);var Lt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?it:Le}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)})}};(0,Ei.customElement)("ft-i18n")(ee);var hr=Lt.build("designedReaderTopicContent");var G=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},M=class extends Qe{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,r,n;return!this.map||!this.error&&!this.content&&((t=this.translationSourceLanguage)===null||t===void 0?void 0:t.code)==((r=this.translationDestinationLanguage)===null||r===void 0?void 0:r.code)?me.html`
91
91
  <section class="topic-loading"></section>
92
92
  `:me.html`
93
93
  <style>
@@ -100,15 +100,15 @@
100
100
  <div class="topic-on-error">
101
101
  <ft-icon>WARNING</ft-icon>
102
102
  <div>
103
- ${this.is404Error()?pr.messages.topicMissingAdvice():pr.messages.somethingWentWrong()}
103
+ ${this.is404Error()?hr.messages.topicMissingAdvice():hr.messages.somethingWentWrong()}
104
104
  </div>
105
105
  </div>
106
106
  `;let i=(r=(t=this.map)===null||t===void 0?void 0:t.contentStyles.customCssClasses.join(" "))!==null&&r!==void 0?r:"",a=(((n=this.tocNode)===null||n===void 0?void 0:n.depth)||1)+this.headingLevelsShift;return this.translationLoading||!this.content?me.html`
107
107
  <ft-skeleton></ft-skeleton>`:me.html`
108
108
  <div class="depth-${a} content-locale-${this.getTopicLanguage()} ${i}">
109
- ${this.content!=null?(0,Ei.unsafeHTML)(`${this.content}`):me.nothing}
109
+ ${this.content!=null?(0,Si.unsafeHTML)(`${this.content}`):me.nothing}
110
110
  </div>
111
- `}is404Error(){return this.error.status===404}getTopicLanguage(){var t;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(t=this.map)===null||t===void 0?void 0:t.lang}};M.styles=[Er,H.highlightHtmlStyles];G([(0,H.redux)()],M.prototype,"map",void 0);G([(0,H.redux)({selector:e=>e.translation.profileId})],M.prototype,"translationProfileId",void 0);G([(0,H.redux)({selector:e=>e.translation.destinationLanguage})],M.prototype,"translationDestinationLanguage",void 0);G([(0,H.redux)({selector:e=>e.translation.sourceLanguage})],M.prototype,"translationSourceLanguage",void 0);G([(0,H.redux)({selector:e=>e.translation.isLoading})],M.prototype,"translationLoading",void 0);G([(0,H.redux)({selector:e=>e.translation.isError})],M.prototype,"translationError",void 0);G([(0,H.redux)()],M.prototype,"scrollTarget",void 0);G([(0,ve.state)()],M.prototype,"content",void 0);G([(0,ve.state)()],M.prototype,"error",void 0);G([(0,H.redux)({selector:(e,t)=>t.disableContextInteractions?"":e.searchInDocumentQuery})],M.prototype,"searchInDocumentQuery",void 0);G([(0,ve.property)({attribute:!1})],M.prototype,"contentPreprocessor",void 0);G([(0,ve.property)({attribute:!1})],M.prototype,"onContentAvailable",void 0);G([(0,ve.query)("section.topic")],M.prototype,"topicContainer",void 0);(0,Ai.customElement)("ft-reader-topic-content")(M);})();
111
+ `}is404Error(){return this.error.status===404}getTopicLanguage(){var t;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(t=this.map)===null||t===void 0?void 0:t.lang}};M.styles=[Er,H.highlightHtmlStyles];G([(0,H.redux)()],M.prototype,"map",void 0);G([(0,H.redux)({selector:e=>e.translation.profileId})],M.prototype,"translationProfileId",void 0);G([(0,H.redux)({selector:e=>e.translation.destinationLanguage})],M.prototype,"translationDestinationLanguage",void 0);G([(0,H.redux)({selector:e=>e.translation.sourceLanguage})],M.prototype,"translationSourceLanguage",void 0);G([(0,H.redux)({selector:e=>e.translation.isLoading})],M.prototype,"translationLoading",void 0);G([(0,H.redux)({selector:e=>e.translation.isError})],M.prototype,"translationError",void 0);G([(0,H.redux)()],M.prototype,"scrollTarget",void 0);G([(0,ve.state)()],M.prototype,"content",void 0);G([(0,ve.state)()],M.prototype,"error",void 0);G([(0,H.redux)({selector:(e,t)=>t.disableContextInteractions?"":e.searchInDocumentQuery})],M.prototype,"searchInDocumentQuery",void 0);G([(0,ve.property)({attribute:!1})],M.prototype,"contentPreprocessor",void 0);G([(0,ve.property)({attribute:!1})],M.prototype,"onContentAvailable",void 0);G([(0,ve.query)("section.topic")],M.prototype,"topicContainer",void 0);(0,xi.customElement)("ft-reader-topic-content")(M);})();
112
112
  /*! Bundled license information:
113
113
 
114
114
  @lit/reactive-element/css-tag.js: