@fluid-topics/ft-search-type 1.1.24 → 1.1.26
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.
|
@@ -545,7 +545,7 @@ const j=Symbol.for(""),M=t=>{if(t?.r===j)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
545
545
|
</div>
|
|
546
546
|
</div>
|
|
547
547
|
</div>
|
|
548
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,null!=t&&await this.hideDebounce.run((()=>{this.hide()}),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",async function(t,e,o){return Mo(t,e,{platform:{...jo,getOffsetParent:t=>jo.getOffsetParent(t,_o)},middleware:[(i={crossAxis:!0},void 0===i&&(i={}),{name:"shift",options:i,async fn(t){const{x:e,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=eo(i,t),c={x:e,y:o},f=await ho(t,l),h=ao(oo(r)),p=ro(h);let d=c[p],u=c[h];if(n){const t="y"===p?"bottom":"right";d=to(d+f["y"===p?"top":"left"],d,d-f[t])}if(a){const t="y"===h?"bottom":"right";u=to(u+f["y"===h?"top":"left"],u,u-f[t])}const y=s.fn({...t,[p]:d,[h]:u});return{...y,data:{x:y.x-e,y:y.y-o}}}}),uo({allowedPlacements:[o]})]});var i}(this.slottedElement,this.tooltip,this.position).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Xo.elementDefinitions={"ft-typography":ue},Xo.styles=Me,Qo([i.property()],Xo.prototype,"text",void 0),Qo([i.property({type:Boolean})],Xo.prototype,"manual",void 0),Qo([i.property({type:Boolean})],Xo.prototype,"inline",void 0),Qo([i.property({type:Number})],Xo.prototype,"delay",void 0),Qo([i.property()],Xo.prototype,"position",void 0),Qo([i.queryAssignedNodes()],Xo.prototype,"slotNodes",void 0),Qo([i.query(".ft-tooltip--container")],Xo.prototype,"container",void 0),Qo([i.query(".ft-tooltip")],Xo.prototype,"tooltip",void 0),Qo([i.query(".ft-tooltip--content")],Xo.prototype,"tooltipContent",void 0),Qo([i.state()],Xo.prototype,"visible",void 0),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onTouch",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onHover",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onOut",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onClick",null),e.customElement("ft-tooltip")(Xo),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(Vo||(Vo={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(qo||(qo={})),new Map([...["abw"].map((t=>[t,qo.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,qo.AUDIO])),...["avi"].map((t=>[t,qo.AVI])),...["chm","xhs"].map((t=>[t,qo.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,qo.CODE])),...["csv"].map((t=>[t,qo.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,qo.DITA])),...["epub"].map((t=>[t,qo.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,qo.EXCEL])),...["flac"].map((t=>[t,qo.FLAC])),...["gif"].map((t=>[t,qo.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,qo.GZIP])),...["html","htm","xhtml"].map((t=>[t,qo.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,qo.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,qo.JPEG])),...["json"].map((t=>[t,qo.JSON])),...["m4a","m4p"].map((t=>[t,qo.M4A])),...["mov","qt"].map((t=>[t,qo.MOV])),...["mp3"].map((t=>[t,qo.MP3])),...["mp4","m4v"].map((t=>[t,qo.MP4])),...["ogg","oga"].map((t=>[t,qo.OGG])),...["pdf","ps"].map((t=>[t,qo.PDF])),...["png"].map((t=>[t,qo.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,qo.POWERPOINT])),...["rar"].map((t=>[t,qo.RAR])),...["stp"].map((t=>[t,qo.STP])),...["txt","rtf","md","mdown"].map((t=>[t,qo.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,qo.VIDEO])),...["wav"].map((t=>[t,qo.WAV])),...["wma"].map((t=>[t,qo.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,qo.WORD])),...["xml","xsl","rdf"].map((t=>[t,qo.XML])),...["yaml","yml","x-yaml"].map((t=>[t,qo.YAML])),...["zip"].map((t=>[t,qo.ZIP]))]),qo.ABW,qo.AUDIO,qo.AVI,qo.CHM,qo.CODE,qo.CSV,qo.DITA,qo.EPUB,qo.EXCEL,qo.FLAC,qo.GIF,qo.GZIP,qo.HTML,qo.IMAGE,qo.JPEG,qo.JSON,qo.M4A,qo.MOV,qo.MP3,qo.MP4,qo.OGG,qo.PDF,qo.PNG,qo.POWERPOINT,qo.RAR,qo.STP,qo.TEXT,qo.UNKNOWN,qo.VIDEO,qo.WAV,qo.WMA,qo.WORD,qo.XML,qo.YAML,qo.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Yo||(Yo={}));var Jo=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ti extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=o.nothing}render(){const t=this.variant&&Object.values(Yo).includes(this.variant)?this.variant:Yo.fluid_topics,e=t!==Yo.material||!!this.value;return o.html`
|
|
548
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,null!=t&&await this.hideDebounce.run((()=>{this.hide()}),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",async function(t,e,o){return Mo(t,e,{platform:{...jo,getOffsetParent:t=>jo.getOffsetParent(t,_o)},middleware:[(i={crossAxis:!0},void 0===i&&(i={}),{name:"shift",options:i,async fn(t){const{x:e,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=eo(i,t),c={x:e,y:o},f=await ho(t,l),h=ao(oo(r)),p=ro(h);let d=c[p],u=c[h];if(n){const t="y"===p?"bottom":"right";d=to(d+f["y"===p?"top":"left"],d,d-f[t])}if(a){const t="y"===h?"bottom":"right";u=to(u+f["y"===h?"top":"left"],u,u-f[t])}const y=s.fn({...t,[p]:d,[h]:u});return{...y,data:{x:y.x-e,y:y.y-o}}}}),uo({allowedPlacements:[o]})]});var i}(this.slottedElement,this.tooltip,this.position).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Xo.elementDefinitions={"ft-typography":ue},Xo.styles=Me,Qo([i.property()],Xo.prototype,"text",void 0),Qo([i.property({type:Boolean})],Xo.prototype,"manual",void 0),Qo([i.property({type:Boolean})],Xo.prototype,"inline",void 0),Qo([i.property({type:Number})],Xo.prototype,"delay",void 0),Qo([i.property()],Xo.prototype,"position",void 0),Qo([i.queryAssignedNodes()],Xo.prototype,"slotNodes",void 0),Qo([i.query(".ft-tooltip--container")],Xo.prototype,"container",void 0),Qo([i.query(".ft-tooltip")],Xo.prototype,"tooltip",void 0),Qo([i.query(".ft-tooltip--content")],Xo.prototype,"tooltipContent",void 0),Qo([i.state()],Xo.prototype,"visible",void 0),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onTouch",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onHover",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onOut",null),Qo([i.eventOptions({passive:!0})],Xo.prototype,"onClick",null),e.customElement("ft-tooltip")(Xo),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(Vo||(Vo={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(qo||(qo={})),new Map([...["abw"].map((t=>[t,qo.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,qo.AUDIO])),...["avi"].map((t=>[t,qo.AVI])),...["chm","xhs"].map((t=>[t,qo.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,qo.CODE])),...["csv"].map((t=>[t,qo.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,qo.DITA])),...["epub"].map((t=>[t,qo.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,qo.EXCEL])),...["flac"].map((t=>[t,qo.FLAC])),...["gif"].map((t=>[t,qo.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,qo.GZIP])),...["html","htm","xhtml"].map((t=>[t,qo.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,qo.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,qo.JPEG])),...["json"].map((t=>[t,qo.JSON])),...["m4a","m4p"].map((t=>[t,qo.M4A])),...["mov","qt"].map((t=>[t,qo.MOV])),...["mp3"].map((t=>[t,qo.MP3])),...["mp4","m4v"].map((t=>[t,qo.MP4])),...["ogg","oga"].map((t=>[t,qo.OGG])),...["pdf","ps"].map((t=>[t,qo.PDF])),...["png"].map((t=>[t,qo.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,qo.POWERPOINT])),...["rar"].map((t=>[t,qo.RAR])),...["stp"].map((t=>[t,qo.STP])),...["txt","rtf","md","mdown"].map((t=>[t,qo.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,qo.VIDEO])),...["wav"].map((t=>[t,qo.WAV])),...["wma"].map((t=>[t,qo.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,qo.WORD])),...["xml","xsl","rdf"].map((t=>[t,qo.XML])),...["yaml","yml","x-yaml"].map((t=>[t,qo.YAML])),...["zip"].map((t=>[t,qo.ZIP]))]),qo.ABW,qo.AUDIO,qo.AVI,qo.CHM,qo.CODE,qo.CSV,qo.DITA,qo.EPUB,qo.EXCEL,qo.FLAC,qo.GIF,qo.GZIP,qo.HTML,qo.IMAGE,qo.JPEG,qo.JSON,qo.M4A,qo.MOV,qo.MP3,qo.MP4,qo.OGG,qo.PDF,qo.PNG,qo.POWERPOINT,qo.RAR,qo.STP,qo.TEXT,qo.UNKNOWN,qo.VIDEO,qo.WAV,qo.WMA,qo.WORD,qo.XML,qo.YAML,qo.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Yo||(Yo={}));var Jo=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ti extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=o.nothing}render(){const t=this.variant&&Object.values(Yo).includes(this.variant)?this.variant:Yo.fluid_topics,e=t!==Yo.material||!!this.value;return o.html`
|
|
549
549
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
550
550
|
${a.unsafeHTML(this.resolvedIcon)}
|
|
551
551
|
<slot ?hidden=${e}></slot>
|
|
@@ -1484,7 +1484,7 @@ const j=Symbol.for(""),M=t=>{if(t?.r===j)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1484
1484
|
`,tr=o.css`
|
|
1485
1485
|
`,er=e.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 or{static build(t){const{baseUrl:e,apiIntegrationIdentifier:o}=er.getState(),i=null!=t?t:o;if(e&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,i,!0)}static get(t){var e;return null!=t?or.build(t):null!==(e=or.API)&&void 0!==e?e:or.API=or.build()}static await(t){return new Promise((e=>{let o=or.get(t);if(o)e(o);else{const i=er.subscribe((()=>{o=or.get(t),o&&(i(),e(o))}))}}))}}var ir;const rr=Symbol("clearAfterUnitTest");class nr{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[ir]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=er.getState().uiLocale,er.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=er.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var i;if(t=t.toLowerCase(),Object.keys(o).length>0){const r={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...o};e.deepEqual(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...i){var r,n,a;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(n=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},s).resolve(o,...i)}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,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}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=>e.delay(0).then((()=>t())).catch((()=>null)))))}}ir=rr,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new nr((async(t,e)=>(await or.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new nr((async(t,e)=>(await or.await()).getCustomMessageContext(t,e))));const ar=window.FluidTopicsI18nService,sr=window.FluidTopicsCustomI18nService;var lr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class cr extends e.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=()=>or.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return o.html`
|
|
1486
1486
|
<slot></slot>
|
|
1487
|
-
`}update(t){super.update(t),t.has("baseUrl")&&er.actions.baseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&er.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&er.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&er.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&er.actions.noCustom(this.noCustom),t.has("editorMode")&&er.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&er.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&er.actions.session(this.session),t.has("availableUiLocales")&&er.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ar.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()))}}cr.elementDefinitions={},cr.styles=tr,lr([i.property()],cr.prototype,"baseUrl",void 0),lr([i.property()],cr.prototype,"apiIntegrationIdentifier",void 0),lr([i.property()],cr.prototype,"uiLocale",void 0),lr([e.jsonProperty(null)],cr.prototype,"availableUiLocales",void 0),lr([e.jsonProperty(null)],cr.prototype,"metadataConfiguration",void 0),lr([i.property({type:Boolean})],cr.prototype,"editorMode",void 0),lr([i.property({type:Boolean})],cr.prototype,"noCustom",void 0),lr([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],cr.prototype,"noCustomComponent",void 0),lr([i.property({type:Boolean})],cr.prototype,"withManualResources",void 0),lr([e.jsonProperty([])],cr.prototype,"messageContexts",void 0),lr([e.jsonProperty(void 0)],cr.prototype,"session",void 0),lr([i.property({type:Object})],cr.prototype,"apiProvider",void 0);class fr{async listMySearches(){var t;return(null===(t=er.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await or.await()).listMySearches(er.getState().session.profile.userId):[]}}const hr=new e.CacheRegistry;class pr{async listMyBookmarks(){return hr.get("bookmarks",(async()=>(await or.await()).listMyBookmarks(er.getState().session.profile.userId)))}clearCache(){hr.clear("bookmarks")}}const dr=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const ur=new class{constructor(){this.currentSession=er.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pr,er.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:o}=er.getState();e.deepEqual(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(){dr.actions.savedSearches(void 0)}clearMyBookmarks(){dr.actions.bookmarks(void 0)}async reloadMySearches(){const t=new fr,e=await t.listMySearches();dr.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;dr.actions.bookmarks(e)}}};e.customElement("ft-app-context")(cr);var yr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const gr=Symbol("i18nProperties"),br=Symbol("i18nUnsubs");function mr(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?sr:ar}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[gr])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[gr])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[gr]&&new Set([...this[gr].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[br].has(t)||this[br].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[br].forEach((t=>t())),this[br].clear()}}return e=br,yr([i.property({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class vr extends(mr(e.FtLitElement)){}class xr extends(mr(e.FtLitElementRedux)){}var Or=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class wr extends xr{constructor(){super(),this.editorMode=!1,this.addStore(er)}render(){return this.key&&this.context?o.html`
|
|
1487
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(er.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&er.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&er.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&er.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&er.actions.noCustom(this.noCustom),t.has("editorMode")&&er.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&er.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&er.actions.session(this.session),t.has("availableUiLocales")&&er.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ar.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()))}}cr.elementDefinitions={},cr.styles=tr,lr([i.property()],cr.prototype,"baseUrl",void 0),lr([i.property()],cr.prototype,"apiIntegrationIdentifier",void 0),lr([i.property()],cr.prototype,"uiLocale",void 0),lr([e.jsonProperty(null)],cr.prototype,"availableUiLocales",void 0),lr([e.jsonProperty(null)],cr.prototype,"metadataConfiguration",void 0),lr([i.property({type:Boolean})],cr.prototype,"editorMode",void 0),lr([i.property({type:Boolean})],cr.prototype,"noCustom",void 0),lr([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],cr.prototype,"noCustomComponent",void 0),lr([i.property({type:Boolean})],cr.prototype,"withManualResources",void 0),lr([e.jsonProperty([])],cr.prototype,"messageContexts",void 0),lr([e.jsonProperty(void 0)],cr.prototype,"session",void 0),lr([i.property({type:Object})],cr.prototype,"apiProvider",void 0);class fr{async listMySearches(){var t;return(null===(t=er.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await or.await()).listMySearches(er.getState().session.profile.userId):[]}}const hr=new e.CacheRegistry;class pr{async listMyBookmarks(){return hr.get("bookmarks",(async()=>(await or.await()).listMyBookmarks(er.getState().session.profile.userId)))}clearCache(){hr.clear("bookmarks")}}const dr=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const ur=new class{constructor(){this.currentSession=er.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pr,er.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:o}=er.getState();e.deepEqual(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(){dr.actions.savedSearches(void 0)}clearMyBookmarks(){dr.actions.bookmarks(void 0)}async reloadMySearches(){const t=new fr,e=await t.listMySearches();dr.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;dr.actions.bookmarks(e)}}};e.customElement("ft-app-context")(cr);var yr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const gr=Symbol("i18nProperties"),br=Symbol("i18nUnsubs");function mr(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?sr:ar}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[gr])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[gr])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[gr]&&new Set([...this[gr].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[br].has(t)||this[br].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[br].forEach((t=>t())),this[br].clear()}}return e=br,yr([i.property({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class vr extends(mr(e.FtLitElement)){}class xr extends(mr(e.FtLitElementRedux)){}var Or=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class wr extends xr{constructor(){super(),this.editorMode=!1,this.addStore(er)}render(){return this.key&&this.context?o.html`
|
|
1488
1488
|
<span class="ft-i18n">
|
|
1489
1489
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1490
1490
|
</span>
|
|
@@ -692,7 +692,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
692
692
|
* Copyright 2017 Google LLC
|
|
693
693
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
694
694
|
*/
|
|
695
|
-
class ya extends $s{constructor(t){if(super(t),this.et=ct,t.type!==Ns)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ct||null==t)return this.vt=void 0,this.et=t;if(t===lt)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:[]}}}ya.directiveName="unsafeHTML",ya.resultType=1;const ga=Cs(ya);var ba,ma,va;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(ba||(ba={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ma||(ma={})),new Map([...["abw"].map((t=>[t,ma.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,ma.AUDIO])),...["avi"].map((t=>[t,ma.AVI])),...["chm","xhs"].map((t=>[t,ma.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,ma.CODE])),...["csv"].map((t=>[t,ma.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ma.DITA])),...["epub"].map((t=>[t,ma.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ma.EXCEL])),...["flac"].map((t=>[t,ma.FLAC])),...["gif"].map((t=>[t,ma.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ma.GZIP])),...["html","htm","xhtml"].map((t=>[t,ma.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,ma.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ma.JPEG])),...["json"].map((t=>[t,ma.JSON])),...["m4a","m4p"].map((t=>[t,ma.M4A])),...["mov","qt"].map((t=>[t,ma.MOV])),...["mp3"].map((t=>[t,ma.MP3])),...["mp4","m4v"].map((t=>[t,ma.MP4])),...["ogg","oga"].map((t=>[t,ma.OGG])),...["pdf","ps"].map((t=>[t,ma.PDF])),...["png"].map((t=>[t,ma.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ma.POWERPOINT])),...["rar"].map((t=>[t,ma.RAR])),...["stp"].map((t=>[t,ma.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ma.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,ma.VIDEO])),...["wav"].map((t=>[t,ma.WAV])),...["wma"].map((t=>[t,ma.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ma.WORD])),...["xml","xsl","rdf"].map((t=>[t,ma.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ma.YAML])),...["zip"].map((t=>[t,ma.ZIP]))]),ma.ABW,ma.AUDIO,ma.AVI,ma.CHM,ma.CODE,ma.CSV,ma.DITA,ma.EPUB,ma.EXCEL,ma.FLAC,ma.GIF,ma.GZIP,ma.HTML,ma.IMAGE,ma.JPEG,ma.JSON,ma.M4A,ma.MOV,ma.MP3,ma.MP4,ma.OGG,ma.PDF,ma.PNG,ma.POWERPOINT,ma.RAR,ma.STP,ma.TEXT,ma.UNKNOWN,ma.VIDEO,ma.WAV,ma.WMA,ma.WORD,ma.XML,ma.YAML,ma.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(va||(va={}));var xa=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Oa extends Vo{constructor(){super(...arguments),this.resolvedIcon=ye}render(){const t=this.variant&&Object.values(va).includes(this.variant)?this.variant:va.fluid_topics,e=t!==va.material||!!this.value;return pe`
|
|
695
|
+
class ya extends $s{constructor(t){if(super(t),this.et=ct,t.type!==Ns)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ct||null==t)return this.vt=void 0,this.et=t;if(t===lt)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:[]}}}ya.directiveName="unsafeHTML",ya.resultType=1;const ga=Cs(ya);var ba,ma,va;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE=""}(ba||(ba={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ma||(ma={})),new Map([...["abw"].map((t=>[t,ma.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,ma.AUDIO])),...["avi"].map((t=>[t,ma.AVI])),...["chm","xhs"].map((t=>[t,ma.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,ma.CODE])),...["csv"].map((t=>[t,ma.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ma.DITA])),...["epub"].map((t=>[t,ma.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ma.EXCEL])),...["flac"].map((t=>[t,ma.FLAC])),...["gif"].map((t=>[t,ma.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ma.GZIP])),...["html","htm","xhtml"].map((t=>[t,ma.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,ma.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ma.JPEG])),...["json"].map((t=>[t,ma.JSON])),...["m4a","m4p"].map((t=>[t,ma.M4A])),...["mov","qt"].map((t=>[t,ma.MOV])),...["mp3"].map((t=>[t,ma.MP3])),...["mp4","m4v"].map((t=>[t,ma.MP4])),...["ogg","oga"].map((t=>[t,ma.OGG])),...["pdf","ps"].map((t=>[t,ma.PDF])),...["png"].map((t=>[t,ma.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ma.POWERPOINT])),...["rar"].map((t=>[t,ma.RAR])),...["stp"].map((t=>[t,ma.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ma.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,ma.VIDEO])),...["wav"].map((t=>[t,ma.WAV])),...["wma"].map((t=>[t,ma.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ma.WORD])),...["xml","xsl","rdf"].map((t=>[t,ma.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ma.YAML])),...["zip"].map((t=>[t,ma.ZIP]))]),ma.ABW,ma.AUDIO,ma.AVI,ma.CHM,ma.CODE,ma.CSV,ma.DITA,ma.EPUB,ma.EXCEL,ma.FLAC,ma.GIF,ma.GZIP,ma.HTML,ma.IMAGE,ma.JPEG,ma.JSON,ma.M4A,ma.MOV,ma.MP3,ma.MP4,ma.OGG,ma.PDF,ma.PNG,ma.POWERPOINT,ma.RAR,ma.STP,ma.TEXT,ma.UNKNOWN,ma.VIDEO,ma.WAV,ma.WMA,ma.WORD,ma.XML,ma.YAML,ma.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(va||(va={}));var xa=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Oa extends Vo{constructor(){super(...arguments),this.resolvedIcon=ye}render(){const t=this.variant&&Object.values(va).includes(this.variant)?this.variant:va.fluid_topics,e=t!==va.material||!!this.value;return pe`
|
|
696
696
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
697
697
|
${ga(this.resolvedIcon)}
|
|
698
698
|
<slot ?hidden=${e}></slot>
|
|
@@ -1637,7 +1637,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1637
1637
|
`,Ol=Ut`
|
|
1638
1638
|
`,wl=Yr.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 Sl{static build(t){const{baseUrl:e,apiIntegrationIdentifier:o}=wl.getState(),i=null!=t?t:o;if(e&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,i,!0)}static get(t){var e;return null!=t?Sl.build(t):null!==(e=Sl.API)&&void 0!==e?e:Sl.API=Sl.build()}static await(t){return new Promise((e=>{let o=Sl.get(t);if(o)e(o);else{const i=wl.subscribe((()=>{o=Sl.get(t),o&&(i(),e(o))}))}}))}}var Nl;const Cl=Symbol("clearAfterUnitTest");class $l{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new r,this.listeners={},this.currentUiLocale="",this[Nl]=()=>{this.defaultMessages={},this.cache=new r,this.listeners={}},this.currentUiLocale=wl.getState().uiLocale,wl.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=wl.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const i={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};P(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var i,r,n;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(i=this.cache.getNow(t))||void 0===i?void 0:i.messages)&&void 0!==r?r:{};return new Jo(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},s).resolve(e,...o)}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,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}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=>j(0).then((()=>t())).catch((()=>null)))))}}Nl=Cl,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new $l((async(t,e)=>(await Sl.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new $l((async(t,e)=>(await Sl.await()).getCustomMessageContext(t,e))));const El=window.FluidTopicsI18nService,kl=window.FluidTopicsCustomI18nService;var Rl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Il extends Vo{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=()=>Sl.get(),this.cache=new r,this.cleanSessionDebouncer=new n}render(){return pe`
|
|
1639
1639
|
<slot></slot>
|
|
1640
|
-
`}update(t){super.update(t),t.has("baseUrl")&&wl.actions.baseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&wl.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&wl.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&wl.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&wl.actions.noCustom(this.noCustom),t.has("editorMode")&&wl.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&wl.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&wl.actions.session(this.session),t.has("availableUiLocales")&&wl.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>El.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()))}}Il.elementDefinitions={},Il.styles=Ol,Rl([R()],Il.prototype,"baseUrl",void 0),Rl([R()],Il.prototype,"apiIntegrationIdentifier",void 0),Rl([R()],Il.prototype,"uiLocale",void 0),Rl([B(null)],Il.prototype,"availableUiLocales",void 0),Rl([B(null)],Il.prototype,"metadataConfiguration",void 0),Rl([R({type:Boolean})],Il.prototype,"editorMode",void 0),Rl([R({type:Boolean})],Il.prototype,"noCustom",void 0),Rl([R({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Il.prototype,"noCustomComponent",void 0),Rl([R({type:Boolean})],Il.prototype,"withManualResources",void 0),Rl([B([])],Il.prototype,"messageContexts",void 0),Rl([B(void 0)],Il.prototype,"session",void 0),Rl([R({type:Object})],Il.prototype,"apiProvider",void 0);class Ul{async listMySearches(){var t;return(null===(t=wl.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Sl.await()).listMySearches(wl.getState().session.profile.userId):[]}}const Ll=new r;class Al{async listMyBookmarks(){return Ll.get("bookmarks",(async()=>(await Sl.await()).listMyBookmarks(wl.getState().session.profile.userId)))}clearCache(){Ll.clear("bookmarks")}}const Wl=Yr.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const jl=new class{constructor(){this.currentSession=wl.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Al,wl.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=wl.getState();P(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(){Wl.actions.savedSearches(void 0)}clearMyBookmarks(){Wl.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Ul,e=await t.listMySearches();Wl.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Wl.actions.bookmarks(e)}}};z("ft-app-context")(Il);var Fl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};const Dl=Symbol("i18nProperties"),Pl=Symbol("i18nUnsubs");function zl(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?kl:El}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Dl])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[Dl])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Dl]&&new Set([...this[Dl].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Pl].has(t)||this[Pl].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Pl].forEach((t=>t())),this[Pl].clear()}}return e=Pl,Fl([R({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Bl extends(zl(Vo)){}class Ml extends(zl(li)){}var Tl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Kl extends Ml{constructor(){super(),this.editorMode=!1,this.addStore(wl)}render(){return this.key&&this.context?pe`
|
|
1640
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(wl.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&wl.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&wl.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&wl.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&wl.actions.noCustom(this.noCustom),t.has("editorMode")&&wl.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&wl.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&wl.actions.session(this.session),t.has("availableUiLocales")&&wl.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>El.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()))}}Il.elementDefinitions={},Il.styles=Ol,Rl([R()],Il.prototype,"baseUrl",void 0),Rl([R()],Il.prototype,"apiIntegrationIdentifier",void 0),Rl([R()],Il.prototype,"uiLocale",void 0),Rl([B(null)],Il.prototype,"availableUiLocales",void 0),Rl([B(null)],Il.prototype,"metadataConfiguration",void 0),Rl([R({type:Boolean})],Il.prototype,"editorMode",void 0),Rl([R({type:Boolean})],Il.prototype,"noCustom",void 0),Rl([R({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Il.prototype,"noCustomComponent",void 0),Rl([R({type:Boolean})],Il.prototype,"withManualResources",void 0),Rl([B([])],Il.prototype,"messageContexts",void 0),Rl([B(void 0)],Il.prototype,"session",void 0),Rl([R({type:Object})],Il.prototype,"apiProvider",void 0);class Ul{async listMySearches(){var t;return(null===(t=wl.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Sl.await()).listMySearches(wl.getState().session.profile.userId):[]}}const Ll=new r;class Al{async listMyBookmarks(){return Ll.get("bookmarks",(async()=>(await Sl.await()).listMyBookmarks(wl.getState().session.profile.userId)))}clearCache(){Ll.clear("bookmarks")}}const Wl=Yr.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const jl=new class{constructor(){this.currentSession=wl.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Al,wl.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=wl.getState();P(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(){Wl.actions.savedSearches(void 0)}clearMyBookmarks(){Wl.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Ul,e=await t.listMySearches();Wl.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Wl.actions.bookmarks(e)}}};z("ft-app-context")(Il);var Fl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};const Dl=Symbol("i18nProperties"),Pl=Symbol("i18nUnsubs");function zl(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?kl:El}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Dl])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[Dl])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Dl]&&new Set([...this[Dl].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Pl].has(t)||this[Pl].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Pl].forEach((t=>t())),this[Pl].clear()}}return e=Pl,Fl([R({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Bl extends(zl(Vo)){}class Ml extends(zl(li)){}var Tl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Kl extends Ml{constructor(){super(),this.editorMode=!1,this.addStore(wl)}render(){return this.key&&this.context?pe`
|
|
1641
1641
|
<span class="ft-i18n">
|
|
1642
1642
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1643
1643
|
</span>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-type",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "Search",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.1.26",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "6734976f5a7f6b986917a085be0c38ca3ae562a0"
|
|
26
26
|
}
|