var __extends,AutoSuggest;(function(n){var t;(function(n){function t(){for(var t,r,u,n,f,e=[],i=0;i0?t.join(" "):null}function i(t){return n.ViewData.TestHooksEnabled?t:undefined}n.ViewData={};n.classNames=t;n.whenTestHooks=i})(t=n.View||(n.View={}))})(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.componentDidMount=function(){this.props.adjustHeight&&this.props.adjustHeight()},t.prototype.componentDidUpdate=function(){this.props.adjustHeight&&this.props.adjustHeight()},t}(React.Component);n.DynamicHeightView=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var u=this.props,f=u.suggestion,i=u.openPreviewPaneButton,e="OpenWebPreviewPaneTooltip",o="OpenLocalPreviewPaneTooltip",r=n.WSB.supportsPreview(f);return!i||r==0?null:React.createElement("div",{className:"openPreviewPaneBtn",onClick:function(n){return i.clickHandler(f,n)},"data-partnertag":t.whenTestHooks("Suggestion.OpenPreviewPaneButton"),"data-noct":"true",role:"button",title:t.getLocString(r==1?e:o),"aria-label":t.getLocString(r==1?e:o)},React.createElement("span",{className:"openPreviewIcon",role:"presentation"},React.createElement(t.Icon,{icon:i.defaultIcon})),React.createElement("span",{className:"previewOpenedIcon",role:"presentation"},React.createElement(t.Icon,{icon:i.openedIcon})))},r}(React.Component);t.PreviewPaneButton=i})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props.icon;return t?React.createElement("span",{className:"removeIcon",title:t.title,onClick:function(n){t.click(n.nativeEvent);n.stopPropagation()},"data-partnertag":n.whenTestHooks("Suggestion.RemoveIcon")},React.createElement(n.Icon,{icon:t.icon})):null},i}(React.Component);n.RemoveIcon=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props,i=t.visible,r=t.messageText,u=t.buttons;return i?React.createElement("div",{id:"dialog_overlay","data-partnertag":n.whenTestHooks("DialogBoxOverlay")},React.createElement("div",{"data-partnertag":n.whenTestHooks("DialogBox")},r,React.createElement("div",null,u.map(function(t){return React.createElement("input",{type:"button",value:t.text,id:t.id,tabIndex:1,"data-partnertag":n.whenTestHooks("DialogBoxButton")})})))):null},i}(React.Component);n.WindowsDialogBox=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props,i=t.visible,r=t.icon,u=t.running,f=t.action;return i?u?React.createElement(n.WindowsMessage,{visible:i,icon:r,messageClassName:"indexingMessage",title:n.getLocString("WindowsIndexingInProgressToolTip"),messageText:n.getLocString("WindowsIndexingInProgressMessage")}):React.createElement(n.WindowsMessage,{visible:i,messageClassName:"indexingMessage",title:n.getLocString("WindowsIndexingDisabledToolTip"),messageText:n.getLocString("WindowsIndexingDisabledMessage"),action:f}):null},i}(n.DynamicHeightView);n.WindowsIndexingMessage=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props,f=t.visible,r=t.icon,e=t.messageClassName,o=t.messageText,u=t.clickHandler,s=t.title,i=t.action;return React.createElement("div",{className:n.classNames(e,{visible:f}),"data-partnertag":n.whenTestHooks("Message"),title:s,onClick:function(n){return u&&u(n.nativeEvent)}},React.createElement("div",{className:"message"},r&&React.createElement(n.Icon,{icon:r}),React.createElement("div",{className:n.classNames({details:r!=null})},React.createElement("div",{className:"primaryText"},o),i&&React.createElement("div",{className:"primaryText accentColor",onClick:function(n){return i.click(n.nativeEvent)},"data-h":i.instItem.getHValue(),"data-clicks":"true"},i.text))))},i}(n.DynamicHeightView);n.WindowsMessage=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var i=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var i=this.props,r=i.scopes,e=i.cancelHandler,o=i.cancelIcon,u=i.advancedOptionsTop,f=i.advancedOptionsBottom;return!r||r.length==0?null:React.createElement("div",{className:"searchScopes"},React.createElement("div",{className:"searchByCat"},React.createElement("div",{className:"groupHeader"},React.createElement("span",{className:"groupTitle"},n.getLocString("ScopesList"))),React.createElement("a",{href:"#","data-partnertag":n.whenTestHooks("AutoSuggest.ScopesL2.Dismiss"),"aria-label":n.getLocString("ScopesDismissFilters"),title:n.getLocString("ScopesDismissFilters"),className:"focusable filterIcon",onClick:function(){return e()},tabIndex:1},React.createElement("span",{className:"chevronDownIcon"},React.createElement(n.Icon,{icon:o})))),!!u.length&&React.createElement("div",{className:"topOptions"},React.createElement(n.AdvancedOptions,{advancedOptions:u,tabIndex:1})),React.createElement("div",{className:"scopesListContainer"},React.createElement("ul",{className:"scopesL2List","aria-label":n.getLocString("ScopesList"),role:"listbox"},r.map(function(n){return React.createElement(t,{scope:n,tabIndex:-1,partnerTag:"AutoSuggest.ScopesL2.ScopeTile",showDescription:!0})}))),!!f.length&&React.createElement(n.AdvancedOptions,{advancedOptions:f,tabIndex:u.length+2}))},r}(React.Component),t;n.WindowsSearchScopesL2=i;t=function(t){var i=t.scope,r=t.partnerTag,u=t.tabIndex,f=t.showDescription;return React.createElement("li",{role:"presentation"},React.createElement("a",{className:n.classNames("scopeTile","focusable",{selectedScope:i.selected}),"data-partnertag":n.whenTestHooks(r),href:"#",onClick:function(){return i.click()},role:"listitem","aria-selected":i.selected?"true":"false","aria-label":i.narratorText,title:i.narratorText,id:i.id,tabIndex:u},React.createElement(n.Icon,{icon:i.icon}),i.text&&React.createElement("div",{className:"details"},i.text),f&&i.description&&React.createElement("div",{className:"details secondaryText annotation"},i.description)))}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var i=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var i=this.props,t=i.advancedOptions,f=i.additionalClass,u=this.props.tabIndex;return!t||t.length==0?null:React.createElement("div",{className:n.classNames("advancedOptions",f)},t.map(function(t){return React.createElement("div",{id:t.id,className:n.classNames("advancedOption",{selectable:t.selected,sa_hv:t.selected})},t.title&&React.createElement("div",{className:"groupHeader"},React.createElement("span",{className:"groupTitle"},t.title)),React.createElement(r,{option:t,tabIndex:++u}),!t.dismiss?undefined:(u++,undefined))}))},i}(React.Component);n.AdvancedOptions=i;var r=function(n){var i=n.option,r=n.tabIndex,t=[];switch(i.layout){case 1:t.push(React.createElement(e,{option:i,tabIndex:r}));break;case 2:t.push(React.createElement(o,{option:i,tabIndex:r}));break;case 3:t.push(React.createElement(f,{option:i,tabIndex:r}));break;default:t.push(React.createElement(u,{option:i,tabIndex:r}))}return t.push(React.createElement(s,{dismiss:i.dismiss,tabIndex:r+1})),t?React.createElement("div",null,t):null},u=function(t){var i=t.option,r=t.tabIndex;return React.createElement("div",null,i.heading&&React.createElement("div",{className:"advancedOptionHeading"},i.heading),React.createElement("input",{type:"button",className:"focusable","data-partnertag":n.whenTestHooks("AutoSuggest.ScopesL2.AdvancedOption"),tabIndex:r,onClick:function(n){return i.click(n.nativeEvent)},"data-h":i.instItem?i.instItem.getHValue():undefined,"data-clicks":"true",value:i.text}))},f=function(i){var r=i.option,u=i.tabIndex;return React.createElement("div",null,React.createElement(n.Icon,{icon:r.icon}),React.createElement("div",{className:"optin focusable","data-partnertag":n.whenTestHooks("AutoSuggest.OptInCard")},React.createElement("div",{className:"optInContent"},React.createElement("div",{className:"txtBtns"},React.createElement("b",null,r.heading),React.createElement("p",null,r.description),React.createElement("div",{className:"btnsWrapper"},React.createElement(t,{id:"optInYesBtn",tabIndex:++u,option:r.yesBtn}),React.createElement(t,{id:"optInNoBtn",tabIndex:++u,option:r.noBtn}))))))},t=function(n){var i=n.id,r=n.tabIndex,t=n.option;return React.createElement("div",null,React.createElement("input",{type:"button",id:i,className:"focusable accentColor",onClick:function(n){return t.click(n.nativeEvent)},"data-clicks":"true",tabIndex:r,value:t.text}))},e=function(t){var i=t.option,r=t.tabIndex;return React.createElement("div",null,React.createElement(n.Icon,{icon:i.icon}),React.createElement("div",{className:"details"},React.createElement("a",{href:"#",className:"accentColor focusable additionalInfoText","data-partnertag":n.whenTestHooks("AutoSuggest.ScopesL2.AdvancedOption"),tabIndex:r,onClick:function(n){return i.click(n.nativeEvent)},"data-h":i.instItem.getHValue(),"data-clicks":"true"},i.heading)))},o=function(t){var i=t.option;return React.createElement("div",null,React.createElement(n.Icon,{icon:i.icon}),React.createElement("div",{className:"details"},React.createElement("div",{className:"focusable additionalInfoText","data-partnertag":n.whenTestHooks("AutoSuggest.DismissCard"),"data-clicks":"true"},i.heading)))},s=function(t){var i=t.dismiss,r=t.tabIndex;return i?React.createElement("a",{href:"#","data-partnertag":n.whenTestHooks("AdvancedOption.Dismiss"),"aria-label":n.getLocString("DismissUpsell"),title:n.getLocString("DismissUpsell"),className:"cancelIcon focusable",onClick:function(){return i.action()},tabIndex:r},React.createElement(n.Icon,{icon:i.icon})):null}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.render=function(){var n=this.props,e=n.showModule,i=n.advancedOptions,o=n.scopes,s=n.hiddenScopes,h=n.moreClickHandler,c=n.showFeedback,f=n.headerText,u=n.message,l=n.messageIcon,a=n.chevronDownIcon;return e?React.createElement("div",null,!!i.length&&React.createElement("div",{className:"topOptions"},React.createElement(t.AdvancedOptions,{advancedOptions:i.filter(function(n){return n.layout==1}),tabIndex:1}),React.createElement("div",{id:"optInOutOptions"},React.createElement(t.AdvancedOptions,{advancedOptions:i.filter(function(n){return n.layout==2}),tabIndex:1}),React.createElement(t.AdvancedOptions,{advancedOptions:i.filter(function(n){return n.layout==3}),tabIndex:1,additionalClass:"optInOption"}))),React.createElement("div",{className:"searchScopes"},React.createElement(r,{advancedOptions:i,scopes:o,hiddenScopes:s,moreClickHandler:h,showFeedback:c,chevronDownIcon:a})),f&&React.createElement("div",{className:"groupHeader"},React.createElement("span",{className:"groupTitle","aria-label":f,role:"heading"},f)),React.createElement("div",{className:t.classNames({b_hide:!u}),"aria-live":"assertive"},u&&React.createElement("div",{className:"scopeMessage"},React.createElement(t.Icon,{icon:l}),React.createElement("div",{className:"details","aria-label":u,role:"heading","data-partnertag":t.whenTestHooks("message")},u))),!!i.length&&React.createElement("div",{className:"scopeOptions"},React.createElement(t.AdvancedOptions,{advancedOptions:i.filter(function(n){return n.layout==0}),tabIndex:1}))):null},i}(React.Component);t.TopHitHeader=i;var r=function(i){var e=i.advancedOptions,r=i.scopes,o=i.hiddenScopes,s=i.moreClickHandler,h=i.showFeedback,c=i.chevronDownIcon;return React.createElement("div",{className:"scopesListContainer","data-partnertag":t.whenTestHooks("AutoSuggest.ScopesContainer")},r.length>0&&React.createElement("ul",{className:"scopesList","aria-label":t.getLocString("ScopesList"),role:"listbox"},!!r.length&&r.map(function(n){return React.createElement(u,{scope:n})}),!!r.length&&(!n.WSB.config.scopeOptions||!n.WSB.alwaysWide)&&React.createElement("li",{role:"presentation",className:"more"},React.createElement("a",{className:"scopeTile focusable",onClick:function(){return s()},"data-partnertag":t.whenTestHooks("AutoSuggest.ScopesL1.More"),href:"#",role:"listitem","aria-label":t.getLocString("ScopesList"),title:t.getLocString("ScopesListToolTip"),tabIndex:-1,id:"filtersButton"},React.createElement("div",{className:"details"},t.getLocString("ScopesList")),React.createElement("span",{className:"chevronDownIcon"},React.createElement(t.Icon,{icon:c})))),n.WSB.config.scopeOptions&&n.WSB.alwaysWide&&[React.createElement(t.MoreMenuButton,{id:"scopeMoreMenu",scopes:o}),React.createElement(f,{showFeedback:h}),React.createElement(t.OptionsMenuButton,{id:"scopeOptionsMenu",advancedOptions:e})].map(function(n){return n})))},u=function(n){var i=n.scope;return React.createElement("li",{role:"presentation"},React.createElement("a",{className:t.classNames("scopeTile","focusable",{selectedScope:i.selected}),"data-partnertag":t.whenTestHooks("AutoSuggest.ScopesL1.ScopeTile"),href:"#",onClick:function(){return i.click()},role:"listitem","aria-selected":i.selected?"true":"false","aria-label":i.narratorText,title:i.narratorText,id:i.id,tabIndex:i.tabindex?i.tabindex:-1},React.createElement(t.Icon,{icon:i.icon}),i.text&&React.createElement("div",{className:"details"},i.text)))},f=function(n){var i=n.showFeedback;return React.createElement("li",{role:"presentation",className:"rightAligned immersiveScopeButton"},React.createElement("a",{className:"scopeTile focusable dropdownbutton",onClick:function(){return i()},href:"#",role:"listitem","aria-label":"Feedback",title:"Give Feedback",tabIndex:-1,"data-partnertag":t.whenTestHooks("AutoSuggest.OptOutFeedbackLink"),id:"feedbackButton"},React.createElement("div",{className:"details"},t.getLocString("FeedbackButtonText"))))}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var i=this.props,r=i.suggestions,u=i.clickHandler,f=i.contextMenuHandler,e=i.openPreviewPaneButton,o=i.query;return React.createElement("div",{className:n.WSB.shouldRenderFlatListWithoutGroups(o)?"group":"topResults"},r.map(function(i,o){return React.createElement(t.WindowsSuggestionThreeLines,{suggestion:i,previousWasWebSuggestion:o>0&&n.isWebSuggestion(r[o-1]),contextMenuHandler:f,clickHandler:u,openPreviewPaneButton:e})}))},r}(t.DynamicHeightView);t.WindowsTopResults=i})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var r=function(r){function u(){return r!==null&&r.apply(this,arguments)||this}return __extends(u,r),u.prototype.render=function(){var u=this.props,r=u.suggestion,f=u.openPreviewPaneButton,o=u.isFirst,s=u.clickHandler,h=u.webSuggestionAnnotation,c=u.contextMenuHandler,e;return r?(e=t.classNames("suggestion",{sa_hv:r.selected&&!r.selectedStyleSuspended,selectable:!!r.click,withOpenPreviewPaneBtn:f&&n.WSB.supportsPreview(r)!=0,previewPaneOpened:r.hasPreviewPaneOpened,removeIconPadding:!!r.removeIcon},r.classNames.join(" ")),React.createElement("div",{className:e,onContextMenu:function(n){return c(r,n.nativeEvent)},onClick:function(n){return s(r,n.nativeEvent)},id:r.id,"data-partnertag":t.whenTestHooks("AutoSuggest.RegularSuggestion"),role:"listitem","aria-selected":r.selected?"true":"false","aria-label":r.narratorText,"data-stype":t.whenTestHooks(r.type),"data-h":r.instItem.getHValue(),"data-clicks":r.isReformulation?"true":null,"data-noct":r.isReformulation?"true":null,title:r.tooltip},React.createElement(t.Icon,{icon:r.icon}),React.createElement(i,{suggestion:r,isFirst:o,webSuggestionAnnotation:h}),React.createElement(t.PreviewPaneButton,{suggestion:r,openPreviewPaneButton:f}))):null},u}(React.Component),i;t.WindowsSuggestionSingleLine=r;i=function(i){var r=i.suggestion,e=i.isFirst,f=i.webSuggestionAnnotation,u=r.additionalInfoText;return!u&&e&&n.isWebSuggestion(r)&&f&&(u=f),React.createElement("div",{className:"details"},React.createElement("div",{className:"primaryText","data-partnertag":t.whenTestHooks("Suggestion.PrimaryText")},!u?React.createElement("div",null,React.createElement(t.HighlightedText,{text:r.text,dir:"ltr",reverse:n.WSB.hasReverseHighlighting(r)})):React.createElement("div",null,React.createElement("span",null,React.createElement(t.HighlightedText,{text:r.text,dir:"ltr",reverse:n.WSB.hasReverseHighlighting(r)})),React.createElement("span",{className:"additionalInfoText annotation"},React.createElement(t.HighlightedText,{text:u})))),React.createElement(t.RemoveIcon,{icon:r.removeIcon}))}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var u=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),f.prototype.render=function(){var f=this.props,u=f.suggestion,o=f.openPreviewPaneButton,h=f.previousWasWebSuggestion,c=f.clickHandler,l=f.contextMenuHandler,s=n.WSB.isSmallerAnswersUX(),e=!u.htmlContent||s,a=t.classNames("suggestion","cf",{sa_hv:u.selected&&!u.selectedStyleSuspended,topHitConnectedToGroup:u.hasChildSuggestionsDisplayed,selectable:!!u.click,withSecondaryIcon:!!u.secondaryIcon,withOpenPreviewPaneBtn:o&&n.WSB.supportsPreview(u)!=0,previewPaneOpened:u.hasPreviewPaneOpened,removeIconPadding:u.removeIcon!=null},u.classNames.join(" "));return React.createElement("div",{className:a,onContextMenu:function(n){return l(u,n.nativeEvent)},onClick:function(n){return u.click&&c(u,n.nativeEvent)},id:u.id,"data-partnertag":t.whenTestHooks("AutoSuggest.RegularSuggestion"),role:"listitem","aria-selected":u.selected?"true":"false","aria-label":u.narratorText&&u.narratorText,"data-stype":t.whenTestHooks(u.type),"data-h":u.instItem.getHValue(),"data-clicks":u.isReformulation?"true":null,"data-noct":u.isReformulation?"true":null,title:u.tooltip},e&&React.createElement(t.Icon,{icon:u.icon}),e&&React.createElement(r,{suggestion:u,previousWasWebSuggestion:h}),e&&React.createElement(t.RemoveIcon,{icon:u.removeIcon}),e&&u.secondaryIcon&&React.createElement(t.Icon,{icon:u.secondaryIcon,type:"SecondaryIcon"}),e&&React.createElement(t.PreviewPaneButton,{suggestion:u,openPreviewPaneButton:o}),u.htmlContent&&!s&&React.createElement(i,{htmlContent:u.htmlContent}))},f}(React.Component),r,i;t.WindowsSuggestionThreeLines=u;r=function(r){var u=r.suggestion,h=r.previousWasWebSuggestion,e=u.stars,o=typeof e=="number",f=n.WSB.isSmallerAnswersUX(),s=f,c=f&&n.isWebSuggestion(u)&&h&&!u.additionalInfoText;return React.createElement("div",{className:t.classNames("details",{withAnswer:f&&!!u.htmlContent})},React.createElement("div",{className:"primaryText","data-partnertag":t.whenTestHooks("Suggestion.PrimaryText")},React.createElement("div",null,React.createElement(t.HighlightedText,{text:u.text,dir:"ltr",reverse:n.WSB.hasReverseHighlighting(u)})),u.receivedDate&&React.createElement("div",{className:"secondaryText annotation receivedDate"},u.receivedDate)),o&&!s&&React.createElement(t.StarsRating,{ratingValue:e,className:"secondaryText"}),u.primaryMetadata&&!c&&React.createElement("div",{className:"secondaryText annotation","data-partnertag":t.whenTestHooks("Suggestion.SecondaryText")},React.createElement(t.HighlightedText,{text:u.primaryMetadata,dir:"ltr"})),o&&s&&React.createElement(t.StarsRating,{ratingValue:e,className:"secondaryMetadata secondaryText"}),u.htmlContent&&f&&React.createElement(i,{htmlContent:u.htmlContent}),u.secondaryMetadata&&React.createElement("div",{className:"secondaryMetadata secondaryText annotation","data-partnertag":t.whenTestHooks("Suggestion.SecondaryMetadta")},React.createElement(t.HighlightedText,{text:u.secondaryMetadata,dir:"ltr"})))};i=function(n){return React.createElement("div",{className:"answer",dangerouslySetInnerHTML:{__html:n.htmlContent}})}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.render=function(){var i=this.props,n=i.group,f=i.clickHandler;return React.createElement("div",{className:t.classNames("group",n.cssClasses),"data-region":n.instRegionName},React.createElement(r,{group:n,clickHandler:f}),React.createElement(u,{suggestions:n.suggestions,rootProperties:this.props,renderingState:{isFirst:!0}}))},i}(React.Component);t.WindowsGroup=i;var r=function(i){var r=i.group,u=i.clickHandler;return React.createElement("div",{className:t.classNames("groupHeader",{selectable:!!r.click,sa_hv:r.selected&&!r.selectedStyleSuspended}),id:r.id,onClick:function(n){return u(r,n.nativeEvent)},"data-h":r.instItem&&r.instItem.getHValue(),"data-clicks":"true",role:r.click?"listitem":"heading","aria-label":r.narratorText,title:r.tooltip,"aria-selected":r.selected?"true":"false","data-partnertag":t.whenTestHooks("AutoSuggest.GroupHeader")},React.createElement("span",{className:t.classNames("groupTitle",{countAndChevronHeader:r.showCountInHeader})},React.createElement("span",{className:t.classNames({title:r.showCountInHeader})},n.WSB.useMoreSearchOptionsHeader(r)?t.getLocString("MoreSearchOptions"):r.text),r.count&&r.showCountInHeader&&React.createElement("span",null," ","(",r.count,r.showPlusIconInHeader?"+":"",")")))},u=function(n){var t=n.suggestions,i=n.rootProperties,r=n.renderingState;return React.createElement("div",{className:"suggsList"},t.map(function(n){return!n.suppressed&&React.createElement(f,{suggestion:n,rootProperties:i,renderingState:r})}))},f=function(n){var r=n.suggestion,i=n.rootProperties,f=n.renderingState,u;switch(r.template){case 0:u=React.createElement(t.WindowsSuggestionSingleLine,{isFirst:f.isFirst,suggestion:r,contextMenuHandler:i.contextMenuHandler,clickHandler:i.clickHandler,openPreviewPaneButton:i.openPreviewPaneButton,webSuggestionAnnotation:i.webSuggestionAnnotation});f.isFirst=!1;break;case 1:u=React.createElement(t.WindowsSuggestionThreeLines,{previousWasWebSuggestion:!1,suggestion:r,contextMenuHandler:i.contextMenuHandler,clickHandler:i.clickHandler,openPreviewPaneButton:i.openPreviewPaneButton})}return u}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var i=this.props,u=i.groups,f=i.clickHandler,e=i.contextMenuHandler,o=i.openPreviewPaneButton,s=i.webSuggestionAnnotation,r;return React.createElement("div",{"data-partnertag":t.whenTestHooks("AutoSuggest.GroupContainer"),"data-region":"Groups"},u.map(function(i){var u=React.createElement("div",null,!n.WSB.isTopHitChildGroup(i.typeWithSource)&&r&&n.WSB.isTopHitChildGroup(r.typeWithSource)&&React.createElement("hr",{className:"divider topHitConnectedToGroup"}),React.createElement(t.WindowsGroup,{group:i,clickHandler:f,contextMenuHandler:e,openPreviewPaneButton:o,webSuggestionAnnotation:s}));return r=i,u}),r&&n.WSB.isTopHitChildGroup(r.typeWithSource)&&React.createElement("hr",{className:"divider topHitConnectedToGroup"}))},r}(t.DynamicHeightView);t.WindowsGroups=i})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var r=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var r=this.props,i=r.suggestion,u=r.sections,s=r.suggestionClickHandler,f=r.itemClickHandler,h=r.expanderClickInstrumentation,c=r.chevronDownIcon,e=i&&i.stars,o=typeof e=="number";return i&&React.createElement("div",null,React.createElement("section",{className:"anchor clickable","data-partnertag":n.whenTestHooks("AutoSuggest.Preview.Anchor")},React.createElement("div",{onClick:function(n){return s(i,n.nativeEvent)}},React.createElement(n.Icon,{icon:i.previewIcon}),React.createElement("div",{className:"title"},React.createElement(n.HighlightedText,{text:i.text,dir:"ltr"})),o&&React.createElement(n.StarsRating,{ratingValue:e,className:"secondaryText"}),!o&&i.primaryMetadata&&React.createElement("div",{className:"secondaryText annotation"},HitHighlightingParser.removeMarkers(i.primaryMetadata)),React.createElement("hr",null))),i.previewMetadata&&Object.keys(i.previewMetadata).length>0&&React.createElement("section",{className:"metadata allowcontextmenu","data-partnertag":n.whenTestHooks("AutoSuggest.Preview.Metadata")},Object.keys(i.previewMetadata).map(function(t){return React.createElement("div",{className:"secondaryText annotation"},React.createElement("div",{className:"label"},t),React.createElement("div",{className:n.classNames({clickable:!!i.previewMetadata[t].click}),onClick:function(n){return i.previewMetadata[t].click&&f(i.previewMetadata[t],n.nativeEvent)}},i.previewMetadata[t].text))}),React.createElement("hr",null)),u.length&&u.map(function(n,r){return React.createElement(t,{suggestion:i,section:n,itemClickHandler:f,numberOfSections:u.length,sectionIndex:r,expanderClickInstrumentation:h,chevronDownIcon:c})}))},r}(React.Component),t,i;n.WindowsPreviewContainer=r;t=function(t){function r(n){var i=t.call(this,n)||this;return i.state={sectionCollapsed:!0},i.toggleSectionVisibility=i.toggleSectionVisibility.bind(i),i}return __extends(r,t),r.prototype.toggleSectionVisibility=function(){var n=this.state.sectionCollapsed;this.setState({sectionCollapsed:!n});this.props.expanderClickInstrumentation(this.props.suggestion,this.props.sectionIndex,this.props.section.sectionType,n)},r.prototype.render=function(){var f=this,r=this.props,t=r.section,u=r.itemClickHandler,e=r.chevronDownIcon,o=r.sectionIndex,s=r.numberOfSections;return React.createElement("section",null,t.title&&React.createElement("div",{className:"groupTitle"},t.title),React.createElement("section",null,t.items.map(function(n){return React.createElement(i,{item:n,title:t.title,itemClickHandler:u})})),React.createElement("section",{className:n.classNames({expandable:this.state.sectionCollapsed,sectionHidden:this.state.sectionCollapsed,sectionShown:!this.state.sectionCollapsed})},t.collapsedItems.map(function(n){return React.createElement(i,{item:n,title:t.title,itemClickHandler:u,expanderCollapsed:f.state.sectionCollapsed.valueOf()})})),t.collapsedItems.length>0&&React.createElement(n.Expander,{chevronDownIcon:e,expandCollapseClickEventHandler:this.toggleSectionVisibility,expanderCollapsed:this.state.sectionCollapsed,expanderItem:t.expander,sectionNarratorText:t.narratorText}),t.collapsedItems.length==0&&s!==o+1&&React.createElement("hr",null))},r}(React.Component);n.WindowsPreviewSectionsContainer=t;i=function(t){var i=t.item,r=t.title,u=t.itemClickHandler,f=t.expanderCollapsed;return React.createElement("div",{id:i.id,className:n.classNames("sectionItem selectable",{accentColor:!r},{sa_hv:i.selected},{collapsedItem:f}),onClick:function(n){return u(i,n.nativeEvent)},title:i.tooltip,role:"listitem","aria-selected":i.selected,"aria-label":i.narratorText,"data-partnertag":n.whenTestHooks("AutoSuggest.Preview.SectionItem"),tabIndex:-1},React.createElement(n.Icon,{icon:i.icon}),React.createElement("div",{className:"details"},React.createElement("div",{className:"secondaryText"},React.createElement("span",null,i.text),i.annotation&&React.createElement("span",{className:i.annotationClass},i.annotation))))}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){function u(r){var u=r.index,f=r.item,e=r.isLast,o=r.hasPartialNextWord;return o&&u==0?React.createElement("span",null,React.createElement("span",{key:u,className:"hidden"},f.text,e?"":t),React.createElement("span",null,i)):React.createElement("span",{key:u,className:n.classNames({highlighted:f.highlighted})},f.text,e?"":t)}var i="…",t="‍",r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.render=function(){var n=this.props,i=n.text,r=n.dir,f=n.reverse,e=n.partialNextWord,t=HitHighlightingParser.split(i,f);return React.createElement("span",{dir:r},t.map(function(n,i){return React.createElement(u,{index:i,item:n,isLast:i==t.length-1,hasPartialNextWord:e})}))},t}(React.Component);n.HighlightedText=r})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){function i(t){var i=t.icon;return i.type==0?React.createElement("img",{src:i.content,role:"presentation"}):React.createElement("span",{className:n.classNames("iconContent",{accentColor:i.needsAccentColor,cortanaFontIcon:i.type==2,segoeRegularFont:i.type==5}),dangerouslySetInnerHTML:{__html:i.content}})}function r(n){var t="Suggestion.";switch(n){case"SecondaryIcon":return{dataPartnerTag:t+n,additionalCssClass:"secondaryIcon"};case"ActionIcon":return{dataPartnerTag:t+n,additionalCssClass:"actionIcon"};default:return{dataPartnerTag:t+"Icon",additionalCssClass:undefined}}}var t=function(t){function u(){return t!==null&&t.apply(this,arguments)||this}return __extends(u,t),u.prototype.render=function(){var s=r(this.props.type),l=s.dataPartnerTag,a=s.additionalCssClass,f=this.props,t=f.icon,v=f.onClick,y=f.hidden,e=f.suggestionText,o="",h={},c={},u;if(t){switch(t.ratio){case 2:o="wide";break;case 3:o="tall"}t.bgColor&&(h.backgroundColor=t.bgColor);t.color&&(c.color=t.color);t.type==3?u=React.createElement(n.CortanaIcon,null):t.type==6?u=React.createElement(n.OptInIcon,null):t.content?u=React.createElement(i,{icon:t}):t.className&&(u=React.createElement("span",{style:c,className:n.classNames("iconContent",t.className,{bookmarksFontIcon:t.type==4})}))}return React.createElement("div",{"data-partnertag":n.whenTestHooks(l),"aria-label":e?e:undefined,role:e?"button":undefined,onClick:v,className:n.classNames("iconContainer",a,{cortanaIcon:t&&t.type==3,optInIcon:t&&t.type==6,hidden:y})},u&&React.createElement("div",{style:h,className:n.classNames("icon",o,{iconWithBackground:!!t.bgColor},t.className&&t.type!=4?t.className:null)},u))},u}(React.Component);n.Icon=t;n.StarsRating=function(n){return React.createElement("div",{className:n.className},React.createElement("span",{className:"starRating"},React.createElement("span",{style:{width:n.ratingValue+"em"}})))}})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.render=function(){return React.createElement("span",{className:"wrapper",dangerouslySetInnerHTML:{__html:'<\/g><\/svg>'}})},t}(React.Component);n.CortanaIcon=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props,i=t.items,r=t.showIcons,u=t.clickHandler;return React.createElement("div",{id:"contextMenu",className:"contextMenu",role:"listbox"},i.length&&i.map(function(t){return t.isSeparator?React.createElement("hr",{className:"divider"}):React.createElement("div",{id:t.id,role:"listitem","aria-label":t.text,className:n.classNames("contextMenuItem",{sa_hv:t.selected}),"aria-selected":t.selected?"true":"false",onMouseUp:function(n){return u(t,n.nativeEvent)}},r&&t.icon&&React.createElement(n.Icon,{icon:t.icon}),React.createElement("div",{className:r?"details":""},t.isDefault&&React.createElement("span",{className:"highlighted"},t.text),!t.isDefault&&t.text))}))},i}(React.Component);n.WindowsContextMenu=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var r=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.render=function(){var i=this.props,s=i.uiLanguage,o=i.type,r=i.verifyAccountCallback,h=i.verifyAccountDismiss,c=n.isBingEnabled()&&_w.WindowsFeedbackForm?function(){return WindowsFeedbackForm.Show()}:null;return o==1?React.createElement("div",{"data-partnertag":t.whenTestHooks("AutoSuggest.TabShellZeroFooter")},React.createElement(u,null),!!r&&React.createElement(f,{verifyAccountCallback:r,verifyAccountDismiss:h})):o==2?React.createElement(e,{uiLanguage:s,verifyAccountCallback:r,feedbackFormLaunch:c,dataPartnertag:t.whenTestHooks("AutoSuggest.TabShellZeroFooter")}):null},r}(t.DynamicHeightView);t.TabShellFooter=r;var u=function(){return React.createElement("div",{className:"zeroInputIllustration"},React.createElement("div",{className:"image"}),React.createElement("div",null,t.getLocString("IllustrationMessage_TabShell")))},f=function(n){var r=n.verifyAccountCallback,i=n.verifyAccountDismiss;return React.createElement("div",{className:"zeroInputVerifyAccount"},React.createElement("div",{className:"messagesContainer"},React.createElement("div",null,t.getLocString("VerifyAccountToSearchDocuments")),React.createElement("div",null,t.getLocString("AccountNotVerifiedMessage_TabShell"))),React.createElement("div",{className:"buttonsContainer"},React.createElement("input",{type:"button",onClick:function(n){return r(n.nativeEvent)},className:"verifyButton",value:t.getLocString("Verify")}),i&&React.createElement("input",{type:"button",onClick:function(){return i()},value:t.getLocString("DismissUpsell")})))},e=function(n){var f=n.uiLanguage,r=n.verifyAccountCallback,u=n.feedbackFormLaunch,e=n.dataPartnertag;return React.createElement("div",{className:"tabShellFeedbackBar","data-partnertag":e},r&&React.createElement("a",{href:"#",className:"accentColor",onClick:function(n){return r(n.nativeEvent)}},t.getLocString("VerifyAccountFooter_TabShell")),u&&React.createElement("a",{href:"#",className:"accentColor",onClick:function(){return u()},"data-partnertag":t.whenTestHooks("AutoSuggest.PanelFeedbackLink")},i.get(f,"WINDOWS_TITLE_TEXT")),React.createElement("div",{className:"annotation"},t.getLocString("PoweredByBingFooter_TabShell")))},i;(function(t){function f(t){var f={uiCulture:"en-US",name:"LocStrings",namespace:"Feedback"};r||(r=LocStringManager.getLocString(f));t.toLowerCase()!="en-us"?(f.uiCulture=t,i=n.safeExecute(function(){return LocStringManager.getLocString(f)},"getLocString",null,f.uiCulture)):i=null;u=t}function e(n,t){return u!=n&&f(n),i?i[t]:r[t]}var u,i,r;t.get=e})(i||(i={}))})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var r=function(n){function t(t){var i=n.call(this,t)||this;return i.searchBoxId="sb_form_q",i.itemCount=0,i.onCloseFocusId=i.searchBoxId,i.toggleMenu=function(){i.state.menuVisible?i.closeMenu():i.openMenu()},i.onKeyEvent=function(n){switch(n.keyCode){case 27:case 9:return i.closeMenu(),!1;case 40:return i.selectNextItem(),!1;case 38:return i.selectPrevItem(),!1;case 37:case 39:return i.onCloseFocusId=_ge(i.props.id).parentElement.id,i.closeMenu(),!1;case 13:return n.target instanceof Element&&_ge(n.target.id).click(),i.closeMenu(),!1}return!0},i.selectItem=function(n){i.setState({menuVisible:!0,selectedItemIndex:n})},i.closeMenu=function(){i.setState({menuVisible:!1,selectedItemIndex:0});_w.removeEventListener("click",i.closeMenu);_w.removeEventListener("blur",i.closeMenu);_ge(_d.activeElement.id).blur();_ge(i.onCloseFocusId).focus()},i.openMenu=function(){sb_st(function(){_w.addEventListener("click",i.closeMenu,{once:!0})},1);_w.addEventListener("blur",i.closeMenu,{once:!0});i.setState({menuVisible:!0,selectedItemIndex:0});i.onCloseFocusId=i.searchBoxId},i.selectNextItem=function(){i.selectItem((i.state.selectedItemIndex+1)%i.itemCount)},i.selectPrevItem=function(){var n=i.state.selectedItemIndex==0?i.itemCount-1:i.state.selectedItemIndex-1;i.selectItem(n)},i.state={menuVisible:!1,selectedItemIndex:0},i}return __extends(t,n),t.prototype.componentDidUpdate=function(){var n=_ge(this.props.id+"Item"+this.state.selectedItemIndex);n&&n.focus()},t}(React.Component),t,i;n.OptionsMenuButton=function(i){var u=i.id,f=i.advancedOptions,r;return React.createElement("li",{role:"presentation",className:"immersiveScopeButton"},React.createElement("a",{className:"scopeTile focusable dropDownButton",onClick:function(){r.toggleMenu()},href:"#",role:"listitem","aria-label":"Options",title:"Options",tabIndex:-1,id:"optionsButton","data-partnertag":n.whenTestHooks("AutoSuggest.OptionsMenu")},React.createElement("span",{className:"optionsMenuIcon"},React.createElement(n.Icon,{icon:{content:"",type:2}})),React.createElement(t,{ref:function(n){r=n},id:u,advancedOptions:f})))};t=function(t){function i(n){return t.call(this,n)||this}return __extends(i,t),i.prototype.render=function(){var f=this,i=this.props.id,r=this.state,e=r.selectedItemIndex,o=r.menuVisible,t,u;return o?(t=0,u=React.createElement("div",{onKeyDown:this.onKeyEvent,className:"menuPanel",id:i,role:"menubar"},this.props.advancedOptions.map(function(r){return r.layout==4?React.createElement(n.DropDownMenuButton,{isSelected:t==e,onMouseOver:function(){return f.selectItem(t)},id:i+"Item"+t++,icon:r.icon,text:r.text,title:r.heading,clickHandler:function(){return r.click(new PointerEvent("mouse"))}}):r.layout==5?React.createElement("hr",null):null})),this.itemCount=t,u):null},i}(r);n.OptionsMenu=t;n.DropDownMenuButton=function(t){var u=t.id,i=t.isSelected,f=t.text,e=t.title,r=t.icon,o=t.clickHandler,s=t.onMouseOver,h=i?"menuItem selectedItem":"menuItem";return React.createElement("div",{"aria-selected":i,tabIndex:0,id:u,title:e,onClick:o,className:h,role:"listitem",onMouseOver:s},r&&React.createElement("div",{className:"menuIcon"},React.createElement(n.Icon,{icon:r})),React.createElement("div",{className:"menuText"},f))};n.MoreMenuButton=function(t){var u=t.id,f=t.scopes,r;return React.createElement("li",{role:"presentation",className:"more"},React.createElement("a",{className:"scopeTile focusable dropDownButton",onClick:function(){r.toggleMenu()},href:"#",role:"listitem","aria-label":n.getLocString("MoreScopesList"),title:n.getLocString("MoreScopesListToolTip"),tabIndex:-1,id:"moreButton","data-partnertag":n.whenTestHooks("AutoSuggest.MoreMenu")},React.createElement("div",{className:"details"},n.getLocString("MoreScopesList")),React.createElement("span",{className:"chevronDownIcon"},React.createElement(n.Icon,{icon:{content:"",type:2}})),React.createElement(i,{ref:function(n){r=n},id:u,scopes:f})))};i=function(t){function i(n){return t.call(this,n)||this}return __extends(i,t),i.prototype.render=function(){var f=this,t=this.props,i=t.id,r=t.scopes,u=this.state,e=u.selectedItemIndex,o=u.menuVisible;return o?(this.itemCount=r.length,React.createElement("div",{onKeyDown:this.onKeyEvent,className:"menuPanel",id:i,role:"menubar"},r.map(function(t,r){return React.createElement(n.DropDownMenuButton,{id:i+"Item"+r,isSelected:r==e,text:t.text,title:t.narratorText,clickHandler:t.click,onMouseOver:function(){return f.selectItem(r)}})}))):null},i}(r);n.MoreMenu=i})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){var t=this.props,e=t.chevronDownIcon,o=t.expandCollapseClickEventHandler,i=t.expanderCollapsed,r=t.expanderItem,u=t.sectionNarratorText,f=i?n.getLocString("ExpanderNarratorText",u):n.getLocString("ExpanderNarratorTextExpanded",u);return React.createElement("div",{className:n.classNames("hr-expander",{expanderOpened:!i},{selectedExpander:r.selected})},React.createElement("button",{onClick:function(){return o()},"data-partnertag":n.whenTestHooks("AutoSuggest.Preview.Expander"),id:r.id,"aria-label":f,title:f},React.createElement("div",{className:"expanderCircle"},React.createElement("div",{className:"expanderInnerCircle"},React.createElement(n.Icon,{icon:e})))),React.createElement("hr",null))},i}(React.Component);n.Expander=t})(t=n.View||(n.View={}))}(AutoSuggest||(AutoSuggest={}))