@fluid-topics/ft-search-result-title 1.1.29 → 1.1.31
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,4 +1,4 @@
|
|
|
1
|
-
!function(t,o,e,r,a){var n,i,l,c,p,f,s,h,y,g,d,b,u,m,O,N,S,x;!function(t){!function(o){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function i(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function c(t){this.map={},t instanceof c?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function s(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function h(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t,o,e,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=f(o),o.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),r=0;r<o.length;r++)e[r]=String.fromCharCode(o[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=n(t),o=i(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},c.prototype.delete=function(t){delete this.map[n(t)]},c.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},c.prototype.set=function(t,o){this.map[n(t)]=i(o)},c.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),l(t)},c.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),l(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),l(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function d(t,o){var e,r,a=(o=o||{}).body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,a||null==t._bodyInit||(a=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new c(o.headers)),this.method=(e=o.method||this.method||"GET",r=e.toUpperCase(),g.indexOf(r)>-1?r:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function b(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),a=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(r),decodeURIComponent(a))}})),o}function u(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new c(o.headers),this.url=o.url||"",this._initBody(t)}d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},y.call(d.prototype),y.call(u.prototype),u.prototype.clone=function(){return new u(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},u.error=function(){var t=new u(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];u.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new u(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function O(t,r){return new Promise((function(a,n){var i=new d(t,r);if(i.signal&&i.signal.aborted)return n(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function p(){l.abort()}l.onload=function(){var t,o,e={status:l.status,statusText:l.statusText,headers:(t=l.getAllResponseHeaders()||"",o=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var a=e.join(":").trim();o.append(r,a)}})),o)};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;a(new u(r,e))},l.onerror=function(){n(new TypeError("Network request failed"))},l.ontimeout=function(){n(new TypeError("Network request failed"))},l.onabort=function(){n(new o.DOMException("Aborted","AbortError"))},l.open(i.method,i.url,!0),"include"===i.credentials?l.withCredentials=!0:"omit"===i.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),i.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),i.signal&&(i.signal.addEventListener("abort",p),l.onreadystatechange=function(){4===l.readyState&&i.signal.removeEventListener("abort",p)}),l.send(void 0===i._bodyInit?null:i._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=d,t.Response=u),o.Headers=c,o.Request=d,o.Response=u,o.fetch=O,Object.defineProperty(o,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(n||(n={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(i||(i={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(l||(l={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(c||(c={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(p||(p={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(f||(f={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(s||(s={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(h||(h={})),function(t){t.ASC="ASC",t.DESC="DESC"}(y||(y={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(g||(g={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(d||(d={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(b||(b={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(u||(u={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(O||(O={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(N||(N={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(S||(S={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(x||(x={})),S.PERSONAL_BOOK_SHARE_USER,S.PERSONAL_BOOK_USER,S.HTML_EXPORT_USER,S.PERSONAL_BOOK_USER,S.PDF_EXPORT_USER,S.PERSONAL_BOOK_USER,S.KHUB_ADMIN,S.CONTENT_PUBLISHER,S.ADMIN,S.KHUB_ADMIN,S.USERS_ADMIN,S.PORTAL_ADMIN,S.DEVELOPER,S.BETA_USER,S.DEBUG_USER;const C=e.css`
|
|
1
|
+
!function(t,o,e,r,a){var n,i,l,c,p,f,s,h,y,g,d,b,u,m,O,N,S,x;!function(t){!function(o){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function i(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function c(t){this.map={},t instanceof c?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function s(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function h(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t,o,e,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=f(o),o.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),r=0;r<o.length;r++)e[r]=String.fromCharCode(o[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=n(t),o=i(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},c.prototype.delete=function(t){delete this.map[n(t)]},c.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},c.prototype.set=function(t,o){this.map[n(t)]=i(o)},c.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),l(t)},c.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),l(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),l(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function d(t,o){var e,r,a=(o=o||{}).body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,a||null==t._bodyInit||(a=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new c(o.headers)),this.method=(e=o.method||this.method||"GET",r=e.toUpperCase(),g.indexOf(r)>-1?r:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function b(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),a=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(r),decodeURIComponent(a))}})),o}function u(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new c(o.headers),this.url=o.url||"",this._initBody(t)}d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},y.call(d.prototype),y.call(u.prototype),u.prototype.clone=function(){return new u(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},u.error=function(){var t=new u(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];u.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new u(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function O(t,r){return new Promise((function(a,n){var i=new d(t,r);if(i.signal&&i.signal.aborted)return n(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function p(){l.abort()}l.onload=function(){var t,o,e={status:l.status,statusText:l.statusText,headers:(t=l.getAllResponseHeaders()||"",o=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var a=e.join(":").trim();o.append(r,a)}})),o)};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;a(new u(r,e))},l.onerror=function(){n(new TypeError("Network request failed"))},l.ontimeout=function(){n(new TypeError("Network request failed"))},l.onabort=function(){n(new o.DOMException("Aborted","AbortError"))},l.open(i.method,i.url,!0),"include"===i.credentials?l.withCredentials=!0:"omit"===i.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),i.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),i.signal&&(i.signal.addEventListener("abort",p),l.onreadystatechange=function(){4===l.readyState&&i.signal.removeEventListener("abort",p)}),l.send(void 0===i._bodyInit?null:i._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=d,t.Response=u),o.Headers=c,o.Request=d,o.Response=u,o.fetch=O,Object.defineProperty(o,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(n||(n={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(i||(i={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(l||(l={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(c||(c={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(p||(p={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(f||(f={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(s||(s={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(h||(h={})),function(t){t.ASC="ASC",t.DESC="DESC"}(y||(y={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(g||(g={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(d||(d={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(b||(b={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(u||(u={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(O||(O={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(N||(N={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(S||(S={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(x||(x={})),S.PERSONAL_BOOK_SHARE_USER,S.PERSONAL_BOOK_USER,S.HTML_EXPORT_USER,S.PERSONAL_BOOK_USER,S.PDF_EXPORT_USER,S.PERSONAL_BOOK_USER,S.KHUB_ADMIN,S.CONTENT_PUBLISHER,S.ADMIN,S.KHUB_ADMIN,S.USERS_ADMIN,S.PORTAL_ADMIN,S.DEVELOPER,S.BETA_USER,S.DEBUG_USER;const C=e.css`
|
|
2
2
|
`,v=o.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class w{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=v.getState(),r=null!=t?t:e;if(o&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,r,!0)}static get(t){var o;return null!=t?w.build(t):null!==(o=w.API)&&void 0!==o?o:w.API=w.build()}static await(t){return new Promise((o=>{let e=w.get(t);if(e)o(e);else{const r=v.subscribe((()=>{e=w.get(t),e&&(r(),o(e))}))}}))}}var E;const I=Symbol("clearAfterUnitTest");class U{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={},this.currentUiLocale="",this[E]=()=>{this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={}},this.currentUiLocale=v.getState().uiLocale,v.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=v.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var r;if(t=t.toLowerCase(),Object.keys(e).length>0){const a={...null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},...e};o.deepEqual(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...r){var a,n,i;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(a=this.cache.getNow(t))||void 0===a?void 0:a.messages)&&void 0!==n?n:{};return new o.ParametrizedLabelResolver(null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},l).resolve(e,...r)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>o.delay(0).then((()=>t())).catch((()=>null)))))}}E=I,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new U((async(t,o)=>(await w.await()).getFluidTopicsMessageContext(t,o)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new U((async(t,o)=>(await w.await()).getCustomMessageContext(t,o))));const R=window.FluidTopicsI18nService;var W=function(t,o,e,r){for(var a,n=arguments.length,i=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(a=t[l])&&(i=(n<3?a(i):n>3?a(o,e,i):a(o,e))||i);return n>3&&i&&Object.defineProperty(o,e,i),i};class L extends o.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>w.get(),this.cache=new o.CacheRegistry,this.cleanSessionDebouncer=new o.Debouncer}render(){return e.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}update(t){super.update(t),t.has("baseUrl")&&(v.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&v.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&v.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&v.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&v.actions.noCustom(this.noCustom),t.has("editorMode")&&v.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&v.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&v.actions.session(this.session),t.has("availableUiLocales")&&v.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>R.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}L.elementDefinitions={},L.styles=C,W([r.property()],L.prototype,"baseUrl",void 0),W([r.property()],L.prototype,"apiIntegrationIdentifier",void 0),W([r.property()],L.prototype,"uiLocale",void 0),W([o.jsonProperty(null)],L.prototype,"availableUiLocales",void 0),W([o.jsonProperty(null)],L.prototype,"metadataConfiguration",void 0),W([r.property({type:Boolean})],L.prototype,"editorMode",void 0),W([r.property({type:Boolean})],L.prototype,"noCustom",void 0),W([r.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],L.prototype,"noCustomComponent",void 0),W([r.property({type:Boolean})],L.prototype,"withManualResources",void 0),W([o.jsonProperty([])],L.prototype,"messageContexts",void 0),W([o.jsonProperty(void 0)],L.prototype,"session",void 0),W([r.property({type:Object})],L.prototype,"apiProvider",void 0);class K{async listMySearches(){var t;return(null===(t=v.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await w.await()).listMySearches(v.getState().session.profile.userId):[]}}const A=new o.CacheRegistry;class Z{async listMyBookmarks(){return A.get("bookmarks",(async()=>(await w.await()).listMyBookmarks(v.getState().session.profile.userId)))}clearCache(){A.clear("bookmarks")}}const k=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=v.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Z,v.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=v.getState();o.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){k.actions.savedSearches(void 0)}clearMyBookmarks(){k.actions.bookmarks(void 0)}async reloadMySearches(){const t=new K,o=await t.listMySearches();k.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(o)}}},o.customElement("ft-app-context")(L);class $ extends Event{constructor(){super($.eventName)}}$.eventName="search-context-clear-all-filters";var D=function(t,o,e,r){for(var a,n=arguments.length,i=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(a=t[l])&&(i=(n<3?a(i):n>3?a(o,e,i):a(o,e))||i);return n>3&&i&&Object.defineProperty(o,e,i),i};class z extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const F=Symbol("registerInterval");class B extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[F]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[F]):this.dispatchEvent(new z)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=F,D([r.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}var H=function(t,o,e,r){for(var a,n=arguments.length,i=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(a=t[l])&&(i=(n<3?a(i):n>3?a(o,e,i):a(o,e))||i);return n>3&&i&&Object.defineProperty(o,e,i),i};class T extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}}const P=Symbol("registerInterval");class G extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setResultStateManager(t){this.resultStateManager=t}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[P]=window.setInterval((()=>this.tryToRegisterToResultContext()),50)}tryToRegisterToResultContext(){null!=this.result?window.clearInterval(this[P]):this.dispatchEvent(new T)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return o=P,H([r.property({attribute:!1})],e.prototype,"cluster",void 0),H([r.property({attribute:!1})],e.prototype,"result",void 0),H([r.property({attribute:!1,type:Number})],e.prototype,"rank",void 0),e}(B)){}const _={highlightBackgroundColor:o.FtCssVariableFactory.create("--ft-srt-highlight-background-color","","COLOR","transparent")},M=e.css`
|
|
@@ -102,7 +102,7 @@ let bo=class extends $t{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
102
102
|
display: inline-block;
|
|
103
103
|
width: 0;
|
|
104
104
|
}
|
|
105
|
-
`;class $o{constructor(t,o){this.defaultLabels=t,this.labels=o}resolve(t,...o){var e,r;t=this.resolvePluralKey(t,o);let n=null!==(r=null!==(e=this.labels[t])&&void 0!==e?e:this.defaultLabels[t])&&void 0!==r?r:"";return o.forEach(((t,o)=>n=n.replace(new RegExp(`\\{${o}([^}]*)\\}`,"g"),((o,e)=>this.formatValue(t,e))))),n}resolvePluralKey(t,o){for(let e of o)if("number"==typeof e){const o=`${String(t)}[\\=${e}]`;if(o in this.labels||o in this.defaultLabels)return o}return t}formatValue(t,o){return t instanceof Date?this.formatDate(t,o):null!=t?t:""}formatDate(t,o){const e=e=>(null==o?void 0:o.includes("date"))?t.toLocaleDateString(e):(null==o?void 0:o.includes("time"))?t.toLocaleTimeString(e):t.toLocaleString(e);try{return e(document.documentElement.lang)}catch(t){return e()}}}class Do{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter((o=>o.type!==t.type))),this.queue.push(t)}consume(t){const o=this.queue.find((o=>o.type===t));return o&&(this.queue=this.queue.filter((t=>t!==o))),o}}function Po(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Fo,jo,Mo;const Zo=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),zo=Symbol("internalStores");class _o extends ko{constructor(){super(...arguments),this[Fo]=new Map,this[jo]=new Map,this[Mo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((o=>t.has(o)))&&this.updateFromStores()}getUnnamedStore(){if(this[zo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zo].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zo].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Po(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[zo].delete(o)}setupStore(t,o){this[zo].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zo].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[To].has(t.store):this[To].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[To].set(t,o.subscribe((()=>this.updateFromStores()))),Po(o)&&o.eventBus&&(null===(e=this.reduxConstructor.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Zo].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[To].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Zo].forEach((t=>t())),this[Zo]=[]}unsubscribeFromStore(t){this[To].has(t)&&this[To].get(t)(),this[To].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Bo(t){for(var o=arguments.length,e=Array(o>1?o-1:0),r=1;r<o;r++)e[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(e.length?" "+e.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ho(t){return!!t&&!!t[Ae]}function Go(t){var o;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;var e=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return e===Object||"function"==typeof e&&Function.toString.call(e)===ke}(t)||Array.isArray(t)||!!t[We]||!!(null===(o=t.constructor)||void 0===o?void 0:o[We])||Qo(t)||te(t))}function Vo(t,o,e){void 0===e&&(e=!1),0===qo(t)?(e?Object.keys:Ke)(t).forEach((function(r){e&&"symbol"==typeof r||o(r,t[r],t)})):t.forEach((function(e,r){return o(r,e,t)}))}function qo(t){var o=t[Ae];return o?o.i>3?o.i-4:o.i:Array.isArray(t)?1:Qo(t)?2:te(t)?3:0}function Yo(t,o){return 2===qo(t)?t.has(o):Object.prototype.hasOwnProperty.call(t,o)}function Xo(t,o,e){var r=qo(t);2===r?t.set(o,e):3===r?t.add(e):t[o]=e}function Jo(t,o){return t===o?0!==t||1/t==1/o:t!=t&&o!=o}function Qo(t){return Re&&t instanceof Map}function te(t){return Ue&&t instanceof Set}function oe(t){return t.o||t.t}function ee(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var o=$e(t);delete o[Ae];for(var e=Ke(o),r=0;r<e.length;r++){var n=e[r],i=o[n];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),o)}function re(t,o){return void 0===o&&(o=!1),ie(t)||Ho(t)||!Go(t)||(qo(t)>1&&(t.set=t.add=t.clear=t.delete=ne),Object.freeze(t),o&&Vo(t,(function(t,o){return re(o,!0)}),!0)),t}function ne(){Bo(2)}function ie(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ae(t){var o=De[t];return o||Bo(18,t),o}function se(){return Ee}function ce(t,o){o&&(ae("Patches"),t.u=[],t.s=[],t.v=o)}function le(t){fe(t),t.p.forEach(pe),t.p=null}function fe(t){t===Ee&&(Ee=t.l)}function he(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function pe(t){var o=t[Ae];0===o.i||1===o.i?o.j():o.g=!0}function ue(t,o){o._=o.p.length;var e=o.p[0],r=void 0!==t&&t!==e;return o.h.O||ae("ES5").S(o,t,r),r?(e[Ae].P&&(le(o),Bo(4)),Go(t)&&(t=de(o,t),o.l||ge(o,t)),o.u&&ae("Patches").M(e[Ae].t,t,o.u,o.s)):t=de(o,e,[]),le(o),o.u&&o.v(o.u,o.s),t!==Le?t:void 0}function de(t,o,e){if(ie(o))return o;var r=o[Ae];if(!r)return Vo(o,(function(n,i){return ye(t,r,o,n,i,e)}),!0),o;if(r.A!==t)return o;if(!r.P)return ge(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var n=4===r.i||5===r.i?r.o=ee(r.k):r.o,i=n,a=!1;3===r.i&&(i=new Set(n),n.clear(),a=!0),Vo(i,(function(o,i){return ye(t,r,n,o,i,e,a)})),ge(t,n,!1),e&&t.u&&ae("Patches").N(r,e,t.u,t.s)}return r.o}function ye(t,o,e,r,n,i,a){if(Ho(n)){var s=de(t,n,i&&o&&3!==o.i&&!Yo(o.R,r)?i.concat(r):void 0);if(Xo(e,r,s),!Ho(s))return;t.m=!1}else a&&e.add(n);if(Go(n)&&!ie(n)){if(!t.h.D&&t._<1)return;de(t,n),o&&o.A.l||ge(t,n)}}function ge(t,o,e){void 0===e&&(e=!1),!t.l&&t.h.D&&t.m&&re(o,e)}function be(t,o){var e=t[Ae];return(e?oe(e):t)[o]}function me(t,o){if(o in t)for(var e=Object.getPrototypeOf(t);e;){var r=Object.getOwnPropertyDescriptor(e,o);if(r)return r;e=Object.getPrototypeOf(e)}}function Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function ve(t){t.o||(t.o=ee(t.t))}function Se(t,o,e){var r=Qo(o)?ae("MapSet").F(o,e):te(o)?ae("MapSet").T(o,e):t.O?function(t,o){var e=Array.isArray(t),r={i:e?1:0,A:o?o.A:se(),P:!1,I:!1,R:{},l:o,t,k:null,o:null,j:null,C:!1},n=r,i=Pe;e&&(n=[r],i=Fe);var a=Proxy.revocable(n,i),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(o,e):ae("ES5").J(o,e);return(e?e.A:se()).p.push(r),r}function we(t){return Ho(t)||Bo(22,t),function t(o){if(!Go(o))return o;var e,r=o[Ae],n=qo(o);if(r){if(!r.P&&(r.i<4||!ae("ES5").K(r)))return r.t;r.I=!0,e=Ne(o,n),r.I=!1}else e=Ne(o,n);return Vo(e,(function(o,n){r&&function(t,o){return 2===qo(t)?t.get(o):t[o]}(r.t,o)===n||Xo(e,o,t(n))})),3===n?new Set(e):e}(t)}function Ne(t,o){switch(o){case 2:return new Map(t);case 3:return Array.from(t)}return ee(t)}Fo=To,jo=zo,Mo=Zo,_o.reduxProperties=new Map,_o.reduxReactiveProperties=new Set,_o.reduxEventListeners=new Map;var xe,Ee,Ce="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Re="undefined"!=typeof Map,Ue="undefined"!=typeof Set,Ie="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Le=Ce?Symbol.for("immer-nothing"):((xe={})["immer-nothing"]=!0,xe),We=Ce?Symbol.for("immer-draftable"):"__$immer_draftable",Ae=Ce?Symbol.for("immer-state"):"__$immer_state",ke=""+Object.prototype.constructor,Ke="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$e=Object.getOwnPropertyDescriptors||function(t){var o={};return Ke(t).forEach((function(e){o[e]=Object.getOwnPropertyDescriptor(t,e)})),o},De={},Pe={get:function(t,o){if(o===Ae)return t;var e=oe(t);if(!Yo(e,o))return function(t,o,e){var r,n=me(o,e);return n?"value"in n?n.value:null===(r=n.get)||void 0===r?void 0:r.call(t.k):void 0}(t,e,o);var r=e[o];return t.I||!Go(r)?r:r===be(t.t,o)?(ve(t),t.o[o]=Se(t.A.h,r,t)):r},has:function(t,o){return o in oe(t)},ownKeys:function(t){return Reflect.ownKeys(oe(t))},set:function(t,o,e){var r=me(oe(t),o);if(null==r?void 0:r.set)return r.set.call(t.k,e),!0;if(!t.P){var n=be(oe(t),o),i=null==n?void 0:n[Ae];if(i&&i.t===e)return t.o[o]=e,t.R[o]=!1,!0;if(Jo(e,n)&&(void 0!==e||Yo(t.t,o)))return!0;ve(t),Oe(t)}return t.o[o]===e&&(void 0!==e||o in t.o)||Number.isNaN(e)&&Number.isNaN(t.o[o])||(t.o[o]=e,t.R[o]=!0),!0},deleteProperty:function(t,o){return void 0!==be(t.t,o)||o in t.t?(t.R[o]=!1,ve(t),Oe(t)):delete t.R[o],t.o&&delete t.o[o],!0},getOwnPropertyDescriptor:function(t,o){var e=oe(t),r=Reflect.getOwnPropertyDescriptor(e,o);return r?{writable:!0,configurable:1!==t.i||"length"!==o,enumerable:r.enumerable,value:e[o]}:r},defineProperty:function(){Bo(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Bo(12)}},Fe={};Vo(Pe,(function(t,o){Fe[t]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}})),Fe.deleteProperty=function(t,o){return Fe.set.call(this,t,o,void 0)},Fe.set=function(t,o,e){return Pe.set.call(this,t[0],o,e,t[0])};var je=function(){function t(t){var o=this;this.O=Ie,this.D=!0,this.produce=function(t,e,r){if("function"==typeof t&&"function"!=typeof e){var n=e;e=t;var i=o;return function(t){var o=this;void 0===t&&(t=n);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(t,(function(t){var r;return(r=e).call.apply(r,[o,t].concat(a))}))}}var a;if("function"!=typeof e&&Bo(6),void 0!==r&&"function"!=typeof r&&Bo(7),Go(t)){var s=he(o),c=Se(o,t,void 0),l=!0;try{a=e(c),l=!1}finally{l?le(s):fe(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return ce(s,r),ue(t,s)}),(function(t){throw le(s),t})):(ce(s,r),ue(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=e(t))&&(a=t),a===Le&&(a=void 0),o.D&&re(a,!0),r){var f=[],h=[];ae("Patches").M(t,a,f,h),r(f,h)}return a}Bo(21,t)},this.produceWithPatches=function(t,e){if("function"==typeof t)return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(e,(function(o){return t.apply(void 0,[o].concat(n))}))};var r,n,i=o.produce(t,e,(function(t,o){r=t,n=o}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(t){return[t,r,n]})):[i,r,n]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=t.prototype;return o.createDraft=function(t){Go(t)||Bo(8),Ho(t)&&(t=we(t));var o=he(this),e=Se(this,t,void 0);return e[Ae].C=!0,fe(o),e},o.finishDraft=function(t,o){var e=(t&&t[Ae]).A;return ce(e,o),ue(void 0,e)},o.setAutoFreeze=function(t){this.D=t},o.setUseProxies=function(t){t&&!Ie&&Bo(20),this.O=t},o.applyPatches=function(t,o){var e;for(e=o.length-1;e>=0;e--){var r=o[e];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}e>-1&&(o=o.slice(e+1));var n=ae("Patches").$;return Ho(t)?n(t,o):this.produce(t,(function(t){return n(t,o)}))},t}(),Me=new je,Ze=Me.produce;function Te(t){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(t)}function ze(t){var o=function(t,o){if("object"!==Te(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o||"default");if("object"!==Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===Te(o)?o:String(o)}function _e(t,o,e){return(o=ze(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function Be(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function He(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Be(Object(e),!0).forEach((function(o){_e(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Be(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function Ge(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Me.produceWithPatches.bind(Me),Me.setAutoFreeze.bind(Me),Me.setUseProxies.bind(Me),Me.applyPatches.bind(Me),Me.createDraft.bind(Me),Me.finishDraft.bind(Me);var Ve="function"==typeof Symbol&&Symbol.observable||"@@observable",qe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ye={INIT:"@@redux/INIT"+qe(),REPLACE:"@@redux/REPLACE"+qe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qe()}};function Xe(t,o,e){var r;if("function"==typeof o&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(Ge(0));if("function"==typeof o&&void 0===e&&(e=o,o=void 0),void 0!==e){if("function"!=typeof e)throw new Error(Ge(1));return e(Xe)(t,o)}if("function"!=typeof t)throw new Error(Ge(2));var n=t,i=o,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(Ge(3));return i}function h(t){if("function"!=typeof t)throw new Error(Ge(4));if(c)throw new Error(Ge(5));var o=!0;return l(),s.push(t),function(){if(o){if(c)throw new Error(Ge(6));o=!1,l();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(t)===o}(t))throw new Error(Ge(7));if(void 0===t.type)throw new Error(Ge(8));if(c)throw new Error(Ge(9));try{c=!0,i=n(i,t)}finally{c=!1}for(var o=a=s,e=0;e<o.length;e++){(0,o[e])()}return t}return p({type:Ye.INIT}),(r={dispatch:p,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ge(10));n=t,p({type:Ye.REPLACE})}})[Ve]=function(){var t,o=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ge(11));function e(){t.next&&t.next(f())}return e(),{unsubscribe:o(e)}}})[Ve]=function(){return this},t},r}function Je(t){for(var o=Object.keys(t),e={},r=0;r<o.length;r++){var n=o[r];"function"==typeof t[n]&&(e[n]=t[n])}var i,a=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(o){var e=t[o];if(void 0===e(void 0,{type:Ye.INIT}))throw new Error(Ge(12));if(void 0===e(void 0,{type:Ye.PROBE_UNKNOWN_ACTION()}))throw new Error(Ge(13))}))}(e)}catch(t){i=t}return function(t,o){if(void 0===t&&(t={}),i)throw i;for(var r=!1,n={},s=0;s<a.length;s++){var c=a[s],l=e[c],f=t[c],h=l(f,o);if(void 0===h)throw o&&o.type,new Error(Ge(14));n[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?n:t}}function Qe(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return 0===o.length?function(t){return t}:1===o.length?o[0]:o.reduce((function(t,o){return function(){return t(o.apply(void 0,arguments))}}))}function tr(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),r=function(){throw new Error(Ge(15))},n={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=o.map((function(t){return t(n)}));return r=Qe.apply(void 0,i)(e.dispatch),He(He({},e),{},{dispatch:r})}}}function or(t){return function(o){var e=o.dispatch,r=o.getState;return function(o){return function(n){return"function"==typeof n?n(e,r,t):o(n)}}}}var er=or();er.withExtraArgument=or;var rr,nr=er,ir=(rr=function(t,o){return rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])},rr(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}rr(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),ar=function(t,o){var e,r,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=o.call(t,a)}catch(t){i=[6,t],r=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},sr=function(t,o){for(var e=0,r=o.length,n=t.length;e<r;e++,n++)t[n]=o[e];return t},cr=Object.defineProperty,lr=Object.defineProperties,fr=Object.getOwnPropertyDescriptors,hr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,dr=function(t,o,e){return o in t?cr(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e},yr=function(t,o){for(var e in o||(o={}))pr.call(o,e)&&dr(t,e,o[e]);if(hr)for(var r=0,n=hr(o);r<n.length;r++){e=n[r];ur.call(o,e)&&dr(t,e,o[e])}return t},gr=function(t,o){return lr(t,fr(o))},br="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Qe:Qe.apply(null,arguments)};var mr=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ir(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,sr([void 0],t[0].concat(this)))):new(o.bind.apply(o,sr([void 0],t.concat(this))))},o}(Array),Or=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ir(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,sr([void 0],t[0].concat(this)))):new(o.bind.apply(o,sr([void 0],t.concat(this))))},o}(Array);function vr(t){return Go(t)?Ze(t,(function(){})):t}function Sr(){return function(t){return function(t){void 0===t&&(t={});var o=t.thunk,e=void 0===o||o;t.immutableCheck,t.serializableCheck;var r=new mr;e&&(!function(t){return"boolean"==typeof t}(e)?r.push(nr.withExtraArgument(e.extraArgument)):r.push(nr));return r}(t)}}function wr(t){var o,e=Sr(),r=t||{},n=r.reducer,i=void 0===n?void 0:n,a=r.middleware,s=void 0===a?e():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,p=r.enhancers,u=void 0===p?void 0:p;if("function"==typeof i)o=i;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;for(var e=o;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return o===e}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');o=Je(i)}var d=s;"function"==typeof d&&(d=d(e));var y=tr.apply(void 0,d),g=Qe;l&&(g=br(yr({trace:!1},"object"==typeof l&&l)));var b=new Or(y),m=b;return Array.isArray(u)?m=sr([y],u):"function"==typeof u&&(m=u(b)),Xe(o,h,g.apply(void 0,m))}function Nr(t,o){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(o){var n=o.apply(void 0,e);if(!n)throw new Error("prepareAction did not return an object");return yr(yr({type:t,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:t,payload:e[0]}}return e.toString=function(){return""+t},e.type=t,e.match=function(o){return o.type===t},e}function xr(t){var o,e={},r=[],n={addCase:function(t,o){var r="string"==typeof t?t:t.type;if(r in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[r]=o,n},addMatcher:function(t,o){return r.push({matcher:t,reducer:o}),n},addDefaultCase:function(t){return o=t,n}};return t(n),[e,r,o]}function Er(t){var o=t.name;if(!o)throw new Error("`name` is a required option for createSlice");var e,r="function"==typeof t.initialState?t.initialState:vr(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};function l(){var o="function"==typeof t.extraReducers?xr(t.extraReducers):[t.extraReducers],e=o[0],n=void 0===e?{}:e,i=o[1],a=void 0===i?[]:i,c=o[2],l=void 0===c?void 0:c,f=yr(yr({},n),s);return function(t,o,e,r){void 0===e&&(e=[]);var n,i="function"==typeof o?xr(o):[o,e,r],a=i[0],s=i[1],c=i[2];if(function(t){return"function"==typeof t}(t))n=function(){return vr(t())};else{var l=vr(t);n=function(){return l}}function f(t,o){void 0===t&&(t=n());var e=sr([a[o.type]],s.filter((function(t){return(0,t.matcher)(o)})).map((function(t){return t.reducer})));return 0===e.filter((function(t){return!!t})).length&&(e=[c]),e.reduce((function(t,e){if(e){var r;if(Ho(t))return void 0===(r=e(t,o))?t:r;if(Go(t))return Ze(t,(function(t){return e(t,o)}));if(void 0===(r=e(t,o))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=n,f}(r,(function(t){for(var o in f)t.addCase(o,f[o]);for(var e=0,r=a;e<r.length;e++){var n=r[e];t.addMatcher(n.matcher,n.reducer)}l&&t.addDefaultCase(l)}))}return i.forEach((function(t){var e,r,i=n[t],l=o+"/"+t;"reducer"in i?(e=i.reducer,r=i.prepare):e=i,a[t]=e,s[l]=e,c[t]=r?Nr(l,r):Nr(l)})),{name:o,reducer:function(t,o){return e||(e=l()),e(t,o)},actions:c,caseReducers:a,getInitialState:function(){return e||(e=l()),e.getInitialState()}}}var Cr=["name","message","stack","code"],Rr=function(t,o){this.payload=t,this.meta=o},Ur=function(t,o){this.payload=t,this.meta=o},Ir=function(t){if("object"==typeof t&&null!==t){for(var o={},e=0,r=Cr;e<r.length;e++){var n=r[e];"string"==typeof t[n]&&(o[n]=t[n])}return o}return{message:String(t)}};function Lr(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,o,e){var r=Nr(t+"/fulfilled",(function(t,o,e,r){return{payload:t,meta:gr(yr({},r||{}),{arg:e,requestId:o,requestStatus:"fulfilled"})}})),n=Nr(t+"/pending",(function(t,o,e){return{payload:void 0,meta:gr(yr({},e||{}),{arg:o,requestId:t,requestStatus:"pending"})}})),i=Nr(t+"/rejected",(function(t,o,r,n,i){return{payload:n,error:(e&&e.serializeError||Ir)(t||"Rejected"),meta:gr(yr({},i||{}),{arg:r,requestId:o,rejectedWithValue:!!n,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,h=(null==e?void 0:e.idGenerator)?e.idGenerator(t):function(t){void 0===t&&(t=21);for(var o="",e=t;e--;)o+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return o}(),p=new a;function u(t){f=t,p.abort()}var d=function(){return a=this,d=null,y=function(){var a,d,y,g,b,m;return ar(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==e?void 0:e.condition)?void 0:a.call(e,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,o){return p.signal.addEventListener("abort",(function(){return o({name:"AbortError",message:f||"Aborted"})}))})),s(n(h,t,null==(d=null==e?void 0:e.getPendingMeta)?void 0:d.call(e,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(o(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:p.signal,abort:u,rejectWithValue:function(t,o){return new Rr(t,o)},fulfillWithValue:function(t,o){return new Ur(t,o)}})).then((function(o){if(o instanceof Rr)throw o;return o instanceof Ur?r(o.payload,h,t,o.meta):r(o,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof Rr?i(null,h,t,m.payload,m.meta):i(m,h,t),[3,5];case 5:return e&&!e.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,o){var e=function(t){try{n(y.next(t))}catch(t){o(t)}},r=function(t){try{n(y.throw(t))}catch(t){o(t)}},n=function(o){return o.done?t(o.value):Promise.resolve(o.value).then(e,r)};n((y=y.apply(a,d)).next())}));var a,d,y}();return Object.assign(d,{abort:u,requestId:h,arg:t,unwrap:function(){return d.then(Lr)}})}}),{pending:n,rejected:i,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Wr,Ar,kr,Kr,$r,Dr,Pr,Fr,jr,Mr,Zr,Tr,zr,_r,Br,Hr,Gr,Vr,qr,Yr,Xr="listenerMiddleware";Nr(Xr+"/add"),Nr(Xr+"/removeAll"),Nr(Xr+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,o){var e=n[t];return e?e.enumerable=o:n[t]=e={configurable:!0,enumerable:o,get:function(){var o=this[Ae];return Pe.get(o,t)},set:function(o){var e=this[Ae];Pe.set(e,t,o)}},e}function o(t){for(var o=t.length-1;o>=0;o--){var n=t[o][Ae];if(!n.P)switch(n.i){case 5:r(n)&&Oe(n);break;case 4:e(n)&&Oe(n)}}}function e(t){for(var o=t.t,e=t.k,r=Ke(e),n=r.length-1;n>=0;n--){var i=r[n];if(i!==Ae){var a=o[i];if(void 0===a&&!Yo(o,i))return!0;var s=e[i],c=s&&s[Ae];if(c?c.t!==a:!Jo(s,a))return!0}}var l=!!o[Ae];return r.length!==Ke(o).length+(l?0:1)}function r(t){var o=t.k;if(o.length!==t.t.length)return!0;var e=Object.getOwnPropertyDescriptor(o,o.length-1);if(e&&!e.get)return!0;for(var r=0;r<o.length;r++)if(!o.hasOwnProperty(r))return!0;return!1}var n={};!function(t,o){De[t]||(De[t]=o)}("ES5",{J:function(o,e){var r=Array.isArray(o),n=function(o,e){if(o){for(var r=Array(e.length),n=0;n<e.length;n++)Object.defineProperty(r,""+n,t(n,!0));return r}var i=$e(e);delete i[Ae];for(var a=Ke(i),s=0;s<a.length;s++){var c=a[s];i[c]=t(c,o||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(e),i)}(r,o),i={i:r?5:4,A:e?e.A:se(),P:!1,I:!1,R:{},l:e,t:o,k:n,o:null,g:!1,C:!1};return Object.defineProperty(n,Ae,{value:i,writable:!0}),n},S:function(t,e,n){n?Ho(e)&&e[Ae].A===t&&o(t.p):(t.u&&function t(o){if(o&&"object"==typeof o){var e=o[Ae];if(e){var n=e.t,i=e.k,a=e.R,s=e.i;if(4===s)Vo(i,(function(o){o!==Ae&&(void 0!==n[o]||Yo(n,o)?a[o]||t(i[o]):(a[o]=!0,Oe(e)))})),Vo(n,(function(t){void 0!==i[t]||Yo(i,t)||(a[t]=!1,Oe(e))}));else if(5===s){if(r(e)&&(Oe(e),a.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)a[c]=!1;else for(var l=n.length;l<i.length;l++)a[l]=!0;for(var f=Math.min(i.length,n.length),h=0;h<f;h++)i.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(i[h])}}}}(t.p[0]),o(t.p))},K:function(t){return 4===t.i?e(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Jr{static get(t){var o;const e="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Po(n))return n;if(null==r)return;const i=Er({...r,reducers:null!==(o=r.reducers)&&void 0!==o?o:{}}),a=wr({reducer:(t,o)=>{var e;switch(o.type){case"CLEAR_FT_REDUX_STORE":return i.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(e=o.overwrites)&&void 0!==e?e:{}};default:return i.reducer(t,o)}}});return window.ftReduxStores[r.name]=new Jr(i,a)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Do,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,o,e)=>{const r=o,n=t[r];return n?(...t)=>{const o=n(...t);return this.reduxStore.dispatch(o),o}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",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()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ar=null===(Wr=window.safari)||void 0===Wr?void 0:Wr.pushNotification)||void 0===Ar||Ar.toString()),function(t){!function(o){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function c(t){this.map={},t instanceof c?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function h(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function p(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var o=new FileReader,e=f(o);return o.readAsText(t),e}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),r=0;r<o.length;r++)e[r]=String.fromCharCode(o[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=i(t),o=a(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},c.prototype.delete=function(t){delete this.map[i(t)]},c.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},c.prototype.set=function(t,o){this.map[i(t)]=a(o)},c.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),s(t)},c.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),s(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),s(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,o){var e,r,n=(o=o||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new c(o.headers)),this.method=(e=o.method||this.method||"GET",r=e.toUpperCase(),d.indexOf(r)>-1?r:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function g(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),n=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(r),decodeURIComponent(n))}})),o}function b(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new c(o.headers),this.url=o.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},u.call(y.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new b(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function O(t,r){return new Promise((function(n,i){var a=new y(t,r);if(a.signal&&a.signal.aborted)return i(new o.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var t,o,e={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",o=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var n=e.join(":").trim();o.append(r,n)}})),o)};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;n(new b(r,e))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new o.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&e.blob&&(s.responseType="blob"),a.headers.forEach((function(t,o){s.setRequestHeader(o,t)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=y,t.Response=b),o.Headers=c,o.Request=y,o.Response=b,o.fetch=O,Object.defineProperty(o,"U",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(kr||(kr={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Kr||(Kr={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}($r||($r={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Dr||(Dr={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Pr||(Pr={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Fr||(Fr={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(jr||(jr={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(Mr||(Mr={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Zr||(Zr={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Tr||(Tr={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(zr||(zr={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(_r||(_r={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Br||(Br={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Hr||(Hr={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Gr||(Gr={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Vr||(Vr={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(qr||(qr={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Yr||(Yr={})),qr.PERSONAL_BOOK_SHARE_USER,qr.PERSONAL_BOOK_USER,qr.HTML_EXPORT_USER,qr.PERSONAL_BOOK_USER,qr.PDF_EXPORT_USER,qr.PERSONAL_BOOK_USER,qr.KHUB_ADMIN,qr.CONTENT_PUBLISHER,qr.ADMIN,qr.KHUB_ADMIN,qr.USERS_ADMIN,qr.PORTAL_ADMIN,qr.DEVELOPER,qr.BETA_USER,qr.DEBUG_USER;const Qr=Ot`
|
|
105
|
+
`;class $o{constructor(t,o){this.defaultLabels=t,this.labels=o}resolve(t,...o){var e,r;t=this.resolvePluralKey(t,o);let n=null!==(r=null!==(e=this.labels[t])&&void 0!==e?e:this.defaultLabels[t])&&void 0!==r?r:"";return o.forEach(((t,o)=>n=n.replace(new RegExp(`\\{${o}([^}]*)\\}`,"g"),((o,e)=>this.formatValue(t,e))))),n}resolvePluralKey(t,o){for(let e of o)if("number"==typeof e){const o=`${String(t)}[\\=${e}]`;if(o in this.labels||o in this.defaultLabels)return o}return t}formatValue(t,o){return t instanceof Date?this.formatDate(t,o):null!=t?t:""}formatDate(t,o){const e=e=>(null==o?void 0:o.includes("date"))?t.toLocaleDateString(e):(null==o?void 0:o.includes("time"))?t.toLocaleTimeString(e):t.toLocaleString(e);try{return e(document.documentElement.lang)}catch(t){return e()}}}class Do{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter((o=>o.type!==t.type))),this.queue.push(t)}consume(t){const o=this.queue.find((o=>o.type===t));return o&&(this.queue=this.queue.filter((t=>t!==o))),o}}function Po(t){var o;return null!==(o=null==t?void 0:t.isFtReduxStore)&&void 0!==o&&o}var Fo,jo,Mo;const Zo=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),zo=Symbol("internalStores");class _o extends ko{constructor(){super(...arguments),this[Fo]=new Map,this[jo]=new Map,this[Mo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((o=>t.has(o)))&&this.updateFromStores()}getUnnamedStore(){if(this[zo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zo].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[zo].get(t)}addStore(t,o){var e;o=null!==(e=null!=o?o:Po(t)?t.name:void 0)&&void 0!==e?e:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){const o="string"==typeof t?t:t.name;this.unsubscribeFromStore(o),this[zo].delete(o)}setupStore(t,o){this[zo].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[zo].forEach(((t,o)=>this.subscribeToStore(o,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,o)=>{const e=this.constructor.getPropertyOptions(o);if(!(null==e?void 0:e.attribute)||!this.hasAttribute("string"==typeof(null==e?void 0:e.attribute)?e.attribute:o)){const e=this.getStore(t.store);e&&(t.store?this[To].has(t.store):this[To].size>0)&&(this[o]=t.selector(e.getState(),this))}}))}subscribeToStore(t,o){var e;this[To].set(t,o.subscribe((()=>this.updateFromStores()))),Po(o)&&o.eventBus&&(null===(e=this.reduxConstructor.reduxEventListeners)||void 0===e||e.forEach(((t,e)=>{if("function"==typeof this[e]&&(!t.store||o.name===t.store)){const r=t=>this[e](t);o.eventBus.addEventListener(t.eventName,r),this[Zo].push((()=>o.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[To].forEach(((t,o)=>this.unsubscribeFromStore(o))),this[Zo].forEach((t=>t())),this[Zo]=[]}unsubscribeFromStore(t){this[To].has(t)&&this[To].get(t)(),this[To].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Bo(t){for(var o=arguments.length,e=Array(o>1?o-1:0),r=1;r<o;r++)e[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(e.length?" "+e.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ho(t){return!!t&&!!t[Ae]}function Go(t){var o;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;var e=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return e===Object||"function"==typeof e&&Function.toString.call(e)===ke}(t)||Array.isArray(t)||!!t[We]||!!(null===(o=t.constructor)||void 0===o?void 0:o[We])||Qo(t)||te(t))}function Vo(t,o,e){void 0===e&&(e=!1),0===qo(t)?(e?Object.keys:Ke)(t).forEach((function(r){e&&"symbol"==typeof r||o(r,t[r],t)})):t.forEach((function(e,r){return o(r,e,t)}))}function qo(t){var o=t[Ae];return o?o.i>3?o.i-4:o.i:Array.isArray(t)?1:Qo(t)?2:te(t)?3:0}function Yo(t,o){return 2===qo(t)?t.has(o):Object.prototype.hasOwnProperty.call(t,o)}function Xo(t,o,e){var r=qo(t);2===r?t.set(o,e):3===r?t.add(e):t[o]=e}function Jo(t,o){return t===o?0!==t||1/t==1/o:t!=t&&o!=o}function Qo(t){return Re&&t instanceof Map}function te(t){return Ue&&t instanceof Set}function oe(t){return t.o||t.t}function ee(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var o=$e(t);delete o[Ae];for(var e=Ke(o),r=0;r<e.length;r++){var n=e[r],i=o[n];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),o)}function re(t,o){return void 0===o&&(o=!1),ie(t)||Ho(t)||!Go(t)||(qo(t)>1&&(t.set=t.add=t.clear=t.delete=ne),Object.freeze(t),o&&Vo(t,(function(t,o){return re(o,!0)}),!0)),t}function ne(){Bo(2)}function ie(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ae(t){var o=De[t];return o||Bo(18,t),o}function se(){return Ee}function ce(t,o){o&&(ae("Patches"),t.u=[],t.s=[],t.v=o)}function le(t){fe(t),t.p.forEach(pe),t.p=null}function fe(t){t===Ee&&(Ee=t.l)}function he(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function pe(t){var o=t[Ae];0===o.i||1===o.i?o.j():o.g=!0}function ue(t,o){o._=o.p.length;var e=o.p[0],r=void 0!==t&&t!==e;return o.h.O||ae("ES5").S(o,t,r),r?(e[Ae].P&&(le(o),Bo(4)),Go(t)&&(t=de(o,t),o.l||ge(o,t)),o.u&&ae("Patches").M(e[Ae].t,t,o.u,o.s)):t=de(o,e,[]),le(o),o.u&&o.v(o.u,o.s),t!==Le?t:void 0}function de(t,o,e){if(ie(o))return o;var r=o[Ae];if(!r)return Vo(o,(function(n,i){return ye(t,r,o,n,i,e)}),!0),o;if(r.A!==t)return o;if(!r.P)return ge(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var n=4===r.i||5===r.i?r.o=ee(r.k):r.o,i=n,a=!1;3===r.i&&(i=new Set(n),n.clear(),a=!0),Vo(i,(function(o,i){return ye(t,r,n,o,i,e,a)})),ge(t,n,!1),e&&t.u&&ae("Patches").N(r,e,t.u,t.s)}return r.o}function ye(t,o,e,r,n,i,a){if(Ho(n)){var s=de(t,n,i&&o&&3!==o.i&&!Yo(o.R,r)?i.concat(r):void 0);if(Xo(e,r,s),!Ho(s))return;t.m=!1}else a&&e.add(n);if(Go(n)&&!ie(n)){if(!t.h.D&&t._<1)return;de(t,n),o&&o.A.l||ge(t,n)}}function ge(t,o,e){void 0===e&&(e=!1),!t.l&&t.h.D&&t.m&&re(o,e)}function be(t,o){var e=t[Ae];return(e?oe(e):t)[o]}function me(t,o){if(o in t)for(var e=Object.getPrototypeOf(t);e;){var r=Object.getOwnPropertyDescriptor(e,o);if(r)return r;e=Object.getPrototypeOf(e)}}function Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function ve(t){t.o||(t.o=ee(t.t))}function Se(t,o,e){var r=Qo(o)?ae("MapSet").F(o,e):te(o)?ae("MapSet").T(o,e):t.O?function(t,o){var e=Array.isArray(t),r={i:e?1:0,A:o?o.A:se(),P:!1,I:!1,R:{},l:o,t,k:null,o:null,j:null,C:!1},n=r,i=Pe;e&&(n=[r],i=Fe);var a=Proxy.revocable(n,i),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(o,e):ae("ES5").J(o,e);return(e?e.A:se()).p.push(r),r}function we(t){return Ho(t)||Bo(22,t),function t(o){if(!Go(o))return o;var e,r=o[Ae],n=qo(o);if(r){if(!r.P&&(r.i<4||!ae("ES5").K(r)))return r.t;r.I=!0,e=Ne(o,n),r.I=!1}else e=Ne(o,n);return Vo(e,(function(o,n){r&&function(t,o){return 2===qo(t)?t.get(o):t[o]}(r.t,o)===n||Xo(e,o,t(n))})),3===n?new Set(e):e}(t)}function Ne(t,o){switch(o){case 2:return new Map(t);case 3:return Array.from(t)}return ee(t)}Fo=To,jo=zo,Mo=Zo,_o.reduxProperties=new Map,_o.reduxReactiveProperties=new Set,_o.reduxEventListeners=new Map;var xe,Ee,Ce="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Re="undefined"!=typeof Map,Ue="undefined"!=typeof Set,Ie="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Le=Ce?Symbol.for("immer-nothing"):((xe={})["immer-nothing"]=!0,xe),We=Ce?Symbol.for("immer-draftable"):"__$immer_draftable",Ae=Ce?Symbol.for("immer-state"):"__$immer_state",ke=""+Object.prototype.constructor,Ke="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$e=Object.getOwnPropertyDescriptors||function(t){var o={};return Ke(t).forEach((function(e){o[e]=Object.getOwnPropertyDescriptor(t,e)})),o},De={},Pe={get:function(t,o){if(o===Ae)return t;var e=oe(t);if(!Yo(e,o))return function(t,o,e){var r,n=me(o,e);return n?"value"in n?n.value:null===(r=n.get)||void 0===r?void 0:r.call(t.k):void 0}(t,e,o);var r=e[o];return t.I||!Go(r)?r:r===be(t.t,o)?(ve(t),t.o[o]=Se(t.A.h,r,t)):r},has:function(t,o){return o in oe(t)},ownKeys:function(t){return Reflect.ownKeys(oe(t))},set:function(t,o,e){var r=me(oe(t),o);if(null==r?void 0:r.set)return r.set.call(t.k,e),!0;if(!t.P){var n=be(oe(t),o),i=null==n?void 0:n[Ae];if(i&&i.t===e)return t.o[o]=e,t.R[o]=!1,!0;if(Jo(e,n)&&(void 0!==e||Yo(t.t,o)))return!0;ve(t),Oe(t)}return t.o[o]===e&&(void 0!==e||o in t.o)||Number.isNaN(e)&&Number.isNaN(t.o[o])||(t.o[o]=e,t.R[o]=!0),!0},deleteProperty:function(t,o){return void 0!==be(t.t,o)||o in t.t?(t.R[o]=!1,ve(t),Oe(t)):delete t.R[o],t.o&&delete t.o[o],!0},getOwnPropertyDescriptor:function(t,o){var e=oe(t),r=Reflect.getOwnPropertyDescriptor(e,o);return r?{writable:!0,configurable:1!==t.i||"length"!==o,enumerable:r.enumerable,value:e[o]}:r},defineProperty:function(){Bo(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Bo(12)}},Fe={};Vo(Pe,(function(t,o){Fe[t]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}})),Fe.deleteProperty=function(t,o){return Fe.set.call(this,t,o,void 0)},Fe.set=function(t,o,e){return Pe.set.call(this,t[0],o,e,t[0])};var je=function(){function t(t){var o=this;this.O=Ie,this.D=!0,this.produce=function(t,e,r){if("function"==typeof t&&"function"!=typeof e){var n=e;e=t;var i=o;return function(t){var o=this;void 0===t&&(t=n);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(t,(function(t){var r;return(r=e).call.apply(r,[o,t].concat(a))}))}}var a;if("function"!=typeof e&&Bo(6),void 0!==r&&"function"!=typeof r&&Bo(7),Go(t)){var s=he(o),c=Se(o,t,void 0),l=!0;try{a=e(c),l=!1}finally{l?le(s):fe(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return ce(s,r),ue(t,s)}),(function(t){throw le(s),t})):(ce(s,r),ue(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=e(t))&&(a=t),a===Le&&(a=void 0),o.D&&re(a,!0),r){var f=[],h=[];ae("Patches").M(t,a,f,h),r(f,h)}return a}Bo(21,t)},this.produceWithPatches=function(t,e){if("function"==typeof t)return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return o.produceWithPatches(e,(function(o){return t.apply(void 0,[o].concat(n))}))};var r,n,i=o.produce(t,e,(function(t,o){r=t,n=o}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(t){return[t,r,n]})):[i,r,n]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=t.prototype;return o.createDraft=function(t){Go(t)||Bo(8),Ho(t)&&(t=we(t));var o=he(this),e=Se(this,t,void 0);return e[Ae].C=!0,fe(o),e},o.finishDraft=function(t,o){var e=(t&&t[Ae]).A;return ce(e,o),ue(void 0,e)},o.setAutoFreeze=function(t){this.D=t},o.setUseProxies=function(t){t&&!Ie&&Bo(20),this.O=t},o.applyPatches=function(t,o){var e;for(e=o.length-1;e>=0;e--){var r=o[e];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}e>-1&&(o=o.slice(e+1));var n=ae("Patches").$;return Ho(t)?n(t,o):this.produce(t,(function(t){return n(t,o)}))},t}(),Me=new je,Ze=Me.produce;function Te(t){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(t)}function ze(t){var o=function(t,o){if("object"!==Te(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o||"default");if("object"!==Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===Te(o)?o:String(o)}function _e(t,o,e){return(o=ze(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function Be(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function He(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Be(Object(e),!0).forEach((function(o){_e(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Be(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function Ge(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Me.produceWithPatches.bind(Me),Me.setAutoFreeze.bind(Me),Me.setUseProxies.bind(Me),Me.applyPatches.bind(Me),Me.createDraft.bind(Me),Me.finishDraft.bind(Me);var Ve="function"==typeof Symbol&&Symbol.observable||"@@observable",qe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ye={INIT:"@@redux/INIT"+qe(),REPLACE:"@@redux/REPLACE"+qe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qe()}};function Xe(t,o,e){var r;if("function"==typeof o&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(Ge(0));if("function"==typeof o&&void 0===e&&(e=o,o=void 0),void 0!==e){if("function"!=typeof e)throw new Error(Ge(1));return e(Xe)(t,o)}if("function"!=typeof t)throw new Error(Ge(2));var n=t,i=o,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(Ge(3));return i}function h(t){if("function"!=typeof t)throw new Error(Ge(4));if(c)throw new Error(Ge(5));var o=!0;return l(),s.push(t),function(){if(o){if(c)throw new Error(Ge(6));o=!1,l();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(t)===o}(t))throw new Error(Ge(7));if(void 0===t.type)throw new Error(Ge(8));if(c)throw new Error(Ge(9));try{c=!0,i=n(i,t)}finally{c=!1}for(var o=a=s,e=0;e<o.length;e++){(0,o[e])()}return t}return p({type:Ye.INIT}),(r={dispatch:p,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ge(10));n=t,p({type:Ye.REPLACE})}})[Ve]=function(){var t,o=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ge(11));function e(){t.next&&t.next(f())}return e(),{unsubscribe:o(e)}}})[Ve]=function(){return this},t},r}function Je(t){for(var o=Object.keys(t),e={},r=0;r<o.length;r++){var n=o[r];"function"==typeof t[n]&&(e[n]=t[n])}var i,a=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(o){var e=t[o];if(void 0===e(void 0,{type:Ye.INIT}))throw new Error(Ge(12));if(void 0===e(void 0,{type:Ye.PROBE_UNKNOWN_ACTION()}))throw new Error(Ge(13))}))}(e)}catch(t){i=t}return function(t,o){if(void 0===t&&(t={}),i)throw i;for(var r=!1,n={},s=0;s<a.length;s++){var c=a[s],l=e[c],f=t[c],h=l(f,o);if(void 0===h)throw o&&o.type,new Error(Ge(14));n[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?n:t}}function Qe(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return 0===o.length?function(t){return t}:1===o.length?o[0]:o.reduce((function(t,o){return function(){return t(o.apply(void 0,arguments))}}))}function tr(){for(var t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),r=function(){throw new Error(Ge(15))},n={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=o.map((function(t){return t(n)}));return r=Qe.apply(void 0,i)(e.dispatch),He(He({},e),{},{dispatch:r})}}}function or(t){return function(o){var e=o.dispatch,r=o.getState;return function(o){return function(n){return"function"==typeof n?n(e,r,t):o(n)}}}}var er=or();er.withExtraArgument=or;var rr,nr=er,ir=(rr=function(t,o){return rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])},rr(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}rr(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),ar=function(t,o){var e,r,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=o.call(t,a)}catch(t){i=[6,t],r=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},sr=function(t,o){for(var e=0,r=o.length,n=t.length;e<r;e++,n++)t[n]=o[e];return t},cr=Object.defineProperty,lr=Object.defineProperties,fr=Object.getOwnPropertyDescriptors,hr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,dr=function(t,o,e){return o in t?cr(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e},yr=function(t,o){for(var e in o||(o={}))pr.call(o,e)&&dr(t,e,o[e]);if(hr)for(var r=0,n=hr(o);r<n.length;r++){e=n[r];ur.call(o,e)&&dr(t,e,o[e])}return t},gr=function(t,o){return lr(t,fr(o))},br="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Qe:Qe.apply(null,arguments)};var mr=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ir(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,sr([void 0],t[0].concat(this)))):new(o.bind.apply(o,sr([void 0],t.concat(this))))},o}(Array),Or=function(t){function o(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return Object.setPrototypeOf(n,o.prototype),n}return ir(o,t),Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return t.prototype.concat.apply(this,o)},o.prototype.prepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Array.isArray(t[0])?new(o.bind.apply(o,sr([void 0],t[0].concat(this)))):new(o.bind.apply(o,sr([void 0],t.concat(this))))},o}(Array);function vr(t){return Go(t)?Ze(t,(function(){})):t}function Sr(){return function(t){return function(t){void 0===t&&(t={});var o=t.thunk,e=void 0===o||o;t.immutableCheck,t.serializableCheck;var r=new mr;e&&(!function(t){return"boolean"==typeof t}(e)?r.push(nr.withExtraArgument(e.extraArgument)):r.push(nr));return r}(t)}}function wr(t){var o,e=Sr(),r=t||{},n=r.reducer,i=void 0===n?void 0:n,a=r.middleware,s=void 0===a?e():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,p=r.enhancers,u=void 0===p?void 0:p;if("function"==typeof i)o=i;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var o=Object.getPrototypeOf(t);if(null===o)return!0;for(var e=o;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return o===e}(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');o=Je(i)}var d=s;"function"==typeof d&&(d=d(e));var y=tr.apply(void 0,d),g=Qe;l&&(g=br(yr({trace:!1},"object"==typeof l&&l)));var b=new Or(y),m=b;return Array.isArray(u)?m=sr([y],u):"function"==typeof u&&(m=u(b)),Xe(o,h,g.apply(void 0,m))}function Nr(t,o){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(o){var n=o.apply(void 0,e);if(!n)throw new Error("prepareAction did not return an object");return yr(yr({type:t,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:t,payload:e[0]}}return e.toString=function(){return""+t},e.type=t,e.match=function(o){return o.type===t},e}function xr(t){var o,e={},r=[],n={addCase:function(t,o){var r="string"==typeof t?t:t.type;if(r in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[r]=o,n},addMatcher:function(t,o){return r.push({matcher:t,reducer:o}),n},addDefaultCase:function(t){return o=t,n}};return t(n),[e,r,o]}function Er(t){var o=t.name;if(!o)throw new Error("`name` is a required option for createSlice");var e,r="function"==typeof t.initialState?t.initialState:vr(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};function l(){var o="function"==typeof t.extraReducers?xr(t.extraReducers):[t.extraReducers],e=o[0],n=void 0===e?{}:e,i=o[1],a=void 0===i?[]:i,c=o[2],l=void 0===c?void 0:c,f=yr(yr({},n),s);return function(t,o,e,r){void 0===e&&(e=[]);var n,i="function"==typeof o?xr(o):[o,e,r],a=i[0],s=i[1],c=i[2];if(function(t){return"function"==typeof t}(t))n=function(){return vr(t())};else{var l=vr(t);n=function(){return l}}function f(t,o){void 0===t&&(t=n());var e=sr([a[o.type]],s.filter((function(t){return(0,t.matcher)(o)})).map((function(t){return t.reducer})));return 0===e.filter((function(t){return!!t})).length&&(e=[c]),e.reduce((function(t,e){if(e){var r;if(Ho(t))return void 0===(r=e(t,o))?t:r;if(Go(t))return Ze(t,(function(t){return e(t,o)}));if(void 0===(r=e(t,o))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=n,f}(r,(function(t){for(var o in f)t.addCase(o,f[o]);for(var e=0,r=a;e<r.length;e++){var n=r[e];t.addMatcher(n.matcher,n.reducer)}l&&t.addDefaultCase(l)}))}return i.forEach((function(t){var e,r,i=n[t],l=o+"/"+t;"reducer"in i?(e=i.reducer,r=i.prepare):e=i,a[t]=e,s[l]=e,c[t]=r?Nr(l,r):Nr(l)})),{name:o,reducer:function(t,o){return e||(e=l()),e(t,o)},actions:c,caseReducers:a,getInitialState:function(){return e||(e=l()),e.getInitialState()}}}var Cr=["name","message","stack","code"],Rr=function(t,o){this.payload=t,this.meta=o},Ur=function(t,o){this.payload=t,this.meta=o},Ir=function(t){if("object"==typeof t&&null!==t){for(var o={},e=0,r=Cr;e<r.length;e++){var n=r[e];"string"==typeof t[n]&&(o[n]=t[n])}return o}return{message:String(t)}};function Lr(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,o,e){var r=Nr(t+"/fulfilled",(function(t,o,e,r){return{payload:t,meta:gr(yr({},r||{}),{arg:e,requestId:o,requestStatus:"fulfilled"})}})),n=Nr(t+"/pending",(function(t,o,e){return{payload:void 0,meta:gr(yr({},e||{}),{arg:o,requestId:t,requestStatus:"pending"})}})),i=Nr(t+"/rejected",(function(t,o,r,n,i){return{payload:n,error:(e&&e.serializeError||Ir)(t||"Rejected"),meta:gr(yr({},i||{}),{arg:r,requestId:o,rejectedWithValue:!!n,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,h=(null==e?void 0:e.idGenerator)?e.idGenerator(t):function(t){void 0===t&&(t=21);for(var o="",e=t;e--;)o+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return o}(),p=new a;function u(t){f=t,p.abort()}var d=function(){return a=this,d=null,y=function(){var a,d,y,g,b,m;return ar(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==e?void 0:e.condition)?void 0:a.call(e,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,o){return p.signal.addEventListener("abort",(function(){return o({name:"AbortError",message:f||"Aborted"})}))})),s(n(h,t,null==(d=null==e?void 0:e.getPendingMeta)?void 0:d.call(e,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(o(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:p.signal,abort:u,rejectWithValue:function(t,o){return new Rr(t,o)},fulfillWithValue:function(t,o){return new Ur(t,o)}})).then((function(o){if(o instanceof Rr)throw o;return o instanceof Ur?r(o.payload,h,t,o.meta):r(o,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof Rr?i(null,h,t,m.payload,m.meta):i(m,h,t),[3,5];case 5:return e&&!e.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,o){var e=function(t){try{n(y.next(t))}catch(t){o(t)}},r=function(t){try{n(y.throw(t))}catch(t){o(t)}},n=function(o){return o.done?t(o.value):Promise.resolve(o.value).then(e,r)};n((y=y.apply(a,d)).next())}));var a,d,y}();return Object.assign(d,{abort:u,requestId:h,arg:t,unwrap:function(){return d.then(Lr)}})}}),{pending:n,rejected:i,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Wr,Ar,kr,Kr,$r,Dr,Pr,Fr,jr,Mr,Zr,Tr,zr,_r,Br,Hr,Gr,Vr,qr,Yr,Xr="listenerMiddleware";Nr(Xr+"/add"),Nr(Xr+"/removeAll"),Nr(Xr+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,o){var e=n[t];return e?e.enumerable=o:n[t]=e={configurable:!0,enumerable:o,get:function(){var o=this[Ae];return Pe.get(o,t)},set:function(o){var e=this[Ae];Pe.set(e,t,o)}},e}function o(t){for(var o=t.length-1;o>=0;o--){var n=t[o][Ae];if(!n.P)switch(n.i){case 5:r(n)&&Oe(n);break;case 4:e(n)&&Oe(n)}}}function e(t){for(var o=t.t,e=t.k,r=Ke(e),n=r.length-1;n>=0;n--){var i=r[n];if(i!==Ae){var a=o[i];if(void 0===a&&!Yo(o,i))return!0;var s=e[i],c=s&&s[Ae];if(c?c.t!==a:!Jo(s,a))return!0}}var l=!!o[Ae];return r.length!==Ke(o).length+(l?0:1)}function r(t){var o=t.k;if(o.length!==t.t.length)return!0;var e=Object.getOwnPropertyDescriptor(o,o.length-1);if(e&&!e.get)return!0;for(var r=0;r<o.length;r++)if(!o.hasOwnProperty(r))return!0;return!1}var n={};!function(t,o){De[t]||(De[t]=o)}("ES5",{J:function(o,e){var r=Array.isArray(o),n=function(o,e){if(o){for(var r=Array(e.length),n=0;n<e.length;n++)Object.defineProperty(r,""+n,t(n,!0));return r}var i=$e(e);delete i[Ae];for(var a=Ke(i),s=0;s<a.length;s++){var c=a[s];i[c]=t(c,o||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(e),i)}(r,o),i={i:r?5:4,A:e?e.A:se(),P:!1,I:!1,R:{},l:e,t:o,k:n,o:null,g:!1,C:!1};return Object.defineProperty(n,Ae,{value:i,writable:!0}),n},S:function(t,e,n){n?Ho(e)&&e[Ae].A===t&&o(t.p):(t.u&&function t(o){if(o&&"object"==typeof o){var e=o[Ae];if(e){var n=e.t,i=e.k,a=e.R,s=e.i;if(4===s)Vo(i,(function(o){o!==Ae&&(void 0!==n[o]||Yo(n,o)?a[o]||t(i[o]):(a[o]=!0,Oe(e)))})),Vo(n,(function(t){void 0!==i[t]||Yo(i,t)||(a[t]=!1,Oe(e))}));else if(5===s){if(r(e)&&(Oe(e),a.length=!0),i.length<n.length)for(var c=i.length;c<n.length;c++)a[c]=!1;else for(var l=n.length;l<i.length;l++)a[l]=!0;for(var f=Math.min(i.length,n.length),h=0;h<f;h++)i.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(i[h])}}}}(t.p[0]),o(t.p))},K:function(t){return 4===t.i?e(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Jr{static get(t){var o;const e="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(Po(n))return n;if(null==r)return;const i=Er({...r,reducers:null!==(o=r.reducers)&&void 0!==o?o:{}}),a=wr({reducer:(t,o)=>{var e;switch(o.type){case"CLEAR_FT_REDUX_STORE":return i.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(e=o.overwrites)&&void 0!==e?e:{}};default:return i.reducer(t,o)}}});return window.ftReduxStores[r.name]=new Jr(i,a)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Do,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,o,e)=>{const r=o,n=t[r];return n?(...t)=>{const o=n(...t);return this.reduxStore.dispatch(o),o}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",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()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Ar=null===(Wr=window.safari)||void 0===Wr?void 0:Wr.pushNotification)||void 0===Ar||Ar.toString()),function(t){!function(o){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function c(t){this.map={},t instanceof c?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function h(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function p(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=p(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var o=new FileReader,e=f(o);return o.readAsText(t),e}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),r=0;r<o.length;r++)e[r]=String.fromCharCode(o[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=i(t),o=a(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},c.prototype.delete=function(t){delete this.map[i(t)]},c.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},c.prototype.set=function(t,o){this.map[i(t)]=a(o)},c.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),s(t)},c.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),s(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),s(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,o){var e,r,n=(o=o||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new c(o.headers)),this.method=(e=o.method||this.method||"GET",r=e.toUpperCase(),d.indexOf(r)>-1?r:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function g(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),n=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(r),decodeURIComponent(n))}})),o}function b(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new c(o.headers),this.url=o.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},u.call(y.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new b(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function O(t,r){return new Promise((function(n,i){var a=new y(t,r);if(a.signal&&a.signal.aborted)return i(new o.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var t,o,e={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",o=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var n=e.join(":").trim();o.append(r,n)}})),o)};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;n(new b(r,e))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new o.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&e.blob&&(s.responseType="blob"),a.headers.forEach((function(t,o){s.setRequestHeader(o,t)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=y,t.Response=b),o.Headers=c,o.Request=y,o.Response=b,o.fetch=O,Object.defineProperty(o,"U",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(kr||(kr={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Kr||(Kr={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}($r||($r={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Dr||(Dr={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Pr||(Pr={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Fr||(Fr={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(jr||(jr={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(Mr||(Mr={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Zr||(Zr={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Tr||(Tr={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(zr||(zr={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(_r||(_r={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Br||(Br={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Hr||(Hr={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Gr||(Gr={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Vr||(Vr={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(qr||(qr={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Yr||(Yr={})),qr.PERSONAL_BOOK_SHARE_USER,qr.PERSONAL_BOOK_USER,qr.HTML_EXPORT_USER,qr.PERSONAL_BOOK_USER,qr.PDF_EXPORT_USER,qr.PERSONAL_BOOK_USER,qr.KHUB_ADMIN,qr.CONTENT_PUBLISHER,qr.ADMIN,qr.KHUB_ADMIN,qr.USERS_ADMIN,qr.PORTAL_ADMIN,qr.DEVELOPER,qr.BETA_USER,qr.DEBUG_USER;const Qr=Ot`
|
|
106
106
|
`,tn=Jr.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class on{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=tn.getState(),r=null!=t?t:e;if(o&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,r,!0)}static get(t){var o;return null!=t?on.build(t):null!==(o=on.API)&&void 0!==o?o:on.API=on.build()}static await(t){return new Promise((o=>{let e=on.get(t);if(e)o(e);else{const r=tn.subscribe((()=>{e=on.get(t),e&&(r(),o(e))}))}}))}}var en;const rn=Symbol("clearAfterUnitTest");class nn{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new r,this.listeners={},this.currentUiLocale="",this[en]=()=>{this.defaultMessages={},this.cache=new r,this.listeners={}},this.currentUiLocale=tn.getState().uiLocale,tn.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=tn.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var e;if(t=t.toLowerCase(),Object.keys(o).length>0){const r={...null!==(e=this.defaultMessages[t])&&void 0!==e?e:{},...o};L(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...e){var r,n,i;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==n?n:{};return new $o(null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},a).resolve(o,...e)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(o=0,new Promise((t=>setTimeout(t,o)))).then((()=>t())).catch((()=>null));var o})))}}en=rn,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new nn((async(t,o)=>(await on.await()).getFluidTopicsMessageContext(t,o)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new nn((async(t,o)=>(await on.await()).getCustomMessageContext(t,o))));const an=window.FluidTopicsI18nService;var sn=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class cn extends ko{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>on.get(),this.cache=new r,this.cleanSessionDebouncer=new n}render(){return oo`
|
|
107
107
|
<slot></slot>
|
|
108
108
|
`}update(t){super.update(t),t.has("baseUrl")&&(tn.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&tn.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&tn.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&tn.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&tn.actions.noCustom(this.noCustom),t.has("editorMode")&&tn.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&tn.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&tn.actions.session(this.session),t.has("availableUiLocales")&&tn.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>an.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}cn.elementDefinitions={},cn.styles=Qr,sn([U()],cn.prototype,"baseUrl",void 0),sn([U()],cn.prototype,"apiIntegrationIdentifier",void 0),sn([U()],cn.prototype,"uiLocale",void 0),sn([A(null)],cn.prototype,"availableUiLocales",void 0),sn([A(null)],cn.prototype,"metadataConfiguration",void 0),sn([U({type:Boolean})],cn.prototype,"editorMode",void 0),sn([U({type:Boolean})],cn.prototype,"noCustom",void 0),sn([U({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],cn.prototype,"noCustomComponent",void 0),sn([U({type:Boolean})],cn.prototype,"withManualResources",void 0),sn([A([])],cn.prototype,"messageContexts",void 0),sn([A(void 0)],cn.prototype,"session",void 0),sn([U({type:Object})],cn.prototype,"apiProvider",void 0);class ln{async listMySearches(){var t;return(null===(t=tn.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await on.await()).listMySearches(tn.getState().session.profile.userId):[]}}const fn=new r;class hn{async listMyBookmarks(){return fn.get("bookmarks",(async()=>(await on.await()).listMyBookmarks(tn.getState().session.profile.userId)))}clearCache(){fn.clear("bookmarks")}}const pn=Jr.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=tn.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hn,tn.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:o}=tn.getState();L(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==o?void 0:o.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){pn.actions.savedSearches(void 0)}clearMyBookmarks(){pn.actions.bookmarks(void 0)}async reloadMySearches(){const t=new ln,o=await t.listMySearches();pn.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;pn.actions.bookmarks(o)}}},W("ft-app-context")(cn);class un extends Event{constructor(){super(un.eventName)}}un.eventName="search-context-clear-all-filters";var dn=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class yn extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const gn=Symbol("registerInterval");class bn extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[gn]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[gn]):this.dispatchEvent(new yn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=gn,dn([I()],e.prototype,"stateManager",void 0),e}(_o)){}var mn=function(t,o,e,r){for(var n,i=arguments.length,a=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(n=t[s])&&(a=(i<3?n(a):i>3?n(o,e,a):n(o,e))||a);return i>3&&a&&Object.defineProperty(o,e,a),a};class On extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}}const vn=Symbol("registerInterval");class Sn extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setResultStateManager(t){this.resultStateManager=t}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[vn]=window.setInterval((()=>this.tryToRegisterToResultContext()),50)}tryToRegisterToResultContext(){null!=this.result?window.clearInterval(this[vn]):this.dispatchEvent(new On)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return o=vn,mn([U({attribute:!1})],e.prototype,"cluster",void 0),mn([U({attribute:!1})],e.prototype,"result",void 0),mn([U({attribute:!1,type:Number})],e.prototype,"rank",void 0),e}(bn)){}const wn={highlightBackgroundColor:vo.create("--ft-srt-highlight-background-color","","COLOR","transparent")},Nn=Ot`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-title",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.31",
|
|
4
4
|
"description": "Search result title for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-search-result-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-search-result-context": "1.1.31",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.1.31",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.31",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
28
|
+
"@fluid-topics/public-api": "1.0.58"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "e9db5f3c700c9d25c85c211c8875686bb989da96"
|
|
31
31
|
}
|