@fluid-topics/ft-search-results 1.1.27 → 1.1.28
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
text-align: center;
|
|
4
4
|
padding: 12px;
|
|
5
5
|
}
|
|
6
|
-
`;var l,c,s,p,f,h,y,d,g,u,b,m,O,N,S,x,v,C;!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 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 n(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 s(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function f(t){var o=new FileReader,e=p(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=s(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?s(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var t,o,e,r=s(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=p(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(u)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=i(t),o=n(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)]=n(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 d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,o){var e,r,a=(o=o||{}).body;if(t instanceof g){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(),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)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function u(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 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)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},y.call(g.prototype),y.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(a,i){var n=new g(t,r);if(n.signal&&n.signal.aborted)return i(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){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 b(r,e))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new o.DOMException("Aborted","AbortError"))},l.open(n.method,n.url,!0),"include"===n.credentials?l.withCredentials=!0:"omit"===n.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),n.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),n.signal&&(n.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&n.signal.removeEventListener("abort",s)}),l.send(void 0===n._bodyInit?null:n._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=g,t.Response=b),o.Headers=c,o.Request=g,o.Response=b,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"}(l||(l={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(c||(c={})),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"}(s||(s={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(p||(p={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(f||(f={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(h||(h={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(y||(y={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(d||(d={})),function(t){t.ASC="ASC",t.DESC="DESC"}(g||(g={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(u||(u={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(b||(b={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(O||(O={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(N||(N={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(S||(S={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(x||(x={})),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"}(v||(v={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(C||(C={})),v.PERSONAL_BOOK_SHARE_USER,v.PERSONAL_BOOK_USER,v.HTML_EXPORT_USER,v.PERSONAL_BOOK_USER,v.PDF_EXPORT_USER,v.PERSONAL_BOOK_USER,v.KHUB_ADMIN,v.CONTENT_PUBLISHER,v.ADMIN,v.KHUB_ADMIN,v.USERS_ADMIN,v.PORTAL_ADMIN,v.DEVELOPER,v.BETA_USER,v.DEBUG_USER;const w=e.css`
|
|
6
|
+
`;var l,c,s,p,f,h,d,y,g,u,b,m,O,N,S,x,v,C;!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 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 n(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 s(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function f(t){var o=new FileReader,e=p(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 d(){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=s(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?s(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var t,o,e,r=s(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=p(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(u)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,o){t=i(t),o=n(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)]=n(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 y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,o){var e,r,a=(o=o||{}).body;if(t instanceof g){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(),y.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 u(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 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)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},d.call(g.prototype),d.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(a,i){var n=new g(t,r);if(n.signal&&n.signal.aborted)return i(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){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 b(r,e))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new o.DOMException("Aborted","AbortError"))},l.open(n.method,n.url,!0),"include"===n.credentials?l.withCredentials=!0:"omit"===n.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),n.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),n.signal&&(n.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&n.signal.removeEventListener("abort",s)}),l.send(void 0===n._bodyInit?null:n._bodyInit)}))}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=c,t.Request=g,t.Response=b),o.Headers=c,o.Request=g,o.Response=b,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"}(l||(l={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(c||(c={})),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"}(s||(s={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(p||(p={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(f||(f={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(h||(h={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(d||(d={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(y||(y={})),function(t){t.ASC="ASC",t.DESC="DESC"}(g||(g={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(u||(u={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(b||(b={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(O||(O={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(N||(N={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(S||(S={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(x||(x={})),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"}(v||(v={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(C||(C={})),v.PERSONAL_BOOK_SHARE_USER,v.PERSONAL_BOOK_USER,v.HTML_EXPORT_USER,v.PERSONAL_BOOK_USER,v.PDF_EXPORT_USER,v.PERSONAL_BOOK_USER,v.KHUB_ADMIN,v.CONTENT_PUBLISHER,v.ADMIN,v.KHUB_ADMIN,v.USERS_ADMIN,v.PORTAL_ADMIN,v.DEVELOPER,v.BETA_USER,v.DEBUG_USER;const w=e.css`
|
|
7
7
|
`,E=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 I{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=E.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?I.build(t):null!==(o=I.API)&&void 0!==o?o:I.API=I.build()}static await(t){return new Promise((o=>{let e=I.get(t);if(e)o(e);else{const r=E.subscribe((()=>{e=I.get(t),e&&(r(),o(e))}))}}))}}var U;const R=Symbol("clearAfterUnitTest");class W{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={},this.currentUiLocale="",this[U]=()=>{this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=E.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,i,n;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(i=null===(a=this.cache.getNow(t))||void 0===a?void 0:a.messages)&&void 0!==i?i:{};return new o.ParametrizedLabelResolver(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},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)))))}}U=R,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new W((async(t,o)=>(await I.await()).getFluidTopicsMessageContext(t,o)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new W((async(t,o)=>(await I.await()).getCustomMessageContext(t,o))));const L=window.FluidTopicsI18nService,K=window.FluidTopicsCustomI18nService;var A=function(t,o,e,r){for(var a,i=arguments.length,n=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(a=t[l])&&(n=(i<3?a(n):i>3?a(o,e,n):a(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class k 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=()=>I.get(),this.cache=new o.CacheRegistry,this.cleanSessionDebouncer=new o.Debouncer}render(){return e.html`
|
|
8
8
|
<slot></slot>
|
|
9
9
|
`}update(t){super.update(t),t.has("baseUrl")&&(E.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&E.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&E.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&E.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&E.actions.noCustom(this.noCustom),t.has("editorMode")&&E.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&E.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&E.actions.session(this.session),t.has("availableUiLocales")&&E.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>L.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()))}}k.elementDefinitions={},k.styles=w,A([a.property()],k.prototype,"baseUrl",void 0),A([a.property()],k.prototype,"apiIntegrationIdentifier",void 0),A([a.property()],k.prototype,"uiLocale",void 0),A([o.jsonProperty(null)],k.prototype,"availableUiLocales",void 0),A([o.jsonProperty(null)],k.prototype,"metadataConfiguration",void 0),A([a.property({type:Boolean})],k.prototype,"editorMode",void 0),A([a.property({type:Boolean})],k.prototype,"noCustom",void 0),A([a.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],k.prototype,"noCustomComponent",void 0),A([a.property({type:Boolean})],k.prototype,"withManualResources",void 0),A([o.jsonProperty([])],k.prototype,"messageContexts",void 0),A([o.jsonProperty(void 0)],k.prototype,"session",void 0),A([a.property({type:Object})],k.prototype,"apiProvider",void 0);class Z{async listMySearches(){var t;return(null===(t=E.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await I.await()).listMySearches(E.getState().session.profile.userId):[]}}const $=new o.CacheRegistry;class D{async listMyBookmarks(){return $.get("bookmarks",(async()=>(await I.await()).listMyBookmarks(E.getState().session.profile.userId)))}clearCache(){$.clear("bookmarks")}}const z=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new D,E.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=E.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(){z.actions.savedSearches(void 0)}clearMyBookmarks(){z.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Z,o=await t.listMySearches();z.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;z.actions.bookmarks(o)}}},o.customElement("ft-app-context")(k);class F extends Event{constructor(){super(F.eventName)}}F.eventName="search-context-clear-all-filters";var B=function(t,o,e,r){for(var a,i=arguments.length,n=i<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(a=t[l])&&(n=(i<3?a(n):i>3?a(o,e,n):a(o,e))||n);return i>3&&n&&Object.defineProperty(o,e,n),n};class H extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const T=Symbol("registerInterval");class P 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[T]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[T]):this.dispatchEvent(new H)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=T,B([a.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}const G=e.css`
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/,ot=globalThis,et=ot.trustedTypes,rt=et?et.createPolicy("lit-html",{createHTML:t=>t}):void 0,at="$lit$",it=`lit$${(Math.random()+"").slice(9)}$`,nt="?"+it,lt=`<${nt}>`,ct=document,st=()=>ct.createComment(""),pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,ht="[ \t\n\f\r]",
|
|
35
|
+
*/,ot=globalThis,et=ot.trustedTypes,rt=et?et.createPolicy("lit-html",{createHTML:t=>t}):void 0,at="$lit$",it=`lit$${(Math.random()+"").slice(9)}$`,nt="?"+it,lt=`<${nt}>`,ct=document,st=()=>ct.createComment(""),pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,ht="[ \t\n\f\r]",dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,gt=/>/g,ut=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),bt=/'/g,mt=/"/g,Ot=/^(?:script|style|textarea|title)$/i,Nt=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),St=Symbol.for("lit-noChange"),xt=Symbol.for("lit-nothing"),vt=new WeakMap,Ct=ct.createTreeWalker(ct,129);function wt(t,o){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==rt?rt.createHTML(o):o}const Et=(t,o)=>{const e=t.length-1,r=[];let a,i=2===o?"<svg>":"",n=dt;for(let o=0;o<e;o++){const e=t[o];let l,c,s=-1,p=0;for(;p<e.length&&(n.lastIndex=p,c=n.exec(e),null!==c);)p=n.lastIndex,n===dt?"!--"===c[1]?n=yt:void 0!==c[1]?n=gt:void 0!==c[2]?(Ot.test(c[2])&&(a=RegExp("</"+c[2],"g")),n=ut):void 0!==c[3]&&(n=ut):n===ut?">"===c[0]?(n=a??dt,s=-1):void 0===c[1]?s=-2:(s=n.lastIndex-c[2].length,l=c[1],n=void 0===c[3]?ut:'"'===c[3]?mt:bt):n===mt||n===bt?n=ut:n===yt||n===gt?n=dt:(n=ut,a=void 0);const f=n===ut&&t[o+1].startsWith("/>")?" ":"";i+=n===dt?e+lt:s>=0?(r.push(l),e.slice(0,s)+at+e.slice(s)+it+f):e+it+(-2===s?o:f)}return[wt(t,i+(t[e]||"<?>")+(2===o?"</svg>":"")),r]};class It{constructor({strings:t,_$litType$:o},e){let r;this.parts=[];let a=0,i=0;const n=t.length-1,l=this.parts,[c,s]=Et(t,o);if(this.el=It.createElement(c,e),Ct.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=Ct.nextNode())&&l.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(at)){const o=s[i++],e=r.getAttribute(t).split(it),n=/([.?@])?(.*)/.exec(o);l.push({type:1,index:a,name:n[2],strings:e,ctor:"."===n[1]?Kt:"?"===n[1]?At:"@"===n[1]?kt:Lt}),r.removeAttribute(t)}else t.startsWith(it)&&(l.push({type:6,index:a}),r.removeAttribute(t));if(Ot.test(r.tagName)){const t=r.textContent.split(it),o=t.length-1;if(o>0){r.textContent=et?et.emptyScript:"";for(let e=0;e<o;e++)r.append(t[e],st()),Ct.nextNode(),l.push({type:2,index:++a});r.append(t[o],st())}}}else if(8===r.nodeType)if(r.data===nt)l.push({type:2,index:a});else{let t=-1;for(;-1!==(t=r.data.indexOf(it,t+1));)l.push({type:7,index:a}),t+=it.length-1}a++}}static createElement(t,o){const e=ct.createElement("template");return e.innerHTML=t,e}}function Ut(t,o,e=t,r){if(o===St)return o;let a=void 0!==r?e._$Co?.[r]:e._$Cl;const i=pt(o)?void 0:o._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),void 0===i?a=void 0:(a=new i(t),a._$AT(t,e,r)),void 0!==r?(e._$Co??=[])[r]=a:e._$Cl=a),void 0!==a&&(o=Ut(t,a._$AS(t,o.values),a,r)),o}class Rt{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:e}=this._$AD,r=(t?.creationScope??ct).importNode(o,!0);Ct.currentNode=r;let a=Ct.nextNode(),i=0,n=0,l=e[0];for(;void 0!==l;){if(i===l.index){let o;2===l.type?o=new Wt(a,a.nextSibling,this,t):1===l.type?o=new l.ctor(a,l.name,l.strings,this,t):6===l.type&&(o=new Zt(a,this,t)),this._$AV.push(o),l=e[++n]}i!==l?.index&&(a=Ct.nextNode(),i++)}return Ct.currentNode=ct,r}p(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}class Wt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,o,e,r){this.type=2,this._$AH=xt,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===t?.nodeType&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=Ut(this,t,o),pt(t)?t===xt||null==t||""===t?(this._$AH!==xt&&this._$AR(),this._$AH=xt):t!==this._$AH&&t!==St&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>ft(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==xt&&pt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ct.createTextNode(t)),this._$AH=t}g(t){const{values:o,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=It.createElement(wt(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(o);else{const t=new Rt(r,this),e=t.u(this.options);t.p(o),this.$(e),this._$AH=t}}_$AC(t){let o=vt.get(t.strings);return void 0===o&&vt.set(t.strings,o=new It(t)),o}T(t){ft(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,r=0;for(const a of t)r===o.length?o.push(e=new Wt(this.k(st()),this.k(st()),this,this.options)):e=o[r],e._$AI(a),r++;r<o.length&&(this._$AR(e&&e._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Lt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,e,r,a){this.type=1,this._$AH=xt,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=a,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=xt}_$AI(t,o=this,e,r){const a=this.strings;let i=!1;if(void 0===a)t=Ut(this,t,o,0),i=!pt(t)||t!==this._$AH&&t!==St,i&&(this._$AH=t);else{const r=t;let n,l;for(t=a[0],n=0;n<a.length-1;n++)l=Ut(this,r[e+n],o,n),l===St&&(l=this._$AH[n]),i||=!pt(l)||l!==this._$AH[n],l===xt?t=xt:t!==xt&&(t+=(l??"")+a[n+1]),this._$AH[n]=l}i&&!r&&this.O(t)}O(t){t===xt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Kt extends Lt{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===xt?void 0:t}}class At extends Lt{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==xt)}}class kt extends Lt{constructor(t,o,e,r,a){super(t,o,e,r,a),this.type=5}_$AI(t,o=this){if((t=Ut(this,t,o,0)??xt)===St)return;const e=this._$AH,r=t===xt&&e!==xt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,a=t!==xt&&(e===xt||r);r&&this.element.removeEventListener(this.name,this,e),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Zt{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Ut(this,t)}}const $t=ot.litHtmlPolyfillSupport;$t?.(It,Wt),(ot.litHtmlVersions??=[]).push("3.1.0");
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2020 Google LLC
|
|
@@ -120,7 +120,7 @@ const Dt=Symbol.for(""),zt=t=>{if(t?.r===Dt)return t?._$litStatic$},Ft=t=>({_$li
|
|
|
120
120
|
line-height: ${Xo};
|
|
121
121
|
text-transform: ${qo};
|
|
122
122
|
}
|
|
123
|
-
`,
|
|
123
|
+
`,de=e.css`
|
|
124
124
|
.ft-typography--button {
|
|
125
125
|
font-family: ${Jo};
|
|
126
126
|
font-size: ${Qo};
|
|
@@ -129,7 +129,7 @@ const Dt=Symbol.for(""),zt=t=>{if(t?.r===Dt)return t?._$litStatic$},Ft=t=>({_$li
|
|
|
129
129
|
line-height: ${ee};
|
|
130
130
|
text-transform: ${re};
|
|
131
131
|
}
|
|
132
|
-
`,
|
|
132
|
+
`,ye=e.css`
|
|
133
133
|
.ft-typography {
|
|
134
134
|
vertical-align: inherit;
|
|
135
135
|
}
|
|
@@ -149,8 +149,8 @@ const Dt=Symbol.for(""),zt=t=>{if(t?.r===Dt)return t?._$litStatic$},Ft=t=>({_$li
|
|
|
149
149
|
</${Ft(this.element)}>
|
|
150
150
|
`:Ht`
|
|
151
151
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
152
|
-
`}}be.styles=[ae,ie,ne,le,ce,se,pe,fe,he,ye
|
|
153
|
-
<a href="${this.result?function(t){switch(t.type){case S.MAP:return t.map.readerUrl;case S.DOCUMENT:return t.document.viewerUrl;case S.TOPIC:return t.topic.readerUrl}return""}(this.result):""}" @click=${this.onResultClick}>
|
|
152
|
+
`}}be.styles=[ae,ie,ne,le,ce,se,pe,fe,he,de,ye,...ge],ue([a.property()],be.prototype,"element",void 0),ue([a.property()],be.prototype,"variant",void 0),o.customElement("ft-typography")(be);class me extends CustomEvent{constructor(t,o){super("ft-search-result-click",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}}class Oe extends J{render(){return this.result?e.html`
|
|
153
|
+
<a href="${this.result?function(t){var o,e,r,a,i,n,l,c,s,p;if("EXTERNAL"===(null!==(a=null!==(e=null===(o=t.map)||void 0===o?void 0:o.openMode)&&void 0!==e?e:null===(r=t.topic)||void 0===r?void 0:r.openMode)&&void 0!==a?a:null===(i=t.document)||void 0===i?void 0:i.openMode))return null!==(s=null!==(l=null===(n=t.map)||void 0===n?void 0:n.originUrl)&&void 0!==l?l:null===(c=t.topic)||void 0===c?void 0:c.originUrl)&&void 0!==s?s:null===(p=t.document)||void 0===p?void 0:p.originUrl;switch(t.type){case S.MAP:return t.map.readerUrl;case S.DOCUMENT:return t.document.viewerUrl;case S.TOPIC:return t.topic.readerUrl}return""}(this.result):""}" @click=${this.onResultClick}>
|
|
154
154
|
<ft-typography variant="title" part="text">${i.unsafeHTML(this.selectTitle(this.result))}</ft-typography>
|
|
155
155
|
</a>
|
|
156
156
|
`:e.nothing}onResultClick(){this.dispatchEvent(new me(this.result,this.rank))}selectTitle(t){switch(t.type){case"MAP":return t.map.htmlTitle;case"DOCUMENT":return t.document.htmlTitle;case"TOPIC":return t.topic.htmlTitle}return""}}Oe.elementDefinitions={"ft-typography":be},Oe.styles=tt,o.customElement("ft-search-result-title")(Oe);const Ne=o.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent"),Se=e.css`
|
|
@@ -270,7 +270,7 @@ const Mr=2,Zr=t=>(...e)=>({_$litDirective$:t,values:e});let Tr=class{constructor
|
|
|
270
270
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
271
271
|
*/
|
|
272
272
|
class wa extends Tr{constructor(t){if(super(t),this.et=et,t.type!==Mr)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===et||null==t)return this.vt=void 0,this.et=t;if(t===tt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}wa.directiveName="unsafeHTML",wa.resultType=1;const Na=Zr(wa);class xa extends CustomEvent{constructor(t,e){super("ft-search-result-click",{detail:{result:t,rank:e},bubbles:!0,composed:!0})}}class Ca extends _n{render(){return this.result?ie`
|
|
273
|
-
<a href="${this.result?function(t){switch(t.type){case un.MAP:return t.map.readerUrl;case un.DOCUMENT:return t.document.viewerUrl;case un.TOPIC:return t.topic.readerUrl}return""}(this.result):""}" @click=${this.onResultClick}>
|
|
273
|
+
<a href="${this.result?function(t){var e,o,r,n,i,a,s,c,l,f;if("EXTERNAL"===(null!==(n=null!==(o=null===(e=t.map)||void 0===e?void 0:e.openMode)&&void 0!==o?o:null===(r=t.topic)||void 0===r?void 0:r.openMode)&&void 0!==n?n:null===(i=t.document)||void 0===i?void 0:i.openMode))return null!==(l=null!==(s=null===(a=t.map)||void 0===a?void 0:a.originUrl)&&void 0!==s?s:null===(c=t.topic)||void 0===c?void 0:c.originUrl)&&void 0!==l?l:null===(f=t.document)||void 0===f?void 0:f.originUrl;switch(t.type){case un.MAP:return t.map.readerUrl;case un.DOCUMENT:return t.document.viewerUrl;case un.TOPIC:return t.topic.readerUrl}return""}(this.result):""}" @click=${this.onResultClick}>
|
|
274
274
|
<ft-typography variant="title" part="text">${Na(this.selectTitle(this.result))}</ft-typography>
|
|
275
275
|
</a>
|
|
276
276
|
`:se}onResultClick(){this.dispatchEvent(new xa(this.result,this.rank))}selectTitle(t){switch(t.type){case"MAP":return t.map.htmlTitle;case"DOCUMENT":return t.document.htmlTitle;case"TOPIC":return t.topic.htmlTitle}return""}}Ca.elementDefinitions={"ft-typography":Sa},Ca.styles=Hn,W("ft-search-result-title")(Ca);const Ea=Ne.create("--ft-sra-highlight-background-color","","COLOR","transparent"),Ra=Nt`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-results",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.28",
|
|
4
4
|
"description": "Search result list for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
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-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-search-result-context": "1.1.28",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.1.28",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@fluid-topics/public-api": "1.0.
|
|
27
|
+
"@fluid-topics/public-api": "1.0.57"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "8c1055ddd23e83efa3833f033a507aa1ab32fecc"
|
|
30
30
|
}
|