@fluid-topics/ft-reader-search-in-document 1.1.113 → 1.1.114
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.
|
@@ -536,7 +536,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
536
536
|
</div>
|
|
537
537
|
</div>
|
|
538
538
|
</div>
|
|
539
|
-
`}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Vc(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}px`,this.tooltip.style.top=`${o}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",e=>{e.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(e,o){return Math.max(e,Math.min(0,-o))}};re.elementDefinitions={"ft-typography":ne};re.styles=vc;we([(0,ce.property)()],re.prototype,"text",void 0);we([(0,ce.property)({type:Boolean})],re.prototype,"manual",void 0);we([(0,ce.property)({type:Boolean})],re.prototype,"inline",void 0);we([(0,ce.property)({type:Number})],re.prototype,"delay",void 0);we([(0,ce.property)()],re.prototype,"position",void 0);we([(0,ce.queryAssignedNodes)()],re.prototype,"slotNodes",void 0);we([(0,ce.query)(".ft-tooltip--container")],re.prototype,"container",void 0);we([(0,ce.query)(".ft-tooltip")],re.prototype,"tooltip",void 0);we([(0,ce.query)(".ft-tooltip--content")],re.prototype,"tooltipContent",void 0);we([(0,ce.state)()],re.prototype,"visible",void 0);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onTouch",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onHover",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onOut",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onClick",null)});var qc=f(()=>{"use strict"});var Yc,xi=f(()=>{"use strict";Yc=g(A());bi();bi();ai();qc();(0,Yc.customElement)("ft-tooltip")(re)});var Mo=Ft((xv,Xc)=>{Xc.exports=ftGlobals.litUnsafeHTML});function Qc(t,e){var o,n,i,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,c]=(((o=hh.get(t))!==null&&o!==void 0?o:t)+"/").split("/");return(a=(i=(n=vi.get(c))!==null&&n!==void 0?n:vi.get(e))!==null&&i!==void 0?i:vi.get(s))!==null&&a!==void 0?a:E.UNKNOWN}var Ct,E,vi,hh,vv,Si=f(()=>{"use strict";(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",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="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.EYE="",t.SHARE="󨃱"})(Ct||(Ct={}));(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=""})(E||(E={}));vi=new Map([...["abw"].map(t=>[t,E.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,E.AUDIO]),...["avi"].map(t=>[t,E.AVI]),...["chm","xhs"].map(t=>[t,E.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,E.CODE]),...["csv"].map(t=>[t,E.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,E.DITA]),...["epub"].map(t=>[t,E.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,E.EXCEL]),...["flac"].map(t=>[t,E.FLAC]),...["gif"].map(t=>[t,E.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,E.GZIP]),...["html","htm","xhtml"].map(t=>[t,E.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,E.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,E.JPEG]),...["json"].map(t=>[t,E.JSON]),...["m4a","m4p"].map(t=>[t,E.M4A]),...["mov","qt"].map(t=>[t,E.MOV]),...["mp3"].map(t=>[t,E.MP3]),...["mp4","m4v"].map(t=>[t,E.MP4]),...["ogg","oga"].map(t=>[t,E.OGG]),...["pdf","ps"].map(t=>[t,E.PDF]),...["png"].map(t=>[t,E.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,E.POWERPOINT]),...["rar"].map(t=>[t,E.RAR]),...["stp"].map(t=>[t,E.STP]),...["txt","rtf","md","mdown"].map(t=>[t,E.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,E.VIDEO]),...["wav"].map(t=>[t,E.WAV]),...["wma"].map(t=>[t,E.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,E.WORD]),...["xml","xsl","rdf"].map(t=>[t,E.XML]),...["yaml","yml","x-yaml"].map(t=>[t,E.YAML]),...["zip"].map(t=>[t,E.ZIP])]),hh=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);vv={[E.ABW]:"#91ABC6",[E.AUDIO]:"#1795E3",[E.AVI]:"#E63324",[E.CHM]:"#71C3EB",[E.CODE]:"#71C3EB",[E.CSV]:"#1F7345",[E.DITA]:"#71C3EB",[E.EPUB]:"#85B926",[E.EXCEL]:"#1F7345",[E.FLAC]:"#1795E3",[E.GIF]:"#59B031",[E.GZIP]:"#F8AB36",[E.HTML]:"#71C3EB",[E.IMAGE]:"#59B031",[E.JPEG]:"#59B031",[E.JSON]:"#71C3EB",[E.M4A]:"#1795E3",[E.MOV]:"#E63324",[E.MP3]:"#1795E3",[E.MP4]:"#E63324",[E.OGG]:"#1795E3",[E.PDF]:"#E44948",[E.PNG]:"#59B031",[E.POWERPOINT]:"#B54A2B",[E.RAR]:"#F8AB36",[E.STP]:"#3764B1",[E.TEXT]:"#3162AB",[E.UNKNOWN]:"#999999",[E.VIDEO]:"#E63324",[E.WAV]:"#1795E3",[E.WMA]:"#1795E3",[E.WORD]:"#3162AB",[E.XML]:"#71C3EB",[E.YAML]:"#71C3EB",[E.ZIP]:"#F8AB36"}});var Ie,Oi=f(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ie||(Ie={}))});var Xr,Zt,Jc,eu,Bo,Ae,Ci=f(()=>{"use strict";Xr=g(_()),Zt=g(X()),Jc=g(A()),eu=g(Mo());Si();Ur();Oi();Bo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ae=class extends Jc.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=Xr.nothing}render(){let e=this.variant&&Object.values(Ie).includes(this.variant)?this.variant:Ie.fluid_topics,o=e!==Ie.material||!!this.value;return Xr.html`
|
|
539
|
+
`}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Vc(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}px`,this.tooltip.style.top=`${o}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",e=>{e.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(e,o){return Math.max(e,Math.min(0,-o))}};re.elementDefinitions={"ft-typography":ne};re.styles=vc;we([(0,ce.property)()],re.prototype,"text",void 0);we([(0,ce.property)({type:Boolean})],re.prototype,"manual",void 0);we([(0,ce.property)({type:Boolean})],re.prototype,"inline",void 0);we([(0,ce.property)({type:Number})],re.prototype,"delay",void 0);we([(0,ce.property)()],re.prototype,"position",void 0);we([(0,ce.queryAssignedNodes)()],re.prototype,"slotNodes",void 0);we([(0,ce.query)(".ft-tooltip--container")],re.prototype,"container",void 0);we([(0,ce.query)(".ft-tooltip")],re.prototype,"tooltip",void 0);we([(0,ce.query)(".ft-tooltip--content")],re.prototype,"tooltipContent",void 0);we([(0,ce.state)()],re.prototype,"visible",void 0);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onTouch",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onHover",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onOut",null);we([(0,ce.eventOptions)({passive:!0})],re.prototype,"onClick",null)});var qc=f(()=>{"use strict"});var Yc,xi=f(()=>{"use strict";Yc=g(A());bi();bi();ai();qc();(0,Yc.customElement)("ft-tooltip")(re)});var Mo=Ft((xv,Xc)=>{Xc.exports=ftGlobals.litUnsafeHTML});function Qc(t,e){var o,n,i,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,c]=(((o=hh.get(t))!==null&&o!==void 0?o:t)+"/").split("/");return(a=(i=(n=vi.get(c))!==null&&n!==void 0?n:vi.get(e))!==null&&i!==void 0?i:vi.get(s))!==null&&a!==void 0?a:E.UNKNOWN}var Ct,E,vi,hh,vv,Si=f(()=>{"use strict";(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",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="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.EYE="",t.SHARE="󨃱"})(Ct||(Ct={}));(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=""})(E||(E={}));vi=new Map([...["abw"].map(t=>[t,E.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,E.AUDIO]),...["avi"].map(t=>[t,E.AVI]),...["chm","xhs"].map(t=>[t,E.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,E.CODE]),...["csv"].map(t=>[t,E.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,E.DITA]),...["epub"].map(t=>[t,E.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,E.EXCEL]),...["flac"].map(t=>[t,E.FLAC]),...["gif"].map(t=>[t,E.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,E.GZIP]),...["html","htm","xhtml"].map(t=>[t,E.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,E.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,E.JPEG]),...["json"].map(t=>[t,E.JSON]),...["m4a","m4p"].map(t=>[t,E.M4A]),...["mov","qt"].map(t=>[t,E.MOV]),...["mp3"].map(t=>[t,E.MP3]),...["mp4","m4v"].map(t=>[t,E.MP4]),...["ogg","oga"].map(t=>[t,E.OGG]),...["pdf","ps"].map(t=>[t,E.PDF]),...["png"].map(t=>[t,E.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,E.POWERPOINT]),...["rar"].map(t=>[t,E.RAR]),...["stp"].map(t=>[t,E.STP]),...["txt","rtf","md","mdown"].map(t=>[t,E.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,E.VIDEO]),...["wav"].map(t=>[t,E.WAV]),...["wma"].map(t=>[t,E.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,E.WORD]),...["xml","xsl","rdf"].map(t=>[t,E.XML]),...["yaml","yml","x-yaml"].map(t=>[t,E.YAML]),...["zip"].map(t=>[t,E.ZIP])]),hh=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);vv={[E.ABW]:"#91ABC6",[E.AUDIO]:"#1795E3",[E.AVI]:"#E63324",[E.CHM]:"#71C3EB",[E.CODE]:"#71C3EB",[E.CSV]:"#1F7345",[E.DITA]:"#71C3EB",[E.EPUB]:"#85B926",[E.EXCEL]:"#1F7345",[E.FLAC]:"#1795E3",[E.GIF]:"#59B031",[E.GZIP]:"#F8AB36",[E.HTML]:"#71C3EB",[E.IMAGE]:"#59B031",[E.JPEG]:"#59B031",[E.JSON]:"#71C3EB",[E.M4A]:"#1795E3",[E.MOV]:"#E63324",[E.MP3]:"#1795E3",[E.MP4]:"#E63324",[E.OGG]:"#1795E3",[E.PDF]:"#E44948",[E.PNG]:"#59B031",[E.POWERPOINT]:"#B54A2B",[E.RAR]:"#F8AB36",[E.STP]:"#3764B1",[E.TEXT]:"#3162AB",[E.UNKNOWN]:"#999999",[E.VIDEO]:"#E63324",[E.WAV]:"#1795E3",[E.WMA]:"#1795E3",[E.WORD]:"#3162AB",[E.XML]:"#71C3EB",[E.YAML]:"#71C3EB",[E.ZIP]:"#F8AB36"}});var Ie,Oi=f(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ie||(Ie={}))});var Xr,Zt,Jc,eu,Bo,Ae,Ci=f(()=>{"use strict";Xr=g(_()),Zt=g(X()),Jc=g(A()),eu=g(Mo());Si();Ur();Oi();Bo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ae=class extends Jc.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=Xr.nothing}render(){let e=this.variant&&Object.values(Ie).includes(this.variant)?this.variant:Ie.fluid_topics,o=e!==Ie.material||!!this.value;return Xr.html`
|
|
540
540
|
<i class="ft-icon ft-icon--${e}" part="icon icon-${e}">
|
|
541
541
|
${(0,eu.unsafeHTML)(this.resolvedIcon)}
|
|
542
542
|
<slot ?hidden=${o}></slot>
|
|
@@ -931,7 +931,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
931
931
|
</span>
|
|
932
932
|
`}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Ve.elementDefinitions={};Ve.styles=Su;co([(0,Cn.redux)()],Ve.prototype,"editorMode",void 0);co([(0,On.property)()],Ve.prototype,"context",void 0);co([(0,On.property)()],Ve.prototype,"key",void 0);co([(0,Cn.jsonProperty)([])],Ve.prototype,"args",void 0);co([(0,On.property)()],Ve.prototype,"defaultMessage",void 0)});var tt,zd=f(()=>{"use strict";wr();tt=class t{static build(e){return new t(e)}static fromGwt(e){return new t(e)}constructor(e){this.name=e,this.properties=new Proxy({},{get:(o,n)=>{let i=n;return a=>({context:this.name,key:i,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...i)=>Xt.resolveMessage(this.name,n,...i)}),this.rawMessages=new Proxy({},{get:(o,n)=>Xt.resolveRawMessage(this.name,n)})}}});var jd=f(()=>{"use strict";vn()});var Gd=f(()=>{"use strict"});var Vd,rt=f(()=>{"use strict";Vd=g(A());Ca();zd();vn();jd();ki();Gd();Ca();(0,Vd.customElement)("ft-i18n")(Ve)});var Xd=Ft((Lt,Yd)=>{var wn=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,An=function(){function t(){this.fetch=!1,this.DOMException=wn.DOMException}return t.prototype=wn,new t}();(function(t){var e=function(o){var n=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function a(h){return h&&DataView.prototype.isPrototypeOf(h)}if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(h)||h==="")throw new TypeError('Invalid character in header field name: "'+h+'"');return h.toLowerCase()}function p(h){return typeof h!="string"&&(h=String(h)),h}function m(h){var x={next:function(){var L=h.shift();return{done:L===void 0,value:L}}};return i.iterable&&(x[Symbol.iterator]=function(){return x}),x}function y(h){this.map={},h instanceof y?h.forEach(function(x,L){this.append(L,x)},this):Array.isArray(h)?h.forEach(function(x){if(x.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+x.length);this.append(x[0],x[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(x){this.append(x,h[x])},this)}y.prototype.append=function(h,x){h=d(h),x=p(x);var L=this.map[h];this.map[h]=L?L+", "+x:x},y.prototype.delete=function(h){delete this.map[d(h)]},y.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},y.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},y.prototype.set=function(h,x){this.map[d(h)]=p(x)},y.prototype.forEach=function(h,x){for(var L in this.map)this.map.hasOwnProperty(L)&&h.call(x,this.map[L],L,this)},y.prototype.keys=function(){var h=[];return this.forEach(function(x,L){h.push(L)}),m(h)},y.prototype.values=function(){var h=[];return this.forEach(function(x){h.push(x)}),m(h)},y.prototype.entries=function(){var h=[];return this.forEach(function(x,L){h.push([L,x])}),m(h)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(h){if(!h._noBody){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}}function S(h){return new Promise(function(x,L){h.onload=function(){x(h.result)},h.onerror=function(){L(h.error)}})}function v(h){var x=new FileReader,L=S(x);return x.readAsArrayBuffer(h),L}function O(h){var x=new FileReader,L=S(x),Z=/charset=([A-Za-z0-9_-]+)/.exec(h.type),ee=Z?Z[1]:"utf-8";return x.readAsText(h,ee),L}function T(h){for(var x=new Uint8Array(h),L=new Array(x.length),Z=0;Z<x.length;Z++)L[Z]=String.fromCharCode(x[Z]);return L.join("")}function R(h){if(h.slice)return h.slice(0);var x=new Uint8Array(h.byteLength);return x.set(new Uint8Array(h)),x.buffer}function N(){return this.bodyUsed=!1,this._initBody=function(h){this.bodyUsed=this.bodyUsed,this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:i.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:i.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():i.arrayBuffer&&i.blob&&a(h)?(this._bodyArrayBuffer=R(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||c(h))?this._bodyArrayBuffer=R(h):this._bodyText=h=Object.prototype.toString.call(h):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var h=b(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var h=b(this);return h||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var h=b(this);if(h)return h;if(this._bodyBlob)return O(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(Oe)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function B(h){var x=h.toUpperCase();return D.indexOf(x)>-1?x:h}function $(h,x){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');x=x||{};var L=x.body;if(h instanceof $){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,x.headers||(this.headers=new y(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!L&&h._bodyInit!=null&&(L=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new y(x.headers)),this.method=B(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal||function(){if("AbortController"in n){var F=new AbortController;return F.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(L),(this.method==="GET"||this.method==="HEAD")&&(x.cache==="no-store"||x.cache==="no-cache")){var Z=/([?&])_=[^&]*/;if(Z.test(this.url))this.url=this.url.replace(Z,"$1_="+new Date().getTime());else{var ee=/\?/;this.url+=(ee.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function Oe(h){var x=new FormData;return h.trim().split("&").forEach(function(L){if(L){var Z=L.split("="),ee=Z.shift().replace(/\+/g," "),F=Z.join("=").replace(/\+/g," ");x.append(decodeURIComponent(ee),decodeURIComponent(F))}}),x}function Ze(h){var x=new y,L=h.replace(/\r?\n[\t ]+/g," ");return L.split("\r").map(function(Z){return Z.indexOf(`
|
|
933
933
|
`)===0?Z.substr(1,Z.length):Z}).forEach(function(Z){var ee=Z.split(":"),F=ee.shift().trim();if(F){var bo=ee.join(":").trim();try{x.append(F,bo)}catch(zn){console.warn("Response "+zn.message)}}}),x}N.call($.prototype);function ge(h,x){if(!(this instanceof ge))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=x.statusText===void 0?"":""+x.statusText,this.headers=new y(x.headers),this.url=x.url||"",this._initBody(h)}N.call(ge.prototype),ge.prototype.clone=function(){return new ge(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},ge.error=function(){var h=new ge(null,{status:200,statusText:""});return h.ok=!1,h.status=0,h.type="error",h};var qe=[301,302,303,307,308];ge.redirect=function(h,x){if(qe.indexOf(x)===-1)throw new RangeError("Invalid status code");return new ge(null,{status:x,headers:{location:h}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(x,L){this.message=x,this.name=L;var Z=Error(x);this.stack=Z.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function de(h,x){return new Promise(function(L,Z){var ee=new $(h,x);if(ee.signal&&ee.signal.aborted)return Z(new o.DOMException("Aborted","AbortError"));var F=new XMLHttpRequest;function bo(){F.abort()}F.onload=function(){var pe={statusText:F.statusText,headers:Ze(F.getAllResponseHeaders()||"")};ee.url.indexOf("file://")===0&&(F.status<200||F.status>599)?pe.status=200:pe.status=F.status,pe.url="responseURL"in F?F.responseURL:pe.headers.get("X-Request-URL");var $t="response"in F?F.response:F.responseText;setTimeout(function(){L(new ge($t,pe))},0)},F.onerror=function(){setTimeout(function(){Z(new TypeError("Network request failed"))},0)},F.ontimeout=function(){setTimeout(function(){Z(new TypeError("Network request timed out"))},0)},F.onabort=function(){setTimeout(function(){Z(new o.DOMException("Aborted","AbortError"))},0)};function zn(pe){try{return pe===""&&n.location.href?n.location.href:pe}catch{return pe}}if(F.open(ee.method,zn(ee.url),!0),ee.credentials==="include"?F.withCredentials=!0:ee.credentials==="omit"&&(F.withCredentials=!1),"responseType"in F&&(i.blob?F.responseType="blob":i.arrayBuffer&&(F.responseType="arraybuffer")),x&&typeof x.headers=="object"&&!(x.headers instanceof y||n.Headers&&x.headers instanceof n.Headers)){var ps=[];Object.getOwnPropertyNames(x.headers).forEach(function(pe){ps.push(d(pe)),F.setRequestHeader(pe,p(x.headers[pe]))}),ee.headers.forEach(function(pe,$t){ps.indexOf($t)===-1&&F.setRequestHeader($t,pe)})}else ee.headers.forEach(function(pe,$t){F.setRequestHeader($t,pe)});ee.signal&&(ee.signal.addEventListener("abort",bo),F.onreadystatechange=function(){F.readyState===4&&ee.signal.removeEventListener("abort",bo)}),F.send(typeof ee._bodyInit>"u"?null:ee._bodyInit)})}return de.polyfill=!0,n.fetch||(n.fetch=de,n.Headers=y,n.Request=$,n.Response=ge),o.Headers=y,o.Request=$,o.Response=ge,o.fetch=de,o}({})})(An);An.fetch.ponyfill=!0;delete An.fetch.polyfill;var Ar=wn.fetch?wn:An;Lt=Ar.fetch;Lt.default=Ar.fetch;Lt.fetch=Ar.fetch;Lt.Headers=Ar.Headers;Lt.Request=Ar.Request;Lt.Response=Ar.Response;Yd.exports=Lt});var Qd=f(()=>{});var Jd,ep,tp,rp,op,np,ip,ap,sp,lp,cp,Rr,up,Rn,dp,pp,Nr,Tr,ue,Aa=f(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Jd||(Jd={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ep||(ep={}));(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"})(tp||(tp={}));(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(rp||(rp={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(op||(op={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(np||(np={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(ip||(ip={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ap||(ap={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(sp||(sp={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(lp||(lp={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(cp||(cp={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Rr||(Rr={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(up||(up={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Rn||(Rn={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(dp||(dp={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pp||(pp={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Nr||(Nr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(Tr||(Tr={}));(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(ue||(ue={}))});var fp,hp=f(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(fp||(fp={}))});var mC,mp=f(()=>{Aa();mC={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN],[ue.DEVELOPER]:[ue.BETA_USER,ue.DEBUG_USER]}});var yp=f(()=>{});var lm,Ra=f(()=>{lm=g(Xd(),1);Qd();Aa();hp();mp();yp()});var gp,bp=f(()=>{ti();gp=t=>t??le});var xp=f(()=>{bp()});function vp(t){var e,o,n,i,a;return((i=(o=(e=t.map)===null||e===void 0?void 0:e.openMode)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.openMode)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.openMode)===Rn.EXTERNAL}function Nn(t){var e,o,n,i,a;if(vp(t))return(i=(o=(e=t.map)===null||e===void 0?void 0:e.originUrl)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.originUrl)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.originUrl;switch(t.type){case Nr.MAP:return t.map.readerUrl;case Nr.DOCUMENT:return t.document.viewerUrl;case Nr.TOPIC:return t.topic.readerUrl}return""}function Sp(t,e){return gp(e&&vp(t)?"_blank":void 0)}var Pr,Na=f(()=>{"use strict";Ra();xp();Pr=class extends CustomEvent{constructor(e,o){super("ft-search-result-click",{detail:{result:e,rank:o},bubbles:!0,composed:!0})}}});var wp,cm,Pa,Ia=f(()=>{"use strict";wp=g(_()),cm={},Pa=wp.css`
|
|
934
|
-
`});var Ap=f(()=>{"use strict"});var Rp,um,Np,Tp=f(()=>{"use strict";Rp=g(A()),um={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},Np=t=>Rp.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:um})});var In,Pp=f(()=>{"use strict";wr();In=class extends Je{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}}});var ot,Ip,fo,Ir,La=f(()=>{"use strict";ot=g(A());Tp();Ra();Pp();Ip=t=>t.request.virtualField===Rr.TITLE_ONLY&&t.request.scope===Tr.DOCUMENTS,fo=class t extends Event{constructor(){super(t.eventName)}};fo.eventName="search-context-clear-all-filters";Ir=class t{static build(e,o){return new t(Np(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ot.Debouncer(10),this.searchDebouncer=new ot.Debouncer(100),this.suggestDebouncer=new ot.Debouncer(300),this.service=o??new In}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Rr.TITLE_ONLY),this.store.actions.setRequestScope(Tr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Rr.EVERYWHERE),this.store.actions.setRequestScope(Tr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ip(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new fo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,ot.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof ot.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,ot.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof ot.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}}});function pm(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[_a]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[_a]):this.dispatchEvent(new ka)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=_a,dm([(0,_p.state)()],o.prototype,"stateManager",void 0),o}var Lp,_p,dm,ka,_a,Ne,_t=f(()=>{"use strict";Lp=g(A()),_p=g(X());Ap();La();dm=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ka=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},_a=Symbol("registerInterval");Ne=class extends pm(Lp.FtLitElementRedux){}});var kp,ht,Ke,Se,Ln,_n,kn,oe,Da=f(()=>{"use strict";kp=g(_()),ht=g(X()),Ke=g(A());Ia();_t();wr();ba();Se=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ln=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},_n=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},kn=class extends CustomEvent{constructor(e,o,n){super("ft-search-results-change",{detail:{request:e,paging:o,spellcheck:n}})}},oe=class extends Ke.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Ir.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=o=>this.handleLoadError(o),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(k)}render(){return kp.html`
|
|
934
|
+
`});var Ap=f(()=>{"use strict"});var Rp,um,Np,Tp=f(()=>{"use strict";Rp=g(A()),um={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},Np=t=>Rp.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:um})});var In,Pp=f(()=>{"use strict";wr();In=class extends Je{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}}});var ot,Ip,fo,Ir,La=f(()=>{"use strict";ot=g(A());Tp();Ra();Pp();Ip=t=>t.request.virtualField===Rr.TITLE_ONLY&&t.request.scope===Tr.DOCUMENTS,fo=class t extends Event{constructor(){super(t.eventName)}};fo.eventName="search-context-clear-all-filters";Ir=class t{static build(e,o){return new t(Np(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ot.Debouncer(10),this.searchDebouncer=new ot.Debouncer(100),this.suggestDebouncer=new ot.Debouncer(300),this.service=o??new In}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Rr.TITLE_ONLY),this.store.actions.setRequestScope(Tr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Rr.EVERYWHERE),this.store.actions.setRequestScope(Tr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ip(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new fo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,ot.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof ot.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,ot.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof ot.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}}});function pm(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[_a]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[_a]):this.dispatchEvent(new ka)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=_a,dm([(0,_p.state)()],o.prototype,"stateManager",void 0),o}var Lp,_p,dm,ka,_a,Ne,_t=f(()=>{"use strict";Lp=g(A()),_p=g(X());Ap();La();dm=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ka=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},_a=Symbol("registerInterval");Ne=class extends pm(Lp.FtLitElementRedux){}});var kp,ht,Ke,Se,Ln,_n,kn,oe,Da=f(()=>{"use strict";kp=g(_()),ht=g(X()),Ke=g(A());Ia();_t();wr();ba();Se=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ln=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},_n=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},kn=class extends CustomEvent{constructor(e,o,n){super("ft-search-results-change",{detail:{request:e,paging:o,spellcheck:n}})}},oe=class extends Ke.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Ir.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=o=>this.handleLoadError(o),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(k)}render(){return kp.html`
|
|
935
935
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
936
936
|
`}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new _n(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new kn(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let o=e.composedPath()[0];this.register(o)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new Ln(e))}reloadSavedSearches(){Ld.clearMySearches()}clear(){this.stateManager.clear()}};oe.elementDefinitions={};oe.styles=Pa;Se([(0,Ke.redux)({store:k.name})],oe.prototype,"session",void 0);Se([(0,ht.property)()],oe.prototype,"query",void 0);Se([(0,ht.property)()],oe.prototype,"contentLocale",void 0);Se([(0,ht.property)({type:Number})],oe.prototype,"pageSize",void 0);Se([(0,ht.property)({type:Boolean})],oe.prototype,"searchInDocumentTitlesOnly",void 0);Se([(0,ht.property)()],oe.prototype,"scope",void 0);Se([(0,ht.property)()],oe.prototype,"virtualField",void 0);Se([(0,ht.property)({type:Boolean})],oe.prototype,"ignoreEmptyQuery",void 0);Se([(0,Ke.redux)({store:k.name})],oe.prototype,"openExternalDocumentInNewTab",void 0);Se([(0,Ke.jsonProperty)([])],oe.prototype,"filters",void 0);Se([(0,Ke.jsonProperty)([])],oe.prototype,"sort",void 0);Se([(0,Ke.redux)({store:"search"})],oe.prototype,"request",void 0);Se([(0,Ke.redux)({store:"search"})],oe.prototype,"paging",void 0);Se([(0,Ke.redux)({store:"search",selector:t=>t.spellcheck})],oe.prototype,"autocorrect",void 0);Se([(0,ht.property)({attribute:!1})],oe.prototype,"searchServiceProvider",void 0)});var Dp=f(()=>{"use strict"});var Bp={};Wt(Bp,{ClearAllFiltersEvent:()=>fo,FtSearchContext:()=>oe,FtSearchContextCssVariables:()=>cm,FtSearchStateManager:()=>Ir,LoadErrorEvent:()=>Ln,SearchRequestChangeEvent:()=>_n,SearchResultsChangeEvent:()=>kn,searchInDocumentTitlesOnlySelector:()=>Ip,styles:()=>Pa});var Mp,Up=f(()=>{"use strict";Mp=g(A());Da();Ia();Dp();Da();La();(0,Mp.customElement)("ft-search-context")(oe)});var ho,$p=f(()=>{"use strict";rt();ho=tt.build("designedSearchInput")});var Fp,Wp,Hp=f(()=>{"use strict";Fp=g(_());eo();Wp=Fp.css`
|
|
937
937
|
* {
|