@fluid-topics/ft-search-bar 2.0.7 → 2.0.9
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.
- package/build/ft-search-bar.d.ts +1 -1
- package/build/ft-search-bar.js +29 -30
- package/build/ft-search-bar.light.js +3 -3
- package/build/ft-search-bar.min.js +3 -3
- package/package.json +15 -15
package/build/ft-search-bar.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export declare class FtSearchBar extends FtLitElement implements FtSearchBarProp
|
|
|
92
92
|
private dispatchStateChangeEvent;
|
|
93
93
|
private updateLocalesDebouncer;
|
|
94
94
|
private initSearchData;
|
|
95
|
-
|
|
95
|
+
facetsLoaded: boolean;
|
|
96
96
|
private updateFacetsDebouncer;
|
|
97
97
|
private updateFacets;
|
|
98
98
|
protected contentAvailableCallback(props: PropertyValues): void;
|
package/build/ft-search-bar.js
CHANGED
|
@@ -4,29 +4,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, nothing } from "lit";
|
|
8
|
-
import { property, query, state } from "lit/decorators.js";
|
|
7
|
+
import { html, nothing, } from "lit";
|
|
8
|
+
import { property, query, state, } from "lit/decorators.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
-
import { Debouncer, flatDeep, FtLitElement, isTouchScreen, jsonProperty, noTextInputDefaultClearButton, ParametrizedLabelResolver, screenReaderStyles, SearchPlaceConverter, waitFor } from "@fluid-topics/ft-wc-utils";
|
|
11
|
-
import { FtSizeCategory, FtSizeWatcher } from "@fluid-topics/ft-size-watcher";
|
|
12
|
-
import { FtTypography, FtTypographyBody2 } from "@fluid-topics/ft-typography";
|
|
13
|
-
import { facetToFilter, selectedValues, unquote } from "./converters";
|
|
14
|
-
import { FtFilter, FtFilterOption } from "@fluid-topics/ft-filter";
|
|
10
|
+
import { Debouncer, flatDeep, FtLitElement, isTouchScreen, jsonProperty, noTextInputDefaultClearButton, ParametrizedLabelResolver, screenReaderStyles, SearchPlaceConverter, waitFor, } from "@fluid-topics/ft-wc-utils";
|
|
11
|
+
import { FtSizeCategory, FtSizeWatcher, } from "@fluid-topics/ft-size-watcher";
|
|
12
|
+
import { FtTypography, FtTypographyBody2, } from "@fluid-topics/ft-typography";
|
|
13
|
+
import { facetToFilter, selectedValues, unquote, } from "./converters";
|
|
14
|
+
import { FtFilter, FtFilterOption, } from "@fluid-topics/ft-filter";
|
|
15
15
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
16
|
-
import { FtAccordion, FtAccordionItem } from "@fluid-topics/ft-accordion";
|
|
16
|
+
import { FtAccordion, FtAccordionItem, } from "@fluid-topics/ft-accordion";
|
|
17
17
|
import { FtButton } from "@fluid-topics/ft-button";
|
|
18
18
|
import { FtChip } from "@fluid-topics/ft-chip";
|
|
19
|
-
import { FtSelect, FtSelectOption } from "@fluid-topics/ft-select";
|
|
19
|
+
import { FtSelect, FtSelectOption, } from "@fluid-topics/ft-select";
|
|
20
20
|
import { FtSnapScroll } from "@fluid-topics/ft-snap-scroll";
|
|
21
21
|
import { FtTooltip } from "@fluid-topics/ft-tooltip";
|
|
22
22
|
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
23
|
-
import { facetsCss, searchBarCss } from "./ft-search-bar.styles";
|
|
23
|
+
import { facetsCss, searchBarCss, } from "./ft-search-bar.styles";
|
|
24
24
|
import { FtSkeleton } from "@fluid-topics/ft-skeleton";
|
|
25
25
|
import { SuggestManager } from "./managers/SuggestManager";
|
|
26
26
|
import { FacetsChipsManager } from "./managers/FacetsChipsManager";
|
|
27
27
|
import { MobileSearchBarManager } from "./managers/MobileSearchBarManager";
|
|
28
28
|
import { DesktopSearchBarManager } from "./managers/DesktopSearchBarManager";
|
|
29
|
-
import { FtRadio, FtRadioGroup } from "@fluid-topics/ft-radio";
|
|
29
|
+
import { FtRadio, FtRadioGroup, } from "@fluid-topics/ft-radio";
|
|
30
30
|
import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
31
31
|
if (window.fluidtopics == null) {
|
|
32
32
|
console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");
|
|
@@ -102,13 +102,7 @@ class FtSearchBar extends FtLitElement {
|
|
|
102
102
|
this.availableContentLocalesInitialized = true;
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
|
-
this.
|
|
106
|
-
this.retrieveFacetsFromSearch()
|
|
107
|
-
.then(() => {
|
|
108
|
-
this.facetsLoaded = true;
|
|
109
|
-
this.facetsInitialized = true;
|
|
110
|
-
});
|
|
111
|
-
}, this.facetsInitialized ? 500 : 10);
|
|
105
|
+
this.updateFacets();
|
|
112
106
|
};
|
|
113
107
|
this.facetsLoaded = false;
|
|
114
108
|
this.updateFacetsDebouncer = new Debouncer(500);
|
|
@@ -488,18 +482,18 @@ class FtSearchBar extends FtLitElement {
|
|
|
488
482
|
this.stateChangeEventDebouncer.run(() => this.dispatchEvent(new SearchStateChangeEvent(this.request)));
|
|
489
483
|
}
|
|
490
484
|
updateFacets() {
|
|
491
|
-
if (this.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
this.
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
485
|
+
if (this.facetsRequest.length > 0) {
|
|
486
|
+
this.facetsLoaded = false;
|
|
487
|
+
this.updateFacetsDebouncer.run(async () => {
|
|
488
|
+
await this.retrieveFacetsFromSearch();
|
|
489
|
+
this.facetsLoaded = true;
|
|
490
|
+
this.facetsInitialized = true;
|
|
491
|
+
}, this.facetsInitialized ? 500 : 10);
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
this.facets = [];
|
|
495
|
+
this.facetsLoaded = true;
|
|
496
|
+
this.facetsInitialized = true;
|
|
503
497
|
}
|
|
504
498
|
}
|
|
505
499
|
contentAvailableCallback(props) {
|
|
@@ -527,6 +521,11 @@ class FtSearchBar extends FtLitElement {
|
|
|
527
521
|
}
|
|
528
522
|
async retrieveFacetsFromSearch() {
|
|
529
523
|
var _a;
|
|
524
|
+
// Safeguard if facetsRequest is modified during a Debouncer period
|
|
525
|
+
if (this.facetsRequest.length == 0) {
|
|
526
|
+
this.facets = [];
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
530
529
|
const retrievedFacets = new Map();
|
|
531
530
|
await ((_a = this.api) === null || _a === void 0 ? void 0 : _a.search({ ...this.request, query: "" }).then((r) => r.facets.forEach((f) => {
|
|
532
531
|
this.knownFacetLabels.set(f.key, f.label);
|
|
@@ -647,7 +647,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
647
647
|
</div>
|
|
648
648
|
</div>
|
|
649
649
|
</div>
|
|
650
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:e},await this.show(r),this.text=a,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.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&&Q1(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${jt.designSystemVariables.transitionDuration}, left ${jt.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||(0,jt.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}};Te.elementDefinitions={"ft-typography":ie};Te.styles=O1;ar([qf()],Te.prototype,"text",void 0);ar([(0,Kt.property)({type:Boolean})],Te.prototype,"manual",void 0);ar([(0,Kt.property)({type:Boolean})],Te.prototype,"inline",void 0);ar([(0,jt.numberProperty)()],Te.prototype,"delay",void 0);ar([(0,Kt.property)()],Te.prototype,"position",void 0);ar([(0,jt.jsonProperty)([])],Te.prototype,"ignoreMatchingElements",void 0);ar([(0,Kt.queryAssignedNodes)()],Te.prototype,"slotNodes",void 0);ar([(0,Kt.query)(".ft-tooltip--container")],Te.prototype,"container",void 0);ar([(0,Kt.query)(".ft-tooltip")],Te.prototype,"tooltip",void 0);ar([(0,Kt.query)(".ft-tooltip--content")],Te.prototype,"tooltipContent",void 0);ar([(0,Kt.state)()],Te.prototype,"visible",void 0);var Jf=h(E());(0,Jf.customElement)("ft-tooltip")(Te);var tt;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(tt||(tt={}));var la=h(k()),eo=h(q()),rp=h(E()),op=h(_l());var Ae;(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.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CLOUD_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(Ae||(Ae={}));var _;(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=""})(_||(_={}));var kl=new Map([...["abw"].map(t=>[t,_.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,_.AUDIO]),...["avi"].map(t=>[t,_.AVI]),...["chm","xhs"].map(t=>[t,_.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,_.CODE]),...["csv"].map(t=>[t,_.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,_.DITA]),...["epub"].map(t=>[t,_.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,_.EXCEL]),...["flac"].map(t=>[t,_.FLAC]),...["gif"].map(t=>[t,_.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,_.GZIP]),...["html","htm","xhtml"].map(t=>[t,_.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,_.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,_.JPEG]),...["json"].map(t=>[t,_.JSON]),...["m4a","m4p"].map(t=>[t,_.M4A]),...["mov","qt"].map(t=>[t,_.MOV]),...["mp3"].map(t=>[t,_.MP3]),...["mp4","m4v"].map(t=>[t,_.MP4]),...["ogg","oga"].map(t=>[t,_.OGG]),...["pdf","ps"].map(t=>[t,_.PDF]),...["png"].map(t=>[t,_.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,_.POWERPOINT]),...["rar"].map(t=>[t,_.RAR]),...["stp"].map(t=>[t,_.STP]),...["txt","rtf","md","mdown"].map(t=>[t,_.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,_.VIDEO]),...["wav"].map(t=>[t,_.WAV]),...["wma"].map(t=>[t,_.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,_.WORD]),...["xml","xsl","rdf"].map(t=>[t,_.XML]),...["yaml","yml","x-yaml"].map(t=>[t,_.YAML]),...["zip"].map(t=>[t,_.ZIP])]),F3=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"]]);function tp(t,e){var r,o,a,i;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=F3.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(i=(a=(o=kl.get(l))!==null&&o!==void 0?o:kl.get(e))!==null&&a!==void 0?a:kl.get(s))!==null&&i!==void 0?i:_.UNKNOWN}var VA={[_.ABW]:"#91ABC6",[_.AUDIO]:"#1795E3",[_.AVI]:"#E63324",[_.CHM]:"#71C3EB",[_.CODE]:"#71C3EB",[_.CSV]:"#1F7345",[_.DITA]:"#71C3EB",[_.EPUB]:"#85B926",[_.EXCEL]:"#1F7345",[_.FLAC]:"#1795E3",[_.GIF]:"#59B031",[_.GZIP]:"#F8AB36",[_.HTML]:"#71C3EB",[_.IMAGE]:"#59B031",[_.JPEG]:"#59B031",[_.JSON]:"#71C3EB",[_.M4A]:"#1795E3",[_.MOV]:"#E63324",[_.MP3]:"#1795E3",[_.MP4]:"#E63324",[_.OGG]:"#1795E3",[_.PDF]:"#E44948",[_.PNG]:"#59B031",[_.POWERPOINT]:"#B54A2B",[_.RAR]:"#F8AB36",[_.STP]:"#3764B1",[_.TEXT]:"#3162AB",[_.UNKNOWN]:"#999999",[_.VIDEO]:"#E63324",[_.WAV]:"#1795E3",[_.WMA]:"#1795E3",[_.WORD]:"#3162AB",[_.XML]:"#71C3EB",[_.YAML]:"#71C3EB",[_.ZIP]:"#F8AB36"};var ca=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ce=class extends rp.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=la.nothing}render(){let e=this.variant&&Object.values(tt).includes(this.variant)?this.variant:tt.fluid_topics,r=e!==tt.material||!!this.value;return la.html`
|
|
650
|
+
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:e},await this.show(r),this.text=a,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.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&&Q1(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${jt.designSystemVariables.transitionDuration}, left ${jt.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||(0,jt.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}};Te.elementDefinitions={"ft-typography":ie};Te.styles=O1;ar([qf()],Te.prototype,"text",void 0);ar([(0,Kt.property)({type:Boolean})],Te.prototype,"manual",void 0);ar([(0,Kt.property)({type:Boolean})],Te.prototype,"inline",void 0);ar([(0,jt.numberProperty)()],Te.prototype,"delay",void 0);ar([(0,Kt.property)()],Te.prototype,"position",void 0);ar([(0,jt.jsonProperty)([])],Te.prototype,"ignoreMatchingElements",void 0);ar([(0,Kt.queryAssignedNodes)()],Te.prototype,"slotNodes",void 0);ar([(0,Kt.query)(".ft-tooltip--container")],Te.prototype,"container",void 0);ar([(0,Kt.query)(".ft-tooltip")],Te.prototype,"tooltip",void 0);ar([(0,Kt.query)(".ft-tooltip--content")],Te.prototype,"tooltipContent",void 0);ar([(0,Kt.state)()],Te.prototype,"visible",void 0);var Jf=h(E());(0,Jf.customElement)("ft-tooltip")(Te);var tt;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(tt||(tt={}));var la=h(k()),eo=h(q()),rp=h(E()),op=h(_l());var Ae;(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.CLOUD_SLASH="",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.CLOUD="",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.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.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.CIRCLE_ARROW_DOWN_SLASH="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(Ae||(Ae={}));var _;(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=""})(_||(_={}));var kl=new Map([...["abw"].map(t=>[t,_.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,_.AUDIO]),...["avi"].map(t=>[t,_.AVI]),...["chm","xhs"].map(t=>[t,_.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,_.CODE]),...["csv"].map(t=>[t,_.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,_.DITA]),...["epub"].map(t=>[t,_.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,_.EXCEL]),...["flac"].map(t=>[t,_.FLAC]),...["gif"].map(t=>[t,_.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,_.GZIP]),...["html","htm","xhtml"].map(t=>[t,_.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,_.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,_.JPEG]),...["json"].map(t=>[t,_.JSON]),...["m4a","m4p"].map(t=>[t,_.M4A]),...["mov","qt"].map(t=>[t,_.MOV]),...["mp3"].map(t=>[t,_.MP3]),...["mp4","m4v"].map(t=>[t,_.MP4]),...["ogg","oga"].map(t=>[t,_.OGG]),...["pdf","ps"].map(t=>[t,_.PDF]),...["png"].map(t=>[t,_.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,_.POWERPOINT]),...["rar"].map(t=>[t,_.RAR]),...["stp"].map(t=>[t,_.STP]),...["txt","rtf","md","mdown"].map(t=>[t,_.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,_.VIDEO]),...["wav"].map(t=>[t,_.WAV]),...["wma"].map(t=>[t,_.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,_.WORD]),...["xml","xsl","rdf"].map(t=>[t,_.XML]),...["yaml","yml","x-yaml"].map(t=>[t,_.YAML]),...["zip"].map(t=>[t,_.ZIP])]),F3=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"]]);function tp(t,e){var r,o,a,i;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=F3.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(i=(a=(o=kl.get(l))!==null&&o!==void 0?o:kl.get(e))!==null&&a!==void 0?a:kl.get(s))!==null&&i!==void 0?i:_.UNKNOWN}var VA={[_.ABW]:"#91ABC6",[_.AUDIO]:"#1795E3",[_.AVI]:"#E63324",[_.CHM]:"#71C3EB",[_.CODE]:"#71C3EB",[_.CSV]:"#1F7345",[_.DITA]:"#71C3EB",[_.EPUB]:"#85B926",[_.EXCEL]:"#1F7345",[_.FLAC]:"#1795E3",[_.GIF]:"#59B031",[_.GZIP]:"#F8AB36",[_.HTML]:"#71C3EB",[_.IMAGE]:"#59B031",[_.JPEG]:"#59B031",[_.JSON]:"#71C3EB",[_.M4A]:"#1795E3",[_.MOV]:"#E63324",[_.MP3]:"#1795E3",[_.MP4]:"#E63324",[_.OGG]:"#1795E3",[_.PDF]:"#E44948",[_.PNG]:"#59B031",[_.POWERPOINT]:"#B54A2B",[_.RAR]:"#F8AB36",[_.STP]:"#3764B1",[_.TEXT]:"#3162AB",[_.UNKNOWN]:"#999999",[_.VIDEO]:"#E63324",[_.WAV]:"#1795E3",[_.WMA]:"#1795E3",[_.WORD]:"#3162AB",[_.XML]:"#71C3EB",[_.YAML]:"#71C3EB",[_.ZIP]:"#F8AB36"};var ca=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ce=class extends rp.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=la.nothing}render(){let e=this.variant&&Object.values(tt).includes(this.variant)?this.variant:tt.fluid_topics,r=e!==tt.material||!!this.value;return la.html`
|
|
651
651
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
652
652
|
${(0,op.unsafeHTML)(this.resolvedIcon)}
|
|
653
653
|
<slot ?hidden=${r}></slot>
|
|
@@ -4731,7 +4731,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
4731
4731
|
</div>
|
|
4732
4732
|
`}onSearchBarKeyDown(e){var r;switch(["Escape","Tab","Shift"].includes(e.key)||(this.searchBar.displaySuggestListbox=!0),e.key){case"Tab":this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0;break;case"Escape":this.suggestManager.shouldDisplaySuggestions&&(e.stopPropagation(),e.preventDefault(),this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0),this.searchBar.mobileMenuOpen=!1;break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusNextSuggestion();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusPreviousSuggestion();break;case"ArrowLeft":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowLeft());break;case"ArrowRight":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowRight());break;case"Enter":if(this.searchBar.selectedSuggestRemoveRecent)(r=this.suggestManager.selectedSuggestRemoveRecentButton)===null||r===void 0||r.click();else{let o=this.suggestManager.selectedSuggestOptionLink||this.searchBar.launchSearchButton;o?.click()}break}}onInput(e){let r=e.composedPath()[0];this.searchBar.query=r.value}onClick(){this.onFocus()}onFocus(){this.searchBar.reactToFocus&&(this.searchBar.displaySuggestListbox=!0)}};Ia.styles=xt.css`
|
|
4733
4733
|
|
|
4734
|
-
`;var ee=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var ch={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Yc=class extends CustomEvent{constructor(e){super("change",{detail:e})}},B5=()=>{},W=class extends ue.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new ue.ParametrizedLabelResolver(ch,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new ue.SearchPlaceConverter(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=Bt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new wr(this),this.selectedFacetsManager=new Rr(this),this.desktopSearchBarManager=new Ia(this),this.mobileSearchBarManager=new Pa(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new ue.Debouncer(10),this.updateLocalesDebouncer=new ue.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.
|
|
4734
|
+
`;var ee=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var ch={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Yc=class extends CustomEvent{constructor(e){super("change",{detail:e})}},B5=()=>{},W=class extends ue.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new ue.ParametrizedLabelResolver(ch,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new ue.SearchPlaceConverter(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=Bt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new wr(this),this.selectedFacetsManager=new Rr(this),this.desktopSearchBarManager=new Ia(this),this.mobileSearchBarManager=new Pa(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new ue.Debouncer(10),this.updateLocalesDebouncer=new ue.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.updateFacets()},this.facetsLoaded=!1,this.updateFacetsDebouncer=new ue.Debouncer(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(r=>r===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(a=>a===this||a===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,r)=>e.valueFilter&&r.valueFilter?this.compareValueFilters(e.valueFilter,r.valueFilter):e.dateFilter&&r.dateFilter?this.compareDateFilters(e.dateFilter,r.dateFilter):e.rangeFilter&&r.rangeFilter?this.compareRangeFilters(e.rangeFilter,r.rangeFilter):!1,this.compareValueFilters=(e,r)=>e.negative==r.negative&&e.values.length===r.values.length&&e.values.every(o=>r.values.includes(o)),this.compareDateFilters=(e,r)=>e.type===r.type,this.compareRangeFilters=(e,r)=>e.from===r.from&&e.to===r.to,this.compareFilters=(e,r)=>e.key===r.key&&this.compareUnknownFilters(e,r),this.compareRequests=(e,r)=>(e.contentLocale==null||r.contentLocale==null||e.contentLocale===r.contentLocale)&&e.metadataFilters.length===r.metadataFilters.length&&e.metadataFilters.every(o=>r.metadataFilters.some(a=>this.compareFilters(o,a)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(r=>{var o,a;return((a=(o=r.valueFilter)===null||o===void 0?void 0:o.values.length)!==null&&a!==void 0?a:0)>0&&!this.displayedFilters.includes(r.key)}).map(r=>({id:r.key}));return[...this.displayedFilters.map(r=>({id:r})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===Bt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await(0,ue.waitFor)(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return se.html`
|
|
4735
4735
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
4736
4736
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
4737
4737
|
${this.renderLiveText()}
|
|
@@ -4871,7 +4871,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
4871
4871
|
></ft-filter>
|
|
4872
4872
|
`})}
|
|
4873
4873
|
</ft-snap-scroll>
|
|
4874
|
-
`:se.nothing}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,a,i,s;if(e.has("labels")&&(this.labelResolver=new ue.ParametrizedLabelResolver(ch,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=f=>this.availableContentLocales.some(p=>p.lang==f);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(f=>{f.valueFilter&&(f.valueFilter.values=f.valueFilter.values.map(p=>Ga(p)))})),e.has("presets")||e.has("selectedPreset")){let l=((a=this.presets)!==null&&a!==void 0?a:[]).find(f=>f.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((i=this.presets)!==null&&i!==void 0?i:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Yc(this.request)))}updateFacets(){this.
|
|
4874
|
+
`:se.nothing}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,a,i,s;if(e.has("labels")&&(this.labelResolver=new ue.ParametrizedLabelResolver(ch,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=f=>this.availableContentLocales.some(p=>p.lang==f);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(f=>{f.valueFilter&&(f.valueFilter.values=f.valueFilter.values.map(p=>Ga(p)))})),e.has("presets")||e.has("selectedPreset")){let l=((a=this.presets)!==null&&a!==void 0?a:[]).find(f=>f.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((i=this.presets)!==null&&i!==void 0?i:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Yc(this.request)))}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run(async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0},this.facetsInitialized?500:10)):(this.facets=[],this.facetsLoaded=!0,this.facetsInitialized=!0)}contentAvailableCallback(e){var r,o,a;if(super.contentAvailableCallback(e),e.has("displayFacets")&&this.displayFacets&&((r=this.floatingContainer)===null||r===void 0||r.focus()),this.scrollToFacet!=null&&this.facetsLoaded){(o=this.scrollingFiltersContainer)===null||o===void 0||o.scrollIndexIntoView(this.facets.findIndex(s=>s.key===this.scrollToFacet));let i=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);i&&(i.active=!0),this.scrollToFacet=void 0}}initApi(){this.api==null&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout(()=>this.initApi(),10))}async retrieveFacetsFromSearch(){var e;if(this.facetsRequest.length==0){this.facets=[];return}let r=new Map;await((e=this.api)===null||e===void 0?void 0:e.search({...this.request,query:""}).then(o=>o.facets.forEach(a=>{this.knownFacetLabels.set(a.key,a.label),r.set(a.key,a)})).catch(B5)),this.facets=[];for(let o of this.facetsRequest)r.has(o.id)?this.facets.push(r.get(o.id)):this.knownFacetLabels.has(o.id)&&this.facets.push({key:o.id,label:this.knownFacetLabels.get(o.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(e){var r;e.key==="Escape"&&(this.displayFacets=!1,(r=this.filtersOpener)===null||r===void 0||r.focus())}setQuery(e){this.input&&(this.input.value=e),this.query=e}onLaunchSearch(){if(this.query){let e=this.recentSearches.filter(r=>r.toLowerCase()!==this.query.toLowerCase()).filter((r,o)=>o<20);this.recentSearches=[this.query,...e],this.saveRecentSearches()}this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var e;this.recentSearches=JSON.parse((e=window.localStorage.getItem(this.recentSearchesStorageKey))!==null&&e!==void 0?e:"[]")}saveRecentSearches(){let e=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:e,storageArea:window.localStorage,url:window.location.href}))}async connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.closeSuggestListbox),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer),this.focusOnDisplay&&!ue.isTouchScreen&&this.focusInput(),I.addEventListener("authentication-change",this.initSearchData),this.initSearchData()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeSuggestListbox),document.removeEventListener("focusin",this.closeFloatingContainer),document.removeEventListener("click",this.closeFloatingContainer),I.removeEventListener("authentication-change",this.initSearchData)}updateSize(e){this.sizeCategory=e.detail.category}setFilter(e,r){let o=this.metadataFilters.filter(a=>!a.valueFilter||a.key!==e);this.facets.forEach(a=>{a.key===e&&(0,ue.flatDeep)(a.rootNodes,i=>i.childNodes).forEach(i=>i.selected=r.includes(i.value))}),r.length&&o.push({key:e,valueFilter:{negative:!1,values:r}}),this.metadataFilters=o,this.scrollToFacet=e}setFiltersFromPreset(e){e!=null&&(e.contentLocale!=null&&(this.contentLocale=e.contentLocale),this.metadataFilters=e.metadataFilters)}clearFilters(){this.facets.forEach(r=>(0,ue.flatDeep)(r.rootNodes,o=>o.childNodes).forEach(o=>o.selected=!1)),this.metadataFilters=[];let e=this.facets[0];this.scrollToFacet=e?.key}querySelector(e){return this.shadowRoot.querySelector(e)}querySelectorAll(e){return this.shadowRoot.querySelectorAll(e)}renderDesktopFloatingMenu(){return this.forceMenuOpen?se.nothing:se.html`
|
|
4875
4875
|
<div class="ft-search-bar--floating-panel"
|
|
4876
4876
|
id="ft-search-bar-floating-panel"
|
|
4877
4877
|
@keyup=${this.onFloatingContainerKeyUp}
|
|
@@ -727,7 +727,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
727
727
|
</div>
|
|
728
728
|
</div>
|
|
729
729
|
</div>
|
|
730
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.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&&Ys(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${M.transitionDuration}, left ${M.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||ns(e,this.ignoreMatchingElements,this.eventsTarget)}};Pe.elementDefinitions={"ft-typography":ue};Pe.styles=Np;jt([Gp()],Pe.prototype,"text",void 0);jt([g({type:Boolean})],Pe.prototype,"manual",void 0);jt([g({type:Boolean})],Pe.prototype,"inline",void 0);jt([_r()],Pe.prototype,"delay",void 0);jt([g()],Pe.prototype,"position",void 0);jt([Te([])],Pe.prototype,"ignoreMatchingElements",void 0);jt([Xa()],Pe.prototype,"slotNodes",void 0);jt([B(".ft-tooltip--container")],Pe.prototype,"container",void 0);jt([B(".ft-tooltip")],Pe.prototype,"tooltip",void 0);jt([B(".ft-tooltip--content")],Pe.prototype,"tooltipContent",void 0);jt([H()],Pe.prototype,"visible",void 0);K("ft-tooltip")(Pe);var Xe;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Xe||(Xe={}));var Re;(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.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CLOUD_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(Re||(Re={}));var D;(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=""})(D||(D={}));var bc=new Map([...["abw"].map(t=>[t,D.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,D.AUDIO]),...["avi"].map(t=>[t,D.AVI]),...["chm","xhs"].map(t=>[t,D.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,D.CODE]),...["csv"].map(t=>[t,D.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,D.DITA]),...["epub"].map(t=>[t,D.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,D.EXCEL]),...["flac"].map(t=>[t,D.FLAC]),...["gif"].map(t=>[t,D.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,D.GZIP]),...["html","htm","xhtml"].map(t=>[t,D.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,D.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,D.JPEG]),...["json"].map(t=>[t,D.JSON]),...["m4a","m4p"].map(t=>[t,D.M4A]),...["mov","qt"].map(t=>[t,D.MOV]),...["mp3"].map(t=>[t,D.MP3]),...["mp4","m4v"].map(t=>[t,D.MP4]),...["ogg","oga"].map(t=>[t,D.OGG]),...["pdf","ps"].map(t=>[t,D.PDF]),...["png"].map(t=>[t,D.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,D.POWERPOINT]),...["rar"].map(t=>[t,D.RAR]),...["stp"].map(t=>[t,D.STP]),...["txt","rtf","md","mdown"].map(t=>[t,D.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,D.VIDEO]),...["wav"].map(t=>[t,D.WAV]),...["wma"].map(t=>[t,D.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,D.WORD]),...["xml","xsl","rdf"].map(t=>[t,D.XML]),...["yaml","yml","x-yaml"].map(t=>[t,D.YAML]),...["zip"].map(t=>[t,D.ZIP])]),P3=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"]]);function Vp(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=P3.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=bc.get(l))!==null&&o!==void 0?o:bc.get(e))!==null&&n!==void 0?n:bc.get(s))!==null&&a!==void 0?a:D.UNKNOWN}var j_={[D.ABW]:"#91ABC6",[D.AUDIO]:"#1795E3",[D.AVI]:"#E63324",[D.CHM]:"#71C3EB",[D.CODE]:"#71C3EB",[D.CSV]:"#1F7345",[D.DITA]:"#71C3EB",[D.EPUB]:"#85B926",[D.EXCEL]:"#1F7345",[D.FLAC]:"#1795E3",[D.GIF]:"#59B031",[D.GZIP]:"#F8AB36",[D.HTML]:"#71C3EB",[D.IMAGE]:"#59B031",[D.JPEG]:"#59B031",[D.JSON]:"#71C3EB",[D.M4A]:"#1795E3",[D.MOV]:"#E63324",[D.MP3]:"#1795E3",[D.MP4]:"#E63324",[D.OGG]:"#1795E3",[D.PDF]:"#E44948",[D.PNG]:"#59B031",[D.POWERPOINT]:"#B54A2B",[D.RAR]:"#F8AB36",[D.STP]:"#3764B1",[D.TEXT]:"#3162AB",[D.UNKNOWN]:"#999999",[D.VIDEO]:"#E63324",[D.WAV]:"#1795E3",[D.WMA]:"#1795E3",[D.WORD]:"#3162AB",[D.XML]:"#71C3EB",[D.YAML]:"#71C3EB",[D.ZIP]:"#F8AB36"};var rn=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ye=class extends F{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=z}render(){let e=this.variant&&Object.values(Xe).includes(this.variant)?this.variant:Xe.fluid_topics,r=e!==Xe.material||!!this.value;return O`
|
|
730
|
+
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.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&&Ys(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${M.transitionDuration}, left ${M.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||ns(e,this.ignoreMatchingElements,this.eventsTarget)}};Pe.elementDefinitions={"ft-typography":ue};Pe.styles=Np;jt([Gp()],Pe.prototype,"text",void 0);jt([g({type:Boolean})],Pe.prototype,"manual",void 0);jt([g({type:Boolean})],Pe.prototype,"inline",void 0);jt([_r()],Pe.prototype,"delay",void 0);jt([g()],Pe.prototype,"position",void 0);jt([Te([])],Pe.prototype,"ignoreMatchingElements",void 0);jt([Xa()],Pe.prototype,"slotNodes",void 0);jt([B(".ft-tooltip--container")],Pe.prototype,"container",void 0);jt([B(".ft-tooltip")],Pe.prototype,"tooltip",void 0);jt([B(".ft-tooltip--content")],Pe.prototype,"tooltipContent",void 0);jt([H()],Pe.prototype,"visible",void 0);K("ft-tooltip")(Pe);var Xe;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Xe||(Xe={}));var Re;(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.CLOUD_SLASH="",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.CLOUD="",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.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.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.CIRCLE_ARROW_DOWN_SLASH="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(Re||(Re={}));var D;(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=""})(D||(D={}));var bc=new Map([...["abw"].map(t=>[t,D.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,D.AUDIO]),...["avi"].map(t=>[t,D.AVI]),...["chm","xhs"].map(t=>[t,D.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,D.CODE]),...["csv"].map(t=>[t,D.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,D.DITA]),...["epub"].map(t=>[t,D.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,D.EXCEL]),...["flac"].map(t=>[t,D.FLAC]),...["gif"].map(t=>[t,D.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,D.GZIP]),...["html","htm","xhtml"].map(t=>[t,D.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,D.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,D.JPEG]),...["json"].map(t=>[t,D.JSON]),...["m4a","m4p"].map(t=>[t,D.M4A]),...["mov","qt"].map(t=>[t,D.MOV]),...["mp3"].map(t=>[t,D.MP3]),...["mp4","m4v"].map(t=>[t,D.MP4]),...["ogg","oga"].map(t=>[t,D.OGG]),...["pdf","ps"].map(t=>[t,D.PDF]),...["png"].map(t=>[t,D.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,D.POWERPOINT]),...["rar"].map(t=>[t,D.RAR]),...["stp"].map(t=>[t,D.STP]),...["txt","rtf","md","mdown"].map(t=>[t,D.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,D.VIDEO]),...["wav"].map(t=>[t,D.WAV]),...["wma"].map(t=>[t,D.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,D.WORD]),...["xml","xsl","rdf"].map(t=>[t,D.XML]),...["yaml","yml","x-yaml"].map(t=>[t,D.YAML]),...["zip"].map(t=>[t,D.ZIP])]),P3=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"]]);function Vp(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=P3.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=bc.get(l))!==null&&o!==void 0?o:bc.get(e))!==null&&n!==void 0?n:bc.get(s))!==null&&a!==void 0?a:D.UNKNOWN}var j_={[D.ABW]:"#91ABC6",[D.AUDIO]:"#1795E3",[D.AVI]:"#E63324",[D.CHM]:"#71C3EB",[D.CODE]:"#71C3EB",[D.CSV]:"#1F7345",[D.DITA]:"#71C3EB",[D.EPUB]:"#85B926",[D.EXCEL]:"#1F7345",[D.FLAC]:"#1795E3",[D.GIF]:"#59B031",[D.GZIP]:"#F8AB36",[D.HTML]:"#71C3EB",[D.IMAGE]:"#59B031",[D.JPEG]:"#59B031",[D.JSON]:"#71C3EB",[D.M4A]:"#1795E3",[D.MOV]:"#E63324",[D.MP3]:"#1795E3",[D.MP4]:"#E63324",[D.OGG]:"#1795E3",[D.PDF]:"#E44948",[D.PNG]:"#59B031",[D.POWERPOINT]:"#B54A2B",[D.RAR]:"#F8AB36",[D.STP]:"#3764B1",[D.TEXT]:"#3162AB",[D.UNKNOWN]:"#999999",[D.VIDEO]:"#E63324",[D.WAV]:"#1795E3",[D.WMA]:"#1795E3",[D.WORD]:"#3162AB",[D.XML]:"#71C3EB",[D.YAML]:"#71C3EB",[D.ZIP]:"#F8AB36"};var rn=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ye=class extends F{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=z}render(){let e=this.variant&&Object.values(Xe).includes(this.variant)?this.variant:Xe.fluid_topics,r=e!==Xe.material||!!this.value;return O`
|
|
731
731
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
732
732
|
${Ri(this.resolvedIcon)}
|
|
733
733
|
<slot ?hidden=${r}></slot>
|
|
@@ -4811,7 +4811,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
4811
4811
|
</div>
|
|
4812
4812
|
`}onSearchBarKeyDown(e){var r;switch(["Escape","Tab","Shift"].includes(e.key)||(this.searchBar.displaySuggestListbox=!0),e.key){case"Tab":this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0;break;case"Escape":this.suggestManager.shouldDisplaySuggestions&&(e.stopPropagation(),e.preventDefault(),this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0),this.searchBar.mobileMenuOpen=!1;break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusNextSuggestion();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusPreviousSuggestion();break;case"ArrowLeft":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowLeft());break;case"ArrowRight":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowRight());break;case"Enter":if(this.searchBar.selectedSuggestRemoveRecent)(r=this.suggestManager.selectedSuggestRemoveRecentButton)===null||r===void 0||r.click();else{let o=this.suggestManager.selectedSuggestOptionLink||this.searchBar.launchSearchButton;o?.click()}break}}onInput(e){let r=e.composedPath()[0];this.searchBar.query=r.value}onClick(){this.onFocus()}onFocus(){this.searchBar.reactToFocus&&(this.searchBar.displaySuggestListbox=!0)}};vn.styles=T`
|
|
4813
4813
|
|
|
4814
|
-
`;var oe=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var F0={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Sd=class extends CustomEvent{constructor(e){super("change",{detail:e})}},N5=()=>{},J=class extends F{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Nr(F0,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new Fr(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=Nt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new pr(this),this.selectedFacetsManager=new ur(this),this.desktopSearchBarManager=new vn(this),this.mobileSearchBarManager=new bn(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new me(10),this.updateLocalesDebouncer=new me(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.
|
|
4814
|
+
`;var oe=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var F0={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Sd=class extends CustomEvent{constructor(e){super("change",{detail:e})}},N5=()=>{},J=class extends F{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new Nr(F0,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new Fr(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=Nt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new pr(this),this.selectedFacetsManager=new ur(this),this.desktopSearchBarManager=new vn(this),this.mobileSearchBarManager=new bn(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new me(10),this.updateLocalesDebouncer=new me(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.updateFacets()},this.facetsLoaded=!1,this.updateFacetsDebouncer=new me(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(r=>r===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(n=>n===this||n===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,r)=>e.valueFilter&&r.valueFilter?this.compareValueFilters(e.valueFilter,r.valueFilter):e.dateFilter&&r.dateFilter?this.compareDateFilters(e.dateFilter,r.dateFilter):e.rangeFilter&&r.rangeFilter?this.compareRangeFilters(e.rangeFilter,r.rangeFilter):!1,this.compareValueFilters=(e,r)=>e.negative==r.negative&&e.values.length===r.values.length&&e.values.every(o=>r.values.includes(o)),this.compareDateFilters=(e,r)=>e.type===r.type,this.compareRangeFilters=(e,r)=>e.from===r.from&&e.to===r.to,this.compareFilters=(e,r)=>e.key===r.key&&this.compareUnknownFilters(e,r),this.compareRequests=(e,r)=>(e.contentLocale==null||r.contentLocale==null||e.contentLocale===r.contentLocale)&&e.metadataFilters.length===r.metadataFilters.length&&e.metadataFilters.every(o=>r.metadataFilters.some(n=>this.compareFilters(o,n)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(r=>{var o,n;return((n=(o=r.valueFilter)===null||o===void 0?void 0:o.values.length)!==null&&n!==void 0?n:0)>0&&!this.displayedFilters.includes(r.key)}).map(r=>({id:r.key}));return[...this.displayedFilters.map(r=>({id:r})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===Nt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await Nn(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return O`
|
|
4815
4815
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
4816
4816
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
4817
4817
|
${this.renderLiveText()}
|
|
@@ -4951,7 +4951,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
4951
4951
|
></ft-filter>
|
|
4952
4952
|
`})}
|
|
4953
4953
|
</ft-snap-scroll>
|
|
4954
|
-
`:z}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,n,a,s;if(e.has("labels")&&(this.labelResolver=new Nr(F0,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=d=>this.availableContentLocales.some(f=>f.lang==d);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(d=>{d.valueFilter&&(d.valueFilter.values=d.valueFilter.values.map(f=>ta(f)))})),e.has("presets")||e.has("selectedPreset")){let l=((n=this.presets)!==null&&n!==void 0?n:[]).find(d=>d.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((a=this.presets)!==null&&a!==void 0?a:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Sd(this.request)))}updateFacets(){this.
|
|
4954
|
+
`:z}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,n,a,s;if(e.has("labels")&&(this.labelResolver=new Nr(F0,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=d=>this.availableContentLocales.some(f=>f.lang==d);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(d=>{d.valueFilter&&(d.valueFilter.values=d.valueFilter.values.map(f=>ta(f)))})),e.has("presets")||e.has("selectedPreset")){let l=((n=this.presets)!==null&&n!==void 0?n:[]).find(d=>d.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((a=this.presets)!==null&&a!==void 0?a:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Sd(this.request)))}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run(async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0},this.facetsInitialized?500:10)):(this.facets=[],this.facetsLoaded=!0,this.facetsInitialized=!0)}contentAvailableCallback(e){var r,o,n;if(super.contentAvailableCallback(e),e.has("displayFacets")&&this.displayFacets&&((r=this.floatingContainer)===null||r===void 0||r.focus()),this.scrollToFacet!=null&&this.facetsLoaded){(o=this.scrollingFiltersContainer)===null||o===void 0||o.scrollIndexIntoView(this.facets.findIndex(s=>s.key===this.scrollToFacet));let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);a&&(a.active=!0),this.scrollToFacet=void 0}}initApi(){this.api==null&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout(()=>this.initApi(),10))}async retrieveFacetsFromSearch(){var e;if(this.facetsRequest.length==0){this.facets=[];return}let r=new Map;await((e=this.api)===null||e===void 0?void 0:e.search({...this.request,query:""}).then(o=>o.facets.forEach(n=>{this.knownFacetLabels.set(n.key,n.label),r.set(n.key,n)})).catch(N5)),this.facets=[];for(let o of this.facetsRequest)r.has(o.id)?this.facets.push(r.get(o.id)):this.knownFacetLabels.has(o.id)&&this.facets.push({key:o.id,label:this.knownFacetLabels.get(o.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(e){var r;e.key==="Escape"&&(this.displayFacets=!1,(r=this.filtersOpener)===null||r===void 0||r.focus())}setQuery(e){this.input&&(this.input.value=e),this.query=e}onLaunchSearch(){if(this.query){let e=this.recentSearches.filter(r=>r.toLowerCase()!==this.query.toLowerCase()).filter((r,o)=>o<20);this.recentSearches=[this.query,...e],this.saveRecentSearches()}this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var e;this.recentSearches=JSON.parse((e=window.localStorage.getItem(this.recentSearchesStorageKey))!==null&&e!==void 0?e:"[]")}saveRecentSearches(){let e=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:e,storageArea:window.localStorage,url:window.location.href}))}async connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.closeSuggestListbox),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer),this.focusOnDisplay&&!rc&&this.focusInput(),W.addEventListener("authentication-change",this.initSearchData),this.initSearchData()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeSuggestListbox),document.removeEventListener("focusin",this.closeFloatingContainer),document.removeEventListener("click",this.closeFloatingContainer),W.removeEventListener("authentication-change",this.initSearchData)}updateSize(e){this.sizeCategory=e.detail.category}setFilter(e,r){let o=this.metadataFilters.filter(n=>!n.valueFilter||n.key!==e);this.facets.forEach(n=>{n.key===e&&yt(n.rootNodes,a=>a.childNodes).forEach(a=>a.selected=r.includes(a.value))}),r.length&&o.push({key:e,valueFilter:{negative:!1,values:r}}),this.metadataFilters=o,this.scrollToFacet=e}setFiltersFromPreset(e){e!=null&&(e.contentLocale!=null&&(this.contentLocale=e.contentLocale),this.metadataFilters=e.metadataFilters)}clearFilters(){this.facets.forEach(r=>yt(r.rootNodes,o=>o.childNodes).forEach(o=>o.selected=!1)),this.metadataFilters=[];let e=this.facets[0];this.scrollToFacet=e?.key}querySelector(e){return this.shadowRoot.querySelector(e)}querySelectorAll(e){return this.shadowRoot.querySelectorAll(e)}renderDesktopFloatingMenu(){return this.forceMenuOpen?z:O`
|
|
4955
4955
|
<div class="ft-search-bar--floating-panel"
|
|
4956
4956
|
id="ft-search-bar-floating-panel"
|
|
4957
4957
|
@keyup=${this.onFloatingContainerKeyUp}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "2.0.
|
|
23
|
-
"@fluid-topics/ft-app-context": "2.0.
|
|
24
|
-
"@fluid-topics/ft-button": "2.0.
|
|
25
|
-
"@fluid-topics/ft-chip": "2.0.
|
|
26
|
-
"@fluid-topics/ft-filter": "2.0.
|
|
27
|
-
"@fluid-topics/ft-icon": "2.0.
|
|
28
|
-
"@fluid-topics/ft-select": "2.0.
|
|
29
|
-
"@fluid-topics/ft-size-watcher": "2.0.
|
|
30
|
-
"@fluid-topics/ft-skeleton": "2.0.
|
|
31
|
-
"@fluid-topics/ft-snap-scroll": "2.0.
|
|
32
|
-
"@fluid-topics/ft-tooltip": "2.0.
|
|
33
|
-
"@fluid-topics/ft-typography": "2.0.
|
|
34
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-accordion": "2.0.9",
|
|
23
|
+
"@fluid-topics/ft-app-context": "2.0.9",
|
|
24
|
+
"@fluid-topics/ft-button": "2.0.9",
|
|
25
|
+
"@fluid-topics/ft-chip": "2.0.9",
|
|
26
|
+
"@fluid-topics/ft-filter": "2.0.9",
|
|
27
|
+
"@fluid-topics/ft-icon": "2.0.9",
|
|
28
|
+
"@fluid-topics/ft-select": "2.0.9",
|
|
29
|
+
"@fluid-topics/ft-size-watcher": "2.0.9",
|
|
30
|
+
"@fluid-topics/ft-skeleton": "2.0.9",
|
|
31
|
+
"@fluid-topics/ft-snap-scroll": "2.0.9",
|
|
32
|
+
"@fluid-topics/ft-tooltip": "2.0.9",
|
|
33
|
+
"@fluid-topics/ft-typography": "2.0.9",
|
|
34
|
+
"@fluid-topics/ft-wc-utils": "2.0.9",
|
|
35
35
|
"lit": "3.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@fluid-topics/public-api": "1.0.116"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "0c31a55662f9e366ecd36cbb4d10d93ee5433b5c"
|
|
41
41
|
}
|