Vous êtes sur la page 1sur 58

var __extends,AutoSuggest;(function(n){var t;(function(t){function f(){return new

u}function r(){if(i.hostingEnvironment==4)return 7;if(!n.isMiniSerpEnabled())return


0;var r=7;return t.config.allowAnswersToAutoOpenMiniSerp||(r&=-
2),t.config.allowDNavToAutoOpenMiniSerp||(r&=-
3),t.config.allowWebToAutoOpenMiniSerp||(r&=-5),r}var
i=SearchAppWrapper.CortanaApp,u=function(){function n()
{this.QfMode=0;this.AlwaysWide=!1;this.SearchBoxOnTop=!
1;this.AllowKeyboardNavCycling=!0;this.AllowKeyboardNavOffCanvas=!
1;this.FlatListWithoutGroups=!
1;this.MaxSuggestionsWhenFlatList=0;this.PreviewPaneAvailable=!
1;this.MiniSERPMode=0;this.SearchHomeAvailable=undefined;this.ScopesAvailable=!
1;this.FirstSuggestionSelectedByDefault=!0;this.PanelCanResize=!
1;this.AllowProtocolSyntheticSuggestions=!0}return
n.prototype.OnAppVisible=function(n){var
e=i.textScaleFactor>1.25,u,f;try{u=i.isWideSearch}catch(o){}f=u!==!1&&!!
n.getFeatureDWORD("WideAtStartupDelta").featureValue;i.hostingEnvironment==3||
t.config.forceSettingsAppExperience?(this.PreviewPaneAvailable=!
1,this.MiniSERPMode=0,this.QfMode=t.config.forceSettingsAppExperience?
7:5,this.AlwaysWide=!1,this.SearchBoxOnTop=!0,this.AllowKeyboardNavCycling=!
0,this.AllowKeyboardNavOffCanvas=this.QfMode==5,this.ScopesAvailable=!
1,this.FlatListWithoutGroups=!
0,this.MaxSuggestionsWhenFlatList=10,this.SearchHomeAvailable=undefined,this.FirstS
uggestionSelectedByDefault=this.QfMode!=5,this.AllowProtocolSyntheticSuggestions=!
1,this.PanelCanResize=!t.config.forceSettingsAppExperience):i.isCenterScreen?
(this.PreviewPaneAvailable=!0,this.MiniSERPMode=r(),this.QfMode=2,this.AlwaysWide=!
0,this.SearchBoxOnTop=!0,this.AllowKeyboardNavCycling=!
0,this.AllowKeyboardNavOffCanvas=!
1,this.ScopesAvailable=t.config.scopesOrderBeginAlwaysWide.length>0,this.FlatListWi
thoutGroups=!1,this.MaxSuggestionsWhenFlatList=0,this.SearchHomeAvailable=!
t.config.startMenuInWSB&&t.config.searchHomeSupported,this.FirstSuggestionSelectedB
yDefault=!0,this.PanelCanResize=!1,this.AllowProtocolSyntheticSuggestions=!
0):i.hostingEnvironment==5||t.config.forceSantoriniExperience?
(this.PreviewPaneAvailable=!1,this.MiniSERPMode=0,this.QfMode=8,this.AlwaysWide=!
1,this.SearchBoxOnTop=!0,this.AllowKeyboardNavCycling=!
0,this.AllowKeyboardNavOffCanvas=!1,this.ScopesAvailable=!
1,this.FlatListWithoutGroups=!
1,this.MaxSuggestionsWhenFlatList=0,this.SearchHomeAvailable=!
t.config.startMenuInWSB&&t.config.searchHomeSupported,this.FirstSuggestionSelectedB
yDefault=!0,this.PanelCanResize=!1,this.AllowProtocolSyntheticSuggestions=!0):(f||
t.config.alwaysWideBeforeRS5)&&!e?(this.PreviewPaneAvailable=!
0,this.MiniSERPMode=r(),this.QfMode=i.hostingEnvironment==4?6:1,this.AlwaysWide=!
0,this.SearchBoxOnTop=!1,this.AllowKeyboardNavCycling=!
0,this.AllowKeyboardNavOffCanvas=!1,this.ScopesAvailable=this.QfMode!
=6&&t.config.scopesOrderBeginAlwaysWide.length>0,this.FlatListWithoutGroups=!
1,this.MaxSuggestionsWhenFlatList=0,this.SearchHomeAvailable=!
t.config.startMenuInWSB&&t.config.searchHomeSupported,this.FirstSuggestionSelectedB
yDefault=!0,this.PanelCanResize=!1,this.AllowProtocolSyntheticSuggestions=!0):
(this.PreviewPaneAvailable=t.PreviewPane&&!f&&u!==!
1,this.MiniSERPMode=this.PreviewPaneAvailable?
r():0,this.QfMode=i.hostingEnvironment==4?6:this.PreviewPaneAvailable?
0:4,this.AlwaysWide=!1,this.SearchBoxOnTop=!1,this.AllowKeyboardNavCycling=!
0,this.AllowKeyboardNavOffCanvas=!1,this.ScopesAvailable=this.QfMode!
=6&&t.config.scopesOrderBegin.length>0,this.FlatListWithoutGroups=!
1,this.MaxSuggestionsWhenFlatList=0,this.SearchHomeAvailable=!
t.config.startMenuInWSB&&t.config.searchHomeSupported,this.FirstSuggestionSelectedB
yDefault=!0,this.PanelCanResize=!1,this.AllowProtocolSyntheticSuggestions=!0)},n}
();t.RuntimeConfig=new u;n.RuntimeConfig=t.RuntimeConfig;t.getConfigForUT=f})
(t=n.WSB||(n.WSB={}))})(AutoSuggest||(AutoSuggest={})),function(n){var t;
(function(n){var t,i,r,u,f,e;(function(n){n.User="SRCHHPGUSR"})(t=n.CookieNames||
(n.CookieNames={})),function(n){n.AutoSuggest="AS"}(i=n.CrumbNames||
(n.CrumbNames={})),function(n)
{n.CursorPosition="cp";n.ConversationId="cvid";n.SuggestionCount="sc";n.PartialQuer
y="pq";n.SuggestionPosition="sp";n.SuggestionType="qs";n.PreviewPaneSuggestionType=
"qsc";n.SkipValue="sk";n.PreviewPaneSkipValue="skc";n.Ghosting="ghc";n.Css="css";n.
Count="count";n.DataSet="ds";n.SessionId="sid";n.TimeStamp="qt";n.Query="q";n.Impre
ssionGuid="ig";n.QFQuery="qry";n.BaseQuery="bq";n.FormCode="form";n.HashedMuid="ncl
id";n.RequestElToken="elvr";n.ElTokenValue="elv";n.AppId="appid";n.History="history
";n.NoHistory="nohs";n.ApiTextDecoration="textdecorations";n.ClientId="clientid";n.
Market="mkt";n.Scope="scope";n.CountryCode="cc";n.HomeGeographicRegion="hgr";n.SetL
ang="setlang";n.ZeroInputSerp="zis"}(r=n.QueryParams||
(n.QueryParams={})),function(n){n.ImpressionGuid="X-MSEdge-IG"}(u=n.Headers||
(n.Headers={})),function(n)
{n.HitHighlighting="h";n.PopularNow="p";n.Local="l";n.Answers="a"}(f=n.Options||
(n.Options={})),function(n)
{n.Id="id";n.Query="query";n.Url="url";n.Navigation="nav";n.Type="stype";n.Autocomp
lete="hc";n.InstData="h";n.AriaLabel="aria-label"}(e=n.SuggestionAttributes||
(n.SuggestionAttributes={}))})(t=n.Service||(n.Service={}))}(AutoSuggest||
(AutoSuggest={})),function(n){function gt(t,i){if(i){var r=d.exec(t);return
r&&n.TopLevelDomains[r[1].toLowerCase()]==1}return d.test(t)}function ni(n){return
bt.test(n)}function ti(t){for(var i,u=t.substr(1).split("%").map(function(n){return
parseInt(n,16)}),r=0;r<u.length;++r)if((i=[u[r],u[r+1]||0,u[r+2]||0,u[r+3]||
0],i[0]>=240&&++r&&i[3]<128)||i[0]>=224&&++r&&i[2]<128||i[0]>=192&&++r&&i[1]<128||
i[0]<192&&i[0]>=128||i[0]<32||n.contains(nt,i[0]))return!1;return!0}function ii(n)
{return n.replace(/%25/g,"%2525").replace(/%([^0-9a-fA-F])/g,"%25$1").replace(/%
([^0-9a-fA-F])/g,"%25$1").replace(/%(.[^0-9a-fA-F])/g,"%25$1").replace(/%(.[^0-9a-
fA-F])/g,"%25$1").replace(/%(.)?$/g,"%25$1").match(/[^%]+|(?:
%..)*/g).map(function(n){return
n.startsWith("%")&&!ti(n)?n.replace(/%/g,"%25"):n}).join("")}function s(t){var
i=t;return t.includes("%")&&(t=n.safeExecute(function(){return
ii(t)},"sanitizeUrlEncodings",i,i)),n.safeExecute(function(){return
decodeURI(t)},"safeDecodeURI",i,i)}function u(n,t){var r,u,i;if(!n)return
null;if(n=n.trim(),n.includes("%")&&h(n))if(n.includes("?")){var e=/([^?]*)
(.*)/.exec(n),f=e[1],o=e[2];f=s(f);n=f+o}else n=s(n);return(r=yt.exec(n),!r)?null:
(u=r[0].length,t&&u<n.length)?null:
(i={length:u,type:0,protocol:r[1]||"",auth:r[2]||"",hostname:r[3]||"",port:r[4]||""
,path:r[5]||"",parameters:r[6]||"",unparsedSegment:n.substr(u)},i.auth&&!
i.auth.includes(":")&&!i.protocol&&!i.port&&!i.path&&!i.parameters)?
null:i.protocol||i.path&&i.path.endsWith("/")?i:pt.test(i.hostname)||
gt(i.hostname,t)||y.test(i.hostname)||w.test(i.hostname)?i:(i.type=i.path&&!
ni(i.path)?1:2,i)}function ri(n,t){var r=new RegExp("[?&]{1}"+t+"=([^&]+)([\\/\\\\]
[^?#]*)?([?#].*)?"),i=n.match(r);return i?i[1]:null}function oi(n){return
fi.some(function(t){return n.startsWith(t)})||ui.test(n)||
n.toLocaleLowerCase().includes(ei)}function si(n,t,i){var e=0,o=0,s=0,r;
(t.startsWith("read:")||t.startsWith("ftp:"))&&(t=t.replace(f,""));r=u(t,!
0);r&&r.type==0&&(e=hi(i,r),o=ci(i,t,r),s=li(i,r));n.protocolMatchLength=e;n.domain
MatchLength=o;n.pathMatchLength=s}function hi(n,t){var i=f.exec(n),r=i?
i[1]:n.trim();return t.protocol.startsWith(r)?r.length:0}function ci(t,i,r){var
u,f,o,e,s;return y.test(r.hostname)||w.test(r.hostname)?r.hostname.startsWith(t)||
i.startsWith(t)?t.length:0:(u=r.hostname.split("."),u.length==1?
f=HitHighlightingParser.addMarkers(u[0],t):
(u=u.length>2&&n.SecondLevelDomains[u[u.length-2]]?u.splice(0,u.length-
2):u.splice(0,u.length-
1),o=u.join("."),f=HitHighlightingParser.addMarkers(o,t)),e=f.indexOf(HitHighlighti
ngParser.startMarker),e==-1)?0:t.includes(".")?
(t.endsWith("/")&&(t=t.substr(0,t.length-1)),r.hostname.includes(t)?t.length:0):
(s=f.indexOf(HitHighlightingParser.endMarker),s-e-1)}function li(n,t){var
i,r,u;return t.path?
(i=HitHighlightingParser.addMarkers(t.path,n),r=i.indexOf(HitHighlightingParser.sta
rtMarker),r==-1)?0:(u=i.indexOf(HitHighlightingParser.endMarker),u-r-1):0}function
ai(n){return n=it(n,!1),wt.test(n)}function tt(n){return f.test(n)}function vi(n)
{return l.test(n)}function h(n){return at.test(n)}function yi(n){return tt(n)&&!
h(n)}function pi(n){var t;return t=typeof n=="string"?n:c(n,!
0),t=bi(t),t.trim().replace(/^ht+p(s)?[:;]+[\\\/]*|^\/*/ig,function(n,t){return
t?"https://":"http://"})}function it(n,t){return t?n.includes("/")||
(n=n.replace(/\\/g,"/")):n.startsWith("//")||n.includes("\\")||
(n=n.replace(/\//g,"\\")),n}function wi(n){return n=it(n,!0).replace(/\/+/g,"/"),
(n.startsWith("/")?"file:/":"file:///")+n}function bi(n){if(!n||!
n.includes("\\"))return n;var i=n.includes("?")?
n.indexOf("?"):n.length,r=n.includes("#")?
n.indexOf("#"):n.length,t=Math.min(i,r),u=n.substring(0,t),f=n.substr(t);return
u.replace(/\\/g,"/")+f}function c(n,t){var i=n.protocol?n.protocol:"";return i+=!
t&&n.auth?n.auth:"",i+=n.hostname,i+=n.port?n.port:"",i+=n.path?
n.path:"",i+=n.parameters?n.parameters:"",i+(n.unparsedSegment?
n.unparsedSegment:"")}function i(n,t){var i=n,r,f,e;return
t&1&&(r=rt.exec(i),r&&(i=r[1])),t&2&&(r=ut.exec(i),r&&(i=r[1])),t&4&&(r=ft.exec(i),
r&&(i=r[1])),t&8&&(r=l.exec(i),r&&(i=r[1])),t&16&&(r=ki.exec(i),r&&(i=r[1])),t&32&&
(f=u(i,!
1),f&&(f.protocol=f.protocol.toLocaleLowerCase(),f.hostname=f.hostname.toLocaleLowe
rCase(),e=c(f),i=i.replace(/^(\s*)(?:[^\s]*)(\s*)
$/g,"$1"+e+"$2"))),t&64&&(i=s(i)),i}function di(n){return l.test(n)}function e(n)
{return ut.test(n)?1:rt.test(n)?2:ft.test(n)?3:0}function gi(n,t,r){var
f,u,o,s,e;return t?t=="/"?n:(f=i(t,7),f!=t)?n:(u=i(n,r?7:6),!u)?n:
(o=t.toLowerCase(),"https".startsWith(o)&&!u.startsWith(t))?n:(s=i(f,8),s!=f)?u:
(e=i(u,8),!e)?u:"www".startsWith(o)&&!e.startsWith(t)?u:e:i(n,r?15:14)||n}function
nr(n,t){var i=e(t);switch(e(n)){case 1:return i!=2;case 2:return i!=1;case
3:case 0:return!0}}function tr(t,r,u){if(i(r,127)!=i(u,127))return!1;var
f=e(t.originalQuery);return n.contains([1,2],f)&&!nr(r,u)?!1:!0}function ot(n){var
t=u(n,!0),i;return t?(i=st(t),i?t.path.toLocaleLowerCase():null):null}function
st(n){var t=n.hostname.split(".");return n.hostname&&t.length>1?t[t.length-
1]=="com"&&et.some(function(n){return t[t.length-2]==n}):!0}function ir(t)
{if(t=="https://www.bing.com/?form=EDGSTP&pc=MESP"||t=="https://www.bing.com/?
form=EDGSTP&pc=MESPB")return!0;var i=ot(t);return!!
i&&n.contains(n.WebSearchPaths,i)}function rr(n){var
t=u(n.replace(/^ftp:/g,"http:"),!0);return(t?t.hostname:null)||""}function ur(t)
{var r=t.queryToFetch.toLocaleLowerCase(),f,u;return r?
(f=["/","ht","htt","http","https","ww","www"],u=i(r,15),!u||n.contains(f,r)||u!
=r&&"www".startsWith(i(r,7))):!1}function fr(n){var t,i;return lt.test(n)||
f.test(n)?!0:(t=n.replace(kt,"/"),dt.test(t)?
t=t.replace(g,"."):t.includes(".")&&(t=t.replace(g,"")),i=u(t,!
0),i&&i.type==0)}function er(t,i,r,u){var e,f;if(!t||!i||!
r)return"";e=encodeURIComponent(i);f={triggeringMode:"Explicit",intent:r};u&&(f.ent
ityId=u);var
s=JSON.stringify(f),h=encodeURIComponent(s),o=n.formatString(t.bfbSearchUrl,
[e,h,t.bfbfrmcde]);return _G&&_G.IG?o+"&cvid="+encodeURIComponent(_G.IG):o}var
r="\\-\\s\\[\\]\\/\\\\!@#$%^&*()+={}:;~`\"'|<,>.。?",ht="(?:[^"+r+"]-*)*[^"+r+"]
(?:-*[^"+r+"])*",a="(?:[^"+r+"]-*)*[^"+r+"0-9](?:-*[^"+r+"])*",ct="(?:
(?:"+ht+"[.。])*"+a+")[.。]?",v="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-
9])",o="(?:(?:"+v+"\\.){3}"+v+")",y=new RegExp("^"+o+"$"),t="(?:[0-9a-fA-F]
{1,4})",p="(?::(?:(?::"+t+"){1,7}|:)|(?:"+t+":){1,7}:|(?:"+t+":){7}"+t+"|(?:"+t+":)
{1,6}(?::"+t+"){1}|(?:"+t+":){1,5}(?::"+t+"){2}|(?:"+t+":){1,4}(?::"+t+"){3}|
(?:"+t+":){1,3}(?::"+t+"){4}|(?:"+t+":){1,2}(?::"+t+"){5}|(?:"+t+":){1,1}(?::"+t+")
{6}|fe80:(?::"+t+"){0,4}%[0-9]+|::ffff:"+o+"|)",w=new RegExp("^\\["+p+"\\]
$","i"),b="ht+ps?[:;]+[\\\\/]*",lt=new RegExp(b,"i"),k=b+"|/+",at=new
RegExp("^("+k+")","i"),vt=ct+"|"+o+"|\\["+p+"\\]",yt=new RegExp("^("+k+")?
([^/@#?]*@)?("+vt+")(:(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-
5][0-9]{1,4}|[1-9][0-9]{0,3}))?([\\/\\\\][^?#]*)?([?
#].*)?","i"),pt=/^localhost[.。]?$/,d=new RegExp("[.。]("+a+")
[.。]?$","i"),wt=/((^[\\]{2}).+)|(^[a-z]:\\.*)/i,f=/^([a-z0-9\-]
+):/i,bt=/\s/,g=/\s+/g,kt=/\s+\/(?!\/)/g,dt=/([^\/]|^)\/
(?!\/)/,nt,et;n.WebSearchPaths=["/search","/entityexplore"];nt=[33,39,40,41,42,91,9
3];n.tryParseUrl=u;n.getQueryStringParam=ri;var
ui=/file:\/\/\/[^:\/]+:\/[^\/]+\/[^\/]+\/AppData\//i,fi=["ms-appx:","ms-appx-
web:","ms-browser-
extension:",],ei="microsoft.microsoftedge_8wekyb3d8bbwe";n.isJunkUrl=oi;n.computeUr
lMatchLengths=si;n.isUncOrLocalPath=ai;n.startsWithProtocol=tt;n.startsWithWww=vi;n
.isHttpProtocol=h;n.isNonHttpProtocol=yi;n.cleanAndFixUrlProtocol=pi;n.cleanAndFixU
ncOrLocalPath=wi;n.parsedUrlToString=c;var
rt=/^ht+ps:\/*(.*)/i,ut=/^ht+p:\/*(.*)/i,ft=/^\/{2,}(.*)/,l=/^www\.
(.*)/i,ki=/^(.*[^:\/])\/+
$/;n.normalizeUrl=i;n.hasWww=di;n.getProtocol=e;n.prettyPrintUrl=gi;n.isDuplicateUr
l=tr;et=["bing","staging-bing-int","working-bing-int","bing-int","bing-
exp"];n.tryGetBingPathLC=ot;n.isBingHost=st;n.isBingSearchUrl=ir;n.getDomain=rr;n.i
sEmptyUrlPrefix=ur;n.queryLooksLikeUrl=fr;n.buildBfbSearchUrl=er}(AutoSuggest||
(AutoSuggest={})),function(n){var t,i;(function(n){function t(t,i,r,u,f,e){var
o={T:n.QFPERFPING_EVENT_NAME,ST:r,CVID:u,OFFSETS:i,STATE:f,V:n.QFPERFPING_VERSION,R
FC:e};return{ImpressionGuid:t,EventType:n.CLIENTINST_EVENT_TYPE,Data:o}}n.CLIENTINS
T_EVENT_TYPE="ClientInst";n.QFPERFPING_EVENT_NAME="QFPerfPing";n.CLICK_EVENT_TYPE="
Click";n.QFPERFPING_VERSION="2";n.QFPERFPING_INVALID_MEASURE=-
2;n.INVALID_SEQUENCE_NUMBER=-
2;n.KVALUE_SUGGESTIONS_START=1e3;n.KVALUE_SUFFIX_START=1;n.KVALUE_NON_SUGGESTIONS_S
TART=100;n.DEFAULT_APP_NAMESPACE="SmartSearch";n.DEFAULT_SERVICE_NAME="AutoSuggest"
;n.createPerfPingEvent=t})(t=n.InstrumentationCommon||
(n.InstrumentationCommon={}));i=function(){function n(n,t,i)
{this._kValue=n;this._qsCode=t;this._handOffType=i}return
n.createInstrumentedItem=function(t,i){return new
n(n.generateKValue(t),i)},n.createInstrumentedItemNoHandoff=function(t,i){return
new
n(n.generateKValue(t),i,999)},n.getNonSuggestionInstrumentedItem=function(t,i,r)
{return new n(i[t],t,r)},n.prototype.getKValue=function(){return
this._kValue},n.prototype.getAppNS=function(){return
n.AppNS},n.prototype.getLayoutKValue=function(){return
this._kValue+"."+n.Suffix},n.prototype.getHValue=function()
{return"ID="+n.AppNS+","+this.getLayoutKValue()},n.prototype.getHandoffType=functio
n(){return this._handOffType},n.prototype.getQsCode=function(){return
this._qsCode},n.resetKValues=function(n){delete
this._keystrokesKValues[n]},n.generateKValue=function(n){var
r=n,i=this._keystrokesKValues[r];return i>0||
(i=t.KVALUE_SUGGESTIONS_START),this._keystrokesKValues[r]=+
+i,i},n.AppNS=t.DEFAULT_APP_NAMESPACE,n.Suffix=t.KVALUE_SUFFIX_START,n._keystrokesK
Values={},n}();n.InstrumentedItem=i}(AutoSuggest||(AutoSuggest={})),function(n)
{function pt(){return matchMedia("screen and (-ms-high-contrast)").matches}function
wt(){return navigator.onLine}function bt(n){return!n.isAnswer&&(n.handoffType==0||
n.handoffType==11)}function v(n){return n?n.replace(st,"$1").replace(ht,"$1
"):n}function kt(n){return n?n.replace(/[-{}]/g,"").toLowerCase():null}function
dt(n){return!n||Object.keys(n).length===0}function gt(n){return n.canFail}function
y(n,t,i,r){var u,e;n&&(n=n.slice(0,t)
+f+n.slice(t,n.length));u=i(n);u&&(e=u.indexOf(f),t=e!=-1?
e:t,u=u.replace(f,""));r(u,t)}function ni(n){if(!n)return
SharedLogHelper.LogError("getInputType",null,new Error("event object is
missing")),0;switch(n.pointerType){case"mouse":return 2;case"touch":return
3;case"pen":return 4;default:return 1}}function o(n){for(var
i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];i.forEach(function(t){return
delete n.enabledDataSources[t]})}function ti(i){return
i&&n.config.bingFetchEnabledRegionsList&&n.config.bingFetchEnabledRegionsList.lengt
h>0&&!t(n.config.bingFetchEnabledRegionsList,i.toLowerCase())}function ii(i){return
i&&n.config.miniSerpEnabledRegionsList&&n.config.miniSerpEnabledRegionsList.length>
0&&!t(n.config.miniSerpEnabledRegionsList,i.toLowerCase())}function ri(t){var
i=t.queryToFetch&&t.queryToFetch.length<n.config.minQueryLengthForWebProvider;retur
n i&&(o(t,n.WebDataSource),o(t,n.WebRankingSignalDataSource)),i}function p(t){if(t)
{t=n.normalizeUrl(t,15);for(var i=1;i<t.length-1;++i)if(lt.includes(t[i]))return!
0}return!1}function ui(t,i,r){var u,f;return r||(r=0),y(t,i,function(n){return
v(n)},function(n,t)
{u=n;f=t}),u&&(n.config&&n.config.doNotRemoveSpaceAfterIn&&u.toLocaleLowerCase().en
dsWith(" in ")||(u=u.trim()),f=Math.min(f,u.length)),
{originalQuery:t,originalCursorPosition:i,queryToFetch:u,cursorPosition:f,enabledDa
taSources:{},equals:function(n){return(u?u.toLowerCase():u)==(n.queryToFetch?
n.queryToFetch.toLowerCase():n.queryToFetch)&&r==n.topHitRestriction},isMultiWord:p
(u),getCacheKey:function(){return u},topHitRestriction:r}}function w(i,r){return
r&&!r.enabledDataSources[i]?!1:t(n.config.enabledDataSources,i)}function b(i,r,u,f)
{var e=f.enabledDataSources[i];return e?e.suggestionIsEnabled&&!
e.suggestionIsEnabled(r,u)?!1:t(n.config.enabledDataSources,i):!1}function t(n,t)
{return n.indexOf(t)!=-1}function fi(n,t){var i=n.indexOf(t);return i!=-1?
(n.splice(i,1),!0):!1}function ei(n,t){var i=n.findIndex(t);return i!=-1?
n.splice(i,1)[0]:null}function oi(n,t,i){if(t<100)for(var r=n.length-
1;n.length>t&&r>=0;--r)i(n[r])&&n.splice(r,1)}function si(n,i){return
n.filter(function(n){return!t(i,n)})}function hi(n,t){if(n.length!=t.length)return!
1;for(var i=0;i<n.length;++i)if(n[i]!=t[i])return!1;return!0}function ci(n,t)
{if(n===t)return!0;if(!n||!t||Object.keys(n).length!=Object.keys(t).length)return!
1;for(var i in n)if(n[i]!=t[i])return!1;return!0}function k(){return
n.getCurrentDate().getTime()}function r(n){var
t=Math.abs(Math.floor(n));return(t<10?"0":"")+t}function li(){var
t=n.getCurrentDate(),i=-t.getTimezoneOffset(),u=i>=0?"+":"-";return t.getFullYear()
+"-"+r(t.getMonth()+1)+"-"+r(t.getDate())+"T"+r(t.getHours())+":"+r(t.getMinutes())
+":"+r(t.getSeconds())+"."+r(t.getMilliseconds())+u+r(i/60)+":"+r(i%60)}function
ai(n,t){return n?n.replace(ct,function(n,i){return t[i]}):n}function vi(n){var t=n?
n.number:null,i=n?n.name:null;return t==-2147023673||i=="Canceled"}function
u(n,t,i,r,u,f){try{return n()}catch(e){return f||
SharedLogHelper.LogError(t,r,e),u&&u(e),i}}function s(n,t,i,r,f,e){return
sb_st(function(){return u(n,i,null,r,f,e)},t)}function yi(n){for(var
i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];u(function(){return
sj_evt.fire.apply(sj_evt,[n].concat(i))},n)}function pi(n,t){s(t,1,n)}function
h(n,t){var i=[],r=!0,u=function(){for(var u=[],n=0;n<arguments.length;n+
+)u[n]=arguments[n];r?i.push(u):t.apply(null,u)};n(u);r=!1;i.forEach(function(n)
{return t.apply(null,n)})}function wi(n,t){return c=n,e=c&&it()!="ms-appx-
web:",l=e&&!ti(t),d=e&&!ii(t),l}function bi(n){return n?l:e}function ki(){return
c}function di(){return d}function tr(n){return t(gi,n)}function ir(n){return
t(tt,n)}function rr(n){return t(g,n)}function ur(n){return t(nt,n)}function fr(n)
{return t(nr,n)}function er(n,t){return n==121&&t||n==93}function or(n,t){return
n==8||n==46||n==88&&t.ctrlKey}function it(){return _w.location.protocol}function
sr(){return _w.location.host}function hr(){var n=_d.activeElement;return!n||
n.id.endsWith("sb_form_q")?_d.body:n}function rt(t){return t&&+t!
=n.WindowsApiDefaultDate&&!isNaN(t.getTime())&&t.getFullYear()!=1600}function ut(n)
{if(!rt(n))return null;var t=n.getTime(),i=k();return Math.abs(i-t)/yt}function
cr(n){var t=ut(n);return t!==null&&t>14}function lr(n){return n==="i"?13:n==="v"?
14:0}function ar(n){return
encodeURIComponent(n).replace(/[!'()*]/g,escape).replace(/%20/g,"+")}var
f=String.fromCharCode(57346),st=new RegExp("^\\s*("+f+")?\\s*"),ht=new
RegExp("\\s*("+f+")?\\s+","g"),ct=/{([0-9]+)}/g,lt=" -_/\\",at=-2147215328,vt=-
2147023673,yt=864e5,i,a,ft,et,ot;n.DebugSourceName="AutoSuggest";SharedLogHelper.Re
gisterErrorFilter(function(n){var t=n?n.number:null,i=n?n.name:null;return t===vt||
t===at||
i==="Canceled"});n.isHighContrastEnabled=pt;n.isBrowserOnline=wt;n.isWebSuggestion=
bt;n.cleanQuery=v;n.cleanGuid=kt;n.isEmpty=dt;n.canIconFail=gt;n.mantainCursorPosit
ionIn=y;n.getInputType=ni;n.disableDataSources=o;n.disableWebDataSourceIfNeeded=ri;
n.isMultiWord=p;n.parseQuery=ui;n.isDataSourceEnabled=w;n.isSuggestionTypeEnabled=b
;n.contains=t;n.tryRemove=fi;n.removeFirstWhere=ei;n.trimList=oi;n.except=si;n.sequ
enceEqual=hi;n.objEquals=ci;n.log=function(){};n.getCurrentDate=function(){return
new Date};_w.ClientTestHooks&&(n.log=function(n,t){return
ClientTestHooks.ClientLog("-
"+n,t)},i=ClientTestHooks.getUrlValue("currentdate",null),i&&(i.includes("-")||
i.length!=8||
(i=i.substr(0,4)+"-"+i.substr(4,2)+"-"+i.substr(6,2)),n.getCurrentDate=function()
{return new
Date(i)}));n.getCurrentTime=k;n.getDateWithTimezone=li;n.fetchWrapper=function(n,t,
i){return
i()};n.formatString=ai;n.isCancellation=vi;n.safeExecute=u;n.safeSetTimeout=s;n.saf
eFireEvent=yi;n.invokeAsynchronously=pi;n.ensureCallbackIsAsync=h;n.WebDataSource="
Web";n.WebRankingSignalDataSource="WRS";n.MRUDataSource="MRU";var c=!0,e=!0,l=!
0,d=!
0;n.refreshBingEnabledCache=wi;n.isBingEnabled=bi;n.isBingEnabledByClient=ki;n.isMi
niSerpEnabled=di;var
gi=[3,16,17,18,19,20,144,145,],g=[38,203,211,],nt=[40,204,212,],tt=g.concat(nt),nr=
tt.concat(37,39,36,35);n.isFunctionalKey=tr;n.isUpOrDownKey=ir;n.isUpKey=rr;n.isDow
nKey=ur;n.isMovingCursorKey=fr;n.isContextMenuKey=er;n.isDeletionKey=or;n.getWindow
Protocol=it;n.getWindowHost=sr;n.getCurrentActiveElement=hr;n.WindowsApiDefaultDate
=-
116444736e5;n.isValidDate=rt;n.getTimeDiffInDays=ut;n.olderThan2Weeks=cr;n.vertical
ToHandoffType=lr;a=function(){function n()
{this._cancellations={};this._lastId=0}return n.prototype.register=function(n,t,i)
{var r=++this._lastId;return
this._cancellations[r]={action:n,skipOnDismissAndLaunch:t,where:i},r},n.prototype.u
nregister=function(n){delete
this._cancellations[n]},n.prototype.cancelAll=function(n){var t=function(t){var
r=i._cancellations[t];r.skipOnDismissAndLaunch&&n||u(function(){return
r.action()},r.where)},i=this;for(var r in
this._cancellations)t(r);this._cancellations={}},n}
();n.CancellationManager=a;ft=function(){function n(){}return
n.prototype.getItem=function(n){try{return _w.localStorage?
_w.localStorage.getItem(n):undefined}catch(t){return
SharedLogHelper.LogError("localStorage",t,new
Error("getItem")),undefined}},n.prototype.setItem=function(n,t)
{try{_w.localStorage&&_w.localStorage.setItem(n,t)}catch(i)
{SharedLogHelper.LogError("localStorage",i,new
Error("setItem"))}},n.prototype.removeItem=function(n){try{return
_w.localStorage.removeItem(n)}catch(t)
{SharedLogHelper.LogError("localStorage",t,new Error("removeItem"))}},n}
();n.LightweightStorage=ft;et=function(){function n(){this._sequenceNumber=0}return
n.prototype.getSequenceNumber=function(){return
this._sequenceNumber},n.prototype.incrementSequenceNumber=function()
{this._sequenceNumber++},n}();n.SequenceNumberManager=et;ot=function(){function
t(t,i,r,u,f,e,o,s,h,c){var
l=this;this._host=t;this._suggestionsParsers=i;this._rootViewModel=r;this._suggesti
onsRenderingManager=u;this._webProviders=f;this._otherProviders=e;this._instrumenta
tionHelper=o;this._ariaLogger=s;this._sequenceNumberManager=h;this._latencyInstrume
ntation=c;n.config.cancellationEnabled&&(this._cancellationManager=new
a);t.bindShown(function()
{l._lastQuery=null;l._currentQuery=null;l._isPaneDismissed=!
1});t.bindDismissed(function(){l.clearFetchTimer();l.finishPreviousQuery(!
0);l.finalizeKeystroke(!0);l._isPaneDismissed=!
0;l._rootViewModel.onDismiss()});t.bindQueryChangedOrInitialized(function(t,i)
{return l.onQueryChanged(t,n.config.d,i)});t.bindOnSubmit(function(n,t,i){return
l.onSubmit(n,t,i)});t.initializeEvents();sj_be(_d.body,"dragstart",function(n)
{return n.preventDefault(),n.stopPropagation(),!
1});sj_b.addEventListener("click",function(n){n.shiftKey&&sj_pd(n)})}return
t.prototype.clearFetchTimer=function()
{this._fetchTimer&&(sb_ct(this._fetchTimer),this._fetchTimer=null)},t.prototype.fin
ishPreviousQuery=function(n)
{this.cancelPreviousQuery(n);this._suggestionsRenderingManager.resetTimers()},t.pro
totype.finalizeKeystroke=function(n){var
t=this._sequenceNumberManager.getSequenceNumber();t>0&&this._instrumentationHelper.
finalizeKeystrokeLog(t);n||
this._sequenceNumberManager.incrementSequenceNumber()},t.prototype.onQueryChanged=f
unction(n,t,i){var
r=this,u;this.clearFetchTimer();this._currentQuery=n;this._lastQuery&&(!
this._lastQuery.equals(this._currentQuery)||i)&&this.cancelPreviousQuery(!1);t<=0?
this.fetchForQueryChange(0,!1,i):(u=Date.now(),this._fetchTimer=s(function()
{r._fetchTimer=null;r.fetchForQueryChange(Date.now()-u,!
1,i)},t,"fetchTimer"))},t.prototype.onSubmit=function(n,t,i)
{this._fetchTimer&&(this._currentQuery||
(this._currentQuery=this._host.getQuery()),this.fetchForQueryChange(0,!0,!
1));this._rootViewModel.submit(n,t,this._sequenceNumberManager.getSequenceNumber(),
i,this._isPaneDismissed)},t.prototype.cancelPreviousQuery=function(n)
{this._cancellationManager&&this._cancellationManager.cancelAll(n)},t.prototype.fet
chForQueryChange=function(t,i,r){var
u=this,e,f,s;if(this.clearFetchTimer(),this._lastQuery&&this._lastQuery.equals(this
._currentQuery)&&!
r)this._rootViewModel.onQueryChanged(this._currentQuery,this._sequenceNumberManager
.getSequenceNumber());else if(e=this._host.getQuery(),e.equals(this._currentQuery))
{if(this.finishPreviousQuery(i),this.finalizeKeystroke(!
1),this._lastQuery=this._currentQuery,f=this._sequenceNumberManager.getSequenceNumb
er(),this._instrumentationHelper.instrumentBeginRequest(f,this._currentQuery,t),s=!
n.config.enabledDataSources.some(function(n){return
w(n,u._currentQuery)}),s)this._rootViewModel.onQueryChanged(this._currentQuery,f);i
f(this._suggestionsRenderingManager.initiateSequenceNumber(f,this._currentQuery),!
s){var o=function(){return!u._isPaneDismissed&&(n.config.d>0?
e.equals(u._currentQuery):f==u._sequenceNumberManager.getSequenceNumber())},c=(new
Date).getTime(),l=function(n,t,i,r,s,h){return
u.onResponseReceived(e,f,n,t,i,o,r,s,c,h)},a=function(t)
{n.fetchWrapper(e,o,function(){u._webProviders.forEach(function(n)
{u.fetchWeb(e,n,f,t,o)});u._otherProviders.forEach(function(n)
{u.fetch(e,n,f,t,o)})});u._rootViewModel.onQueryChanged(u._currentQuery,f)};h(a,l)}
}},t.prototype.fetchWeb=function(t,i,r,f,e){var
c=this,s=n.Service.QueryParams,o=this._host.getCustomUrlParameters(t),h;this._host.
shouldRequestEltoken()&&(o[s.RequestElToken]="1");o[s.CursorPosition]=t.cursorPosit
ion.toString();o[s.ConversationId]=this._host.getConversationId();o[s.ImpressionGui
d]=this._instrumentationHelper.getImpressionGuid(r);h=this._host.getCustomHeaders(t
);u(function(){return i.fetch(t,f,r,c._cancellationManager,e,o,h)},"fetch
"+i.getName())},t.prototype.fetch=function(n,t,i,r,f){var e=this;u(function()
{return t.fetch(n,r,i,e._cancellationManager,f)},"fetch
"+t.getName())},t.prototype.onResponseReceived=function(t,i,r,u,f,e,o,s,c,l){var
a=this,v=n.getCurrentDate().getTime()-
c,y,p;n.config.enableNetworkLatencyMeasurements&&o==0&&this._latencyInstrumentation
&&this._latencyInstrumentation.logDataSourceRequestLatency(r,v);this._ariaLogger&&t
his._ariaLogger.logDataProviderLatency(r,v);e()&&(this._instrumentationHelper.instr
umentResponseReceived(i,r,f,o,s),y=function(n,r,u)
{if(e())a.onSuggestionsParsed(t,i,n,f,r,u,l)},p=function(n){var
f=a._suggestionsParsers[r];f?f.parse(t,i,r,u,e,n,a._cancellationManager):
(SharedLogHelper.LogError("onResponseReceived",null,new Error("No parser for data
source "+r)),n(r,
[],null))},h(p,y))},t.prototype.onSuggestionsParsed=function(n,t,i,r,u,f,e)
{u=u.filter(function(t){return
b(i,t.type,t.handoffType,n)});this._instrumentationHelper.instrumentDataSource(t,i,
u,f);this._rootViewModel.onSuggestionsParsed(n,t,i,r,u,f);this._suggestionsRenderin
gManager.queueSuggestions(t,i,u,f,e)},t}();n.Core=ot;n.encodeQueryParameter=ar}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function dt(t)
{return n.contains(pt,t)}function gt(t){return n.contains(wt,t)}function ni(t)
{return n.contains(nt,t)}function ti(t){return n.contains(bt,t)}function ii(t)
{return n.contains(kt,t)}function u(n,i)
{return{dataSource:n,requirementLevel:function(){return h()?
1:3},conditionalRequirements:function(){if(!t.isCloudSearchEnabledCache)return!
1;var n=h()?t.getAccountTypeForCloudContent():t.isCortanaPersonalized?
t.cortanaAccountType:t.windowsAccountType;return n==2||n==4},suggestionIsEnabled:i?
function(n){return n==i}:undefined}}function h(){return
t.config.wamSupported&&n.isDataSourceEnabled("SSUE",null)}function ri(){return
t.config.wamSupported&&n.isDataSourceEnabled("BAW",null)}function tt(n){var i=!
t.config.userProfileButtonEnabled||t.windowsAccountType==n;switch(n){case 2:return
i&&t.isSubstrateOutlookAccountConnected;case 1:return
i&&t.isSubstrateO365AccountConnected;case 4:return
i&&t.isSubstrateO365AccountConnected&&t.isSubstrateOutlookAccountConnected;default:
return!1}}function ui(n){var
i=o.authenticationManager.getAllSearchWebAccountsAsync;return i?!
0:t.getAccountTypeForCloudContent()==n}function r(n,i,r,u){return u===void 0&&(u=!
0),{dataSource:n,requirementLevel:function(){return
0},conditionalRequirements:function(n){return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&u&&(r||
n&&n.queryToFetch&&n.queryToFetch.length>=t.config.minLengthFor3SonL1)&&ui(i)&&tt(i
)}}}function y(n){return{dataSource:"BAW",requirementLevel:function(){return
1},conditionalRequirements:function(i){var
r=t.getAccountTypeForCloudContent();return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&(n||
i&&i.queryToFetch&&i.queryToFetch.length>=t.config.bawminqlen)&&(r==1||
r==4)}}}function
p(n){return{dataSource:"MSBS",requirementLevel:function(){return
1},conditionalRequirements:function(i){var
r=t.getAccountTypeForCloudContent();return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&(n||
i&&i.queryToFetch&&i.queryToFetch.length>=t.config.bfbminqlens)&&(r==1||
r==4)}}}function w(n){return{dataSource:"MSBC",requirementLevel:function(){return
1},conditionalRequirements:function(i){var
r=t.getAccountTypeForCloudContent();return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&(n||
i&&i.queryToFetch&&i.queryToFetch.length>=t.config.bfbminqlenc)&&(r==1||
r==4)}}}function c(n){if(n===void 0&&(n=!0),!n||!t.isCloudSearchEnabledCache||!
h())return!1;var i=t.getAccountTypeForCloudContent();return i==3||i==0?!1:!
tt(i)}function it(){return
n.contains(t.config.enabledDataSources,"EBH")&&t.config.enableEdgeBrowsingHistory}f
unction l(){return{dataSource:"EBH",requiredCortanaCapabilities:function()
{return["BrowsingHistory"]},conditionalRequirements:function(t){return it()&&(!t||!
t.queryToFetch||n.normalizeUrl(t.queryToFetch,31).length>=3)}}}function rt(){return
t.windowsAccountType==4?!0:t.cortanaAccountType==3?
t.windowsAccountType==2:t.cortanaAccountType!=2?!
1:t.config.windowsAuthForOMA&&ht()!=1?!1:!0}function ut()
{return{dataSource:n.WebDataSource,requirementLevel:function(){return
1},conditionalRequirements:function(){return rt()}}}function fi()
{t.ScopeConfig[i.All].getEmptyZIMessages=function(r){return
f(r,i.All,t.config.useNewEmptyQueryMessages?"EmptyAllMessage":"EmptyScopeMessage",n
.isBingEnabled()?"EmptyAllSubMessage":"EmptyAllSubMessageNoWeb",et(r,!
0))};t.config.startMenuInWSB?
t.ScopeConfig[i.All].enabledDataSourcesForZeroInput=[{dataSource:"SM",conditionalRe
quirements:function(n){return
n&&t.shouldFetchStartMenu(n)}},]:t.RuntimeConfig.QfMode==6?
(t.ScopeConfig[i.All].icon={type:1,content:"&#xE721"},t.ScopeConfig[i.All].getEmpty
ZIMessages=function(n){return
f(n,i.Web,"EmptyLockscreenMessage","EmptyLockscreenSubMessage")}):t.RuntimeConfig.S
earchHomeAvailable==1&&t.RuntimeConfig.QfMode==8?
(t.ScopeConfig[i.All].icon=t.getSearchSuggestionIcon(),t.ScopeConfig[i.All].enabled
DataSourcesForZeroInput=[{dataSource:"AFC",groupType:t.GroupType.ActivityFeedSugges
tions,suggestionGroupToggler:v(t.GroupType.ActivityFeedSuggestions)},],t.ScopeConfi
g[i.All].staticGroupOrderForZeroInput=function()
{return[t.GroupType.ActivityFeedSuggestions,]},t.ScopeConfig[i.AppsSettings].enable
dDataSourcesForZeroInput=t.ScopeConfig[i.All].enabledDataSourcesForZeroInput,t.Scop
eConfig[i.AppsSettings].staticGroupOrderForZeroInput=t.ScopeConfig[i.All].staticGro
upOrderForZeroInput):t.RuntimeConfig.SearchHomeAvailable==1&&t.RuntimeConfig.QfMode
!=7?
(t.ScopeConfig[i.All].icon=t.getSearchSuggestionIcon(),t.ScopeConfig[i.All].enabled
DataSourcesForZeroInput=[{dataSource:"TOPP",groupType:t.GroupType.TopApps,suggestio
nGroupToggler:v(t.GroupType.TopApps)},
{dataSource:"AFC",groupType:t.GroupType.ActivityFeedSuggestions,suggestionGroupTogg
ler:v(t.GroupType.ActivityFeedSuggestions)},
{dataSource:"QSCH",groupType:t.GroupType.QuickSearch,suggestionGroupToggler:v(t.Gro
upType.QuickSearch)},],t.ScopeConfig[i.All].staticGroupOrderForZeroInput=function()
{return[t.GroupType.TopApps,t.GroupType.ActivityFeedSuggestions,t.GroupType.QuickSe
arch,]},t.ScopeConfig[i.AppsSettings].enabledDataSourcesForZeroInput=t.ScopeConfig[
i.All].enabledDataSourcesForZeroInput,t.ScopeConfig[i.AppsSettings].staticGroupOrde
rForZeroInput=t.ScopeConfig[i.All].staticGroupOrderForZeroInput):t.ScopeConfig[i.Al
l].enabledDataSourcesForZeroInput=[]}function ft()
{t.ScopeConfig={};t.ScopeConfig[i.All_FileExplorer]={icon:null,prefixesLocString:nu
ll,enabledDataSources:[{dataSource:"FEH"},{dataSource:"IFF"},
{dataSource:"MDOC",conditionalRequirements:function(){return
t.config.useL2ProvidersInFileExplorer}},
{dataSource:"MPHO",conditionalRequirements:function(){return
t.config.useL2ProvidersInFileExplorer}},
{dataSource:"MVID",conditionalRequirements:function(){return
t.config.useL2ProvidersInFileExplorer}},
{dataSource:"MODC",requirementLevel:function(){return
1},conditionalRequirements:function(){return
t.config.cloudSearchInFileExplorer&&(t.config.fileExplorerCloudInSpecialFolders&&t.
isFileExplorerCurrentPathThisPcOrQuickAccess||!!
o.fileExplorerSuggestionPage.currentSyncRootAccount)}},
{dataSource:"ODC",requirementLevel:function(){return
1},conditionalRequirements:function(){return
t.config.cloudSearchInFileExplorer&&(t.config.fileExplorerCloudInSpecialFolders&&t.
isFileExplorerCurrentPathThisPcOrQuickAccess||!!
o.fileExplorerSuggestionPage.currentSyncRootAccount)}},
{dataSource:"SSUE",requirementLevel:function(){return
0},conditionalRequirements:function(){return
t.config.cloudSearchInFileExplorer&&(t.config.fileExplorerCloudInSpecialFolders&&t.
isFileExplorerCurrentPathThisPcOrQuickAccess||!!
o.fileExplorerSuggestionPage.currentSyncRootAccount)}},
{dataSource:"SSEE",requirementLevel:function(){return
0},conditionalRequirements:function(){return
t.config.cloudSearchInFileExplorer&&(t.config.fileExplorerCloudInSpecialFolders&&t.
isFileExplorerCurrentPathThisPcOrQuickAccess||!!
o.fileExplorerSuggestionPage.currentSyncRootAccount)}},],enabledDataSourcesForZeroI
nput:
[{dataSource:"FEH"},],getEmptyZIMessages:null};t.ScopeConfig[i.All_Lockscreen]={ico
n:null,prefixesLocString:null,enabledDataSources:
[{dataSource:n.WebDataSource,requirementLevel:function(){return
1}},],enabledDataSourcesForZeroInput:
[{dataSource:"LSQS"}],getEmptyZIMessages:null};t.ScopeConfig[i.All_SettingsApp]={ic
on:null,prefixesLocString:null,enabledDataSources:[{dataSource:"ST"},
{dataSource:"MST"},],enabledDataSourcesForZeroInput:
[],getEmptyZIMessages:null};t.ScopeConfig[i.All]=t.config.lightAllScope?{icon:
{content:"&#xE782",type:2,needsAccentColor:!
0},prefixesLocString:"ScopeAll",enabledDataSources:[{dataSource:"PP"},
{dataSource:"ST"},{dataSource:"FL"},{dataSource:"LM"},{dataSource:"IFF"},
{dataSource:"LDIC"},{dataSource:"CG"},{dataSource:n.MRUDataSource},
{dataSource:"MPP"},{dataSource:"MST"},{dataSource:"MFF"},
{dataSource:n.WebDataSource,requirementLevel:function(){return 1}},
{dataSource:"OSTMA",requirementLevel:function(){return 1}},
{dataSource:"QS",requirementLevel:function(){return 1}},
{dataSource:"WRS",requirementLevel:function(){return 1}},r("SSUE",1,!
1),],enabledDataSourcesForZeroInput:[],getEmptyZIMessages:null}:{icon:
{content:"&#xE782",type:2,needsAccentColor:!
0},prefixesLocString:"ScopeAll",enabledDataSources:[{dataSource:"PP"},
{dataSource:"ST"},{dataSource:"FL"},{dataSource:"LM"},{dataSource:"IFF"},
{dataSource:"LDIC"},{dataSource:"CG"},{dataSource:"PBI",requirementLevel:function()
{return 2},conditionalRequirements:function(n){return
n&&n.queryToFetch&&n.queryToFetch.length>=6&&n.queryToFetch.trim().includes(" ")}},
{dataSource:n.MRUDataSource},{dataSource:"MPP"},{dataSource:"MST"},
{dataSource:"MFF"},{dataSource:n.WebDataSource,requirementLevel:function(){return
1}},{dataSource:"OSTMA",requirementLevel:function(){return 1}},
{dataSource:"QS",requirementLevel:function(){return 1}},l(),r("SSUE",1,!
1),r("SSUC",2,!1),y(!1),{dataSource:"WRS",requirementLevel:function(){return
1}},p(!1),w(!1)],enabledDataSourcesForZeroInput:
[],getEmptyZIMessages:null};t.ScopeConfig[i.Apps]={icon:
{content:"&#xEB3B",type:2},prefixesLocString:"ScopeApps",enabledDataSources:
[{dataSource:n.WebDataSource,suggestionIsEnabled:function(){return!
1},requirementLevel:function(){return 1}},
{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MPP"},{dataSource:"PP",suggestionIsEnabled:function(n){return
n=="PP"}},{dataSource:"OSTMA",requirementLevel:function(){return 1}},
{dataSource:"IBA"},],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"TOPP",conditionalRequirements:function(n){return n.isSearchHomeZI}},
{dataSource:"MPP"},n.contains(t.config.enabledDataSources,"LRA")?
{dataSource:"LRA"}:{dataSource:"PP",suggestionIsEnabled:function(n){return
n=="PP"}}],staticGroupOrderForZeroInput:function(n){return n.isSearchHomeZI?
[t.GroupType.TopApps,t.GroupType.Apps]:undefined},getEmptyZIMessages:function(n)
{return
f(n,i.Apps,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptyScopeMess
age","EmptyScopeSubMessage","EmptyScopeSearchLocation_PCAndStore")}};t.ScopeConfig[
i.Settings]={icon:
{content:"&#xE713",type:2},prefixesLocString:"ScopeSettings",enabledDataSources:
[{dataSource:n.WebDataSource,suggestionIsEnabled:function(){return!
1},requirementLevel:function(){return 1}},
{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MST"},{dataSource:"ST"},{dataSource:"QS",requirementLevel:function()
{return 1}}],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MST"},],getEmptyZIMessages:function(n){return
f(n,i.Settings,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptyScope
Message","EmptySettingsSubMessage")}};t.ScopeConfig[i.Photos]={icon:
{content:"&#xEB9F",type:2},prefixesLocString:"ScopePhotos",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="LI"}},
{dataSource:"MPHO",suggestionIsEnabled:function(n){return
n=="LI"}},u("ODC","LI"),u("MODC","LI"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="LI"}},],getEmptyZIMessages:function(n){return e(n,i.Photos,!
0)}};t.ScopeConfig[i.Videos]={icon:
{content:"&#xE714",type:1},prefixesLocString:"ScopeVideos",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="LV"}},
{dataSource:"MVID",suggestionIsEnabled:function(n){return
n=="LV"}},u("ODC","LV"),u("MODC","LV"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="LV"}},],getEmptyZIMessages:function(n){return e(n,i.Videos,!
0)}};t.ScopeConfig[i.Music]={icon:
{content:"&#xE8D6",type:2},prefixesLocString:"ScopeMusic",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="MU"}},
{dataSource:"MMUS",suggestionIsEnabled:function(n){return
n=="MU"}},u("ODC","MU"),u("MODC","MU"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="MU"}},],getEmptyZIMessages:function(n){return e(n,i.Music,!
1)}};t.ScopeConfig[i.Documents]={icon:
{content:"&#xE7C3",type:2},prefixesLocString:"ScopeDocuments",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="FL"}},
{dataSource:"MDOC",suggestionIsEnabled:function(n){return n=="FL"}},
{dataSource:"MPHO",suggestionIsEnabled:function(n){return
n=="FL"},conditionalRequirements:function(n){return!n||!n.taskFrame}},
{dataSource:"MVID",suggestionIsEnabled:function(n){return
n=="FL"},conditionalRequirements:function(n){return!n||!
n.taskFrame}},u("ODC","FL"),u("MODC","FL"),
{dataSource:"PP",suggestionIsEnabled:function(n){return n=="LDOC"}},r("SSUE",1,!
0),r("SSEE",1,!0),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="FL"}},r("SSEE",1,!0,!!
t.config.zeroInputCloudDocs),],showUpsellOnSuggestionsList:function(){return
c(t.getAccountTypeForCloudContent()==1||!!
(t.config.accountVerifyMessage&&t.getAccountTypeForCloudContent()==4))},getEmptyZIM
essages:function(n){return e(n,i.Documents,!1)}};t.ScopeConfig[i.Folders]={icon:
{content:"&#xE838",type:2},prefixesLocString:"ScopeFolders",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="FD"}},
{dataSource:"MFOL",suggestionIsEnabled:function(n){return n=="FD"}},
{dataSource:"LDIC"},u("ODC","FD"),u("MODC","FD"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="FD"}},],getEmptyZIMessages:function(n){return e(n,i.Folders,!
1)}};t.ScopeConfig[i.Web]={icon:
{content:"&#xE774",type:1},prefixesLocString:"ScopeWeb",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(n,t){return t==1}},
{dataSource:n.WebDataSource,suggestionIsEnabled:function(t,i){return
n.contains([0,13,14,10,5,1],i)},requirementLevel:function(){return 1}},
{dataSource:"PP",suggestionIsEnabled:function(n,t){return t==1}},l(),y(!0),
{dataSource:"WRS",requirementLevel:function(){return 1}},p(!0),w(!
0)],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(n,t){return
t==1}},ut(),l(),],getEmptyZIMessages:function(n){return
f(n,i.Web,t.config.useNewEmptyQueryMessages?"EmptyWebMessage":"EmptyScopeMessageWeb
","EmptyWebSubMessage")}};t.ScopeConfig[i.PathCompletion]={icon:
{content:"&#xE782",type:2,needsAccentColor:!
0},scopeNameLocString:t.config.pathCompletionReplacesAll?"PathCompletionScopeName":
null,prefixesLocString:null,enabledDataSources:[{dataSource:"PT"},
{dataSource:"CG"},],enabledDataSourcesForZeroInput:
[],getEmptyZIMessages:null};t.ScopeConfig[i.Emails]={icon:
{content:"&#xE715",type:2},prefixesLocString:"ScopeEmails",enabledDataSources:
[r("SSEE",1,!0),r("SSEC",2,!0),],enabledDataSourcesForZeroInput:
[],showUpsellOnSuggestionsList:function(){return
c()},getEmptyZIMessages:function(n){return
f(n,i.Emails,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptyScopeMe
ssage","EmptyEmailSubMessage")}};t.ScopeConfig[i.People]={icon:
{content:"&#xE716",type:2},prefixesLocString:"ScopePeople",enabledDataSources:
[r("SSUE",1,!0),r("SSUC",2,!0),y(!0),p(!0),w(!0),],enabledDataSourcesForZeroInput:
[r("SSUE",1,!0),r("SSUC",2,!0),],showUpsellOnSuggestionsList:function(){return
c()},getEmptyZIMessages:function(n){return
f(n,i.People,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptyScopeMe
ssage","EmptyPeopleSubMessage")}};t.ScopeConfig[i.PeopleEmail]={icon:
{content:"&#xE716",type:2},prefixes:
["People","people","email","Email"],prefixesLocString:null,enabledDataSources:t.Sco
peConfig[i.People].enabledDataSources.concat(t.ScopeConfig[i.Emails].enabledDataSou
rces),enabledDataSourcesForZeroInput:t.ScopeConfig[i.People].enabledDataSourcesForZ
eroInput,showUpsellOnSuggestionsList:function(){return
c()},getEmptyZIMessages:function(n){return
f(n,i.PeopleEmail,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptySc
opeMessage","EmptyPeopleSubMessage")}};t.ScopeConfig[i.AppsSettings]={icon:
{content:"&#xEB3B",type:2},prefixes:
["Apps/Settings","apps","app","settings","setting"],prefixesLocString:null,enabledD
ataSources:t.ScopeConfig[i.Apps].enabledDataSources.concat(t.ScopeConfig[i.Settings
].enabledDataSources).filter(function(t){return!
n.contains(["OSTMA","QS",n.WebDataSource],t.dataSource)}),enabledDataSourcesForZero
Input:t.ScopeConfig[i.Apps].enabledDataSourcesForZeroInput.concat(t.ScopeConfig[i.S
ettings].enabledDataSourcesForZeroInput).filter(function(t){return!
n.contains(["OSTMA","QS",n.WebDataSource],t.dataSource)}),getEmptyZIMessages:functi
on(n){return e(n,i.AppsSettings,!1)}};t.ScopeConfig[i.FilesFolders]={icon:
{content:"&#xE7C3",type:2},prefixes:
["Files/Folders","documents","document","docs","doc","files","file","music","image"
,"images","photo","photos","picture","pictures","video","videos"],prefixesLocString
:null,enabledDataSources:t.ScopeConfig[i.Documents].enabledDataSources.concat(t.Sco
peConfig[i.Folders].enabledDataSources,t.ScopeConfig[i.Photos].enabledDataSources,t
.ScopeConfig[i.Music].enabledDataSources,t.ScopeConfig[i.Videos].enabledDataSources
),enabledDataSourcesForZeroInput:t.ScopeConfig[i.Documents].enabledDataSourcesForZe
roInput.concat(t.ScopeConfig[i.Folders].enabledDataSourcesForZeroInput,t.ScopeConfi
g[i.Photos].enabledDataSourcesForZeroInput,t.ScopeConfig[i.Music].enabledDataSource
sForZeroInput,t.ScopeConfig[i.Videos].enabledDataSourcesForZeroInput),getEmptyZIMes
sages:function(n){return e(n,i.FilesFolders,!1)}};t.ScopeConfig[i.AllFiles]={icon:
{content:"&#xE7C3",type:2},prefixes:
["Files","documents","document","docs","doc","files","file","music","image","images
","photo","photos","picture","pictures","video","videos"],prefixesLocString:null,en
abledDataSources:t.ScopeConfig[i.Documents].enabledDataSources.concat(t.ScopeConfig
[i.Folders].enabledDataSources,t.ScopeConfig[i.Photos].enabledDataSources,t.ScopeCo
nfig[i.Music].enabledDataSources,t.ScopeConfig[i.Videos].enabledDataSources),enable
dDataSourcesForZeroInput:t.ScopeConfig[i.Documents].enabledDataSourcesForZeroInput.
concat(t.ScopeConfig[i.Folders].enabledDataSourcesForZeroInput,t.ScopeConfig[i.Phot
os].enabledDataSourcesForZeroInput,t.ScopeConfig[i.Music].enabledDataSourcesForZero
Input,t.ScopeConfig[i.Videos].enabledDataSourcesForZeroInput),getEmptyZIMessages:fu
nction(n){return e(n,i.AllFiles,!1)}};for(var s in
t.ScopeConfig)t.ScopeConfig[s].enabledDataSources=t.ScopeConfig[s].enabledDataSourc
es.filter(function(i){return
n.contains(t.config.enabledDataSources,i.dataSource)}),t.ScopeConfig[s].enabledData
SourcesForZeroInput=t.ScopeConfig[s].enabledDataSourcesForZeroInput.filter(function
(i){return n.contains(t.config.enabledDataSources,i.dataSource)})}function ei()
{s=null}function et(t,i){var
f=t.getConnectedAccountInfo(0),e=t.getConnectedAccountInfo(1),r=!!(f||
e),u=i&&n.isBingEnabled();return
r&&u?"EmptyScopeSearchLocation_PCCloudAndWeb":r?"EmptyScopeSearchLocation_PCAndClou
d":u?"EmptyScopeSearchLocation_PCAndWeb":"EmptyScopeSearchLocation_PC"}function
e(n,i,r){return
f(n,i,t.config.useNewEmptyQueryMessages?"EmptyScopeMessageNew":"EmptyScopeMessage",
"EmptyScopeSubMessage",et(n,r))}function f(n,i,r,u,f){var
e=ot(t.ScopeConfig[i],n).toLocaleLowerCase(),o=f?
n.getLocString(f):"",s=n.getLocString(r,e,o),h=t.config.useNewEmptyQueryMessages||
t.RuntimeConfig.QfMode==6?n.getLocString(u,e,o):"";return[s,h]}function oi(n){var
f=function(n){return
HitHighlightingParser.removeDiacritics(n.toLocaleLowerCase().trim())},r,u;if(s={},t
.RuntimeConfig.ScopesAvailable){r=function(r){var
e=parseInt(r),u=t.ScopeConfig[e],o,h;e!=i.All&&a(e,u)&&(!
u.prefixes&&u.prefixesLocString&&(o=n.getLocString(u.prefixesLocString),h=n.getEnUs
LocString(u.prefixesLocString),u.prefixes=st(o,h)),u.prefixes&&u.prefixes.forEach(f
unction(n){return s[f(n)]=e}))};for(u in t.ScopeConfig)r(u)}}function ot(n,t)
{if(n.scopeNameLocString)return
t.getLocString(n.scopeNameLocString);if(n.prefixes)return
n.prefixes[0].trim();if(n.prefixesLocString){var
i=st(t.getLocString(n.prefixesLocString));return i[0].trim()}return""}function
st(n,t){var i=n;return t&&(i+=","+t),i.search(g)>-
1&&(i=i.replace(g,",")),i.split(",")}function a(r,u){var
c=t.RuntimeConfig.AlwaysWide?
t.config.enabledScopesAlwaysWide:t.config.enabledScopes,f,s,e,o,h;if(!
n.contains(c,i[r])||r==i.Web&&!n.isBingEnabled())return!
1;if(u.showUpsellOnSuggestionsList&&u.showUpsellOnSuggestionsList())return!
0;for(f=t.config.enabledDataSources.filter(function(t){return t!
=n.MRUDataSource}),n.isBingEnabled()&&r!=i.Web&&(f=f.filter(function(t){return t!
=n.WebDataSource})),s=function(n){lt(n,null)||(f=f.filter(function(t){return t!
=n.dataSource}))},e=0,o=u.enabledDataSources;e<o.length;e++)h=o[e],s(h);return
u.enabledDataSources.some(function(t){return n.contains(f,t.dataSource)})?!0:!
1}function ht(){if(t.windowsAccountType==0||t.cortanaAccountType==0)return
0;if(t.windowsAccountType!=t.cortanaAccountType)return 2;if(t.windowsAccountType!
=3)if(t.windowsIdentity&&t.cortanaIdentity){if(t.windowsIdentity!
=t.cortanaIdentity)return 2}else return 0;return 1}function si(r,u,f,e,o){var
h,l,b,v,y,p,c,w;o||(o={});var
k=o.topHitRestriction,d=o.forceGroupOnTop,g=o.overrideAction,nt=o.overrideActionHan
dlerAsync,s=n.parseQuery(r,u,k);if
(s.fullPartialQuery=s.queryToFetch,s.scope=a(i.All,t.ScopeConfig[i.All])?
i.All:i.AppsSettings,s.forceGroupOnTop=d,s.overrideAction=g,s.overrideActionHandler
Async=nt,li(s,e))s.isFormulatedQuery=!
0,h=t.ScopeConfig[yt(s)];else{s.fullPartialQuery&&(hi(s),f&&s.scope!
=f.scope&&(s.isFormulatedQuery=!0));s.isSearchHomeZI=!
s.queryToFetch&&(t.RuntimeConfig.SearchHomeAvailable==1||
t.RuntimeConfig.SearchHomeAvailable==2&&s.scope!=i.All);(s.scope==i.All||
s.scope==i.Web)&&(l=n.tryParseUrl(s.queryToFetch,!0),l&&l.type==0?(s.isProtocol=!
0,s.fixedUrl=n.cleanAndFixUrlProtocol(l)):ct.test(s.queryToFetch)&&(s.isProtocol=!
0,s.fixedUrl=n.cleanAndFixUrlProtocol(s.queryToFetch)));switch(t.RuntimeConfig.QfMo
de){case 5:h=t.ScopeConfig[i.All_FileExplorer];break;case
6:h=t.ScopeConfig[i.All_Lockscreen];break;case
7:h=t.ScopeConfig[i.All_SettingsApp];break;default:h=t.ScopeConfig[s.scope]}for(b=s
.queryToFetch?
h.enabledDataSources:h.enabledDataSourcesForZeroInput,s.availableDataSources={},v=0
,y=b;v<y.length;v+
+)c=y[v],n.contains(t.config.enabledDataSources,c.dataSource)&&(s.availableDataSour
ces[c.dataSource]=c);s.enabledDataSources={};for(p in
s.availableDataSources)c=s.availableDataSources[p],c.suggestionGroupToggler&&c.sugg
estionGroupToggler.isHidden()||(s.enabledDataSources[p]=c);w=s.queryToFetch?
h.staticGroupOrder:h.staticGroupOrderForZeroInput;w&&(s.staticGroupOrder=w(s))}retu
rn
ci(s,h),s.showProgressBar=t.isL2(s)&&t.config.dataSourcesWithProgressBar.some(funct
ion(n){return!!s.enabledDataSources[n]}),s.equals=function(n)
{return(s.queryToFetch?
s.queryToFetch.toLowerCase():s.queryToFetch)==(n.queryToFetch?
n.queryToFetch.toLowerCase():n.queryToFetch)&&n.scope==s.scope&&(n.taskFrame?
n.taskFrame.raw:"")==(s.taskFrame?
s.taskFrame.raw:"")&&n.topHitRestriction==s.topHitRestriction},s.getCacheKey=functi
on(){return s.cursorPosition+s.queryToFetch.toLocaleLowerCase()
+s.scope+t.regionCache},s}function hi(r){var
h=n.isDataSourceEnabled("PT",null),c=h&&b.test(r.fullPartialQuery),e,u,o;if(c)
{r.canBePathCompletion=!
0;r.scope=i.PathCompletion;return}if(e=HitHighlightingParser.removeDiacritics(r.ori
ginalQuery),u=e.match(/^(([^::]+)[::]\s*)(.*)/)||
t.config.forwardSlashScopes&&e.match(/(\/(\w+)\s*)(.*)/),u){var
l=u[1],f=u[2],a=u[3];
(f=f.toLocaleLowerCase(),o=f.trim(),n.contains(Object.keys(s),o))&&(r.queryToFetch=
a,r.cursorPosition=Math.max(0,r.originalCursorPosition-
l.length),n.mantainCursorPositionIn(r.queryToFetch,r.cursorPosition,n.cleanQuery,fu
nction(n,t)
{r.queryToFetch=n;r.cursorPosition=t}),r.scope=s[o],r.scopePrefix=f,r.isMultiWord=n
.isMultiWord(r.queryToFetch),r.canBePathCompletion=h&&b.test(r.queryToFetch))}}func
tion lt(i,r){var u=i.requirementLevel?
i.requirementLevel():0;return(i.requiredCortanaCapabilities&&i.requiredCortanaCapab
ilities().length>0&&u<3&&(u=3),!t.isCortanaPersonalized&&u>=3)?!1:!
t.isCortanaEnabledCache&&u>=2?!1:!n.isBingEnabled()&&u>=1?!
1:i.requiredCortanaCapabilities&&!i.requiredCortanaCapabilities().every(function(i)
{return n.contains(t.availableCortanaCapabilities,i)})?!
1:i.conditionalRequirements&&!i.conditionalRequirements(r)?!1:!0}function ci(i,r)
{var c=t.RuntimeConfig.QfMode==5&&i.fullPartialQuery.search(":")>=0,h,u,f,e,s;if(c)
{i.enabledDataSources={};return}for(n.disableWebDataSourceIfNeeded(i,t.getMarketFor
BingAvailability()),h=i.queryToFetch?
r.enabledDataSources:r.enabledDataSourcesForZeroInput,u=0,f=h;u<f.length;u+
+)e=f[u],lt(e,i)||n.disableDataSources(i,e.dataSource);i.queryToFetch||
(s=o.queryFormulationView.searchHistory,s&&s.isDeviceHistoryEnabled||
n.disableDataSources(i,"PP","LRA","FL","LM","IFF"));t.TweakSearch&&t.TweakSearch.di
sableDataSourcesBasedOnTweakSearch(i)}function li(i,r){var
u,h,o,f,s,e;if(r&&(u=r.scope,h=t.ScopeConfig[r.scope],a(u,t.ScopeConfig[u])&&(o=t.S
copeConfig[u].enabledDataSources.filter(function(n){return
pi(n.dataSource,r)}),o.length>0))){for(i.taskFrame=r,f=0,s=o;f<s.length;f+
+)e=s[f],n.contains(t.config.enabledDataSources,e.dataSource)&&(i.enabledDataSource
s[e.dataSource]=e);return h}return null}function ai(t){var
r=n.safeExecute(function(){return JSON.parse(t)},"parseTaskFrame"),u;return
r&&(u=vi(r),u!=i.All)?{raw:t,parsed:r,scope:u}:null}function vi(n){switch(n.Uri)
{case at:var r=n,t=r.FileType;if(t&&t.Value){if(t.Value=="Picture")return
i.Photos;if(t.Value=="Video")return i.Videos}return i.Documents;case vt:return
i.Emails}return i.All}function yt(n){return n?n.taskFrame?
n.taskFrame.scope:n.scope:undefined}function yi(n){var
e,t,o,s,h,u,c,r,f,l;if(n.taskFrame&&(e=n.taskFrame.parsed,e))if(n.taskFrame.scope==
i.Emails){if(t=e,o=t.Subject,o&&o.Value)return
o.Value;if(r=t.Body,r&&r.Value)return r.Value;if(s=t.From&&t.From.length>0?
t.From[0]:null,s&&s.Value)return s.Value;if(h=t.To&&t.To.length>0?
t.To[0]:null,h&&h.Value)return h.Value}else{if(u=e,c=u.Title,c&&c.Value)return
c.Value;if(r=u.Body,r&&r.Value)return
r.Value;if(f=u.People,f&&f[0]&&f[0].Value)return
f[0].Value;if(l=u.Place,l&&l.Value)return l.Value}return n.queryToFetch}function
pi(n,t){if(t.scope==i.Emails)return n=="SSEC"||n=="SSEE";var
u=t.parsed,r=u.FileSource?u.FileSource.Value:null;switch(n)
{case"MDOC":case"MPHO":case"MVID":return r!="onedrive"&&r!
="sharepoint";case"MODC":return r!="thispc"&&r!="sharepoint";case"SSEE":return r!
="thispc"&&r!="onedrive";default:return!1}}function wi(n){k=n}function v(i){var
r=""+i,u=function(){var n=k.getItem(d)||"";return n.split(",")},f=function(n){var
t=n.join(",");k.setItem(d,t)};return{isHidden:t.config.enableSearchHomeCustomizatio
n?function(){return n.safeExecute(function(){return u().some(function(n){return
n==r})},"GroupToggler.isHidden")}:function(){return!1},toggle:function(t)
{n.safeExecute(function(){var n=u(),i;t&&n.every(function(n){return n!=r})?
(n.push(r),f(n)):t||(i=n.findIndex(function(n){return n==r}),i>-
1&&(n.splice(i,1),f(n)))},"GroupToggler.toggle")}}}var
o=SearchAppWrapper.CortanaApp,i,s,ct,b,at,vt,k,d;(function(n)
{n[n.All=0]="All";n[n.Apps=1]="Apps";n[n.Settings=2]="Settings";n[n.Photos=3]="Phot
os";n[n.Videos=4]="Videos";n[n.Music=5]="Music";n[n.Documents=6]="Documents";n[n.Fi
les=7]="Files";n[n.Folders=8]="Folders";n[n.Web=9]="Web";n[n.PathCompletion=10]="Pa
thCompletion";n[n.Emails=11]="Emails";n[n.People=13]="People";n[n.AppsSettings=14]=
"AppsSettings";n[n.FilesFolders=15]="FilesFolders";n[n.AllFiles=16]="AllFiles";n[n.
PeopleEmail=17]="PeopleEmail";n[n.All_FileExplorer=1e3]="All_FileExplorer";n[n.All_
Lockscreen=1001]="All_Lockscreen";n[n.All_SettingsApp=1002]="All_SettingsApp"})
(i=t.Scope||(t.Scope={}));var
g=/،/g,pt=["PP","QP","IBA","SM","TOPL"],wt=["ST","QS","SSTS"],nt=["LI","LV","MU"],b
t=["FL","LDOC","FD"].concat(nt),kt=[i.Documents,i.Folders,i.Photos,i.Videos,i.Music
];t.isApp=dt;t.isSetting=gt;t.isMedia=ni;t.isFileOrFolder=ti;t.isFileOrFolderScope=
ii;t.substrateProvidersEnabled=h;t.bingAtWorkProviderEnabled=ri;t.edgeBrowsingHisto
ryAvailable=it;t.edgeBrowsingHistoryDS=l;t.searchHistoryAllowed=rt;t.webZeroInput=u
t;t.setZeroInputDataSourcesForL1=fi;t.populateScopeConfig=ft;ft();t.cleanScopePrefi
xes=ei;t.initScopePrefixes=oi;t.getScopeDisplayName=ot;t.isScopeEnabled=a;t.isMobil
eCache=o.isMobile||navigator.userAgent.toLowerCase().includes("xbox one")||
navigator.userAgent.toLowerCase().includes("hololens");t.windowsAccountType=0;t.cor
tanaAccountType=0;t.getWindowsAndCortanaAccountIdentityDiff=ht;ct=/^ht+ps?[;:]+|
^www[.。]|^\/+/;b=/^[a-z]:\\|^%[^%]+%\\|
^\\/i;t.parseQuery=si;t.parseTaskFrame=ai;at="action://FindMyStuff/FindDocument";vt
="action://FindMyStuff/FindMessage";t.getEffectiveScope=yt;t.getEffectiveQuery=yi;d
="HiddenSuggestionGroups";t.initQueryParser=wi})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function lt(n,t)
{return n.type==t.type&&n.source==t.source}function vt(n){switch(n)
{case"PP":return"Apps";case"ST":return"Settings";case"FL":return"Files";case"LM":re
turn"Media";default:return null}}function yt(n){switch(n)
{case"FL":case"LM":case"IFF":case"MFF":case"PT":case"CG":case"MDOC":case"MFOL":case
"MPHO":case"MVID":case"MMUS":case"EBH":case"FEH":case"AFC":case"LDIC":return!
0;case"OSTMA":case"QS":case"PP":case"LRA":case"ST":case"PBI":case"MPP":case"MST":ca
se"IBA":case"SM":case"THST":case"TOPP":case"QSCH":case"LSQS":return!1}throw new
Error("New local data source "+n+" needs to be explicity classified as potentially
containing PII or not");}function pt(n){var t=e(n);return
n.deviceItem&&n.handoffType==2?t+"\t"+n.deviceItem.id:t+"\t"+n.query}function l(n)
{switch(n.type)
{case"BKS":case"ML":case"MB":case"OS":case"RI":case"HS":case"EBH":return!
0}switch(n.handoffType){case 1:case 17:case 13:case 16:case 0:case 11:case
14:return!0}return!1}function a(n){switch(n)
{case"MFF":case"FL":case"LM":case"IFF":case"MDOC":case"MPHO":case"MVID":case"MMUS":
case"MFOL":return!0;default:return!1}}function wt(n,i){if(!
t.IndexerQueryGenerator)return!1;if(t.RuntimeConfig.QfMode==5)return!0;switch(n)
{case"IBA":case"MDOC":case"MPHO":case"MVID":case"MMUS":case"MFOL":return!
0;case"IFF":return nt(i)||!t.config.minLengthForIBAonL1||
i.queryToFetch.length>=t.config.minLengthForIBAonL1;default:return!1}}function
bt(n){return SearchAppWrapper.CortanaApp.hostingEnvironment==4?!
0:t.RuntimeConfig.MiniSERPMode==0||n.previewPaneType!=1?!1:n.isAnswer?
(t.RuntimeConfig.MiniSERPMode&1)!=0:n.type=="MD"?(t.RuntimeConfig.MiniSERPMode&2)!
=0:(t.RuntimeConfig.MiniSERPMode&4)!=4?!
1:n.query.length>=t.config.minPrefixLengthForMiniSerp}function kt(n){return a(n)||
n=="IBA"||n=="EBH"}function dt(n){return n&&(n.tagName.toLowerCase()=="body"||
n.tagName.toLowerCase()=="iframe"||
n.className&&n.classList.contains("suggestion"))}function gt(n){return
n.kind=="Modern Setting"}function v(n){return t.isApp(n.type)?
n.deviceItem:null}function ni(n){var i=v(n),t;return i?i.packageFamilyName:
(t=n,t.packageFamilyName)?t.packageFamilyName:null}function ti(n){return
t.isFileOrFolder(n.type)?n.deviceItem:null}function y(n){switch(n)
{case"PBI":case"EBH":return!1}return!0}function ii(n){return!!
n.suggestions}function
ri(n){return y(n.type)?n.deviceItem:null}function ui(n){return n.type=="CG"?
n.deviceItem:null}function fi(n){return n.type=="PT"?n.deviceItem:null}function
ei(n){return n.type=="PBI"?n.deviceItem:null}function p(n){return n.type=="EBH"?
n.deviceItem:null}function oi(n){return
n&&n.classList.contains("scopeTile")}function e(n){if(typeof
n.staticGroupType=="number")return
n.staticGroupType;if(t.RuntimeConfig.QfMode==8&&l(n))return
i.SearchSuggestions;if(t.config.newFilesScope2&&(n.type=="FL"||n.type=="FD"||
n.type=="MU"||n.type=="LI"||n.type=="LV"))return i.Documents;switch(n.type)
{case"SM":return i.StartMenu;case"TOPL":return i.TopApps}if(t.isApp(n.type))return
i.Apps;if(s(n))return n.groupType;if(t.isSetting(n.type))return
i.Settings;switch(n.type){case"CG":return i.Command;case"PT":return
i.PathCompletion;case"LI":return i.Photos;case"LV":return i.Videos;case"MU":return
i.Music;case"PBI":return i.PowerBi;case"FL":case"LDOC":case"SDFE":return
i.Documents;case"FD":return i.Folders;case"OLE":case"OWA":return
i.Emails;case"PPL":return i.People;case"EBH":return i.EdgeHistory;case"BKS":return
i.Bookmarks;case"ELA":return i.LocalPlaces;case"FEH":return
i.LocalSearchHistory;case"SNSC":case"RSSG":return i.QuickSearch;case"LSQS":return
i.LockscreenQuickSearch;default:switch(n.handoffType){case 3:return i.Store;case
5:case 4:return i.Cortana;case 10:return n.htmlContent?
i.SearchSuggestions:i.Cortana;case 0:case 13:case 14:return
i.SearchSuggestions;case 1:return i.Websites;case 18:return
i.ActivityFeedSuggestions}throw new Error("Unexpected handoff type:
"+n.handoffType);}}function si(n){return n.click&&!n.instItem}function o(n)
{switch(n){case i.JumpListTasks:case i.JumpListPinned:case i.JumpListRecent:case
i.JumpListFrequent:case i.JumpListCustom:return!0;default:return!1}}function w(t)
{return t.notAResult&&!n.contains(["SW","PWL","SSTS"],t.type)}function hi(n){return
t.config.recourseOnlyInGroups&&n.suggestions.every(function(n){return
w(n)})}function ci(n){var t=n.type;return o(t)||t==i.Related||t==i.Contact}function
li(n){if(o(n))return i.Apps;if(n==i.Related)return
i.SearchSuggestions;if(n==i.Contact)return i.People;throw new Error("Not a top hit
child group: "+n);}function s(n){return!!n.parent}function ai(n){return
n.type=="JL"}function b(n){switch(n){case i.Apps:case i.Store:return
t.Scope.Apps;case i.Settings:return t.Scope.Settings;case i.Documents:return
t.Scope.Documents;case i.Folders:return t.Scope.Folders;case i.Photos:return
t.Scope.Photos;case i.Videos:return t.Scope.Videos;case i.Music:return
t.Scope.Music;case i.LocalPlaces:case i.SearchSuggestions:case i.Websites:case
i.EdgeHistory:case i.Bookmarks:return t.Scope.Web;case i.Emails:return
t.Scope.Emails;case i.People:return t.Scope.People}return t.Scope.All}function
vi(n){if(t.RuntimeConfig.QfMode==8&&n==1)return 32;switch(n){case 0:case 6:case
7:case 8:return 32;case 1:return 16;case 2:return t.IconSize_GridLayout_Scaled;case
3:return 24;case 4:return 64;case 5:return 200}throw new Error("Unsupported image
size: "+n);}function yi(n,t,i){if(n&&n.type==0&&it(t)){var u=function(t)
{n.ratio=t.height==t.width?1:t.height>t.width?3:2;i()},r=new
Image;r.src=n.content;r.onload=function(){return
u({height:r.height,width:r.width})}}else i()}function pi(){var
n=t.uiLanguageCache.toLocaleLowerCase();return k[n]||n}function
d(n,t,i,r,u,f,e,o,s,h,c,l,a){var
v={text:t,getIcon:i,icon:r,type:u,query:f,ciMatchedQuery:null,id:c,click:l,handoffT
ype:o,instItem:e,isAnswer:!1,htmlContent:null,classNames:[],selected:!
1,featureStore:undefined,sequenceNumber:s,getMruData:function(){return
null},template:0,mayContainPII:h,features:[],previewPaneType:undefined};return
v.previewPaneType=er(n,v,a),v}function wi(t,i,r,u,f,e,o,s,h){var
l=t.getInstrumentedSyntheticSuggestion(r,u),v,a;return l?l:
(v=i.scope,l=d(i,null,null,f,u,null,n.InstrumentedItem.getNonSuggestionInstrumented
Item(u,c.KValues),e,r,!1,u),l.notAResult=!
0,l.primaryMetadata=o,s&&(l.additionalInfoText=" -
"+l.primaryMetadata),a=function(n)
{l.query=n.queryToFetch;l.text=HitHighlightingParser.addMarkers(n.queryToFetch);l.n
arratorText=g(l);l.click=function(){return
h(l,n)}},a(i),l.updateFromQuery=function(n){return!
n.isProtocol&&n.scope==v&&n.queryToFetch?(a(n),!0):!
1},t.instrumentSyntheticSuggestion(r,l),l)}function g(n,t){var i,r,u;return
n.htmlContent?null:(i=p(n)?[n.primaryMetadata||n.text]:
[n.text],r=n.dateShort,r&&i.push(r),t?i.push(t):
(n.primaryMetadata&&(i.push(n.primaryMetadata),u=n.department,u&&i.push(u)),n.templ
ate==1&&n.secondaryMetadata&&i.push(n.secondaryMetadata)),HitHighlightingParser.rem
oveMarkers(i.join(", ")))}function nt(n){return n.scope!=t.Scope.All||!!
n.taskFrame}function tt(n){return typeof n=="string"?n=="LI"||n=="LV":n==i.Photos||
n==i.Videos}function it(n){return tt(n)||n=="PPL"}function bi(n){return!
t.config.disableMediaGridLayout&&!t.RuntimeConfig.AlwaysWide&&tt(n)}function
ki(n,i){var f,u,e,r;if(!n||!t.RuntimeConfig.ScopesAvailable)return
null;if(i.scope==t.Scope.All)
{if(f=[],n.ISUPN&&n.ISUPG)if(u=n.ISUPN.split("\t"),e=n.ISUPG.split("\t"),u.length==
e.length)for(r=0;r<u.length;r++)f.push(e[r]+"\t"+u[r]);else
SharedLogHelper.LogError("parseWebSuppressionSignals",null,new
Error("parsedNames.length !=
parsedGroups.length"));return{fullySuppressedGroups:n.FSUP?
n.FSUP.split("\t"):null,partiallySuppressedGroups:n.PSUP?
n.PSUP.split("\t"):null,suppressedSuggestions:f}}return null}function di(t){return
r||(r=_d.createElement("span")),n.safeExecute(function(){return
r.innerHTML=t,r.innerText},t,"decodeHtml")}function gi(n,t)
{return{matchType:n,matchedText:t}}function ut(n){return n.replace(rt,"\\
$&")}function nr(n,t){if(t){var
u=n.includes(HitHighlightingParser.startMarker),e=u?
n:HitHighlightingParser.addMarkers(n,t),f=HitHighlightingParser.split(e).find(funct
ion(n){return n.highlighted});if(f){var r=u?
HitHighlightingParser.removeMarkers(n):n,o=new RegExp("((?:\\\\[^\\\\]+)?\\\\
[^\\\\]+)?\\\\"+ut(f.text)
+".*","i"),i=o.exec(r);if(i&&i[0])return{matchType:h.Location,matchedText:r.startsW
ith(i[0])?r:String.fromCharCode(8230)+i[0]}}}return null}function tr(n,t){if(t){var
r=n.includes(HitHighlightingParser.startMarker),o=r?
n:HitHighlightingParser.addMarkers(n,t),u=HitHighlightingParser.split(o).find(funct
ion(n){return n.highlighted});if(u){var f=r?
HitHighlightingParser.removeMarkers(n):n,s=new RegExp("(?:\\S+\\s)
{0,3}\\b"+ut(u.text)+"\\S*(?:\\s\\S+){0,5}","i"),i=s.exec(f),e=void 0;return
i&&i[0]&&(e={matchType:h.Content,matchedText:i[0]}),
[f,e]}}return[null,null]}function ir(n,t){return
n&&t&&HitHighlightingParser.addMarkers(n,t).includes(HitHighlightingParser.startMar
ker)}function rr(n){return n==t.Scope.Emails}function ur(n){return
n.isAnswer&&(n.handoffType==13||n.handoffType==14||n.handoffType==0&&(!!
n.additionalInfoText||!!n.secondaryIcon))}function fr(n){if(s(n))return!
1;switch(n.handoffType){case 0:case 13:case 14:case 5:case 10:case 4:return!0;case
3:return n.type=="STS";case 2:return n.type=="PBI"||n.type=="SDFE";case 8:case
12:return n.type=="OWA";default:return!1}}function er(r,u,f){var o=undefined,s;if(!
t.RuntimeConfig.PreviewPaneAvailable||r.isSearchHomeZI)return o;if(s=function()
{return n.isBingEnabled()&&n.contains([0,13,14],u.handoffType)&&!u.htmlContent?
1:o},f)return s();switch(e(u)){case i.Store:return(t.RuntimeConfig.AlwaysWide||
t.config.enableLocalPreviewPaneInSingleColumn)&&u.type!="STS"?2:o;case i.Apps:case
i.PowerBi:case i.Cortana:case i.Command:case i.Documents:case i.Folders:case
i.Music:case i.PathCompletion:case i.Emails:case i.Photos:case i.Settings:case
i.Videos:return t.RuntimeConfig.AlwaysWide||
t.config.enableLocalPreviewPaneInSingleColumn?2:o;case i.StartMenu:return 2;case
i.People:return u.handoffType==0?1:u.handoffType==1?o:u.handoffType==17?
3:t.RuntimeConfig.AlwaysWide||t.config.enableLocalPreviewPaneInSingleColumn?
2:o;case i.Bookmarks:return u.handoffType==17?3:s();case i.Websites:return
n.isBingEnabled()&&u.type!="LURL"?1:o;default:return s()}}function or(){return
t.RuntimeConfig.QfMode==2?null:t.regionCache}function sr(n,t,i){var
r=i.previewPaneType,u,f;return r?
(u=t.previewPaneType,f=r==1&&u==1,t.query.toLocaleLowerCase()==i.query.toLocaleLowe
rCase()&&(!f&&r==u||f&&t.handoffType==i.handoffType)):!1}function hr(n){return
t.config.startMenuInWSB&&n&&!n.queryToFetch&&n.scope==t.Scope.All}function cr(n)
{return n==null}function lr(r,u){return
r==i.Documents&&t.isSubstrateO365AccountConnected||
t.isFileOrFolderScope(b(r))&&(n.isDataSourceEnabled("ODC",u)||
n.isDataSourceEnabled("MODC",u))}function ar(n,t){switch(n){case
2:return"OneDrive";case 3:return t.getLocString("OneDriveForBusiness");case
4:return"SharePoint";case 1:return t.getLocString("ThisPC");case 5:return
t.getLocString("MsbPeopleGroups");case 6:return
t.getLocString("MsbPeopleContacts")}return null}function vr(n){if(ot())switch(n)
{case 37:return 39;case 39:return 37}return n}function yr()
{return{content:"&#xE721",type:2}}function pr(n){return
n.getLocString("SearchTheWeb")}function wr(n){return
n.getLocString("Websites")}function br(n){return
n.getLocString("SeeWebResults")}function kr(n,t){var i="b_hide";n&&(t?
n.classList.remove(i):n.classList.add(i))}function ot(){return
ThresholdUtilities.isRightToLeftLanguage(t.uiLanguageCache)}function dr()
{u={}}function st(t){var i=u[t],r;return typeof
i=="undefined"&&(r=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch,r.
getFolderPathFromKnownFolderIdGuid?(i=n.safeExecute(function(){return
r.getFolderPathFromKnownFolderIdGuid(t)},"getPathFromFolderID","",t),i=i.toLocaleLo
werCase()):i="",u[t]=i),i}function gr(){f={}}function nu(n){var t,i;return
n.startsWith("{")?(t=f[n],t||(i=n.match(ht),t=i?st(i[1])
+i[2]:n,f[n]=t),t):n}function tu(n){return
n.startsWith("file:")&&(n=n.slice(5)),n.replace(/\//g,"\\")}function iu(n){return
t.config.enforceOriginalOrderForTypes[n.type]||
t.config.enforceOriginalOrderForTypes[n.type+"|"+n.handoffType]}function ru(n)
{switch(n){case 2:return
0;case 1:return 1;default:throw new Error("Not a logged in account:
"+n);}}function uu(n){return
n==1?"https://substrate.office.com":"https://substrate.office.com/SubstrateSearch-
Internal.ReadWrite"}function fu(n){return
n==1?"https://www.bing.com/cortana":"service::cortana.bing.com::mbi_ssl"}function
ct(){return"Windows"}function eu(){return ct()=="Windows"?
t.windowsAccountType:t.cortanaAccountType}function ou(){return!1}function su(n)
{return t.TweakSearch&&t.TweakSearch.isTweakSearchEnabled()?
t.config[n]:undefined}function hu(){return
t.config.skipSelectedScope&&t.RuntimeConfig.AlwaysWide}function cu(n){return
n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var i,c,at,k,r,h,rt,ft,et,u,f,ht;
(function(n)
{n[n.Apps=0]="Apps";n[n.Settings=1]="Settings";n[n.Cortana=2]="Cortana";n[n.Command
=3]="Command";n[n.Photos=4]="Photos";n[n.Videos=5]="Videos";n[n.Music=6]="Music";n[
n.Documents=7]="Documents";n[n.Folders=8]="Folders";n[n.Emails=9]="Emails";n[n.Stor
e=10]="Store";n[n.SearchSuggestions=11]="SearchSuggestions";n[n.PathCompletion=12]=
"PathCompletion";n[n.PowerBi=13]="PowerBi";n[n.JumpListTasks=14]="JumpListTasks";n[
n.JumpListPinned=15]="JumpListPinned";n[n.JumpListRecent=16]="JumpListRecent";n[n.J
umpListFrequent=17]="JumpListFrequent";n[n.JumpListCustom=18]="JumpListCustom";n[n.
JumpListActivityFeed=19]="JumpListActivityFeed";n[n.People=20]="People";n[n.EdgeHis
tory=21]="EdgeHistory";n[n.LocalPlaces=22]="LocalPlaces";n[n.Bookmarks=25]="Bookmar
ks";n[n.Related=26]="Related";n[n.Websites=27]="Websites";n[n.Contact=28]="Contact"
;n[n.JumpListSynthetic=29]="JumpListSynthetic";n[n.JumpListActions=30]="JumpListAct
ions";n[n.StartMenu=31]="StartMenu";n[n.LocalSearchHistory=32]="LocalSearchHistory"
;n[n.JumpListSettingsFaq=33]="JumpListSettingsFaq";n[n.JumpListSettingsRelatedSetti
ngs=34]="JumpListSettingsRelatedSettings";n[n.ActivityFeedSuggestions=35]="Activity
FeedSuggestions";n[n.TopApps=36]="TopApps";n[n.QuickSearch=37]="QuickSearch";n[n.Lo
ckscreenQuickSearch=38]="LockscreenQuickSearch";n[n.GroupHeader=104]="GroupHeader"}
)(i=t.GroupType||(t.GroupType={}));t.sameGroup=lt,function(n){n.KValues=function()
{var n={};return
n.GPT=108,n.GT=109,n.GW=110,n.SW=114,n.PWL=115,n.STS=116,n.SBI=117,n.SBV=118,n.SDSC
=119,n.SDIO=120,n.IMIO=121,n.COFA=122,n.COOA=124,n.SDFE=126,n.OWA=128,n.OMCS=129,n.
OMIO=130,n.OMCN=131,n.OMCD=132,n.OMAC=133,n.OMSC=134,n.OMVA=135,n.SSTS=136,n.AFOT=1
37,n.SNSC=138,n.RWBD=139,n}();n.HandoffsForNonSuggestions=function(){var
n={};return n.GPT=2,n.GT=3,n.GW=0,n.SDSC=2,n.SDIO=2,n.IMIO=2,n.COFA=2,n.COOA=2,n}
();n.GroupsForNonSuggestions=function(){var n={};return
n.GPT=i.GroupHeader,n.GT=i.GroupHeader,n.GW=i.GroupHeader,n.SDSC=i.Settings,n.SDIO=
i.Settings,n.IMIO=i.Settings,n.COFA=i.Settings,n.COOA=i.Settings,n}()}
(c=t.SyntheticQSCodesMaps||(t.SyntheticQSCodesMaps={})),function(n)
{n[n.Open=1]="Open";n[n.RunAs=2]="RunAs";n[n.RunAsUser=3]="RunAsUser";n[n.OpenInBro
wser=4]="OpenInBrowser";n[n.OpenFileLocation=5]="OpenFileLocation";n[n.OpenContaini
ng=6]="OpenContaining";n[n.TabletMode_OpenNewWindow=7]="TabletMode_OpenNewWindow";n
[n.PinToStartScreen=8]="PinToStartScreen";n[n.StartUnpin=9]="StartUnpin";n[n.Taskba
rUnpin=10]="TaskbarUnpin";n[n.StartPin=11]="StartPin";n[n.TaskbarPin=12]="TaskbarPi
n";n[n.Manage=13]="Manage";n[n.ConnectNetworkDrive=14]="ConnectNetworkDrive";n[n.Di
sconnectNetworkDrive=15]="DisconnectNetworkDrive";n[n.Uninstall=16]="Uninstall";n[n
["Tile.Uninstall"]=17]="Tile.Uninstall";n[n.ItemProperties=18]="ItemProperties";n[n
.Settings=19]="Settings";n[n.Review=20]="Review";n[n.Share=21]="Share";n[n.S_Open=1
e3]="S_Open";n[n.S_Install=1001]="S_Install";n[n.S_CopyFullPath=1002]="S_CopyFullPa
th";n[n.S_SendEmail=1003]="S_SendEmail";n[n.S_SendInstantMessage=1004]="S_SendInsta
ntMessage";n[n.S_CopyPersonDetails=1005]="S_CopyPersonDetails";n[n.S_OpenFileLocati
onInBrowser=1006]="S_OpenFileLocationInBrowser";n[n.S_OpenInOutlookWeb=1007]="S_Ope
nInOutlookWeb";n[n.S_LaunchOutlookNative=1008]="S_LaunchOutlookNative";n[n.S_OpenIn
Browser=1009]="S_OpenInBrowser"}(at=t.JumplistActionItemType||
(t.JumplistActionItemType={}));t.GroupHeaderQSCodes=function(){var n={};return
n[i.PathCompletion]="GPT",n[i.Store]="GT",n[i.SearchSuggestions]="GW",n[i.ActivityF
eedSuggestions]="AFOT",n[i.TopApps]="ADS",n}
();t.providerFailureLogName=vt;t.localDataSourceMayContainPII=yt;t.getSuggestionKey
=pt;t.MRUDatabaseName="mruWithIndex";t.isSantoriniWeb=l;t.isFileOrFolderLocalDataSo
urce=a;t.supportsShortcuts=wt;t.shouldOpenMiniSerp=bt;t.isIndexerBasedDataSource=kt
;t.isBodyOrSuggestion=dt;t.isModernSetting=gt;t.getAppItem=v;t.getAppPfn=ni;t.getFi
leItem=ti;t.isItemWithFileMetadata=y;t.isGroup=ii;t.getItemWithFileMetadata=ri;t.ge
tCommandLineItem=ui;t.getPathCompletionItem=fi;t.getPowerBiItem=ei;t.getBrowsingHis
toryItem=p;t.isScopeTile=oi;t.getGroupType=e;t.canGoToL2=si;t.isJumpListGroup=o;t.i
sRecourse=w;t.useMoreSearchOptionsHeader=hi;t.isTopHitChildGroup=ci;t.getParentSugg
estionGroupType=li;t.isChildSuggestion=s;t.isJumpListSuggestion=ai;t.getScope=b;t.I
conSize_GridLayout=92;t.IconSize_GridLayout_Medium=68;t.IconSize_GridLayout_Scaled=
130;t.getImageSizeValue=vi;t.populateImageRatio=yi;k={"zh-hans-cn":"zh-cn","zh-
hans-sg":"zh-cn","zh-hant-hk":"zh-hk","zh-hant-tw":"zh-tw",ko:"ko-kr",ja:"ja-
jp",nb:"nb-
no"};t.getCurrentLanguage=pi;t.createSuggestion=d;t.getSyntheticSuggestion=wi;t.get
NarratorText=g;t.isL2=nt;t.iconIsThumbnail=it;t.displayedInGridLayout=bi;t.parseWeb
SuppressionSignals=ki;t.decodeHtml=di,function(n)
{n[n.Author=1]="Author";n[n.LastModifiedBy=2]="LastModifiedBy";n[n.Content=3]="Cont
ent";n[n.Tags=4]="Tags";n[n.Album=5]="Album";n[n.Artist=6]="Artist";n[n.Genre=7]="G
enre";n[n.Location=8]="Location"}(h=t.MatchType||
(t.MatchType={}));t.createMatch=gi;rt=/[-[\]{}()*+!<=:?.\/\\^$|
#\s,]/g;t.tryGetLocationMatch=nr;t.tryGetTextContentMatch=tr;t.matchesOnPropertyHH=
ir;t.uses3lineTemplate=rr;t.isLightAnswer=ur;t.hasReverseHighlighting=fr;t.getMarke
tForBingAvailability=or;t.isEquivalentForPreviewPanePurposes=sr;t.shouldFetchStartM
enu=hr;t.isNullOrUndefined=cr;ft=function(){function t(n,t)
{this.callback=n;this.counter=0;this.expired=!1;this.isBlocked=t}return
t.prototype.check=function(n){this.expired||this.isBlocked||!n&&this.counter!=0||
(this.callback(),this.expired=!0)},t.prototype.increase=function(){+
+this.counter;this.check(!1)},t.prototype.decrease=function()
{if(this.counter==0)throw new Error("already zero");--this.counter;this.check(!
1)},t.prototype.unblock=function(t){var i=this;if(!this.isBlocked)throw new
Error("already unblocked");if(typeof t=="number"&&t<0)throw new Error("invalid
timeout");this.isBlocked=!1;this.check(t===0);typeof t!="number"||this.expired||
n.safeSetTimeout(function(){return i.check(!0)},t,"Semaphore.unblock")},t}
();t.Semaphore=ft;et=function(){function n(n,t,i)
{this.verb=n.verb;this.displayName=n.displayName;this.executeSync=n.executeSync?
function(){return i(function(){return n.executeSync()})}:function(){return
i(function(){return
n.executeAsync()})};this.isDefault=n.isDefault;this.icon=t;this.getIcon=n.getIcon}r
eturn n}
();t.DeviceItemVerbWrapper=et;t.shouldSetThisPcGroupSource=lr;t.getGroupSourceDispl
ayName=ar;t.IndexingOptionsSettingId="Classic_{87d66a43-7b11-4a28-9811-
c86ee395acf7}";t.EdgeAppId="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!
MicrosoftEdge";t.getRtlAdjustedKey=vr;t.getSearchSuggestionIcon=yr;t.getWebSuggesti
onsGroupHeader=pr;t.getWebsitesGroupHeader=wr;t.getWebSuggestionAnnotation=br;t.set
Visibility=kr;t.isRtl=ot;t.FOLDERID_Profile="{5E6C858F-0E22-4760-9AFE-
EA3317B67173}";t.FOLDERID_SkyDrive="{A52BBA46-E9E1-435f-B3D9-
28DAA648C0F6}";t.FOLDERID_System="{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}";t.FOLDERID_SystemX86="{D65231B0-B2F1-4857-A4CE-
A8E7C6EA7D27}";u={};t.clearFolderCaches=dr;t.getKnownFolderPathLC=st;f={};t.clearPa
thExpansionCache=gr;ht=/^\{([a-z0-9-]{36})\}
(.*)/i;t.resolveKnownFolderGUIDsInPath=nu;t.indexerFilePathToRegularPath=tu;t.enfor
ceOriginalOrder=iu;t.accountTypeToAuthType=ru;t.getSubstrateResourceOrScope=uu;t.ge
tBingResourceOrScope=fu;t.getAuthAccountForCloudContent=ct;t.getAccountTypeForCloud
Content=eu;t.isSmallerAnswersUX=ou;t.getTweakedSetting=su;t.shouldSkipSelectedScope
=hu;t.escapeRegExp=cu})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var t,i,r;(function(n)
{n.checking="checking";n.downloading="downloading";n.error="error";n.noUpdate="noup
date";n.obsolete="obsolete";n.updateReady="updateready"})(t||
(t={}));i=[t.checking,t.downloading,t.error,t.noUpdate,t.obsolete,t.updateReady];r=
function(){function r(n,t,i){i===void
0&&(i=Date.now);this._autoSuggestHost=n;this._instrumentationHelper=t;this.getNowTi
mestamp=i;this._appCacheEventIndex=1;this._superFreshEnabled=!
1;this._appCache=_w.applicationCache;this.subscribeForEvents()}return
r.prototype.instrumentSuperFreshUpdate=function(n){this._appCacheTimeline||
(this._appCacheTimeline=this.createAppCacheTimelineObject());this._appCacheTimeline
.SuperFreshUpdateData.T=this.getNowTimestamp();this._appCacheTimeline.SuperFreshUpd
ateData.S=n;this.sendAppCacheEvents()},r.prototype.registerSuperFresh=function()
{this._superFreshEnabled=!0},r.prototype.subscribeForEvents=function(){var
n=this;i.forEach(function(t,i){return sj_be(n._appCache,t,function(){return
n.handleAppCacheEvent(t,i)})})},r.prototype.handleAppCacheEvent=function(n,i){n!
=t.checking&&this._appCacheTimeline||
(this._appCacheTimeline=this.createAppCacheTimelineObject());this._appCacheTimeline
.AppCacheEvents[i]=this.getNowTimestamp();switch(n){case
t.obsolete:SharedLogHelper.LogWarning("handleAppCacheEvent",null,"AppCache marked
as obsolete and will be deleted");this.sendAppCacheEvents();break;case t.error:case
t.noUpdate:this.sendAppCacheEvents();break;case
t.updateReady:this._superFreshEnabled||
this.sendAppCacheEvents()}},r.prototype.sendAppCacheEvents=function(){var
f=_G.ServerIG,t,r,u,i;if(!f){SharedLogHelper.LogError("sendAppCacheEvents","Could
not instrument as server IG not known",new Error("Could
not instrument app cache event"));return}
(t=this._appCacheTimeline,t)&&(r=t.AppCacheEvents,u=[{I:t.EventIndex,E:r,S:t.SuperF
reshUpdateData,ABT:this._instrumentationHelper.getConversationStartTimestamp()}],r[
2]&&(u[0].OL=navigator.onLine),i=n.InstrumentationCommon.createPerfPingEvent(f,u,"A
ppCache",this._autoSuggestHost.getConversationId()),Log2.LogEvent(i.EventType,i.Dat
a,n.InstrumentationCommon.QFPERFPING_EVENT_NAME,null,null,i.ImpressionGuid,null,nul
l),this._appCacheTimeline=this.createAppCacheTimelineObject())},r.prototype.createA
ppCacheTimelineObject=function(){var
n={EventIndex:this._appCacheEventIndex,AppCacheEvents:{},SuperFreshUpdateData:
{T:undefined,S:undefined}};return this._appCacheEventIndex++,n},r}
();n.AppCacheInstrumentationHelper=r}(AutoSuggest||(AutoSuggest={})),function(n)
{var t;(function(t){var
u=["PP","ST","FL","LM"],i=SearchAppWrapper.CortanaApp,r=i.queryFormulationView,f=fu
nction(){function f(n){var i=this;this._host=n;this._startupPerfLogged=!
1;t.config.logTimeToFocus&&(n.bindConversationStart(function(){return
i._startupPerfLogged=!1}),n.bindQueryChangedOrInitialized(function(n){return
i.logClientPerfMetric(n)}));ThresholdUtilities.getCortanaHeaders(function(n)
{n&&(i._windowsFlights=n["X-BM-WindowsFlights"])})}return
f.prototype.logProfilerMarker=function(t,r,u,f,e){e||
(e={});n.safeExecute(function(){t==1?
i.logMeasure("Bing_QF_"+u,r,"QF",JSON.stringify(e),f):i.logVerboseTrace("Bing_QF_"+
u,r,"QF",JSON.stringify(e),f)},"logProfilerMarker")},f.prototype.getEnrichedClientI
nfo=function(n){var u={},f,e;return
u.entryPoint=i.entryPoint,u.previousExperience=r.previousExperience,u.qfMode=""+t.R
untimeConfig.QfMode,u.isSearchHome=n.isSearchHomeZI?
1:undefined,f=this._host.getFeatureDWORD("WideAtStartupDelta"),f.validFeature&&type
of f.featureValue=="number"&&(u.WideAtStartupDelta=f.featureValue),n&&n.scope!
=t.Scope.All&&(u.scope=t.Scope[n.scope]),e=r.searchHistory,u.deviceHistoryEnabled=e
&&e.isDeviceHistoryEnabled?1:0,t.windowsAccountType!
=0&&(u.windowsAccount=t.windowsAccountType.toString()),t.cortanaAccountType!
=0&&(u.cortanaAccount=t.cortanaAccountType.toString()),t.isSubstrateO365AccountConn
ected&&(u.o365Connected=1),t.isSubstrateOutlookAccountConnected&&(u.outlookConnecte
d=1),this._host.hasFallbackHappened()&&(u.fallback=1),this._host.isClientLocationAv
ailable()&&(u.clientLocationAvailable=1),this._host.isInputPanelVisible()&&(u.isInp
utPaneVisible=1),(t.windowsAccountType==2||
t.windowsAccountType==1)&&(t.cortanaAccountType==2||
t.cortanaAccountType==1)&&t.getWindowsAndCortanaAccountIdentityDiff()==2&&(u.diffAc
cForWindowsCortana=1),t.isMobileCache||(i.appsUseLightTheme===!
1&&(u.darkMode=1),i.colorPrevalenceEnabled&&(u.colorPrevalence=1),i.isSearchBoxInTa
skbar&&(u.searchBoxInTaskbar=1),i.taskbarOrientation&&(u.taskbarOrientation=i.taskb
arOrientation)),t.config.snrVersion&&(u.snrVersion=t.config.snrVersion),u.ciVersion
=t.ConstraintIndex.currentCIVersion,u.defaultBrowser=this._host.getDefaultBrowser()
.toString(),this._windowsFlights&&(u.windowsFlights=this._windowsFlights),u},f.prot
otype.getSuggestionsPageName=function()
{return"Page.SmartSearch.AS.Suggestions"},f.prototype.getApplicationName=function()
{return"SmartSearch"},f.prototype.getRankerModelId=function(){return
t.config.mainRankerId},f.prototype.createNonSuggestionDataSourceObject=function(n,i
)
{return{T:"D.Url",K:i.getKValue(),Val:n,Ho:t.SyntheticQSCodesMaps.HandoffsForNonSug
gestions[n],Gr:t.SyntheticQSCodesMaps.GroupsForNonSuggestions[n],NR:1}},f.prototype
.createDataSourceObject=function(i){var f=this,e=i.mayContainPII&&!
t.config.th,r={T:"D.Url",K:i.instItem.getKValue(),Q:e?
undefined:i.query,MQ:i.ciMatchedQuery?
i.ciMatchedQuery:undefined,Val:i.type,Ho:i.handoffType,Ans:i.isAnswer?
1:undefined,Gr:t.getGroupType(i),HC:i.hc?1:undefined,RAF:i.useRaf?
1:undefined,HS:i.fromHistory?1:undefined,F:i.features.length>0?
i.features.join(","):undefined,AC:i.autoCompleteType?
i.autoCompleteType:undefined,HCMS:i.highConfidenceMetaSuggestionScore,HCS:i.highCon
fidenceSuggestionScore,LM:i.suggestionLogMeta,Uri:i.actionUri,Src:i.source,Sg:i.seg
ments,NR:i.notAResult?1:undefined},u;return i.deviceItem?
r.DeviceSignals=n.safeExecute(function(){return
f.buildDeviceItemDataSource(e,i)},"buildDeviceItemDataSource"):t.isJumpListSuggesti
on(i)&&(r.DeviceSignals=n.safeExecute(function(){return
f.buildJumpListItemDataSource(i)},"buildJumpListItemDataSource")),t.config.th&&(u=i
,u.path&&(r.path=u.path),u.targetPathLC&&(r.targetPath=u.targetPathLC)),r.RankerSig
nals=this.buildRankerOutputDataSource(i),r},f.prototype.buildRankerOutputDataSource
=function(n){if(!n.rankingScore&&!n.featureStore)return
undefined;return{rankingScore:n.rankingScore,featureStore:n.featureStore,mruSuppres
sionScore:n.mruSuppressionScore,fbcScore:n.fbcScore,previewPaneScore:n.previewPaneS
core}},f.prototype.buildJumpListItemDataSource=function(i){var
u=i.jumpListItem,r={Rank:u.usagePoints||
undefined,LAD:n.isValidDate(u.lastAccessed)?
u.lastAccessed.toJSON():undefined};if(t.config.th)r.path=u.path,r.description=i.too
ltip;else if(!r.Rank&&!r.LAD)return undefined;return
r},f.prototype.buildDeviceItemDataSource=function(i,r){var
e=r.deviceItem,u={Rank:e.rankScore},f,s,h,o;if(e.propertyHits&&e.propertyHits.lengt
h>0&&(u.PHits=e.propertyHits.join(",")),i||(u.Id=e.id,u.DName!
=r.query&&(u.DName=e.displayName)),t.config.th&&(u.kind=e.kind),t.isSetting(r.type)
)return u.MDN=t.isModernSetting(e)?1:0,u;if(f=t.getAppItem(r),f)return
u.LAD=n.isValidDate(f.lastAccessed)?
f.lastAccessed.toJSON():undefined,u.AppLnch=f.totalLaunches,u.Args=f.launchArgument
s?1:0,u.MDN=f.isImmersive?
1:0,u.Ext=f.extension,t.config.th&&(u.CDT=n.isValidDate(f.createdDate)?
f.createdDate.toJSON():undefined,u.LMD=n.isValidDate(f.lastModifiedDate)?
f.lastModifiedDate.toJSON():undefined,u.launchArguments=f.launchArguments,u.filePat
h=f.filePath),u;if(s=t.getItemWithFileMetadata(r),s)
{if(u.Ext=s.extension,t.config.th&&(u.itemTypeDisplayName=s.itemTypeDisplayName),h=
t.getCommandLineItem(r),h)return
t.config.th&&(u.launchArguments=h.launchArguments,u.encodedPath=h.encodedPath),u;t.
getPathCompletionItem(r)||(o=r.deviceItem,u.CDT=n.isValidDate(o.createdDate)?
o.createdDate.toJSON():undefined,u.LMD=n.isValidDate(o.lastModifiedDate)?
o.lastModifiedDate.toJSON():undefined,u.Ext=o.extension?o.extension:"")}return
u},f.prototype.logMasterPageImpression=function(t){n.safeExecute(function(){return
ThresholdInst.LogPageImpression(t,null,t.enrichedClientInfo)},"logMasterImpressionF
orClient")},f.prototype.logDataSourceTimeout=function(i,f){var
s,e,o,h;if(r.logProviderFailure)for(s=function(u){n.isDataSourceEnabled(u,f)&&!
n.contains(i,u)&&n.safeExecute(function(){return
r.logProviderFailure(t.providerFailureLogName(u),"NoReturnForTopHit")},"logProvider
Failure")},e=0,o=u;e<o.length;e++)h=o[e],s(h)},f.prototype.onItemClick=function()
{r.resetConversationIdNextTimeQFIsShown&&r.resetConversationIdNextTimeQFIsShown()},
f.prototype.logClientPerfMetric=function(){if(!
this._startupPerfLogged&&i.isCenterScreen){this._startupPerfLogged=!0;var
f=n.cleanGuid(this._host.getRawImpressionGuid()),r=this.getClientPerfMetric(39),u=t
his.getClientPerfMetric(38),t=u-r;(t<=0||
r==n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE||
u==n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE)&&(t=n.InstrumentationCommon.
QFPERFPING_INVALID_MEASURE);Log2.LogEvent("ClientPerf",
{TTF:t.toString()},"SearchBoxFocused",null,null,f,null,null)}},f.prototype.getClien
tPerfMetric=function(t){var
r=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE,u=i.proactiveView?
i.proactiveView.perfMetrics:null;if(u)try{r=u.lookup(t).getTime();r=r<=0?
n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE:r}catch(f){}return r},f}
();t.WSBInstrumentationProvider=f})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var
t="/QF_KEYSTROKE_VIRTUAL_URL?",i="autosuggest",r=function(){function r(t,i,r){var
u=this;this._host=t;this._instrumentationProvider=i;this._clientTelemetry=r;this._c
onversationStartTimestamp=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE;this._
keystrokesPerfPingData={};this._keystrokesInstrumentationData={};this._finalizeKeys
trokeHandlers=[];ClientInstConfig.queueDumpInterval=n.config.logQueueDumpInterval;_
w.ClTrCo.SharedClickSuppressed=!0;t.bindConversationStart(function(){return
u.onConversationStart()})}return r.prototype.bindFinalizeKeystroke=function(n)
{this._finalizeKeystrokeHandlers.push(n)},r.prototype.getImpressionGuid=function(n)
{var t=this._keystrokesInstrumentationData[n];if(t&&t.ImpressionGuid)return
t.ImpressionGuid;throw"getImpressionGuid(): No IG for sequence
"+n;},r.prototype.updateSuggestionsList=function(n,t)
{this._clientTelemetry&&this._clientTelemetry.updateSuggestionsList(n,t)},r.prototy
pe.instrumentItemClickForPreviewPane=function(n,t,i,r,u,f,e,o,s){var
h=this.createBaseCustomGPingPayload(u,f);this.addPreviewPaneDataToGPingPayload(h,e,
o,s);this.instrumentItemClickAndGPing(h,n,t,i,r,u)},r.prototype.instrumentItemClick
ForContextMenu=function(n,t,i,r,u,f,e){var
o=this.createBaseCustomGPingPayload(u,f);this.addContextMenuDataToGPingPayload(o,e)
;this.instrumentItemClickAndGPing(o,n,t,i,r,u)},r.prototype.instrumentItemClick=fun
ction(n,t,i,r,u,f)
{if(t.getHandoffType()==999)this.instrumentLayoutItemSelect(t,i);else{var
e=this.createBaseCustomGPingPayload(u,f);this.instrumentItemClickAndGPing(e,n,t,i,r
,u)}},r.prototype.instrumentItemClickAndGPing=function(t,i,r,u,f,e)
{this.sendCustomGPing(t,r.getHValue(),i);var
s=this._keystrokesInstrumentationData[u],o=this._keystrokesInstrumentationData[u];o
?(s.RenderingStarted||this.updatePageIG(u),_G.IG!
=o.ImpressionGuid&&SharedLogHelper.LogError("instrumentItemClick","IG
("+o.ImpressionGuid+") for sequenceNumber "+u+" does not match the page IG
("+_G.IG+")",new Error("IG for sequence number does not match the currently
rendered page's IG
(_G.IG)")),this._clientTelemetry&&this._clientTelemetry.logItemClickedMeasure(o.Con
versationId,o.RawImpressionGuid,r,e)):SharedLogHelper.LogError("instrumentItemClick
","sequenceNumber:
"+u+" ConversationID: "+this._host.getConversationId(),new Error("No
instrumentation data found for
sequenceNumber"));this.finalizeKeystrokeLog(u,1);f&&f();this._instrumentationProvid
er.onItemClick();n.config.forceLogFlush?
Log2.ForceFlush():Log2.FlushMainQueueDontForce();_w.clickFlushedTime=sb_gt()},r.pro
totype.instrumentLayoutItemSelect=function(n,t){var
i={AppNS:n.getAppNS(),K:n.getLayoutKValue()};this.logClientInstEvent("Select","Item
Clicked",t,i)},r.prototype.createBaseCustomGPingPayload=function(n,t){var
i={};switch(n){case 1:i.i="k";i.mk=this.getModifierKeyCodes(t);break;case
3:i.i="t";break;case 4:i.i="p";break;case 5:i.i="n";break;case 6:i.i="b";break;case
0:i.i="x";i.mk=this.getModifierKeyCodes(t);break;default:i.mk=this.getModifierKeyCo
des(t)}return i},r.prototype.addContextMenuDataToGPingPayload=function(n,t)
{n.cm=t},r.prototype.addPreviewPaneDataToGPingPayload=function(n,t,i,r)
{t&&(n.pp=t,i&&(n.ppit=i),typeof
r=="number"&&(n.rho=r))},r.prototype.sendCustomGPing=function(t,i,r){var
u=i;n.isEmpty(t)||(u+="&PR="+JSON.stringify(t));n.safeExecute(function(){return
_w.si_T(u,null,null,0,r)},"logCustomGPing")},r.prototype.getModifierKeyCodes=functi
on(n){if(n){var
t=n.altKey?"A":"";if(t+=n.ctrlKey?"C":"",t+=n.shiftKey?"S":"",t)return t}return
undefined},r.prototype.previewPaneOpenedOrClosed=function(n,t,i,r,u,f){var
o=n?"Select":"Unselect",s=n?"PreviewPaneOpened":"PreviewPaneClosed",e;this.logClien
tInstEvent(o,s,t,f);n&&this._clientTelemetry&&(e=this._keystrokesInstrumentationDat
a[t],e&&this._clientTelemetry.logPreviewPaneOpenedMeasure(i,r,u))},r.prototype.logC
lientInstEvent=function(n,t,i,r){var
f=null,u;i&&(u=this._keystrokesInstrumentationData[i],u&&(f=u.ImpressionGuid));Log2
.LogEvent(n,r,t,null,null,f,null,null)},r.prototype.safeInstrument=function(n,t,i,r
){var u=this._keystrokesInstrumentationData[n];u?t(u):SharedLogHelper.LogError(i,
(r?r+" ":"")+" sequenceNumber: "+n,new Error("No instrumentation data found for
sequenceNumber"))},r.prototype.safeInstrumentPerf=function(n,t,i,r){var
u=this._keystrokesPerfPingData[n];u?t(u):SharedLogHelper.LogError(i,(r?r+" ":"")+"
sequenceNumber: "+n,new Error("No instrumentation data found for
sequenceNumber"))},r.prototype.instrumentRenderingStarted=function(n){var
t=this;this.safeInstrument(n,function(i){i.RenderingStarted=!
0;t.updatePageIG(n)},"instrumentRenderingStarted")},r.prototype.instrumentBeginRequ
est=function(t,i,r){var e;delete this._keystrokesInstrumentationData[t-
1];n.InstrumentedItem.resetKValues(t);e=this._keystrokesPerfPingData[t];e&&SharedLo
gHelper.LogError("instrumentBeginRequest","sequenceNumber: "+t,new Error("Duplicate
BeginRequest for sequenceNumber"));var
f=this._host.getConversationId(),u=this._host.getRawImpressionGuid(),o=n.cleanGuid(
u),s=n.getCurrentTime()-
r,h={RawImpressionGuid:u,ImpressionGuid:o,ConversationId:f,Query:i,PendingDataSourc
es:{},DataSources:{},RankerExtraInfo:{},DuplicateDS:{},Layout:
[],MasterPageImpressionCreated:!1,RenderingStarted:!1,PendingInstrumentedItems:
{},PendingSyntheticSuggestions:
{},OriginalTimestamp:s},c={RawImpressionGuid:u,ImpressionGuid:o,ConversationId:f,Pr
efixLength:i.queryToFetch?
i.queryToFetch.length:0,RequestBegin:this.getOffsetedNow(s),ResponseReceived:
{},MultipleResponsesReceived:{},DataSourcesState:this._searchServiceStatus?
{Indexer:this._searchServiceStatus}:undefined,RenderFinished:
{},AllDataSourcesProcessed:!1,PendingIcons:0,TopResultRendered:[],IconsRetrieved:
{},ResponseFromCache:
{}};this._keystrokesInstrumentationData[t]=h;this._keystrokesPerfPingData[t]=c;this
._clientTelemetry&&this._clientTelemetry.logNewKeystrokeMeasure(f,u,i)},r.prototype
.setSearchServiceStatus=function(n)
{this._searchServiceStatus=n},r.prototype.instrumentResponseReceived=function(n,t,i
,r,u){var f=this;this.safeInstrumentPerf(n,function(n){if(!u){var
e=f.getOffsetedNow();typeof n.ResponseReceived[t]!="number"?
n.ResponseReceived[t]=e:(n.MultipleResponsesReceived[t]||
(n.MultipleResponsesReceived[t]=[n.ResponseReceived[t]]),n.MultipleResponsesReceive
d[t].push(e))}i&&(n.DataSourcesState=n.DataSourcesState||
{},n.DataSourcesState[t]=i);r&&(n.ResponseFromCache[t]=r)},"instrumentResponseRecei
ved",t)},r.prototype.instrumentTopResultRendered=function(t,i){var
r=this;this.safeInstrumentPerf(t,function(u){var
f=r.getOffsetedNow(),e;u.TopResultRendered.push({V:f,T:i.join(",")});r.tryInstrumen
tRenderStopped(t,u);r._clientTelemetry&&(e=f-
r._keystrokesPerfPingData[t].RequestBegin,r._clientTelemetry.logTopResultsRenderedM
easure(u.RawImpressionGuid,i,e));n.config.th&&n.safeFireEvent("TopResultRendered")}
,"instrumentTopResultRendered")},r.prototype.instrumentRenderedLocalSuggestion=func
tion(n,t){var r=this._keystrokesInstrumentationData[n],u,f,i;if(r)
{for(u={},f={},i=0;i<t.length;i++)t[i].type=="FV"?
u[i]="TBD":t[i].type=="HU"&&(f[i]="TBD");r.FvSug=u;r.HuSug=f}},r.prototype.instrume
ntAggregatorCall=function(t,i){var r=this;this.safeInstrument(t,function(t){var
e={fastRankModelId:r._instrumentationProvider.getRankerModelId()},f,u;for(f in
t.RankerExtraInfo)e[f]=t.RankerExtraInfo[f];t.RankerExtraInfo={};u={T:"D.Aggregator
",Service:n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"Aggregator",AppNS:
n.InstrumentationCommon.DEFAULT_APP_NAMESPACE,DS:
[],rankerModelIds:e};n.config.counterFactualLoggingOn&&(u.counterFactualDiff=u.coun
terFactualDiff||
i);t.DataSources.aggregator=u},"instrumentAggregatorCall")},r.prototype.addDuplicat
esDataSource=function(t){var i=Object.keys(t.DuplicateDS).map(function(n){return
t.DuplicateDS[n]});i.length>0&&(t.DataSources.duplicates={T:"D.Duplicates",Service:
n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"Duplicates",AppNS:n.Instrume
ntationCommon.DEFAULT_APP_NAMESPACE,DS:i})},r.prototype.instrumentDuplicate=functio
n(t,i,r){this.safeInstrument(t,function(t){var
u=t.DuplicateDS[i.instItem.getHValue()],f;u||(u={T:"D.Duplicate",DS:
[{T:"D.DSRef",KRef:i.instItem.getKValue()}]},i.instItem.getAppNS()!
=n.InstrumentationCommon.DEFAULT_APP_NAMESPACE&&(u.DS[0].AppNS=i.instItem.getAppNS(
)),t.DuplicateDS[i.instItem.getHValue()]=u);f={T:"D.DSRef",KRef:r.instItem.getKValu
e()};r.instItem.getAppNS()!
=n.InstrumentationCommon.DEFAULT_APP_NAMESPACE&&(f.AppNS=r.instItem.getAppNS());u.D
S.push(f)},"instrumentDuplicate")},r.prototype.renderingStopped=function(n){return
n.PendingIcons==0&&n.AllDataSourcesProcessed},r.prototype.notifyAllDataSourcesProce
ssed=function(n){var t=this;this.safeInstrumentPerf(n,function(i)
{i.AllDataSourcesProcessed=!
0;t.tryInstrumentRenderStopped(n,i)},"notifyAllDataSourcesProcessed")},r.prototype.
notifyIconPending=function(t,i,r,u){var
f=this;this.safeInstrumentPerf(t,function(t){var e=r+
(i?"T":"S");t.IconsRetrieved[e]||
(t.IconsRetrieved[e]={B:f.getOffsetedNow(),E:n.InstrumentationCommon.QFPERFPING_INV
ALID_MEASURE,T:u},t.PendingIcons+
+)},"notifyIconPending",i?"TR":"SUG")},r.prototype.notifyIconReady=function(n,t,i)
{var r=this;this.safeInstrumentPerf(n,function(n){var u=i+
(t?"T":"S");n.IconsRetrieved[u]?
n.IconsRetrieved[u].E=r.getOffsetedNow():SharedLogHelper.LogError("notifyIconReady"
,null,new Error("Instrumenting unseen
icon"));n.PendingIcons--},"notifyIconReady",t?"TR":"SUG")},r.prototype.tryInstrumen
tRenderStopped=function(t,i)
{this.renderingStopped(i)&&(this.finalizeKeystrokeLog(t,2),n.config.th&&n.safeFireE
vent("RenderStopped"))},r.prototype.isLayoutLogged=function(n){return
this._keystrokesInstrumentationData[n].MasterPageImpressionCreated},r.prototype.fin
alizeKeystrokeLog=function(n,t){var r,i;t===void
0&&(t=0);this._finalizeKeystrokeHandlers.forEach(function(n){return
n(t==0)});r=this._keystrokesInstrumentationData[n];r&&this.logKeystrokeData(r,n);t!
=1&&(i=this._keystrokesPerfPingData[n],i&&(this.logPerfPingEvent(this.createKeystro
kePerfPingEvent(n,i)),this._clientTelemetry&&this._clientTelemetry.logDataSourcePer
formancesMeasure(i)))},r.prototype.instrumentRenderFinished=function(n,t,i){var
r=this;this.safeInstrumentPerf(n,function(u){var
f=r.getOffsetedNow();t.forEach(function(n){return
u.RenderFinished[n]=f});r.tryInstrumentRenderStopped(n,u);r._clientTelemetry&&r._cl
ientTelemetry.logGroupsRenderedMeasure(i)},"instrumentRenderFinished",t.join(","))}
,r.prototype.instrumentSyntheticInstrumentedItem=function(n,t,i){var
r=this._keystrokesInstrumentationData[n];r?
r.PendingInstrumentedItems[t]=i:SharedLogHelper.LogError("instrumentSyntheticInstru
mentedItem",t,new Error("keystrokesInstrumentationData not
found"))},r.prototype.instrumentSyntheticSuggestion=function(n,t){var
i=this._keystrokesInstrumentationData[n];i?
i.PendingSyntheticSuggestions[t.type]=t:SharedLogHelper.LogError("instrumentSynthet
icSuggestion",t.type,new Error("Instrumentation synthetic suggestion after
flush"))},r.prototype.getInstrumentedSyntheticSuggestion=function(n,t){return
this._keystrokesInstrumentationData[n].PendingSyntheticSuggestions[t]},r.prototype.
instrumentDataSource=function(n,t,i,r){this.safeInstrument(n,function(n){var
u,f,e;if(r&&r.rankerExtraInfo)for(u in
r.rankerExtraInfo)n.RankerExtraInfo[u]=r.rankerExtraInfo[u];f=i||
[];e=n.PendingDataSources[t];n.PendingDataSources[t]=e?
e.concat(f):f},"instrumentDataSource",t)},r.prototype.processPendingDataSources=fun
ction(t){var i,f,r,u,e,o;for(i in
t.PendingDataSources)if(f=t.PendingDataSources[i],f.length>0)
{for(r=[],u=0,e=f;u<e.length;u+
+)o=e[u],r.push(this._instrumentationProvider.createDataSourceObject(o));i=="Web"&&
(i="WebAS");r.length>0&&(t.DataSources[i]={T:"D."+i,AppNS:n.InstrumentationCommon.D
EFAULT_APP_NAMESPACE,Service:n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:
i,SC:r.length,DS:r})}t.PendingDataSources={}},r.prototype.instrumentSnRProviderFetc
hUrl=function(n,t){this.safeInstrument(n,function(n)
{n.SnRProviderFetchUrl=t},"instrumentSnRProviderFetchUrl")},r.prototype.onConversat
ionStart=function()
{if(this._conversationStartTimestamp=n.getCurrentTime(),this._searchServiceStatus=n
ull,this._clientTelemetry){var
t=this._host.getConversationId();this._clientTelemetry.logConversationStartMeasure(
t,this._conversationStartTimestamp)}this._keystrokesPerfPingData=[]
},r.prototype.getConversationStartTimestamp=function(){return
this._conversationStartTimestamp},r.prototype.logDataSourceTimeout=function(n,t)
{this._instrumentationProvider.logDataSourceTimeout(n,t)},r.prototype.createKeystro
kePerfPingEvent=function(t,i){var
u={I:t,PL:i.PrefixLength,K:i.RequestBegin,RRT:i.ResponseReceived,MRT:i.MultipleResp
onsesReceived,RFT:i.RenderFinished,TRR:i.TopResultRendered,RS:undefined,IRT:i.Icons
Retrieved},r,f,e,o,s;if(this.renderingStopped(i)){for(r=0,f=0,e=u.TRR;f<e.length;f+
+)o=e[f],r=Math.max(r,o.V);for(s in u.RFT)r=Math.max(r,u.RFT[s]);r&&(u.RS=r)}return
n.InstrumentationCommon.createPerfPingEvent(i.ImpressionGuid,
[u],"Keystroke",i.ConversationId,i.DataSourcesState,i.ResponseFromCache)},r.prototy
pe.updatePageIG=function(n)
{_G.IG=this.getImpressionGuid(n)},r.prototype.createMasterPageImpression=function(t
,r,u,f,e){var c=this,h={dataSources:e||[],layoutNodes:[],pageName:t,rawQuery:f?
f.queryToFetch:"",isQuery:!
1,impressionUrl:this.createVirtualImpressionURL(r,u),appName:this._instrumentationP
rovider.getApplicationName(),enrichedClientInfo:
{FDPartnerEntry:i,nclid:_G.nclid,isOffline:n.isBrowserOnline()?0:1,webRequested:u?
1:0}},o=n.safeExecute(function(){return
c._instrumentationProvider.getEnrichedClientInfo(f)},"getEnrichedClientInfo"),s;if(
o)for(s in o)h.enrichedClientInfo[s]=o[s];return
h},r.prototype.logKeystrokeData=function(i){var u,f,r;
(this.processPendingDataSources(i),n.config.th&&this.addDuplicatesDataSource(i),u=O
bject.keys(i.DataSources).map(function(n){return
i.DataSources[n]}).concat(this.createNonSuggestionsDataSource(i.PendingInstrumented
Items,i.PendingSyntheticSuggestions)),i.DataSources={},i.PendingSyntheticSuggestion
s={},i.PendingInstrumentedItems={},u.length==0&&i.MasterPageImpressionCreated)||
(i.RenderingStarted&&(f=DsLManager.CreateLayoutNode(_d.body,n.InstrumentationCommon
.DEFAULT_APP_NAMESPACE,!1,!
0,i.MasterPageImpressionCreated)),i.MasterPageImpressionCreated?
Log2.LogEvent("ClientInst",null,null,u,f,i.ImpressionGuid,null,null):
(r=this.createMasterPageImpression(this._instrumentationProvider.getSuggestionsPage
Name(),t,i.SnRProviderFetchUrl?
i.SnRProviderFetchUrl.substring(i.SnRProviderFetchUrl.indexOf("?")
+1):"",i.Query,u),f&&(r.layoutNodes=f),i.FvSug&&Object.keys(i.FvSug).length>0&&(r.e
nrichedClientInfo.FvSug=i.FvSug),i.HuSug&&Object.keys(i.HuSug).length>0&&(r.enriche
dClientInfo.HuSug=i.HuSug),r.clientTimestamp=i.OriginalTimestamp,this.logMasterPage
Impression(i.ImpressionGuid,r),i.MasterPageImpressionCreated=!
0))},r.prototype.logPerfPingEvent=function(t)
{Log2.LogEvent(t.EventType,t.Data,n.InstrumentationCommon.QFPERFPING_EVENT_NAME,nul
l,null,t.ImpressionGuid,null,null);n.config.th&&ClientTestHooks.DebugLogNoConsole("
perfPingEvent",[t])},r.prototype.logMasterPageImpression=function(t,i){if(i){if(!t)
{SharedLogHelper.LogError("logMasterPageImpression",null,new Error("Missing
impressionGuid"));return}i.impressionGuid=t;this._instrumentationProvider.logMaster
PageImpression(i,this._host.getConversationId());n.config.th&&ClientTestHooks.Debug
LogNoConsole("masterPageImpression",i,t)}},r.prototype.instrumentInitializationFini
sh=function(t){var u=_G.ServerIG,i,r;if(!u)
{SharedLogHelper.LogError("instrumentInitializationFinish","Could not instrument as
server IG not known",new Error("Could not instrument initilization
finish"));return}if(i=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE,r=_w.perfo
rmance,r&&r.timing&&(i=r.timing.navigationStart),!(i<=0)){var f=t.getTime()-
i,e=n.getCurrentTime()-
i,o=[{BLT:f,ILT:e}],s=n.InstrumentationCommon.createPerfPingEvent(u,o,"Load");this.
logPerfPingEvent(s)}},r.prototype.getOffsetedNow=function(t){return t===void
0&&(t=n.getCurrentTime()),t-
this._conversationStartTimestamp},r.prototype.createNonSuggestionsDataSource=functi
on(t,i){var r=[],u,f;for(u in
t)r.push(this._instrumentationProvider.createNonSuggestionDataSourceObject(u,t[u]))
;for(u in
i)r.push(this._instrumentationProvider.createDataSourceObject(i[u]));return
r.length?
(f={T:"D.ContentGroup",AppNS:n.InstrumentationCommon.DEFAULT_APP_NAMESPACE,Service:
n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"NonSuggestions",SC:r.length,
DS:r},[f]):[]},r.prototype.createVirtualImpressionURL=function(t,i){var
r=n.getWindowProtocol()+"//"+n.getWindowHost()+t;return r+=i?
i:n.Service.QueryParams.ConversationId+"="+n.encodeQueryParameter(this._host.getCon
versationId()),_G.ServerIG&&(r+="&ASInitIG="+n.encodeQueryParameter(_G.ServerIG)),r
},r}();n.InstrumentationHelper=r}(AutoSuggest||(AutoSuggest={})),function(n){var
t="&nclid=",i="&ts=",r="&nclidts=",u="&tsms=",f="&elv=",e="&cc=",o="&setlang=",s="&
cvid=",h="&qs=",c="&ao=",l="&wsso=",a=function(){function a(t,i,r,u){if(r===void
0&&(r=Date.now),u===void 0&&(u=n.getWindowProtocol()
+"//"+n.getWindowHost()),this._host=t,this._searchPreCacheHandler=i,this.getNowTime
stamp=r,this._baseUrl=u,n.config.overrideHost){var
f=n.getWindowHost();f.startsWith("www.")&&(this._baseUrl=n.getWindowProtocol()
+"//"+n.config.overrideHost+f.substring(3))}}return
a.prototype.getSearchUrl=function(t,i,r,u,e,o,s,h,a){var
b=e===13?"images":e===14?"videos":"",v,y,p,w;return u||(u=(b?"/"+b:"")+"/search?
q="+n.encodeQueryParameter(i)),v=this._baseUrl+u,v+=n.config.th&&ClientTestHooks.is
TesthookParamSet("isWindowsTest")?"&form=MONITR&traffictype=wintest":"&form="+n.enc
odeQueryParameter(o||
this._host.getFormCode()),a&&(v+=c+"1"),v=this.enrichUrlWithSuggestionType(v,h?"P":
r),v=this.enrichUrlWithCvid(v),n.config.suppressPqParameter||
(v+="&pq="+n.encodeQueryParameter(t)),y=this._host.getMSNRefIg(),y&&(v+="&refig="+y
),v=this.enrichUrlWithMarketInfo(v),v=this.enrichUrlWithDeviceInfo(v),s||
(v=this.enrichUrlWithMuidInfo(v),p=this._host.getElToken(),p&&this._baseUrl.startsW
ith("https:")&&(v+=f+n.encodeQueryParameter(p)),v=this.enrichUrlWithSafeSearchInfo(
v),this._searchPreCacheHandler&&(v=this._searchPreCacheHandler.attempPreCacheAndEnr
ichUrl(v))),w=this._host.getSafeSearchSetting(),w&&(v+=l+w),v},a.prototype.getImage
SearchUrl=function(n){return n?this._baseUrl+"/images/detail/upload?
FORM=SBIWSB":this._baseUrl+"/images/search?
view=detailv2&iss=sbiupload"},a.prototype.enrichUrlWithDeviceInfo=function(n)
{this._host.isEducationEnvironment()&&(n+="&DAF0=1");this._host.isWindowsS()&&(n+="
&DAF1=1");var t=this._host.getPartnerSearchCode();return
t&&(n+="&PC="+t),n},a.prototype.enrichUrlWithMarketInfo=function(n){var
t=this._host.getRegion(),i=this._host.getLanguage();return
t&&(n+=e+t),i&&(n+=o+i),n},a.prototype.enrichUrlWithSafeSearchInfo=function(n)
{return this._host.getSafeSearchSetting()=="Strict"?
n+"&adlt=strict":n},a.prototype.enrichUrlWithMuidInfo=function(f){var e,o,s;return
_G.nclid&&(f+=t+n.encodeQueryParameter(_G.nclid),e=this.getNowTimestamp().toString(
),f+=i+n.encodeQueryParameter(e),o=e.substring(0,e.length-
3),f+=r+n.encodeQueryParameter(o),s=e.substring(e.length-
3),f+=u+n.encodeQueryParameter(s)),f},a.prototype.enrichUrlWithCvid=function(t)
{return t+
(s+n.encodeQueryParameter(this._host.getConversationId()))},a.prototype.enrichUrlWi
thSuggestionType=function(t,i){return t+(h+n.encodeQueryParameter(i))},a}
();n.NavigationHelper=a}(AutoSuggest||(AutoSuggest={})),function(n){var
t=function(){function t(t,i){var
r=this;this.host=t;this._selectableItemsContainer=i;t.bindKeyDown(function(t,u,f)
{var e=!1;t==9?
e=r.selectFirstItemInNextGroup(u&&u.shiftKey):n.isUpOrDownKey(t)&&(e=r.selectNextIt
em(n.isUpKey(t)));i.onAfterKeyDown(t,u,f,e)})}return
t.prototype.selectFirstItemInNextGroup=function(t){var
i=this._selectableItemsContainer.getSelectableItemsByGroup();if(i.length==0)return!
1;var f=this._selectableItemsContainer.getSelectedItem(),r=i.findIndex(function(t)
{return n.contains(t,f)}),e=r<0?-1:i[r].findIndex(function(n){return
n==f}),u;return(r<0?u=i[0][0]:t&&e>0?u=i[r][0]:t?r>0&&(u=i[r-1]
[0]):r+1<i.length&&(u=i[r+1][0]),u)?(this._selectableItemsContainer.select(u,!0),!
0):!1},t.prototype.selectNextItem=function(t){var
i=this._selectableItemsContainer.getSelectableItems(),e;if(i.length==0)return!1;var
u=this._selectableItemsContainer.getSelectedItem(),r=u?i.indexOf(u):-1,f=t?
r==0:r==i.length-1;return f&&n.RuntimeConfig.AllowKeyboardNavOffCanvas?
(this._selectableItemsContainer.select(null,!0),!0):f&&!
n.RuntimeConfig.AllowKeyboardNavCycling?!1:(e=t?r<=0?i.length-1:r-1:
(r+1)%i.length,this._selectableItemsContainer.select(i[e],!0),!0)},t}
();n.KeyboardEvtHandler=t}(AutoSuggest||(AutoSuggest={})),function(n){var
t=function(){function t(n,t,i,r,u)
{this._host=n;this._instrumentationHelper=t;this._ariaLogger=i;this._aggregator=r;t
his._rootViewModel=u;this._lastUsedId=-1;this._sequenceNumber=-
1;this._suggestionsQueue={};this._dataSourcesCompleted={}}return
t.prototype.initiateSequenceNumber=function(t,i){var
o=this,u,f,r,s,e;if(this._sequenceNumber>=t)
{SharedLogHelper.LogError("initiateSequenceNumber",null,new Error("Unexpected
sequence
number"));return}for(this.resetStateForNewQuery(t,i),this._highPriorityDataSources=
[],this._normalPriorityDataSources=[],this._lowPriorityDataSources=[],u=0,f=n.confi
g.enabledDataSources;u<f.length;u++)(r=f[u],r!=n.WebDataSource||n.isBingEnabled(!
0))&&(s=i.enabledDataSources[r],s&&(n.config.lowPriorityDataSources[r]?
this._lowPriorityDataSources.push(r):n.config.highPriorityDataSources[r]?
this._highPriorityDataSources.push(r):this._normalPriorityDataSources.push(r)));thi
s._highPriorityDataSources.length==0&&this._normalPriorityDataSources.length==0&&th
is._lowPriorityDataSources.length==0?this.processSuggestions(!1):
(e=this.getLatencyTimeout(),e>0&&(this._bufferingTimer=n.safeSetTimeout(function()
{o._bufferingTimer=null;o.processSuggestions(!
0)},e,"processSuggestionsBuffering")))},t.prototype.getLatencyTimeout=function()
{return this._partialQuery.queryToFetch?
n.config.latencyTimeout:n.config.latencyTimeoutForZeroInput},t.prototype.queueSugge
stions=function(t,i,r,u,f){var e;if(t>this._sequenceNumber)
{SharedLogHelper.LogError("queueSuggestions",null,new Error("Unexpected
sequence number"));return}if(!(t<this._sequenceNumber))
{if(this._dataSourcesCompleted[i])
{SharedLogHelper.LogError("queueSuggestions",i,new Error("Data source already
completed"));return}if(!n.contains(this._highPriorityDataSources,i)&&!
n.contains(this._normalPriorityDataSources,i)&&!
n.contains(this._lowPriorityDataSources,i))
{SharedLogHelper.LogError("queueSuggestions",i,new Error("Unexpected data
source"));return}this._suggestionsQueue[i]&&!this._suggestionsQueue[i].updated?
(e=this._suggestionsQueue[i].suggestions).push.apply(e,r):this._suggestionsQueue[i]
={suggestions:r,updated:!1};this._dataSourcesCompleted[i]=!
f;u&&(this._extraSignalsMap[i]=u);f||
this._arrivedDataSources.push(i);this._allDataSourcesArrived=this._arrivedDataSourc
es.length==this._highPriorityDataSources.length+this._normalPriorityDataSources.len
gth+this._lowPriorityDataSources.length;this._processingStopped||
this._instrumentationHelper.isLayoutLogged(this._sequenceNumber)?
this._allDataSourcesArrived&&this._instrumentationHelper.notifyAllDataSourcesProces
sed(this._sequenceNumber):this.processSuggestions(!
1)}},t.prototype.resetTimers=function()
{this._bufferingTimer&&(sb_ct(this._bufferingTimer),this._bufferingTimer=null)},t.p
rototype.resetStateForNewQuery=function(t,i)
{this._arrivedDataSources=[];this._allProcessedDataSources={};this._sequenceNumber=
t;this._partialQuery=i;this._suggestionsQueue={};this._dataSourcesCompleted={};this
._extraSignalsMap={};this._renderedThisSequenceNumber=!
1;this._waitingForMoreResults=!0;this._processingStopped=!
1;this._allDataSourcesArrived=n.isEmpty(i.enabledDataSources);this.resetTimers()},t
.prototype.getDependencies=function(t){var i=this;return
this._host.dataSourceDependencies(t).filter(function(t){return
n.isDataSourceEnabled(t,i._partialQuery)})},t.prototype.haveAllDataSourcesArrived=f
unction(n){var t=this;return n.every(function(n){return!!
t._suggestionsQueue[n]})},t.prototype.haveAllDataSourcesCompleted=function(n){var
t=this;return n.every(function(n){return!!
t._dataSourcesCompleted[n]})},t.prototype.processSuggestions=function(t){var
i=this,u=[],o=[],r,l=this.getLatencyTimeout()>0&&this._bufferingTimer==null,s=this.
haveAllDataSourcesArrived(this._highPriorityDataSources),a=s||
l,v=this.haveAllDataSourcesCompleted(this._normalPriorityDataSources),y=this.haveAl
lDataSourcesCompleted(this._highPriorityDataSources),h=y&&v,c;t&&(this._instrumenta
tionHelper.logDataSourceTimeout(Object.keys(this._suggestionsQueue),this._partialQu
ery),this._ariaLogger&&this._ariaLogger.logDataProviderFailure(Object.keys(this._su
ggestionsQueue),this._partialQuery.originalQuery));var f=t&&!
this._renderedThisSequenceNumber,p=function(t,e){var s;if(!
t.updated&&i.getDependencies(e).every(function(t){return
n.contains(i._arrivedDataSources,t)})){if(o.push(e),i._allProcessedDataSources[e]=!
0,t.suggestions.length>0&&(s=i.canHaveSuppressions(e)?
t.suggestions.filter(function(n){return!
i.isSuppressed(e,n,t.suggestions)}):t.suggestions,s.length>0)){r||
(r=i._renderedThisSequenceNumber?i._rootViewModel.getSuggestions(!0):[]);var
h=i.removeDuplicatesAndAssignIds(s,r,u,e),c=h[0],l=h[1];u=u.concat(c);l&&(f=!
0)}t.updated=!0}},e=function(n){var u,t,r;for(u in
n)t=n[u],r=i._suggestionsQueue[t],r&&p(r,t)};a&&e(this._highPriorityDataSources);th
is._bufferingTimer&&h&&(sb_ct(this._bufferingTimer),this._bufferingTimer=null);c=th
is.getLatencyTimeout()>0?
this._bufferingTimer==null:s;c&&(e(this._normalPriorityDataSources),e(this._lowPrio
rityDataSources));this._waitingForMoreResults&&h&&(this._waitingForMoreResults=!1,
(!this._renderedThisSequenceNumber||this._rootViewModel.mayNeedFlush()||(r||
this._rootViewModel.getSuggestions(!0)).length==0)&&(f=!
0));this._partialQuery.showProgressBar&&this._allDataSourcesArrived&&(f=!0);
(u.length>0||f)&&(r||(r=this._renderedThisSequenceNumber?
this._rootViewModel.getSuggestions(!0):
[]),this.addSuggestions(r,u,o,f));this._allDataSourcesArrived&&this._instrumentatio
nHelper.notifyAllDataSourcesProcessed(this._sequenceNumber)},t.prototype.getAggrega
torResult=function(t,i,r){var e=this.waitingForWebProvider(),f=null,u,o;return
n.config.counterFactualLoggingOn&&(f=this._aggregator.rank(i,r,this._extraSignalsMa
p,this._partialQuery,t,this._sequenceNumber,e,!
0)),u=this._aggregator.rank(i,r,this._extraSignalsMap,this._partialQuery,t,this._se
quenceNumber,e,!1),o=n.config.counterFactualLoggingOn&&(!
this.isSuggestionOrderTheSame(u.topResults,f.topResults)||!
this.isSuggestionOrderTheSame(u.suggestionsToAdd,f.suggestionsToAdd)),
[u,o]},t.prototype.waitingForWebProvider=function(){var t=this;return
n.isBrowserOnline()&&[n.WebDataSource].concat(this.getDependencies(n.WebDataSource)
).some(function(i){return n.isDataSourceEnabled(i,t._partialQuery)&&!
t._allProcessedDataSources[i]})},t.prototype.isSuggestionOrderTheSame=function(n,t)
{var r=function(n){return n.query+"\t"+n.type},i;if(n.length!=t.length)return!
1;for(i=0;i<n.length;i++)if(r(n[i])!=r(t[i]))return!1;return!
0},t.prototype.addSuggestions=function(t,i,r,u){var
e=this,o=this._renderedThisSequenceNumber?
this._rootViewModel.getCurrentTopResults():[],v=n.safeExecute(function(){return
e.getAggregatorResult(o,t,i)},"getAggregatorResults",[null,!
1]),f=v[0],p=v[1],s,h,l,c,a,y;for(f||
(f={topResults:o,suggestionsToAdd:i,suggestionsToRemove:[],groupOrder:
[]}),this._instrumentationHelper.instrumentAggregatorCall(this._sequenceNumber,p),i
=f.suggestionsToAdd,s=f.suggestionsToRemove,h=0,l=f.topResults;h<l.length;h+
+)c=l[h],n.contains(t,c)&&!n.contains(o,c)&&s.push(c);(u||i.length!=0||s.length!
=0||!n.sequenceEqual(o,f.topResults))&&(a=!
this._renderedThisSequenceNumber,a&&(this._renderedThisSequenceNumber=!
0,this._instrumentationHelper.instrumentRenderingStarted(this._sequenceNumber)),y=n
.safeExecute(function(){return
e._rootViewModel.update(a,f.topResults,e._waitingForMoreResults,e._sequenceNumber,i
,s,r,f.groupOrder,e._allDataSourcesArrived,e._extraSignalsMap)},"rootViewModel.upda
te",0,null,function(t)
{n.WSB&&n.WSB.fallbackToPrepopulatedBundle&&n.WSB.fallbackToPrepopulatedBundle(t)})
,y==0&&(this._processingStopped=!
0,this.resetTimers()))},t.prototype.removeDuplicatesAndAssignIds=function(n,t,i,r)
{var f=this,h=function(n){n.id||(n.id="id_"+ ++f._lastUsedId)},s=!
1,o;if(this._aggregator.canHaveDuplicates(r,this._partialQuery)){var
e=[],c=function(o){var a=n[o],l=t.findIndex(function(n){return
f._aggregator.mergeDuplicates(f._partialQuery,n,a)}),c;if(l>=0)return
c=t[l],c.needsRefreshAfterDeduping&&(s=!
0),u._instrumentationHelper.instrumentDuplicate(u._sequenceNumber,c,a),"continue";i
f(l=i.findIndex(function(n){return
f._aggregator.mergeDuplicates(f._partialQuery,n,a)}),l>=0)return
c=i[l],c.needsRefreshAfterDeduping&&(c.needsRefreshAfterDeduping=!
1),u._instrumentationHelper.instrumentDuplicate(u._sequenceNumber,c,a),"continue";i
f(u._aggregator.canHaveDuplicatesWithinDataSource(r,u._partialQuery)&&(l=e.findInde
x(function(n){return
f._aggregator.mergeDuplicates(f._partialQuery,n,a)}),l>=0))return
c=e[l],c.needsRefreshAfterDeduping&&(c.needsRefreshAfterDeduping=!
1),u._instrumentationHelper.instrumentDuplicate(u._sequenceNumber,e[l],a),"continue
";h(a);e.push(a)},u=this;for(o=0;o<n.length;++o)c(o);return[e,s]}return
n.forEach(function(n){return h(n)}),
[n,s]},t.prototype.canHaveSuppressions=function(t){return
n.config.suppressDataSources[t]||
n.config.dataSourcesWithSuppressedTypes[t]},t.prototype.isSuppressed=function(t,i)
{return n.config.suppressDataSources[t]||n.config.suppressTypes[i.type]},t}
();n.SuggestionsRenderingManager=t}(AutoSuggest||(AutoSuggest={})),function(n)
{function y(n){return n.handoffType==1?
n.query:HitHighlightingParser.removeMarkers(n.text)}function f(n){var
t,i;if(n.length==0)return 0;for(t=0,i=0;i<n.length;i++)t=(t<<5)-t+n.charCodeAt(i)|
0;return t}function t(n,t){var u,i,r;if(!n)return t.length;if(!t)return
n.length;for(u=[],i=0;i<=t.length;i++)u[i]=[i];for(r=0;r<=n.length;r++)u[0]
[r]=r;for(i=1;i<=t.length;i++)for(r=1;r<=n.length;r++)u[i][r]=t.charAt(i-
1)==n.charAt(r-1)?u[i-1][r-1]:Math.min(u[i-1][r-1]+1,Math.min(u[i][r-1]+1,u[i-1][r]
+1));return u[t.length][n.length]}function p(n,i){return
n&&(n=n.toLocaleLowerCase()),i&&(i=i.toLocaleLowerCase()),t(n,i)}function o(n,t,i)
{var r=0,u;return(t>0||i>0)&&(t>0&&i>0?(i>t&&(u=t,t=i,i=u),r=n/(t-
n+i)):r=Number.MAX_VALUE),r}function s(n,t){var
r=n.length,e=t.length,a,v,f,o,i;if(r===0&&e===0)return 1;var h=new Array(r),s=new
Array(e),u=0,c=0,l=Math.floor(Math.max(r,e)/2)-1;for(i=0;i<r;i+
+)for(a=Math.max(0,i-l),v=Math.min(e,i+l+1),f=a;f<=v;f++)if(!s[f]&&n[i]==t[f])
{h[i]=!0;s[f]=!0;u++;break}if(u===0)return 0;for(o=0,i=0;i<r;i++)if(h[i]){while(!
s[o])o++;n[i]!=t[o]&&c++;o++}return(u/r+u/e+(u-c/2)/u)/3}function w(n,t){var
i=s(n,t),r,u;return i<1?i:(r=.1,u=h(n,t),i+u*r*(1-i))}function h(n,t){for(var
i=0;i<4;i++)if(n[i]!=t[i])return i;return++i}function b(n,t){return!n||!t?
0:n.length+1<=t.length&&t[n.length]==" "?1:n.length==t.length?1:0}function k(n){var
r=0,i=1,t;if(n&&n.length>1)for(t=1;t<n.length;t++)n.charAt(t)==n.charAt(t-1)?i+
+:i=1,i>r&&(r=i);else if(n)return 1;return r}function d(n){return n&&n.length>0?
n.trim().split(" ").length:0}function g(n){var t=new RegExp("^[0-9a-zA-Z ]+
$");return n&&t.test(n)?1:0}function nt(n){return n&&n.length>0&&n.charAt(n.length-
1)==" "?1:0}function tt(n){return n&&n.length>0&&(n.includes("http://")||
n.includes("https://")||n.includes("."))?1:0}function it(t,i,r,u){var
o,e,s,h;t.includes("?")&&(r[117]=1,ot(t)&&(r[127]=1));t.replace("///","").replace("
//","").includes("/")&&(r[118]=1);t.includes(".")&&(r[119]=1);o=u.cvid+u.privacyNum
ber+t;r[120]=f(o);e=t.toLocaleLowerCase();(e.startsWith("www.")||
e.startsWith("http://www.")||
e.startsWith("https://www."))&&(r[122]=1);e.startsWith("www.")||
e.startsWith("http://")?r[123]=1:e.startsWith("https://")?
r[124]=1:e.startsWith("ftp://")?
r[125]=1:r[126]=1;i&&(s=n.normalizeUrl(e,15),h=n.normalizeUrl(i,15).toLocaleLowerCa
se(),s.startsWith(h)&&(r[187]=1))}function rt(n,i,r,u,e){if(e)
{r[128]=t(e,i);r[129]=e.length;var
o=u.cvid+u.privacyNumber+e;r[130]=f(o)}}function ut(n,i,r){var
e=n.toLocaleLowerCase(),s,u,f,h,c;if(r[140]=n.length,s=e.split("
"),r[144]=s.length,i)for(r[141]=t(n,i),r[142]=Math.min(100,o(r[141],i.length,n.leng
th)),u=i.toLocaleLowerCase(),e.includes(u)&&(r[143]=1),e.startsWith(u)&&(r[188]=1),
f=0,h=s;f<h.length;f++)if(c=h[f],c==u){r[145]=1;break}}function ot(n){var
t=et.find(function(t){return n.startsWith(t)});return n=t?
n.substr(t.length):n,ft.some(function(t){return n.startsWith(t)})}function st(n)
{var i=0,r,t;if(n)for(r in
n)t=n[r],t&&t.prefixLaunchCount&&(i+=t.prefixLaunchCount);return i}function
ht(t,i,r,u){if(r){var
f=r[t];f&&(i[47]=f.prefixLaunchCount,i[49]=f.lastLaunchTime,i[101]=u,u>0&&(i[100]=f
.prefixLaunchCount/u),f.previewPaneLaunchCount&&f.lastPreviewPaneLaunchTime&&(i[301
]=f.previewPaneLaunchCount,f.lastPreviewPaneLaunchTime==f.lastLaunchTime&&(i[302]=1
),i[303]=n.getCurrentTime()-f.lastPreviewPaneLaunchTime))}}function ct(n,t,i){if(i)
{var r=i[n];r&&(t[281]=r.probability,t[282]=r.weight)}}function lt(n,t,r,u,f,e)
{if(t){var s=i(u,r),o=t[s];o&&(f?
(n[153]=o.ProbSugClickGivenPref,n[152]=o.ClicksOnSugGivenPref):e?
(n[161]=o.Loglikelihood,n[162]=o.ProbSugClickGivenBackground,n[163]=o.ClicksOnSugGi
venPref,n[164]=o.ProbSugClickGivenPref,n[165]=o.CCR,n[166]=o.EventCount,n[293]=o.Pr
obSugClickGivenPrefTime,n[168]=o.CCRTime,n[294]=o.ProbSugClickGivenBackgroundTime,n
[295]=o.LoglikelihoodTime):
(n[6]=o.Loglikelihood,n[3]=o.ProbSugClickGivenBackground,n[151]=o.ClicksOnSugGivenP
ref,n[0]=o.ProbSugClickGivenPref,n[94]=o.CCR,n[95]=o.EventCount,n[290]=o.ProbSugCli
ckGivenPrefTime,n[155]=o.CCRTime,n[291]=o.ProbSugClickGivenBackgroundTime,n[292]=o.
LoglikelihoodTime))}}function at(n,t,i){if(t){var
r=t[i];r&&(n[256]=r.PSGPCR,n[257]=r.PSGCCR,n[258]=r.PSGSTR,n[286]=r.PSGSATCCR,n[287
]=r.PSGSATPCR)}}function i(n,t){return(n+"\t"+t).toLocaleLowerCase()}function
r(t,i,r){i==11..toString()&&i==0..toString();switch(n.config.athenaKeyType){case
0:return t||SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key
group is empty")),t;case 1:return i||
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key handoff is
empty")),i;case 2:return r||SharedLogHelper.LogError("getAthenaGroupKey",null,new
Error("Athena key suggestion type is empty")),i||
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key handoff is
empty")),r+"_"+i;default:return
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key group type
is not set")),""}}function u(t,i,r){switch(n.config.athenaKeyType){case 0:return
i==t;case 1:return r==t;case 2:return r==t;default:return!1}}function vt(t){var
i={};return t?(n.config.athenaKeyType==2?wt(t,i):(yt(t,i),pt(t,i)),i):i}function
yt(t,f){var y=t.Suggestions?t.Suggestions.split("\t"):
[],p=t.ProbSugClickGivenPrefs?t.ProbSugClickGivenPrefs.split("\t"):
[],w=t.ClicksOnSugGivenPrefs?t.ClicksOnSugGivenPrefs.split("\t"):
[],b=t.ProbSugClickGivenBackground?t.ProbSugClickGivenBackground.split("\t"):
[],k=t.Loglikelihoods?t.Loglikelihoods.split("\t"):[],a=t.SuggestionGroups?
t.SuggestionGroups.split("\t"):[],d=t.ProbSugClickGivenPrefWeeks?
t.ProbSugClickGivenPrefWeeks.split("\t"):[],v=t.ProbSugClickGivenPrefWeekends?
t.ProbSugClickGivenPrefWeekends.split("\t"):
[],g=t.ProbSugClickGivenBackgroundWeeks?
t.ProbSugClickGivenBackgroundWeeks.split("\t"):
[],it=t.ProbSugClickGivenBackgroundWeekends?
t.ProbSugClickGivenBackgroundWeekends.split("\t"):[],nt=t.LoglikelihoodWeeks?
t.LoglikelihoodWeeks.split("\t"):[],tt=t.LoglikelihoodWeekends?
t.LoglikelihoodWeekends.split("\t"):[],c=n.config.athenaKeyType==0||!
t.SuggestionHandOffTypes?
[]:t.SuggestionHandOffTypes.split("\t"),s=y.length,l=e(),o;if(u(s,a.length,c.length
))for(o=0;o<s;o++){var rt=a&&a.length>o?a[o]:"",ut=c&&c.length>o?
c[o]:"",ft=r(rt,ut,""),h=i(y[o],ft);f[h]={SuggestionGroup:
+a[o]};b.length==s&&(f[h].ProbSugClickGivenBackground=Number(b[o]));p.length==s&&(f
[h].ProbSugClickGivenPref=Number(p[o]));w.length==s&&(f[h].ClicksOnSugGivenPref=Num
ber(w[o]));k.length==s&&(f[h].Loglikelihood=Number(k[o]));n.config.athenaKeyType!
=0&&c.length==s&&(f[h].SuggestionHandOffType=Number(c[o]));d.length!=s||l?
v.length==s&&l&&(f[h].ProbSugClickGivenPrefTime=Number(v[o])):f[h].ProbSugClickGive
nPrefTime=Number(d[o]);g.length!=s||l?
v.length==s&&l&&(f[h].ProbSugClickGivenBackgroundTime=Number(it[o])):f[h].ProbSugCl
ickGivenBackgroundTime=Number(g[o]);nt.length!=s||l?
tt.length==s&&l&&(f[h].LoglikelihoodTime=Number(tt[o])):f[h].LoglikelihoodTime=Numb
er(nt[o])}else SharedLogHelper.LogError("parseLLSignals",null,new Error("Length
doesn't match"))}function pt(t,f){var a=t.CCRSuggestions?
t.CCRSuggestions.split("\t"):[],l=t.CCRSuggestionGroups?
t.CCRSuggestionGroups.split("\t"):[],v=t.CCRs?t.CCRs.split("\t"):
[],y=t.EventCounts?t.EventCounts.split("\t"):[],c=n.config.athenaKeyType==0||!
t.CCRSuggestionHandOffTypes?
[]:t.CCRSuggestionHandOffTypes.split("\t"),p=t.CCRsWeek?t.CCRsWeek.split("\t"):
[],w=t.CCRsWeekend?t.CCRsWeekend.split("\t"):
[],s=a.length,b=e(),o;if(u(s,l.length,c.length))for(o=0;o<s;o++){var
k=l&&l.length>o?l[o]:"",d=c&&c.length>o?c[o]:"",g=r(k,d,""),h=i(a[o],g);f[h]||
(f[h]={SuggestionGroup:Number(l[o])});v.length==s&&(f[h].CCR=Number(v[o]));y.length
==s&&(f[h].EventCount=Number(y[o]));n.config.athenaKeyType!
=0&&c.length==s&&(f[h].CCRSuggestionHandOffType=Number(c[o]));p.length!=s||b?
w.length==s&&b&&(f[h].CCRTime=Number(w[o])):f[h].CCRTime=Number(p[o])}else
SharedLogHelper.LogError("parseCCRSignals",null,new Error("Length doesn't
match"))}function wt(n,t){var o=n.SugTypes?n.SugTypes.split("\t"):
[],s=n.HandOffTypes?n.HandOffTypes.split("\t"):[],h=n.PSGPCRs?
n.PSGPCRs.split("\t"):[],c=n.PSGCCRs?n.PSGCCRs.split("\t"):[],l=n.PSGSTRs?
n.PSGSTRs.split("\t"):[],a=n.PSGSATCCRs?n.PSGSATCCRs.split("\t"):[],v=n.PSGSATPCRs?
n.PSGSATPCRs.split("\t"):[],f=o.length,i;if(u(f,0,s.length))for(i=0;i<f;i++){var
y=o[i],p=s[i],e=r("",p,y);t[e]={};h.length==f&&(t[e].PSGPCR=Number(h[i]));c.length=
=f&&(t[e].PSGCCR=Number(c[i]));l.length==f&&(t[e].PSGSTR=Number(l[i]));a.length==f&
&(t[e].PSGSATCCR=Number(a[i]));v.length==f&&(t[e].PSGSATPCR=Number(v[i]))}else
SharedLogHelper.LogError("parseGroupEngagementSignals",null,new Error("Length
doesn't match"))}function bt(n,t){var r={},f,s,o,i;if(t){var
h=0,v=0,u={};for(f=0,s=t;f<s.length;f++){var
y=s[f],e=y.key,p=y.value;u[e]={lexicalSimilarity:0,groupClickCounts:{},groupWeight:
{}};v+=c(u,e,n);o=a(p);u[e].groupClickCounts=o.groupLaunches;for(i in
u[e].groupClickCounts)r[i]||
(r[i]={probability:0,weight:0}),r[i].probability+=o.groupHits[i],h+=o.groupHits[i]}
l(r,u,v,h)}return r}function kt(n,t){var r={},f,o,i;if(t){var
h=0,a=0,u={};for(f=0,o=t;f<o.length;f++){var
v=o[f],s=v.key,e=v.value;u[s]={lexicalSimilarity:0,groupClickCounts:{},groupWeight:
{}};a+=c(u,s,n);for(i in e)e[i]&&e[i].prefixLaunchCount&&(r[i]||
(r[i]={probability:0,weight:0}),u[s].groupClickCounts[i]=e[i].prefixLaunchCount,r[i
].probability++,h++)}l(r,u,a,h)}return r}function c(n,t,i){var r=t.length-
i.length,u=r/t.length;return n[t].lexicalSimilarity=1-
u,n[t].lexicalSimilarity}function l(n,t,i,r){var o=0,s,e,f,u;for(e in t)
{f=t[e];f.lexicalSimilarity/=i;for(u in
f.groupClickCounts)s=f.groupClickCounts[u],f.groupWeight[u]=s*f.lexicalSimilarity,o
+=f.groupWeight[u]}for(u in n)n[u].probability/=r;for(e in t){f=t[e];for(u in
f.groupClickCounts)n[u]||
(n[u]={probability:0,weight:0}),f.groupWeight[u]/=o,n[u].weight+=f.groupWeight[u]}}
function a(n){var u=function(n,t,i){return n[t]=n[t]?n[t]+i:i},r={groupLaunches:
{},groupHits:{},otherGroupLaunches:0},f,t,i;for(f in n)
(t=n[f],t&&t.prefixLaunchCount)&&(i=t.groupType,i||i===0?
(u(r.groupLaunches,i,t.prefixLaunchCount),u(r.groupHits,i,1)):r.otherGroupLaunches+
=t.prefixLaunchCount);return r}function dt(n,t,i,r){if(r){var
f=i(t),u=r[f];u&&(n[266]=u.probability,n[267]=u.weight)}}function e(t){var i=t?
t.getDay():n.getCurrentDate().getDay(),r=i==6||i==0;return
n.config.invertIsWeekend?!r:r}function gt(n){for(var t in n)n[t]?
n[t]=v(Number(n[t])):delete n[t]}function v(n){return Number(n.toFixed(5))}function
ni(n,t){n.featureStore||
(n.featureStore={});n.featureStore[t]=1}n.getTextForLexicalFeatures=y;n.stringHashC
ode=f;n.getEditDistance=t;n.getEditDistanceIgnoreCase=p;n.computeEditDistanceRatio=
o;n.computeJaroSimilarity=s;n.computeJaroWinklerSimilarity=w;n.computeJaroWinklerPr
efixOverLapCount=h;n.isWordBoundary=b;n.countMaxContiguousRepeatedChars=k;n.getNumb
erOfWords=d;n.containsOnlyDigitsLettersOrSpaces=g;n.endsWithSpace=nt;n.prefixIsLike
Url=tt;n.computeUrlFeatures=it;n.computeDomainFeatures=rt;n.computeTitleFeatures=ut
;var
ft=["www.bing.","cn.bing.","www.google.","www.yandex.","www.baidu.","www.yahoo.",],
et=["http://","https://",];n.getSumMruLaunches=st;n.setMRUSignal=ht;n.setMRUBackPro
pSignal=ct;n.setEngagementSignals=lt;n.setSuggestionGroupEngagementSignals=at;n.get
EngagementSignalKey=i;n.getAthenaGroupKey=r;n.checkAthenaGroupLength=u;n.parseWebEn
gagementSignals=vt;n.computeGroupBackpropagatedClicks=bt;n.computeSuggestionBackpro
pagatedClicks=kt;n.evaluateGroupLaunches=a;n.setMRUGroupBackpropClicks=dt;n.isWeeke
nd=e;n.removeUndefinedAndZeroAndTrimValues=gt;n.trimFeatureStoreValue=v;n.setFlagIn
FeatureStore=ni}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var
i;(function(i){function r(n){return
n.isSearchHomeZI}i.suggestionRankingModels={};var u=function(){function u(){}return
u.prototype.rank=function(n,i,u,f,e,o,s,h,c,l){var a,v,y,p;return r(n)?{topResults:
[],mruSuppressions:null}:n.scope==t.Scope.PathCompletion?
this.rankPathCompletion(i):(a=t.isL2(n)?null:
{mruGroupRatios:null,maxGroupCCR:null,maxGroupProbSugClickGivenPref:null,mruGroupBa
ckpropWeights:null,mruGroupBackpropRatios:null},v=i.slice(),t.config.disableWebRank
ingSignals&&(o=null,u=null,h=null),this.orderSuggestions(n,i,u,f,o,s,h,c,a,e),this.
setMRUHintEnabled(n,i),this.setGroupSuppressionSignals(a,i),y=this.getTopHitCandida
tes(n,i,l.searchTheWeb,v),p=this.createMulticlassClassifierTopHitSuggestionList(y),
{topResults:p,mruSuppressions:a})},u.prototype.setMRUHintEnabled=fu
nction(n,i){var
f,r,u;if(t.config.enableMRUHint)for(f=n.queryToFetch.toLocaleLowerCase(),r=0;r<i.le
ngth;r++)u=i[r].featureStore,u[281]&&u[282]&&(t.config.enableMRUHint!
=1&&i[r].text.toLocaleLowerCase().startsWith(f)||(i[r].mruHintEnabled=!
0))},u.prototype.rankPathCompletion=function(n){var t=n.find(function(n){return
n.type=="CG"})||n[0];return{topResults:t?[t]:
[],mruSuppressions:null}},u.prototype.orderSuggestions=function(r,u,f,e,o,s,h,c,l,a
){var g=this,b=n.safeExecute(function(){return
g.createFeatureStore(r,u,f,e,o,s,h,l,a)},"createFeatureStore"),p,y,k,w,d,v;if(b=b||
u.map(function(){return{}}),y=c?
t.config.counterFactualRankerId:t.config.mainRankerId,y?(p=n.safeExecute(function()
{return i.suggestionRankingModels[y]},"getRanker"),p||
SharedLogHelper.LogError("getRanker",y,new Error("Model not
found"))):SharedLogHelper.LogError("getRanker",y,new
Error(c?"CounterFactualRankerId not defined ":"MainRankerId not
defined")),p)for(k=function(t){var i=b[t],r=n.safeExecute(function(){return
p(i)},"calculateRankingScore");u[t].rankingScore=n.trimFeatureStoreValue(r);u[t].fe
atureStore=i},v=0;v<u.length;v++)k(v);if(w=u.filter(function(n){return
n.type=="MB"}),u.sort(function(n,t){return t.rankingScore-
n.rankingScore}),w.length>1)for(d=u.map(function(n,t){return n.type=="MB"?
t:undefined}).filter(function(n){return typeof n=="number"}),v=0;v<w.length;+
+v)u[d[v]]=w[v]},u.prototype.getSuggestionScoreFromSuggestionLogMeta=function(n)
{var t=";2152:";return n.indexOf(t)>=0?parseInt(n.substring(n.indexOf(t)
+6).split(";")[0].slice(1,-1)):NaN},u.prototype.getTopWebSuggestion=function(n){var
u,f,t,e,i,r;if(n.length==0)return
null;if(u=n[0],f=64e3,n.length>1)for(t=0,e=n;t<e.length;t+
+)i=e[t],i.suggestionLogMeta&&(r=this.getSuggestionScoreFromSuggestionLogMeta(i.sug
gestionLogMeta),!isNaN(r)&&r<f&&(f=r,u=i));return
u},u.prototype.bypassFallbackForMBS=function(i,r,u)
{return(t.config.bypassFallbackOnMSBTopHit==2||
t.config.bypassFallbackOnMSBTopHit==3)&&r.every(function(t){return
n.isWebSuggestion(t)||t.handoffType==17||t.isAnswer})?!0:
(t.config.bypassFallbackOnMSBTopHit==1||t.config.bypassFallbackOnMSBTopHit==4)&&!
r.some(function(n){return t.isApp(n.type)||
t.isSetting(n.type)})&&u.length>0&&(u[0].type=="PPL"||u[0].type=="BKS")?!
0:t.config.bypassFallbackOnMSBTopHit==4&&!r.some(function(n){return
t.isApp(n.type)||t.isSetting(n.type)})&&u.length>1&&(u[0].isAnswer||
n.isWebSuggestion(u[0]))&&(u[1].type=="PPL"||u[1].type=="BKS"||
u.length>2&&u[0].isAnswer&&u[1].isAnswer&&(u[2].type=="PPL"||u[2].type=="BKS"))?!
0:!1},u.prototype.getTopHitCandidates=function(i,r,u,f){var
l=this,e=r.filter(function(n){return l.allowInTopHit(i,n,f)}),h,o,c,s;return
this.bypassFallbackForMBS(i,r,e,f)?(h=[],o=f.filter(function(n){return
n.type=="PPL"}),o.length==0&&(o=f.filter(function(n){return
n.type=="BKS"})),o.length>0&&o[0].autoOpenPreviewPaneWhenOnTopHit&&(t.config.bypass
FallbackOnMSBTopHit!=3||
n.getTextForLexicalFeatures(o[0]).toLowerCase().startsWith(i.queryToFetch.toLowerCa
se()))&&h.push(o[0]),t.config.bypassFallbackOnMSBTopHit==4&&(e[0].isAnswer||
n.isWebSuggestion(e[0]))&&(e[0].isAnswer||
this.getFallbackClassifierScore(e[0])>t.config.webFbcScoreThreshold)&&h.push(e[0]),
h):this.enableFallbackClassifier(i,e,u)?
t.config.disableTopHitSyntheticWeb&&i.queryToFetch.length>=t.config.minPrefixDisabl
eTopHitSW&&e.every(function(t){return
n.isWebSuggestion(t)})&&(c=e.filter(function(n){return n.type!
="SW"}),c.length>0&&(s=this.getTopWebSuggestion(c),s.type!="SC"&&s.type!
="RI"&&s.type!="OS"))?
[s]:this.getFallbackClassifierSuggestions(e):e},u.prototype.getFallbackClassifierSc
ore=function(r){var u=n.safeExecute(function(){return
i.suggestionRankingModels[t.config.fallbackClassifierId]},"getFallbackClassifier"),
f=u?n.safeExecute(function(){return
u(r.featureStore)},"calculateFallbackClassifierScore"):0;return
n.trimFeatureStoreValue(f)},u.prototype.getFallbackClassifierSuggestions=function(r
){if(r=r.filter(function(n){return n.type!="SW"}),r.length>0){var f=0,u=r[0];return
u.fbcScore=this.getFallbackClassifierScore(u),f=t.config.enableAppsSettingsFbcScore
Threshold?t.isApp(u.type)||t.isSetting(u.type)?
t.config.appsSettingsFbcScoreThreshold:n.isWebSuggestion(u)?
t.config.webFbcScoreThreshold:t.config.nonWebFbcScoreThreshold:n.isWebSuggestion(u)
?t.config.webFbcScoreThreshold:t.config.nonWebFbcScoreThreshold,u.fbcScore>=f?
r.slice(0,i.topHitIsMultiEntity(r)?2:1):
[]}return[]},u.prototype.enableFallbackClassifier=function(i,r,u)
{if((t.config.enableFBMinQryLength==0||
i.queryToFetch.length>=t.config.enableFBMinQryLength)&&u&&t.config.fallbackClassifi
erId&&r.length>0){var f=r[0];return t.getGroupType(f)==t.GroupType.Cortana?!
1:f.isAnswer?
f.autoOpenPreviewPaneWhenOnTopHit&&t.config.applyFallbackClassifierToAutoOpenAnswer
s||
f.type=="MB"&&t.config.applyFallbackClassifierToEntities:t.config.enableLimitedFall
back&&i.queryToFetch.length>=t.config.minPrefixLengthLimitedFallback&&!
n.isWebSuggestion(f)?!1:!0}return!1},u.prototype.allowInTopHit=function(i,r,u){var
h=!u||u.length==1,o,e,s,f;if(t.RuntimeConfig.QfMode==8||!
t.config.topHitAllowedForGridLayoutL2&&(i.scope==t.Scope.Photos||
i.scope==t.Scope.Videos)||i.topHitRestriction==1&&r.query.toLocaleLowerCase()!
=i.queryToFetch.toLocaleLowerCase()&&(n.contains(r.features,"ForcePrefixOnTop")||
r.features.push("ForcePrefixOnTop"),t.config.forceTypedQueryOnTop))return!
1;if(t.isRecourse(r))return t.config.recourseOnlyInGroups?!
1:h;if(t.isMobileCache)switch(r.handoffType){case 2:case 3:return!1;case 1:if(!
i.queryToFetch.includes("."))return!1}o=t.getGroupType(r);switch(o){case
t.GroupType.Store:return r.hc;case t.GroupType.PowerBi:return r.hc;case
t.GroupType.Command:return r.hc||h;case t.GroupType.LocalPlaces:return
t.config.topHitAllowedForLocal}if(t.getScope(o)==t.Scope.Emails&&!r.hc)return!
1;if(t.enforceOriginalOrder(r)&&u)for(e=0,s=u;e<s.length;e++)
{if(f=s[e],f==r)break;if(f.type==r.type&&f.handoffType==r.handoffType&&f.sourceForG
roup==r.sourceForGroup)return!1}return t.RuntimeConfig.AlwaysWide&&!
r.previewPaneType?!1:!
0},u.prototype.createMulticlassClassifierTopHitSuggestionList=function(n){for(var
r=0,u=0;u<Math.min(n.length,t.config.maxNumberOfTopResults);u++)n[u].rankingScore!
==undefined&&n[u].rankingScore>.5&&(r=u);return
r==0&&i.topHitIsMultiEntity(n)&&(r=1),t.config.bypassFallbackOnMSBTopHit==4&&n.leng
th>0&&(n[0].type=="PPL"||
n[0].type=="BKS")&&(r=1),n.slice(0,r+1)},u.prototype.createFeatureStore=function(i,
r,u,f,e,o,s,h,c){var
ht=[],tt=0,ct=0,it=0,lt=i.queryToFetch.toLocaleLowerCase(),kt=function(n){return
t.getGroupType(n)},at=n.getSumMruLaunches(f),vt=0,yt={},rt,ut,pt,d,ft,y,p,a,w,g,et,
ot,b,nt,st,v,l,k,wt,bt;for(f&&(rt=n.evaluateGroupLaunches(f),vt=rt.otherGroupLaunch
es,yt=rt.groupLaunches),ut=n.computeGroupBackpropagatedClicks(i.queryToFetch,c),pt=
n.computeSuggestionBackpropagatedClicks(i.queryToFetch,c),d=0,ft=r;d<ft.length;d+
+)y=ft[d],y.handoffType==2&&(p=t.getAppItem(y),p&&(ct+=p.totalLaunches,p.totalLaunc
hes>tt&&(tt=p.totalLaunches)),y.deviceItem&&y.deviceItem.rankScore>it&&(it=y.device
Item.rankScore));for(a={},n.isWeekend()&&(a[440]=1),a[441]=this.getLocalHourBucket(
new Date),w=lt.split(" "),g=0,et=w;g<et.length;g++){if(ot=et[g],ot=="install")
{a[451]=1;break}if(ot=="uninstall")
{a[450]=1;break}}for(w&&w.length>0&&(b=w[0],a[452]=b.indexOf("c:")>-1||
b.indexOf("d:")>-1||b.indexOf("e:")>-1||b.indexOf("f:")>-1?
1:0),nt=0,st=r;nt<st.length;nt+
+)v=st[nt],l=this.getSuggestionFeatureStore(lt,v,e,u,ct,s),l[13]=tt,l[7]=it,l[60]=t
.isMobileCache?
1:0,u&&u.WebSignalsAvailable&&(l[93]=1),n.setMRUSignal(t.getSuggestionKey(v),l,f,at
),this.setMRUGroupLaunchRatios(l,v,at,yt,vt,h),n.setMRUBackPropSignal(t.getSuggesti
onKey(v),l,pt),ut&&n.setMRUGroupBackpropClicks(l,v,kt,ut),k=n.getTextForLexicalFeat
ures(v),k&&(v.handoffType==1&&(n.computeUrlFeatures(k,i.queryToFetch,l,o),wt=n.getD
omain(k),n.computeDomainFeatures(v,i.queryToFetch,l,o,wt,e)),t.isFileOrFolder(v.typ
e)&&(bt=o.cvid+o.privacyNumber+k,l[131]=n.stringHashCode(bt))),a&&(l[440]=a[440],l[
441]=a[441],l[451]=a[451],l[450]=a[450],l[452]=a[452]),n.removeUndefinedAndZeroAndT
rimValues(l),ht.push(l);return
ht},u.prototype.setGroupSuppressionSignals=function(n,i){var
f,e,u;if(n)for(n.maxGroupCCR={},n.maxGroupProbSugClickGivenPref={},n.mruGroupBackpr
opRatios={},n.mruGroupBackpropWeights={},f=0,e=i;f<e.length;f+
+)if(u=e[f],u.featureStore){var r=t.getGroupType(u),o=u.featureStore[94]||
0,s=u.featureStore[0]||0;n.maxGroupCCR[r]=n.maxGroupCCR[r]?
Math.max(n.maxGroupCCR[r],o):o;n.maxGroupProbSugClickGivenPref[r]=n.maxGroupProbSug
ClickGivenPref[r]?
Math.max(n.maxGroupProbSugClickGivenPref[r],s):s;n.mruGroupBackpropRatios[r]=u.feat
ureStore[266];n.mruGroupBackpropWeights[r]=u.featureStore[267];
(n.mruGroupBackpropWeights[r]||
n.mruGroupBackpropRatios[r])&&(n.backPropDataExists=!
0)}},u.prototype.setMRUGroupLaunchRatios=function(n,i,r,u,f,e){var s,o;if(r)
{e&&(e.mruGroupRatios={});n[186]=f/r;for(s in u)
{o=u[s]/r;t.getGroupType(i)==Number(s)&&(n[271]=o);e&&(e.mruGroupRatios[s]=o);switc
h(Number(s)){case t.GroupType.Apps:n[169]=o;break;case
t.GroupType.Settings:n[170]=o;break;case t.GroupType.Cortana:n[171]=o;break;case
t.GroupType.Command:n[172]=o;break;case t.GroupType.Photos:n[173]=o;break;case
t.GroupType.Videos:n[174]=o;break;case t.GroupType.Music:n[175]=o;break;case
t.GroupType.Documents:n[176]=o;break;case t.GroupType.Folders:n[177]=o;break;case
t.GroupType.Emails:n[178]=o;break;case t.GroupType.Store:n[179]=o;break;case
t.GroupType.SearchSuggestions:n[262]=o;n[180]=u[t.GroupType.Websites]?
(u[t.GroupType.Websites]+u[s])/r:o;break;case
t.GroupType.Websites:n[263]=o;n[180]=u[t.GroupType.SearchSuggestions]?
(u[t.GroupType.SearchSuggestions]+u[s])/r:o;break;case
t.GroupType.PathCompletion:n[181]=o;break;case
t.GroupType.PowerBi:n[182]=o;break;case t.GroupType.People:n[184]=o;break;case
t.GroupType.EdgeHistory:n[185]=o;break;case
t.GroupType.Bookmarks:n[260]=o;break;case
t.GroupType.LocalPlaces:n[261]=o}}}},u.prototype.getRank=function(n)
{if(n.type=="EBH")return
undefined;if(n.deviceItem&&typeof n.deviceItem.rankScore!="undefined")return
n.deviceItem.rankScore;var i=t.isJumpListSuggestion(n)?
n.jumpListItem.usagePoints:undefined;return typeof i!="undefined"?
i:undefined},u.prototype.getSuggestionFeatureStore=function(i,r,u,f,e,o){var
s={},l,v,d,a,y,p,w,c,h,g,it,b,nt,rt,k,tt;if(this.setTypeSignal(r,s),l=t.getAppItem(
r),l?(s[2]=l.totalLaunches,s[92]=l.launchArguments?
1:0,e>0&&(s[103]=l.totalLaunches/e),this.addLastAccessDate(l.lastAccessed,s)):this.
addLastAccessDate(t.isJumpListSuggestion(r)?
r.jumpListItem.lastAccessed:null,s),v=t.getBrowsingHistoryItem(r),v&&(v.visitCount&
&(s[138]=v.visitCount),this.addLastAccessDate(v.dateVisited,s)),s[96]=r.catalogScor
e,s[97]=r.avgRating,s[98]=r.ratingCount,s[99]=r.confidence,s[150]=r.source,s[283]=r
.pinnedToTaskbar?
1:undefined,r.hc&&(s[189]=1),s[17]=r.highConfidenceMetaSuggestionScore,d=this.getRa
nk(r),typeof d!="undefined"?
s[16]=d:s[4]=1,a=r,a.matchedOnlyOnContent&&(s[259]=1),a.matchedOnlyOnAuthor&&(s[273
]=1),a.lastModifiedDate&&(s[268]=n.getTimeDiffInDays(a.lastModifiedDate)),a.extensi
onLC==".lnk"&&(s[272]=1),s[23]=r.prefetchConfidenceScore,s[264]=f&&f.ProbNextKS!
==undefined?f.ProbNextKS:1,s[296]=f&&f.ProbNextKSV2!==undefined?
f.ProbNextKSV2:1,this.setThresholdRatios(s,f),this.setRatios(s,f),y=t.getGroupType(
r),p=r.query,r.type=="SW"&&(p="SearchTheWeb"),w=n.getAthenaGroupKey(String(y),Strin
g(r.handoffType),r.type),n.setEngagementSignals(s,u,w,p,!1,!
1),n.setEngagementSignals(s,o,w,p,!1,!0),o&&!u&&n.setEngagementSignals(s,o,w,p,!1,!
1),s[10]=i.length,(r.isAnswer||
y==t.GroupType.Cortana)&&(s[11]=1),c=n.getTextForLexicalFeatures(r),h=c?
c.toLocaleLowerCase():null,c||
(s[132]=1),h==i&&(s[133]=1),r.handoffType==2&&(r.type!
="PBI"&&(s[8]=1),t.isSetting(r.type)&&(s[64]=1),t.isApp(r.type)&&(s[83]=1)),y==t.Gr
oupType.SearchSuggestions&&(r.type!="SW"&&(s[82]=1),s[25]=1),g=s[132]==1,g?
s[137]=i.length:
(s[137]=c.length,s[134]=n.getEditDistance(i,h),s[135]=Math.min(100,n.computeEditDis
tanceRatio(s[134],i.length,c.length)),s[136]=n.isWordBoundary(i,c),s[284]=Math.abs(
c.length-i.length)),!g&&h){for(h.indexOf(i)>-
1&&(s[143]=1),h.substring(0,i.length)===i&&(s[188]=1),it=h.split("
"),b=0,nt=it;b<nt.length;b++)if(rt=nt[b],rt==i)
{s[145]=1;break}s[420]=n.computeJaroSimilarity(i,h);s[421]=n.computeJaroWinklerSimi
larity(i,h)}return
s[1]==1&&r.deviceItem&&(k=t.getAppItem(r),k.extension&&(s[400]=k.extension===".exe"
?1:0,s[401]=k.extension===".appref-ms"?1:0),h&&(s[402]=h.indexOf("install")>-1?
1:0)),s[1]||r.type!="FL"&&r.type!="FD"&&r.type!="ST"||(s[403]=1),(r.type=="QP"||
r.type=="QS"||r.type=="SC"||r.type=="OS")&&(s[404]=1),s[8]==1&&(s[27]=s[133]),
(r.isAnswer||y==t.GroupType.Cortana)&&(s[55]=s[133]),(r.type=="HS"||
r.fromHistory)&&(s[121]=1),s[41]=s[83]==1?s[40]:s[64]==1?s[39]:s[11]==1?
s[32]:s[89]==1?s[54]:s[85]==1?s[30]:s[86]==1?s[53]:s[87]==1?s[52]:s[61]==1?
s[31]:s[88]==1?s[51]:s[63]==1?s[35]:s[82]==1?s[29]:s[90]==1?s[50]:s[59]==1?
s[34]:s[37],(t.isSetting(r.type)||
t.isApp(r.type))&&(tt=r.ciMetaData,this.computeConstraintIndexFeatures(r.deviceItem
,s,tt),r.ciMatchedQuery=this.getConstraintIndexMatchedQuery(tt),s[269]&&s[270]&&(s[
405]=Math.sqrt(s[269]*s[270]))),r.signals&&(s[230]=r.signals.DistanceToEntity,s[231
]=r.signals.DistanceToEntityPrecision,s[232]=r.signals.RankingScore),s},u.prototype
.addLastAccessDate=function(t,i){var r=n.getTimeDiffInDays(t);r!=null?
i[9]=r:i[19]=1},u.prototype.setTypeSignal=function(n,t){switch(n.type)
{case"LDOC":case"FL":t[61]=1;break;case"LI":t[85]=1;break;case"LV":t[86]=1;break;ca
se"MU":t[87]=1;break;case"FD":t[88]=1;break;case"CG":t[89]=1;break;case"PT":t[90]=1
;break;case"PP":case"IBA":t[1]=1;break;case"ML":case"MD":t[21]=1;break;case"CS":t[6
3]=1;break;case"SW":t[59]=1}},u.prototype.setRatios=function(n,t){t&&t.AppsRatio!
==undefined&&(n[26]=t.AppsRatio,t.SettingsRatio&&(n[5]=t.SettingsRatio),t.StoreRati
o&&(n[57]=t.StoreRatio),t.PrefixProbability&&(n[12]=t.PrefixProbability),t.FilesRat
io&&(n[24]=t.FilesRatio),t.WebRatio&&(n[18]=t.WebRatio),t.PhotosVideosMusicRatio&&(
n[28]=t.PhotosVideosMusicRatio),t.ContactsRatio&&(n[56]=t.ContactsRatio),t.LocalPro
tocolRatio&&(n[91]=t.LocalProtocolRatio))},u.prototype.setThresholdRatios=function(
n,t){t&&t.ThApps!==undefined?
(n[40]=t.ThApps,t.ThStore&&(n[35]=t.ThStore),t.ThSetting&&(n[39]=t.ThSetting),t.ThC
ortAns&&(n[32]=t.ThCortAns),t.ThPrefixCount&&(n[38]=t.ThPrefixCount),t.ThWeb&&(n[29
]=t.ThWeb),t.ThSearchTheWeb&&(n[34]=t.ThSearchTheWeb),t.ThOther&&(n[37]=t.ThOther),
t.ThFile&&(n[31]=t.ThFile),t.ThFolder&&(n[51]=t.ThFolder),t.ThPath&&(n[50]=t.ThPath
),t.ThEmail&&(n[33]=t.ThEmail),t.ThCommAns&&(n[54]=t.ThCommAns),t.ThPhotoAns&&(n[30
]=t.ThPhotoAns),t.ThVideoAns&&(n[53]=t.ThVideoAns),t.ThMusicAns&&(n[52]=t.ThMusicAn
s),t.ThDNav&&(n[147]=t.ThDNav)):n[42]=1},u.prototype.computeConstraintIndexFeatures
=function(n,t,i){var u,o,f,e,s,r;if(n&&n.rawIndexResponse){if(!
i)return;if(t[157]=i.GrammarScore,t[158]=i.MatchScore,i.Parses&&i.Parses.length>0&&
i.Parses[0].Entities&&i.Parses[0].Entities.length>0)for(u=0,o=i.Parses[0].Entities;
u<o.length;u+
+)if(f=o[u],t[159]=f.EntityScore,f.Attributes)for(e=0,s=f.Attributes;e<s.length;e+
+)r=s[e],r.Name=="gscore"?
t[269]=Number(r.Value):r.Name=="lscore"&&(t[270]=Number(r.Value))}},u.prototype.get
ConstraintIndexMatchedQuery=function(n){return!n||n.MatchScore==0?
null:n.Query},u.prototype.getLocalHourBucket=function(n){var
t=n.getHours(),i=1;return t>=0&&t<6?i=1:t>=6&&t<12?i=2:t>=12&&t<18?
i=3:t>=18&&t<=23&&(i=4),i},u}();i.FastRankRanker=u})(i=t.Ranking||(t.Ranking={}))})
(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;
(function(t){var i=function(){function i(n,t){var
i=this;this._instrumentationProvider=t;this._MCkeystrokeAggregatedMeasure={DataSour
ceResponseTimes:{},TopResultsRendered:null};n.bindDismissed(function(){return
i.flushAggregatedMeasure(!0)})}return i.prototype.onNewKeystroke=function(n,t,i)
{this.flushAggregatedMeasure();this._aggregatedMeasureFlushed=!
1;this._currentLeftPaneSuggestions=null;this._currentRawImpressionGuid=t;this._curr
entRawClientImpressionGuid=SearchAppWrapper.CortanaApp.impressionId;this._keystroke
AggregatedMeasure={CVID:n};this._currentKeystrokeAggregatedMeasureIsForSearchHome=i
},i.prototype.flushAggregatedMeasure=function(n)
{(t.config.logPerf&&this._MCkeystrokeAggregatedMeasure&&Object.keys(this._MCkeystro
keAggregatedMeasure.DataSourceResponseTimes).length>1&&(this._instrumentationProvid
er.logProfilerMarker(1,0,"MCKeystrokeAggregatedMeasure",this._currentRawImpressionG
uid,this._MCkeystrokeAggregatedMeasure),this._MCkeystrokeAggregatedMeasure={DataSou
rceResponseTimes:{},TopResultsRendered:null}),n||
this._currentKeystrokeAggregatedMeasureIsForSearchHome)&&!
this._aggregatedMeasureFlushed&&this._keystrokeAggregatedMeasure&&Object.keys(this.
_keystrokeAggregatedMeasure).length>1&&(this.logProfilerMarker(1,0,"KeystrokeAggreg
atedMeasure",this._currentRawImpressionGuid,this._currentRawClientImpressionGuid,th
is._keystrokeAggregatedMeasure),this._aggregatedMeasureFlushed=!
0)},i.prototype.logSingleMeasure=function(n,t,i)
{this.logProfilerMarker(1,0,n,t,SearchAppWrapper.CortanaApp.impressionId||
t,i)},i.prototype.logProfilerMarker=function(n,t,i,r,u,f){u!
=r&&(f.ServerIG=r);this._instrumentationProvider.logProfilerMarker(n,t,i,u,f)},i.pr
ototype.logAggregate=function(n,t)
{this._keystrokeAggregatedMeasure[n]=t},i.prototype.getItemLayoutFromSuggestionsLis
t=function(n){var u,e,i,f,r,t;if(this._currentLeftPaneSuggestions)
{for(u=this._currentLeftPaneSuggestions.topResults,e=this._currentLeftPaneSuggestio
ns.groups,t=0;t<u.length;++t)if(u[t].instItem==n)return{IsInTopResult:!
0,GroupType:undefined,PositionInGroup:t};for(i=0,f=e;i<f.length;i+
+)for(r=f[i],t=0;t<r.suggestions.length;+
+t)if(r.suggestions[t].instItem==n)return{IsInTopResult:undefined,GroupType:r.typeW
ithSource.type,PositionInGroup:t}}return
undefined},i.prototype.updateSuggestionsList=function(n,t)
{this._currentLeftPaneSuggestions={topResults:n,groups:t}},i.prototype.logDataSourc
ePerformancesMeasure=function(n){var
r=n.RequestBegin,i=Object.keys(n.ResponseReceived).map(function(t)
{return{Name:t,ResponseReceivedTime:n.ResponseReceived[t]-
r,RenderedTime:n.RenderFinished[t]-
r,Status:n.DataSourcesState&&n.DataSourcesState[t]}}),f=n.TopResultRendered.map(fun
ction(n){return{Type:n.T,Time:n.V-
r}}),e={DataSources:i,TopResultRendered:f},u;if(this.logAggregate("DataSourcePerfor
mancesMeasure",e),t.config.logPerf)for(u in
i)this._MCkeystrokeAggregatedMeasure.DataSourceResponseTimes[i[u].Name]=i[u].Respon
seReceivedTime},i.prototype.logNewKeystrokeMeasure=function(t,i,r)
{this.onNewKeystroke(t,i,r.isSearchHomeZI);var
u={ScopeInQuery:r.scopePrefix,Scope:r.scope,IsSearchHome:r.isSearchHomeZI};u.CIVers
ion=n.WSB.ConstraintIndex.currentCIVersion;this.logAggregate("NewKeystrokeMeasure",
u)},i.prototype.logTopResultsRenderedMeasure=function(i,r,u)
{this._instrumentationProvider.logProfilerMarker(1,0,"topResultRendered",i,
{CI:n.WSB.ConstraintIndex.currentCIVersion});var
f={SuggestionTypes:r};this.logAggregate("TopResultsRenderedMeasure",f);t.config.log
Perf&&(this._MCkeystrokeAggregatedMeasure.TopResultsRendered=u)},i.prototype.logGro
upsRenderedMeasure=function(n){var
t={GroupTypes:n};this.logAggregate("GroupsRenderedMeasure",t)},i.prototype.logPrevi
ewPaneOpenedMeasure=function(n,t,i){var
r={ParentType:n.getQsCode(),PreviewPaneType:t,ParentLayoutInfo:this.getItemLayoutFr
omSuggestionsList(n),AutoOpened:i||
undefined};this.logAggregate("LastPreviewPaneOpened",r)},i.prototype.logConversatio
nStartMeasure=function(n,t){var
i={CVID:n,StartTime:t};this.logSingleMeasure("ConversationStartMeasure",n,i)},i.pro
totype.logItemClickedMeasure=function(n,t,i,r){var
u={CVID:n,ItemType:i.getQsCode(),InputType:r,LayoutInfo:this.getItemLayoutFromSugge
stionsList(i)};this.flushAggregatedMeasure(!
0);this.logSingleMeasure("ItemClickedMeasure",t,u)},i}();t.WindowsTelemetry=i})
(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var
t;(function(t){var i=/[+.\\*?\[\]()]/g,r={".":"\\.","+":"\\
+","*":"\\*","\\":"\\\\","?":"\\?","[":"\\[","]":"\\]","(":"\\
(",")":"\\)"},u=/^(?:https?:\/\/)?(.*)/,f=/^(?:(?:https?:\/\/(?:www\.)?)|(?:www\.))
(.*)/,e=/^\s+/,o=function(){function o(t){var
i=this;this._host=t;t.bindKeyDown(function(t)
{n.isUpOrDownKey(t)&&i.reset()});t.bindQueryChangedOrInitialized(function(n)
{i._currentQuery=n;!i._fullAutoCompletedQuery||
i._fullAutoCompletedQuery.startsWith(n.originalQuery)||
n.originalQuery.startsWith(i._fullAutoCompletedQuery)||i.reset()})}return
o.prototype.apply=function(n){var r,o,i;if(n.query!=this._autoCompletedQuery)
{if(r=this._currentQuery.originalQuery,this._host.setAutoCompleteQueryText(""),(!
t.config.disableGhosting&&n.type!="EBH"||
t.config.disableGhosting&&n.type=="PT")&&this._currentQuery.originalCursorPosition=
==r.length){var s=this._currentQuery.scopePrefix?
this._currentQuery.scopePrefix.length+1:0,u=r.substr(s).replace(e,"").toLowerCase()
,f=n.query.toLowerCase();if(u!
==f&&(o=1,i=this.fullAutoCompleteOffset(f,u),i<0&&(t.config.allowInfixGhosting||
n.url)&&(i=this.infixAutoCompleteOffset(f,u),o=2),i<0&&(i=this.directNavAutoComplet
eOffset(f,u)),i>=0))
{this.setAutoCompletedQuery(r,n.query,i);n.autoCompleteType=o;return}}this._autoCom
pletedQuery&&(this.reset(),this._host.setAutoCompleteQueryText(r))}},o.prototype.re
set=function()
{this._autoCompletedQuery=null;this._fullAutoCompletedQuery=null},o.prototype.fullA
utoCompleteOffset=function(n,t){var i=n.startsWith(t);return i?t.length:-
1},o.prototype.infixAutoCompleteOffset=function(n,t){var f=n.search("[
.:,\\\\/+_&-]"+t.replace(i,function(n){return r[n]})),e,o;return
f>0&&(e=n.substring(0,f+1).match(u)[1],o=e?e.match(/[ .:,\\/+_&-]
+/g).length+1:1,o<3)?f+1+t.length:-
1},o.prototype.directNavAutoCompleteOffset=function(n,t){var i=t.match(f),r;return
i&&(r=i[1],r.length>0&&n.startsWith(i[1]))?r.length:-
1},o.prototype.setAutoCompletedQuery=function(n,t,i){var
r=n+t.slice(i);this._host.setAutoCompleteQueryText(r);this._autoCompletedQuery=t;th
is._fullAutoCompletedQuery=r},o}();t.WSBAutoComplete=o})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;(function(i)
{function o(n,i){var r,u;return i?(r=t.getKnownFolderPathLC(t.FOLDERID_SkyDrive),r?
r+="\\":r="\\onedrive\\",u=n.indexOf(r),u>=0&&(n=n.substr(u+r.length))):n.startsWit
h("onedrive:\\")&&(n=n.substr(10)),n}function s(n,i,r){var u,f,o,e;return i?
(u=t.getKnownFolderPathLC(t.FOLDERID_Profile)+"\\onedrive -
",f=n.indexOf(u),f>=0&&(o=n.indexOf("\\",f+u.length),n=n.substr(o+1))):t.windowsIde
ntity&&n.startsWith("onedrive for
business:\\")&&r&&(e=t.windowsIdentity.indexOf("@"),e!=-
1&&r.toLocaleLowerCase().indexOf("personal/"+t.windowsIdentity.substr(0,e))>0&&(n=n
.substr(23))),n}function a(n){return{fullySuppressedGroups:n.fullySuppressedGroups?
n.fullySuppressedGroups.slice(0):
[],partiallySuppressedGroups:n.partiallySuppressedGroups?
n.partiallySuppressedGroups.slice(0):
[],suppressedSuggestions:n.suppressedSuggestions?n.suppressedSuggestions.slice(0):
[]}}function h(n,i,r){var f="",e,o,u,s;return r?
(e=t.getKnownFolderPathLC(t.FOLDERID_Profile)
+"\\"+t.SubstrateTenantName.toLocaleLowerCase()
+"\\",o=i.indexOf(e),o>=0&&(u=o+e.length,s=i.indexOf(" - ",u),f=i.substr(u,s-
u).toLocaleLowerCase(),i=i.substr(s+3))):i.startsWith("sharepoint:\\")&&(i=i.substr
(12),f=n.siteTitle.toLocaleLowerCase()),[i,f]}function v(n){return n.type=="SW"||
n.type=="PWL"}function u(n,t){return!n.suppressed&&n.handoffType==0&&!
n.htmlContent&&n.query.toLocaleLowerCase()==t.queryToFetch.toLocaleLowerCase()}func
tion c(n){return n.length>=2&&n[0].type=="MB"&&n[1].type=="MB"}var
f={"Microsoft.Windows.ControlPanel":"ControlPanel","Microsoft.AutoGenerated.
{923DD477-5846-686B-A659-0FCCD73851A8}":"Classic_{E9C71548-B580-43B2-ACDB-
1BA924002754}","{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}\\dfrgui.exe":"Classic_{7D13A5DB-6081-48BD-8EA3-
A9D7FE67A335}","{6D809377-6AF0-444B-8957-A3773F02200E}\\Windows
Defender\\MSASCui.exe":"NameSpace_Classic_{D8559EB9-20C0-410E-BEDA-
7ED416AECC2A}","{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}\\cleanmgr.exe":"Classic_{AACA901F-E74F-4894-B074-
F55059532853}","Microsoft.AutoGenerated.{BB044BFD-25B7-2FAA-22A8-
6371A93E0456}":"Classic_{45FDB5DF-1457-4A41-A824-
7AD9C75767BC}","Microsoft.Windows.PCSettings.DefaultApps":"AAA_SettingsPageAppsDefa
ults"},e={"NameSpace_Classic_{F942C606-0914-47AB-BE56-
1321B8035096}":"Classic_{232A1851-808C-4B44-A92A-
38E862989CE5",AAA_Proxy_Automatic_Config_Group:"AAA_SettingsPageNetworkProxy",AAA_S
ettings_DeveloperModeGroup:"AAA_SettingsPageRestoreDeveloperOptions",AAA_SystemSett
ings_Users_PicturePassword:"AAA_SettingsGroupPicturePassword"},r,l;(function(n)
{n[n.NotDuplicate=0]="NotDuplicate";n[n.NoMetadata=1]="NoMetadata";n[n.MergeMetadat
a=2]="MergeMetadata"})(r||
(r={}));i.isWebSuggestionForPrefix=u;i.topHitIsMultiEntity=c;l=function(){function
i(n,t,i,r,u,f,e,o)
{this._host=n;this._instrumentationHelper=t;this._navigationHelper=i;this._previous
KeystrokeCache=r;this._ranker=u;this._renderedTopResults=f;this._previewPane=e;this
._imageSearchViewModel=o}return i.prototype.launchWebSearch=function(n,t,i,r){var
u=n.queryToFetch;this._host.launchSearch(u,this._navigationHelper.getSearchUrl(n.fu
llPartialQuery,u,i,null,r),t)},i.prototype.getProtocol=function(i,r){var
o=this,f="PWL",u=this._instrumentationHelper.getInstrumentedSyntheticSuggestion(r,f
),e;return u?u:
(u=t.createSuggestion(i,null,this._host.getEdgeIcon,null,f,null,n.InstrumentedItem.
getNonSuggestionInstrumentedItem(f,t.SyntheticQSCodesMaps.KValues),1,r,!
1,"tp",function(){return o._host.launchUri(u.url)}),u.notAResult=!0,e=function(i)
{var r=n.prettyPrintUrl(i.fixedUrl,i.queryToFetch,!
0);u.url=i.fixedUrl;u.tooltip=i.fixedUrl;u.query=r;u.text=HitHighlightingParser.add
Markers(r);u.narratorText=t.getNarratorText(u,o._host.getLocString("DirectNavSugges
tion"))},e(i),u.updateFromQuery=function(n){return n.isProtocol?(e(n),!0):!
1},this._instrumentationHelper.instrumentSyntheticSuggestion(r,u),u)},i.prototype.g
etWebSearch=function(i,r,u,f,e,o){var s=this,h=n.contains([13,14],e);return
t.getSyntheticSuggestion(this._instrumentationHelper,i,r,u,f,e,o,h,function(n,t)
{return
s.launchWebSearch(t,n.useRaf,u,e)})},i.prototype.getExplorerSearch=function(n,i)
{var u=this,r=t.getSyntheticSuggestion(this._instrumentationHelper,n,i,"SDFE",
{content:"&#xEC50",type:1},2,this._host.getLocString("SearchInFileExplorer"),!
0,function(n,t){return u._host.launchSearchInFileExplorer(t.queryToFetch)});return
t.shouldSetThisPcGroupSource(t.GroupType.Documents,n)&&(r.sourceForGroup=1),r},i.pr
ototype.getOutlookWebAccessSearch=function(n,i){var
u=this,r=t.getAccountTypeForCloudContent()==1;return
t.getSyntheticSuggestion(this._instrumentationHelper,n,i,"OWA",
{content:"&#xE715",type:2},r?8:12,this._host.getLocString("SearchInOutlookWeb"),!
0,function(){return
u._host.launchUri(r?"https://outlook.office.com/owa":"https://outlook.live.com/owa"
)})},i.prototype.getStoreSearch=function(n,i){var r=this;return
t.getSyntheticSuggestion(this._instrumentationHelper,n,i,"STS",
{content:"&#xEA96",type:2},3,this._host.getLocString("SearchForAppsInTheStore"),!
0,function(n,t){return
r._host.launchStoreSearch(t.queryToFetch)})},i.prototype.getRecourse=function(i,r)
{if(!i.queryToFetch||i.taskFrame)return null;switch(t.getEffectiveScope(i)){case
t.Scope.Apps:return n.isBingEnabled()?this.getStoreSearch(i,r):null;case
t.Scope.Documents:return this.getExplorerSearch(i,r);case t.Scope.Emails:return
t.ScopeConfig[t.Scope.Emails].showUpsellOnSuggestionsList()?
null:this.getOutlookWebAccessSearch(i,r);case t.Scope.Photos:return
n.isBingEnabled()?this.getWebSearch(i,r,"SBI",
{content:"&#xEB9F",type:2},13,this._host.getLocString("SearchForWebImages")):null;c
ase t.Scope.Videos:return n.isBingEnabled()?this.getWebSearch(i,r,"SBV",
{content:"&#xE714",type:1},14,this._host.getLocString("SearchForWebVideos")):null;d
efault:return null}},i.prototype.getSyntheticSuggestions=function(i,r){var
o=i.queryToFetch&&n.isSuggestionTypeEnabled(n.WebDataSource,"SW",0,i)?
this.getWebSearch(i,r,"SW",t.getSearchSuggestionIcon(),0,t.getWebSuggestionAnnotati
on(this._host)):null,s=i.isProtocol&&t.RuntimeConfig.AllowProtocolSyntheticSuggesti
ons?this.getProtocol(i,r):null,f=this.getRecourse(i,r),u,e;return
f&&(f.rankingScore=-
Number.MAX_VALUE),u=[],this._imageSearchViewModel&&n.isDataSourceEnabled("QSCH",i)&
&u.push(this._imageSearchViewModel.getSnipSearchSyntheticSuggestion(i,r)),t.TweakSe
arch&&(e=t.TweakSearch.getTweakSearchSuggestion(i,r),e&&u.push(e)),
{protocol:s,searchTheWeb:o,recourse:f,others:u}},i.prototype.canHaveDuplicates=func
tion(i,r){switch(i){case n.WebDataSource:case
n.MRUDataSource:case"OSTMA":case"BAW":case"MSBS":case"MSBC":case"QS":case"PP":case"
IBA":case"LRA":case"ST":case"FL":case"LM":case"IFF":case"LDIC":case"CG":case"PT":ca
se"MPP":case"MST":case"MFF":case"ODC":case"MODC":case"MDOC":case"MFOL":case"MPHO":c
ase"MVID":case"MMUS":case"EBH":case"SSUE":case"SSUC":return!
0;case"PBI":case"SM":case"FEH":case"AFC":case"TOPP":case"QSCH":case"LSQS":return!
1;case"SSEE":return r.scope==t.Scope.Documents||r.scope==t.Scope.Emails||
t.RuntimeConfig.QfMode==5;case"SSEC":return r.scope==t.Scope.Emails}throw new
Error("New data source "+i+" needs to be explicity classified as needed deduping
with other data sources or
not");},i.prototype.canHaveDuplicatesWithinDataSource=function(i,r){switch(i)
{case"MPP":case"MST":case n.MRUDataSource:return!0;case"SSEE":case"SSEC":return
r.scope==t.Scope.Emails}return
t.supportsShortcuts(i,r)},i.prototype.isDuplicate=function(i,u,c){var
v,y,l,a,nt,tt,it,rt,g,p,w,ut,ft,k,d;if(this.isMsbDuplicate(u,c)||
n.contains([5,4],u.handoffType)&&n.contains([5,4],c.handoffType)&&u.actionUri==c.ac
tionUri&&u.query.toLocaleLowerCase()==c.query.toLocaleLowerCase()||
u.handoffType==10&&c.handoffType==10&&u.type==c.type&&!u.htmlContent&&!
c.htmlContent&&u.query.toLocaleLowerCase()==c.query.toLocaleLowerCase()||u.type!
="PWL"&&u.handoffType==1&&c.handoffType==1&&n.isDuplicateUrl(i,u.url,c.url)||
(v=t.getAppItem(u),y=t.ge
tAppItem(c),l=v?v.filePath:u.path,l&&(l=l.toLocaleLowerCase()),a=y?
y.filePath:c.path,a&&(a=a.toLocaleLowerCase()),nt=t.getAppPfn(u),tt=t.getAppPfn(c),
nt&&tt&&nt.toLocaleLowerCase()==tt.toLocaleLowerCase()))return
r.NoMetadata;if(it=t.getCommandLineItem(u),rt=t.getCommandLineItem(c),it&&y||rt&&v)
{var et=l||a,b=it||rt,ot=b.encodedPath;return et&&ot&&et==ot.toLocaleLowerCase()?
(g=v||y,!b.launchArguments||
(g.launchArguments||"").toLocaleLowerCase()==b.launchArguments.toLocaleLowerCase()|
|!
g.launchArguments&&b.launchArguments&&g.displayName.toLocaleLowerCase().startsWith(
b.displayName.toLocaleLowerCase())?
r.NoMetadata:r.NotDuplicate):r.NotDuplicate}if(u.deviceItem&&c.deviceItem)
{if(p=u.deviceItem.id||"",w=c.deviceItem.id||"",p.toLocaleLowerCase()==w.toLocaleLo
werCase())return l&&!v&&a&&!y?r.MergeMetadata:r.NoMetadata;if(v)
{if(t.isSetting(c.type)&&f[p]==w)return r.NoMetadata}else
if(t.isSetting(u.type)&&(y&&f[w]==p||t.isSetting(c.type)&&(e[p]==w||
e[w]==p)))return r.NoMetadata}if(this.isIcoShortcutDuplicate(u,c)||
this.isIcoShortcutDuplicate(c,u))return r.NoMetadata;if(l&&a){if(l==a)return
r.MergeMetadata;if(!v&&!y)if(u.handoffType==c.handoffType)
{if(u.handoffType==8&&u.url==c.url)return
r.MergeMetadata}else{if((l=o(l,u.handoffType!=7),a=o(a,c.handoffType!=7),l==a)||
(ut=u.handoffType!=8,ft=c.handoffType!
=8,l=s(l,ut,u.url),a=s(a,ft,c.url),l==a))return
r.MergeMetadata;if(t.SubstrateTenantName){var
st=h(u,l,ut),ht=st[0],at=st[1],ct=h(c,a,ft),lt=ct[0],vt=ct[1];if(at==vt&&(lt.endsWi
th(ht)||ht.endsWith(lt)))return
r.MergeMetadata}}if(k=u.targetPathLC,d=c.targetPathLC,v&&c.type=="IBA"&&(l=t.resolv
eKnownFolderGUIDsInPath(l)),y&&u.type=="IBA"&&(a=t.resolveKnownFolderGUIDsInPath(a)
),(k&&d&&k==d||k&&k==a||d&&l==d||l==a)&&(!v||!y||
(v.launchArguments||"").toLocaleLowerCase()==(y.launchArguments||"").toLocaleLowerC
ase()))return r.NoMetadata}return this.isCortanaSettingDuplicate(u,c)||
this.isCortanaSettingDuplicate(c,u)?
r.NoMetadata:u.type==="PPL"&&c.type==="PPL"&&u.uniqueName&&c.uniqueName&&u.uniqueNa
me.toLocaleLowerCase()===c.uniqueName.toLocaleLowerCase()?
r.NoMetadata:u.type==="OLE"&&c.type==="OLE"&&u.internetMessageId===c.internetMessag
eId?r.NoMetadata:u.type==="BKS"&&c.type==="BKS"&&u.url&&c.url&&u.url===c.url?
r.NoMetadata:r.NotDuplicate},i.prototype.mergeDuplicates=function(i,u,f){var
e=this.isDuplicate(i,u,f);return e?
(e==r.MergeMetadata&&t.enrichMetadataFromDuplicate(i,u,f,this._host),u.duplicates=u
.duplicates||[],n.contains(u.duplicates,f)||
(u.duplicates.push(f),u.needsRefreshAfterDeduping=!0),!0):!
1},i.prototype.isIcoShortcutDuplicate=function(n,i){return
n.targetPathLC&&t.isApp(n.type)&&t.isApp(i.type)&&n.targetPathLC.includes("\\instal
ler\\")&&n.targetPathLC.endsWith(".ico")&&n.text==i.text},i.prototype.isCortanaSett
ingDuplicate=function(n,t){return n.handoffType==5&&n.actionUri=="ms-
cortana://navigate/Settings"&&t.deviceItem&&t.deviceItem.id=="CortanaSettings"},i.p
rototype.isMsbDuplicate=function(n,t){return n.msbDomain!
=null&&n.msbDomain===t.msbDomain&&n.msbId!
=null&&n.msbId===t.msbId},i.prototype.rankStartMenu=function(n)
{n=n.slice();n.sort(function(n,t){return n.text.localeCompare(t.text)});var
i=[{type:t.GroupType.StartMenu,source:1}];return{topResults:
[],suggestionsToAdd:n,suggestionsToRemove:
[],groupOrder:i}},i.prototype.rank=function(i,r,f,e,o,s,h,c){var
ti=this,yt,p,tt,ot,bt,rt,ct,d,lt,ut,v,g,dt,ft,at,gt,vt,k,ni;if(t.shouldFetchStartMe
nu(e))return this.rankStartMenu(r);t.isL2(e)&&(h=!
1);p=null;n.isDataSourceEnabled("WRS",e)&&(p=f.WRS);p||(p=f[n.WebDataSource]);var
et=p?p.rankingSignals:null,ii=p?
p.webTopResultRoutingType:1,nt=f[n.MRUDataSource],pt=null,l=null,wt=null;et&&(et.We
bSignalsAvailable=!0,pt=p.engagementSignals,l=p.suppressedGroups,
(t.config.groupsToNeverFullySuppress||[]).length>0&&l&&(l.fullySuppressedGroups||
[]).length>0&&(tt=[],ot=[],l.fullySuppressedGroups.forEach(function(i)
{n.contains(t.config.groupsToNeverFullySuppress,i)?
tt.push(i):ot.push(i)}),tt.length>0&&(l=a(l),l.fullySuppressedGroups=ot,
(yt=l.partiallySuppressedGroups).push.apply(yt,tt))));this._previousKeystrokeCache&
&(wt=this._previousKeystrokeCache.getPreviousEventWebSignalsData(e.queryToFetch));v
ar ri=nt?nt.SuggestionEngagementData:null,ui=nt?
nt.LookupCompletions:null,fi={cvid:this._host.getConversationId(),privacyNumber:thi
s._host.getPrivacyNumber()},y=this.getSyntheticSuggestions(e,s);r=r.slice();l&&(l.f
ullySuppressedGroups&&l.fullySuppressedGroups.length>0&&(r=r.filter(function(t)
{return!
n.contains(l.fullySuppressedGroups,String(ti.getGroupTypeForSuppressions(t)))})),t.
config.honorSuppressedSuggestions&&l.suppressedSuggestions&&l.suppressedSuggestions
.length>0&&(r=r.filter(function(i){return!
n.contains(l.suppressedSuggestions,t.getSuggestionKey(i))})));t.config.suppressFile
Folders&&e.queryToFetch.length<t.config.maxPrefixLengthForSupp&&e.scope==t.Scope.Al
l&&(bt=[t.GroupType.Documents,t.GroupType.Folders],r=r.filter(function(i){return!
n.contains(bt,t.getGroupType(i))}));i.length==0&&(y.others.length>0&&r.unshift.appl
y(r,y.others),y.protocol&&r.unshift(y.protocol));var
st=o.length==1&&o[0].childSuggestions&&o[0].childSuggestions.some(function(n)
{return
n.displayed}),kt=this.getSuggestionsToRank(st,i,r,y,s),it=this._ranker.rank(e,kt,et
,ri,ui,pt,fi,wt,c,y);this._previousKeystrokeCache&&!
h&&this._previousKeystrokeCache.updateSpellerTriggerData(e.queryToFetch,kt);i.lengt
h==0&&y.recourse&&r.push(y.recourse);var
w=this.determineTopResults(o,r,it,y,e,s,st),ht=i.filter(function(t){return!
n.contains(o,t)}),b=this.determineSuggestionsToAddToGroups(ht,r,o,w,y,e,st,h);if(!
t.RuntimeConfig.FlatListWithoutGroups&&it.mruSuppressions&&it.mruSuppressions.backP
ropDataExists)this.applyMRUSuppressions(it,o,w,b,e);else
if(l&&l.partiallySuppressedGroups&&this.canPartiallySuppressGroups(w,b))for(rt=0,ct
=b;rt<ct.length;rt++)d=ct[rt],u(d,e)||
(lt=this.getGroupTypeForSuppressions(d),this.canBePartiallySuppressed(d,lt)&&n.cont
ains(l.partiallySuppressedGroups,String(lt))&&(n.contains(o,d)||(d.suppressed=!
0)));if(ut=[],this.removeProtocolIfDuplicate(e,y,w,ht,b,ut),this.setUseRafFlag(w,b,
e,ii),v=this.getGroupOrder(e,b,ht),e.staticGroupOrder){for(g=[],dt=function(n){var
t=v.findIndex(function(t){return
t.type==n});t>=0&&(g.push(v[t]),v.splice(t,1))},ft=0,at=e.staticGroupOrder;ft<at.le
ngth;ft++)gt=at[ft],dt(gt);g.length>0&&(g.push.apply(g,v),v=g)}else
e.forceGroupOnTop&&(vt=e.forceGroupOnTop,k=v.findIndex(function(n){return
t.sameGroup(n,vt)}),k>=0&&(v.splice(k,1),v.unshift(vt)),k=v.findIndex(function(n)
{return
t.isTopHitChildGroup(n)}),k>=0&&(ni=v[k],v.splice(k,1),v.unshift(ni)));if(t.Runtime
Config.FlatListWithoutGroups&&(w=w.concat(b.filter(function(n){return!
n.suppressed})),b=[],n.trimList(w,t.RuntimeConfig.MaxSuggestionsWhenFlatList,functi
on(t){return!n.contains(i,t)&&!t.notAResult}),ut.length!=0))throw new Error("Can't
remove suggestions from groups when there are no
groups");return{topResults:w,suggestionsToAdd:b,suggestionsToRemove:ut,groupOrder:v
}},i.prototype.applyMRUSuppressions=function(i,r,f,e,o){var
c,l,a,h,s;if(this.canPartiallySuppressGroups(f,e))for(c={},l=0,a=e;l<a.length;l+
+)if(h=a[l],!u(h,o)&&(s=t.getGroupType(h),this.canBePartiallySuppressed(h,s))){if(!
c[s]){var v=i.mruSuppressions.maxGroupCCR?i.mruSuppressions.maxGroupCCR[s]||
0:0,y=i.mruSuppressions.maxGroupProbSugClickGivenPref?
i.mruSuppressions.maxGroupProbSugClickGivenPref[s]||
0:0,p=i.mruSuppressions.mruGroupRatios?i.mruSuppressions.mruGroupRatios[s]||
0:0,w=i.mruSuppressions.mruGroupBackpropRatios?
i.mruSuppressions.mruGroupBackpropRatios[s]||
0:0,b=i.mruSuppressions.mruGroupBackpropWeights?
i.mruSuppressions.mruGroupBackpropWeights[s]||
0:0,k=t.config.wtMaxGroupCCR*v+t.config.wtMaxGroupProbSugClickGivenPref*y+t.config.
wtMruGroupRatio*p+t.config.wtMruGroupBackpropRatio*w+t.config.wtMruGroupBackpropWei
ght*b+t.config.wtLRBias,d=1/(1+Math.exp(-
k));c[s]=n.trimFeatureStoreValue(d)}h.mruSuppressionScore=c[s];h.mruSuppressionScor
e<t.config.lRModelCutOff&&(n.contains(r,h)||(h.suppressed=!
0))}},i.prototype.allowedInGroups=function(n){return n.isAnswer?n.allowedInGroups:!
0},i.prototype.getGroupTypeForSuppressions=function(n){var
i=t.getGroupType(n);return i==t.GroupType.LocalPlaces?
t.GroupType.SearchSuggestions:i},i.prototype.canBePartiallySuppressed=function(n,i)
{return t.getScope(i)!
=t.Scope.All},i.prototype.canPartiallySuppressGroups=function(n,i){return
t.RuntimeConfig.ScopesAvailable?n.every(function(n){return
t.getGroupType(n)==t.GroupType.SearchSuggestions})&&i.every(function(n){return
t.getGroupType(n)==t.GroupType.SearchSuggestions})?!1:!0:!
1},i.prototype.isProtocolDuplicate=function(t,i,r){return t==r?!1:t.type=="MD"?!
0:t.handoffType==1&&n.isDuplicateUrl(i,t.url,r.url)},i.prototype.removeProtocolIfDu
plicate=function(t,i,r,u,f,e){var h=this,o,s;i.protocol&&(o=function(n){return!
n.suppressed&&h.isProtocolDuplicate(n,t,i.protocol)},(r.some(o)||u.some(o)||
f.some(o))&&(n.tryRemove(r,i.protocol)?r.length||(s=n.removeFirstWhere(u,o)||
n.removeFirstWhere(f,o),r.push(s)):n.tryRemove(f,i.protocol)||
n.contains(u,i.protocol)&&e.push(i.protocol),i.protocol=null))},i.prototype.getSugg
estionsToRank=function(i,r,u,f){i&&(r=r.filter(function(n){return!
t.isChildSuggestion(n)}));f.recourse&&(r=r.filter(function(n){return n!
=f.recourse}));var e=r.concat(u);return f.searchTheWeb&&!
n.contains(r,f.searchTheWeb)&&e.push(f.searchTheWeb),e},i.prototype.determineTopRes
ults=function(i,r,f,e,o,s,h){var et=this,l,d,p,w,b,it,g,nt,y,k,ut,tt,a,ft;if(h||!
o.queryToFetch||t.config.stickyTopResultsV2&&i.length>1&&!t.isL2(o))return
i;if(l=t.config.forceVoiceFlowOnTopHit?[]:f.topResults,d=this._previewPane?
this._previewPane.getPreviewedSuggestionToForceTopHit():null,d&&this._ranker.allowI
nTopHit(o,d)&&(p=function(n){return
t.isEquivalentForPreviewPanePurposes(o,d,n)},w=l.findIndex(p),w!=0&&(b=void 0,w>0?
(b=l[w],l.splice(w,1)):b=i.find(p)||r.find(p)||(e.searchTheWeb?[e.searchTheWeb]:
[]).find(p),b&&l.unshift(b))),e.protocol&&e.searchTheWeb&&this._ranker.allowInTopHi
t(o,e.protocol)&&n.tryRemove(l,e.searchTheWeb),e.searchTheWeb&&(it=l.inde
xOf(e.searchTheWeb),it>=0&&l.some(function(n){return n!
=e.searchTheWeb&&u(n,o)})&&l.splice(it,1)),l.length==0&&(t.config.stickyTopResultsV
2&&i.length>0?
l.push.apply(l,i):e.protocol&&this._ranker.allowInTopHit(o,e.protocol)?
l.push(e.protocol):e.searchTheWeb&&this._ranker.allowInTopHit(o,e.searchTheWeb)?
l.push(e.searchTheWeb):e.recourse&&this._ranker.allowInTopHit(o,e.recourse)&&l.push
(e.recourse)),g=t.getEffectiveScope(o)==t.Scope.Emails?
t.config.maxNumberOfEmailsInTopResult:Math.max(t.config.maxNumberOfTopResults,c(l)?
2:0,i.length),t.config.bypassFallbackOnMSBTopHit==4&&l.length>0&&(l[0].type=="PPL"|
|
l[0].type=="BKS")&&(g=2),l.length>g&&(l=l.slice(0,g)),t.config.synthWebNoBestMatch&
&l.length==1){var
rt=[t.GroupType.SearchSuggestions,t.GroupType.Websites],ot=r.filter(function(i)
{return!n.contains(rt,t.getGroupType(i))}),st=l.filter(function(i){return!
n.contains(rt,t.getGroupType(i))});ot.length==0&&st.length==0&&(l=[])}for(nt=i.leng
th-1;nt>=0;--nt)y=i[nt],n.contains(l,y)||(y.useRaf&&(y.useRaf=!1),y!
=e.searchTheWeb&&r.unshift(y));return l.length==1&&n.safeExecute(function(){return
et.applyAppOverride(l,r)},"applyDeviceInfoOverride"),l.forEach(function(n){return
n.suppressed=!
1}),k=t.isL2(o),t.config.stickyTopResultsV2&&l.length==1&&i.length==1&&!
k&&(ut=l[0],tt=i[0],ut==tt||v(tt)||
l.unshift(tt)),t.config.stickyConversation&&l.length==1&&this._previousKeystrokeCac
he&&(a=this._previousKeystrokeCache.getPreviousTopHit(),ft=a?a.ciMatchedQuery||
a.query.toLocaleLowerCase():"",a&&!
k&&o.queryToFetch.length>t.config.stickyConversationMinPrefixLength&&(a.type=="PP"|
|a.type=="ST")&&ft.startsWith(o.queryToFetch.toLocaleLowerCase())&&!
(a.query.toLocaleLowerCase()==l[0].query.toLocaleLowerCase()&&a.type==l[0].type)&&t
his._previousKeystrokeCache.getPreviousQuery().length<o.queryToFetch.length&&(a.seq
uenceNumber=s,a.instItem=n.InstrumentedItem.createInstrumentedItem(s,a.type),l[0]=a
),this._previousKeystrokeCache.setPreviousTopHit(k?
null:l[0]),this._previousKeystrokeCache.setPreviousQuery(o.queryToFetch.toLocaleLow
erCase())),t.config.enableCISpeller&&l.length==1&&this._previousKeystrokeCache&&(l[
0].type=="PP"||l[0].type=="ST")&&this._previousKeystrokeCache.setPreviousTopHit(k?
null:l[0]),l},i.prototype.applyAppOverride=function(n,t){var
r=["Microsoft.Office.WINWORD.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Windows
NT\\Accessories\\wordpad.exe"],u=n[0].deviceItem?
n[0].deviceItem.id:null,i;u&&u.startsWith(r[1])&&(i=t.findIndex(function(n){return
n.deviceItem&&n.deviceItem.id&&n.deviceItem.id.startsWith(r[0])}),i>=0&&n.splice(0,
1,t[i]))},i.prototype.setUseRafFlag=function(n,i,r,u){var
e,s,o,h,f;if(t.isCortanaEnabledCache)if(u==2||
t.config.forceVoiceFlowOnTopHit)for(e=0,s=n;e<s.length;e++)f=s[e],f.handoffType!
=0||f.isAnswer||(f.useRaf=!0);else for(o=0,h=n;o<h.length;o+
+)f=h[o],f.handoffType==0&&!f.isAnswer&&this._host.matchesVcd(f.query)&&(f.useRaf=!
0)},i.prototype.determineSuggestionsToAddToGroups=function(i,r,f,e,o,s,h,c){var
k=this,l=r.filter(function(t){return!
n.contains(e,t)}),w=[],a,v,y,p,b;for(t.RuntimeConfig.FlatListWithoutGroups||
l.forEach(function(n,i){k.allowedInGroups(n)||
(t.getScope(t.getGroupType(n))==t.Scope.All?w.push(i):n.suppressed=!
0)}),a=w.length-1;a>=0;--a)l.splice(a,1);return
o.searchTheWeb&&(v=e.indexOf(o.searchTheWeb),v!=-
1&&(y=n.removeFirstWhere(l,function(n){return
u(n,s)}),y&&(e[v]=y))),p=l.filter(function(i){return
n.contains([t.GroupType.SearchSuggestions,t.GroupType.Websites,t.GroupType.LocalPla
ces],t.getGroupType(i))}),b=l.filter(t.enforceOriginalOrder),!
h&&this.canRenderChildSuggestions(e,c,s)&&this.addChildSuggestions(e[0],l),s.queryT
oFetch&&l.sort(function(n,t){return t.rankingScore-
n.rankingScore}),this.insertDefaultSearchTheWeb(s,o,e,i,l,p),l=this.insertSuggestio
nsToRightPlace(l,b),this.insertSuggestionsToRightPlace(l,p)},i.prototype.insertDefa
ultSearchTheWeb=function(n,i,r,f,e,o){var
s,h;i.searchTheWeb&&(n.scope==t.Scope.Web||
n.scope==t.Scope.All)&&(s=o.findIndex(function(t){return
u(t,n)}),f.some(function(t){return u(t,n)})||r.some(function(t){return u(t,n)})?s!
=-1&&(h=o[s],o.splice(s,1),e.splice(e.indexOf(h),1)):s==-
1&&(o.unshift(i.searchTheWeb),e.unshift(i.searchTheWeb)))},i.prototype.getGroupOrde
r=function(n,i,r){var f,o,a,u,w,b,h,v,k,d,c,y,s;switch(n.scope){case
t.Scope.Web:if(!n.queryToFetch)return[{type:t.GroupType.EdgeHistory},
{type:t.GroupType.Websites},{type:t.GroupType.SearchSuggestions}];break;case
t.Scope.Apps:return[{type:t.GroupType.Apps},{type:t.GroupType.Store}];case
t.Scope.Photos:return[{type:t.GroupType.Photos},
{type:t.GroupType.SearchSuggestions}];case
t.Scope.Videos:return[{type:t.GroupType.Videos},
{type:t.GroupType.SearchSuggestions}];case
t.Scope.PeopleEmail:return[{type:t.GroupType.People},
{type:t.GroupType.Emails}]}f=r.concat(i);f.sort(function(n,t){return
t.rankingScore-n.rankingScore});var p=[],l=[],e=[],g=function(n)
{if(n.suppressed)l.push(n);else if(p.push(n),t.config.enableStaticGroupRanking){var
r=t.getGroupType(n),i={type:r,source:n.sourceForGroup};e.some(function(n){return
t.sameGroup(n,i)})||e.push(i)}};for(o=0,a=f;o<a.length;o++)s=a[o],g(s);if(l.length!
=0&&(f=p.concat(l)),u=[],t.config.enableStaticGroupRanking&&f.length>0&&t.getGroupT
ype(f[0])!=t.GroupType.SearchSuggestions){for(w=[{type:t.GroupType.Apps},
{type:t.GroupType.Settings},{type:t.GroupType.Documents,source:1}],b=function(n)
{e.some(function(i){return t.sameGroup(i,n)})&&u.push(n)},h=0,v=w;h<v.length;h+
+)k=v[h],b(k);t.RuntimeConfig.QfMode!=8&&e.some(function(n){return t.sameGroup(n,
{type:t.GroupType.SearchSuggestions})})&&u.push({type:t.GroupType.SearchSuggestions
})}for(d=function(n){var
r=t.getGroupType(n),i={type:r,source:n.sourceForGroup};u.some(function(n){return
t.sameGroup(n,i)})||
(t.RuntimeConfig.QfMode==8&&i.type==t.GroupType.SearchSuggestions?
u.unshift(i):t.config.enableStaticGroupRanking&&t.isTopHitChildGroup(i)?
u.unshift(i):u.push(i))},c=0,y=f;c<y.length;c++)s=y[c],d(s);return
u},i.prototype.addChildSuggestions=function(i,r)
{i.calculateChildSuggestions&&i.calculateChildSuggestions();i.childSuggestions&&i.c
hildSuggestions.length>0&&Object.keys(t.config.topHitChildGroups).forEach(function(
u,f){var e=parseInt(u),o=n.contains(t.config.suppressedTopHitChildGroups,e)?
0:t.config.topHitChildGroups[u],s;o>0&&(s=i.childSuggestions.filter(function(n)
{return n.groupType==e}).slice(0,o),s.forEach(function(n,t){n.rankingScore=1e4-
100*f-t;r.push(n)}))})},i.prototype.canRenderChildSuggestions=function(n,i){var
r,u;return t.RuntimeConfig.FlatListWithoutGroups?!1:n.length!=1?!1:
(r=n[0],t.RuntimeConfig.AlwaysWide&&r.previewPaneType!=1)?!1:i?
this._renderedTopResults.topResults.length==1?
(u=this._renderedTopResults.topResults[0],u.hasChildSuggestionsDisplayed&&u.query==
r.query&&t.getGroupType(u)==t.getGroupType(r)):!1:!
0},i.prototype.insertSuggestionsToRightPlace=function(t,i){var
r,e,u,f;if(i.length==0)return t;for(r=[],e=i[0],u=0;u<t.length;u++)f=t[u],f==e?
r=r.concat(i):n.contains(i,f)||r.push(f);return r},i}();i.Aggregator=l})
(i=t.Ranking||(t.Ranking={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var t=function(){function t(n,t,i,r){var
u=this;this._instrumentationHelper=t;this._sequenceNumberReader=i;this._page=r;this
._itemLaunchEventHandlers=[];this.groups=[];this.topResults=[];this._lastUpdatedSeq
uenceNumber=-1;this._topResultsRenderingDisabled=!1;this._groupRenderingDisabled=!
1;n.bindShown(function(){u._selectedItem=null})}return
t.prototype.onDismiss=function()
{this.topResults=[];this.renderTopResults();this.groups=[];this.renderGroups();this
._partialQuery=null;this._lastUpdatedSequenceNumber=-
1},t.prototype.bindItemLaunch=function(n)
{this._itemLaunchEventHandlers.push(n)},t.prototype.onSuggestionLaunch=function(n,t
,i){this._itemLaunchEventHandlers.forEach(function(r){return
r(n,t,i)})},t.prototype.onQueryChanged=function(n)
{this._partialQuery=n},t.prototype.getCurrentTopResults=function(){return
this.topResults.slice(0)},t.prototype.getTopResultsWhichFitInCanvas=function(n)
{return n},t.prototype.resetAriaSelected=function(n)
{n&&this._page.render(function(){var t=_ge(n.id);t&&(t.setAttribute("aria-
selected","false"),t.setAttribute("aria-
selected","true"))})},t.prototype.updateTopResults=function(t,i,r,u,f,e){var
s=this,a,o,h,y;t!=(u!
=this._lastUpdatedSequenceNumber)&&SharedLogHelper.LogError("updateTopResult",t+" !
= (sequenceNumber "+u+" != lastUpdateSequenceNumber
"+this._lastUpdatedSequenceNumber+")",new Error("Precondition
failed"));this._lastUpdatedSequenceNumber=u;t&&(this.groups=[],this.onGroupsCleared
());a=this._selectedItem;o=this.topResults;i=this.getTopResultsWhichFitInCanvas(i);
h=!n.sequenceEqual(i,o)||o.some(function(n){return
n.needsRefreshAfterDeduping});h&&(this.topResults=i.slice(0));var c=!1,l=h?
i.length:0,v=function()
{c&&l==0&&(n.config.enableLocalInstrumentation&&s._instrumentationHelper.instrument
RenderedLocalSuggestion(u,i),s._instrumentationHelper.instrumentTopResultRendered(u
,i.map(function(n){return n.type})),c=!1)};return h?
(this.renderTopResultsAfter(function(){for(var i,t=0,h=s.topResults;t<h.length;t+
+)i=h[t],i.needsRefreshAfterDeduping=!1,n.contains(o,i)?l-=1:s.setupIcon(u,i,!
0,function(){l-=1;v()});s.onBeforeRenderTopResults(o,f,r,e)}),c=!0):
(y=this.onBeforeRenderTopResults(o,f,r,e),y==0&&(this.renderTopResults(),c=!
0)),this._selectedItem&&(a!=this._selectedItem||
t)&&n.contains(this.topResults,this._selectedItem)&&this.resetAriaSelected(this._se
lectedItem),[h,v]},t.prototype.setupIcon=function(n,t,i,r)
{r()},t.prototype.renderGroups=function(){this._groupRenderingDisabled||
(this._page.updateGroupsView({query:this._contentQuery,topResults:this.topResults,g
roups:this.groups}),this._instrumentationHelper.updateSuggestionsList(this.topResul
ts,this.groups))},t.prototype.renderGroupsAfter=function(n){var
t=this._groupRenderingDisabled;this._groupRenderingDisabled=!
0;try{n()}finally{this._groupRenderingDisabled=t;this.renderGroups()}},t.prototype.
renderTopResults=function(){this._topResultsRenderingDisabled||
(this._page.updateTopResultsView({query:this._
contentQuery,topResults:this.topResults,groups:this.groups}),this._instrumentationH
elper.updateSuggestionsList(this.topResults,this.groups))},t.prototype.renderTopRes
ultsAfter=function(n){var
u=this._topResultsRenderingDisabled,t,i,r;this._topResultsRenderingDisabled=!
0;try{n()}finally{for(this._topResultsRenderingDisabled=u,this.renderTopResults(),t
=0,i=this.topResults;t<i.length;t++)r=i[t],r.executeScript&&r.executeScript()}},t}
();n.BaseRootViewModel=t}(AutoSuggest||(AutoSuggest={})),function(n){function
r(t,i){t(n.getCurrentTime(),n.getInputType(i),i)}var t="aria-
selected",i;n.invokeClickHandler=r;i=function(){function i(i){var
r=this,u;this._host=i;this._renderingInProgress=!
1;this._narratorLaunchHandlers=[];this._viewData={};this._targetElemCache={};u=new
MutationObserver(function(n){var i,o,u,f,s,e;if(!r._renderingInProgress)
{for(i=[],u=0,f=n;u<f.length;u+
+)s=f[u],e=s.target,o=e.id,i.push(e.getAttribute(t)=="true"?1:0);
(i.length==1&&i[0]==0||
i.length==2&&i[0]^i[1])&&r._narratorLaunchHandlers.forEach(function(n){return
n(o)})}});u.observe(document,{subtree:!0,attributes:!0,attributeFilter:
[t]});n.View.getLocString=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-
1]=arguments[t];return i.getLocString.apply(i,
[n].concat(r))};this.addViewData("TestHooksEnabled",n.config.th)}return
i.prototype.adjustHeightAsync=function(){var t=this;n.safeSetTimeout(function()
{return
t._host.adjustHeight()},0,"adjustHeightAsync")},i.prototype.bindOnNarratorLaunch=fu
nction(n){this._narratorLaunchHandlers.push(n)},i.prototype.render=function(t){var
i=this;this._renderingTimer&&sb_ct(this._renderingTimer);this._renderingInProgress=
!
0;try{n.View.ViewData=this.getViewData();t()}finally{this._renderingTimer=n.safeSet
Timeout(function(){i._renderingTimer=null;i._renderingInProgress=!1},0,"BasePage
render")}},i.prototype.renderReactView=function(n,t,i){var
f=this,r=this._targetElemCache[n],u;r||
(this._targetElemCache[n]=r=_ge(n));u=i;u.adjustHeight||(u.adjustHeight=function()
{return f.adjustHeightAsync()});this.render(function(){return
_w.ReactDOM.render(React.createElement(t,i),r)},n)},i.prototype.addViewData=functio
n(n,t){this._viewData[n]=t},i.prototype.getViewData=function(){return
this._viewData},i}();n.BasePage=i}(AutoSuggest||
(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=function(t,i)
{return 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])},n(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){function r(n,t)
{var
i=parseInt(n.substr(1),16),r=i>>16&255,u=i>>8&255,f=i&255;return"rgba("+r+","+u+","
+f+","+t+")"}function s(n,t){var i=parseInt(n.substr(1),16),r=Math.max(0,(i>>16)-
t),u=Math.max(0,(i>>8&255)-t),f=Math.max(0,(i&255)-t);return"#"+String("000000"+(f|
u<<8|r<<16).toString(16)).slice(-6)}function u(n,t){var
i=parseInt(n.substr(1),16),r=Math.max(0,(i>>16)*t),u=Math.max(0,
(i>>8&255)*t),f=Math.max(0,(i&255)*t);return"#"+String("000000"+(f|u<<8|
r<<16).toString(16)).slice(-6)}var
e="slideInMessage",o="indexingMessage",i,f;t.SinglePaneWidth=344;t.PreviewPaneWidth
=440;t.DebugWindowWidth=800;f=function(f){function h(r){var u=f.call(this,r)||
this,e;return u.host=r,u._root=_ge("root"),u._windowsTemporaryMessageShown=!
1,u._windowsIndexingMessageShown=!1,u._progressBarVisible=!
1,u._previewPaneVisible=!1,u._debugWindowVisible=!
1,u._suggestionsContainerHeight=0,u._immersiveSearchHeightExpandedInThisConversatio
n=!
1,i=SearchAppWrapper.CortanaApp,u._windowsTemporaryMessageWrapper=_ge("temporaryMes
sageWrapper"),u._windowsIndexingMessageWrapper=_ge("temporaryMessageWrapper"),u._qf
Container=_ge("qfContainer"),u._previewContainer=_ge("previewContainer"),r.bindAppV
isible(function(){var e=i.width,f=i.height;e&&f?
u.setDimensions(e,f):ThresholdUtilities.getCortanaHeaders(function(n){if(n){var
t=n["X-BM-
DeviceDimensionsLogical"].split("x"),i=t[0],r=t[1];u.setDimensions(parseInt(i),r)}}
);t.RuntimeConfig.PreviewPaneAvailable&&(u.initPreviewPane(),t.setVisibility(u._pre
viewPane,t.RuntimeConfig.AlwaysWide),!
t.RuntimeConfig.AlwaysWide&&r.hasFallbackHappened()&&i.resetToDefaultSize());u.init
DebugWindow();u.setConditionalCss("panelCanResize",t.RuntimeConfig.PanelCanResize);
u.setConditionalCss("flatListWithoutGroups",t.RuntimeConfig.FlatListWithoutGroups);
u.setConditionalCss("searchBoxOnTop",t.RuntimeConfig.SearchBoxOnTop);u.setCondition
alCss("wideByDefault",t.RuntimeConfig.AlwaysWide||
t.RuntimeConfig.QfMode==2);u.setConditionalCss("centerScreen",t.RuntimeConfig.QfMod
e==2);u.setConditionalCss("noPPOpenedArrow",t.config.noPPOpenedArrow);u.setConditio
nalCss("whitePreview",t.config.whitePreview);u.setConditionalCss("searchHomeQuickAn
swer",t.config.quickAnswer&&t.RuntimeConfig.PreviewPaneAvailable);u.setConditionalC
ss("searchHomeQuickAnswerSmallHeight",t.config.quickAnswer&&t.RuntimeConfig.Preview
PaneAvailable&&f<640);u.setConditionalCss("webDisabled",!
n.isMiniSerpEnabled());u.setConditionalCss("enableSnipSearchSmallButton",t.config.E
nableSnipSearchSmallButton);u.setQueryBasedCss(null)}),r.bindShown(function()
{if(t.config.isThemeAware&&i.theme){var
n=i.theme.startsWith("000000");u.setThemeBasedCss(n)}u.setConditionalCss("snipSearc
h",i.entryPoint=="WNSSBS"&&t.config.enableSnipSearchV2);t.setVisibility(u._root,!
0)}),r.bindAppHidden(function()
{u._openPreviewPaneButtonCache=undefined;u.markWebViewExpandedState(!
1);t.setVisibility(u._previewPane,!1)}),e=function(){t.RuntimeConfig.AlwaysWide||
(u._previewPaneVisible=!1,t.setVisibility(u._previewPane,!
1));u.setDebugWindowVisibility(!1)},r.bindQueryChangedOrInitialized(function(n)
{n.fullPartialQuery&&u.ensureWebViewHeightExpanded();t.RuntimeConfig.QfMode==5&&u.u
pdateFENarratorSuggestionCount(null)}),r.bindSearchBoxClick(function(){return
u.ensureWebViewHeightExpanded()}),r.bindKeyDown(function(n)
{n==40&&u.ensureWebViewHeightExpanded()}),r.bindDismissed(function()
{u.resetSuggestionsContainerHeight();e()}),r.bindAccentColorAndThemeRefreshed(funct
ion(n,t)
{u.applyAccentColor();u.setThemeBasedCss(t)}),t.config.alwaysWideBeforeRS5&&i.addEv
entListener("openanimationcompleted",function()
{u.ensureWebViewWidthExpanded()}),i.addEventListener("resettingtodefaultsize",funct
ion(){e()}),sj_be(sj_b,"contextmenu",function(n){for(var t=n.target;t;)
{if(t.classList.contains("allowcontextmenu"))break;t=t.parentElement}t||
sj_pd(n)}),u}return __extends(h,f),h.prototype.setConditionalCss=function(n,t){t?
this._root.classList.add(n):this._root.classList.remove(n)},h.prototype.setQueryBas
edCss=function(n){var
i=t.shouldFetchStartMenu(n);this.setConditionalCss("fileExplorer",t.RuntimeConfig.Q
fMode==5);this.setConditionalCss("startMenu",i);this.setConditionalCss("noScopes",!
t.RuntimeConfig.ScopesAvailable||
i);this.setConditionalCss("settingsApp",t.RuntimeConfig.QfMode==7);this.setConditio
nalCss("santorini",t.RuntimeConfig.QfMode==8);this.setConditionalCss("lockscreen",t
.RuntimeConfig.QfMode==6);this.setConditionalCss("darkBackground",i);t.RuntimeConfi
g.QfMode!=8&&this.setConditionalCss("zeroInput19H1",n?
n.isSearchHomeZI:t.RuntimeConfig.SearchHomeAvailable==1)},h.prototype.setThemeBased
Css=function(n){t.config.isThemeAware?
(t.RuntimeConfig.QfMode==7&&(n=n&&i.appsUseLightTheme===!
1),t.RuntimeConfig.QfMode==5&&i.fileExplorerSuggestionPage&&(n=i.fileExplorerSugges
tionPage.useDarkTheme),this.setConditionalCss("darkTheme19H1",n),this.setConditiona
lCss("lightTheme19H1",!
n)):t.config.searchHomeSupported&&(this.setConditionalCss("lightTheme19H1",!
0),this.setConditionalCss("lightThemeRS5",!
0))},h.prototype.initPreviewPane=function(){var n=i.textScaleFactor||
1,f=t.PreviewPaneWidth/n,r,u;this._previewPane||
(this._previewPane=_ge("qfPreviewPane"),this._previewPane.classList.remove("transit
ionOn"));t.RuntimeConfig.QfMode==2?
(r=470,u=r/n,this._previewPane.style.minWidth=u+"px"):this._previewPane.style.minWi
dth=f+"px"},h.prototype.initDebugWindow=function(){this._debugWindow||
(this._debugWindow=_ge("qfDebugPane"),this._debugWindow&&(this._debugWindow.style.f
lexBasis=t.DebugWindowWidth+"px"))},h.prototype.setDimensions=function(n,i)
{if(t.isMobileCache&&i&&(this._root.style.height=i+"px"),!
this._previewPaneVisible&&!this._debugWindowVisible)
{this.onPaneWidthSet(n);this._originalPaneWidth=n}},h.prototype.ensureWebViewWidthE
xpanded=function(){var
n=t.SinglePaneWidth+t.PreviewPaneWidth;t.RuntimeConfig.QfMode==1&&i.width<n&&(i.set
PaneWidth(n),this.setDimensions(n,null))},h.prototype.ensureWebViewHeightExpanded=f
unction(){if(t.RuntimeConfig.QfMode==2&&!
this._immersiveSearchHeightExpandedInThisConversation){var
n=i.height;i.setCenterScreenAcrylicBackgroundHeight(n+12);i.setWebViewHeight(n);thi
s.markWebViewExpandedState(!0)}},h.prototype.markWebViewExpandedState=function(n)
{this._immersiveSearchHeightExpandedInThisConversation=n;this.setConditionalCss("we
bViewExpanded",n)},h.prototype.getScrollTop=function(){return
this._qfContainer.scrollTop},h.prototype.scrollToTop=function()
{this._qfContainer.scrollTop=0;_d.body.scrollTop=0},h.prototype.scrollTo=function(n
){var
r=_ge(n.id),i;this.scrollToElement(r,this._qfContainer,this._qfContainer.offsetHeig
ht);i=window.innerHeight;t.isMobileCache&&_d.body.scrollHeight>i&&this.scrollToElem
ent(r,_d.body,i)},h.prototype.scrollToElement=function(n,t,i){var
u=t.scrollTop,r=n.offsetTop-t.offsetTop,f=r+n.offsetHeight;f>u+i?t.scrollTop=f-
i:r<u&&(t.scrollTop=r)},h.prototype.getSuggestionsContainerHeight=function(){return
t.RuntimeConfig.QfMode==2&&!this._immersiveSearchHeightExpandedInThisConversation?
i.height:(this._suggestionsContainerHeight||
this.calculateSuggestionsContainerHeight(),this._suggestionsContainerHeight)},h.pro
totype.getSuggestionsContainerWidth=function(){return
i.width},h.prototype.resetSuggestionsContainerHeight=function()
{this._suggestionsContainerHeight=0},h.prototype.calculateSuggestionsContainerHeigh
t=function(){var
n=_ge("root").clientHeight,t;n<440&&(n=440);t=_ge("temporaryMessage");n-
=t.offsetHeight;this._suggestionsContainerHeight=n},h.prototype.getPanelWidthFor=fu
nction(n){var i=this._originalPaneWidth;return i+=n&1?t.PreviewPaneWidth:0,i+(n&2?
t.DebugWindowWidth:0)},h.prototype.getPanelState=function(){switch(i.width-
this._originalPaneWidth){case 0:return 0;case t.PreviewPaneWidth:return 1;case
t.DebugWindowWidth:return 2;case t.PreviewPaneWidth+t.DebugWindowWidth:return
3;default:return 0}},h.prototype.openSidePanel=function(n){var
t=this.getPanelState(),u,r;if(t==0&&this.setDimensions(i.width,null),!(t&n)){u=t|
n;r=this.getPanelWidthFor(u);i.setPaneWidth(r);this.onPaneWidthSet(r)}},h.prototype
.closeSidePanel=function(n){var u=this.getPanelState(),f,r;if(u&n)
{f=u&~n;r=this.getPanelWidthFor(f);r!=this._originalPaneWidth||
t.config.alwaysWideBeforeRS5?
i.setPaneWidth(r):i.resetToDefaultSize();this.onPaneWidthSet(r)}},h.prototype.onPan
eWidthSet=function(t)
{n.safeFireEvent("CortanaPaneWidthSet",t)},h.prototype.getOpenPreviewPaneButton=fun
ction(){if(!t.RuntimeConfig.PreviewPaneAvailable)return null;if(!
this._openPreviewPaneButtonCache){var
n=t.isRtl(),i=n?"&#xE96F":"&#xE970";t.config.chevronMed&&(i=n?"&#xE973":"&#xE974");
this._openPreviewPaneButtonCache={defaultIcon:{content:i,type:2},openedIcon:
{content:n?"&#xE72B":"&#xE72A",type:2},clickHandler:this._openPreviewPaneClickHandl
er}}return
this._openPreviewPaneButtonCache},h.prototype.setContextMenuHandler=function(n)
{this._contextMenuHandler=n},h.prototype.setSuggestionClickHandler=function(n)
{this._suggestionClickHandler=n},h.prototype.setOpenPreviewPaneClickHandler=functio
n(n)
{this._openPreviewPaneClickHandler=n},h.prototype.setExpanderClickInstrumentation=f
unction(n)
{this._expanderClickInstrumentation=n},h.prototype.updateGroupsView=function(i)
{if(t.config.th&&ClientTestHooks.isTesthookParamSet("forceRenderingCrashOnSecondCon
versation")&&this._host.getPaneCloseCount())throw new Error("Simulated
exception");this.setQueryBasedCss(i.query);this.setConditionalCss("noSuggestions",i
.topResults.length==0&&i.groups.length==0);var
r=i.query&&i.query.isSearchHomeZI,u=r?null:" -
"+t.getWebSuggestionAnnotation(this._host),f=t.shouldFetchStartMenu(i.query)&&i.gro
ups.some(function(n){return n.typeWithSource.type==t.GroupType.StartMenu})?
n.View.StartMenuGroups:n.View.WindowsGroups;this.renderReactView("groups",f,
{groups:i.groups,contextMenuHandler:this._contextMenuHandler,clickHandler:this._sug
gestionClickHandler,openPreviewPaneButton:this.getOpenPreviewPaneButton(),webSugges
tionAnnotation:u})},h.prototype.updateFENarratorSuggestionCount=function(i){var
r="";t.RuntimeConfig.QfMode==5&&i&&(r=this.host.getLocString("SuggestionCountNarrat
or",""+i));this.renderReactView("narratorMessageContainer",n.View.FileExplorerNarra
torAnnouncement,{message:r})},h.prototype.updateTopResultsView=function(i)
{if(this.setQueryBasedCss(i.query),this.setConditionalCss("noSuggestions",i.topResu
lts.length==0&&i.groups.length==0),t.RuntimeConfig.QfMode==5){var
r=i.topResults.length;this.updateFENarratorSuggestionCount(r>0?
r:null)}this.renderReactView("topResults",n.View.WindowsTopResults,
{suggestions:i.topResults,contextMenuHandler:this._contextMenuHandler,clickHandler:
this._suggestionClickHandler,openPreviewPaneButton:this.getOpenPreviewPaneButton()}
)},h.prototype.showTemporaryMessage=function(i){var
r=this,u;this._windowsTemporaryMessageShown?
(this.hideTemporaryMessage(),n.safeSetTimeout(function(){return
r.showTemporaryMessage(i)},100,"showTemporaryMessage")):
(u={messageText:i,clickHandler:function()
{r.hideTemporaryMessage();r._host.setFocusInSearchBox(null,"temporaryMessage")}},th
is.updateTemporaryMessageView(u),this._windowsTemporaryMessageShown=!
0,t.setVisibility(this._windowsTemporaryMessageWrapper,!
0))},h.prototype.hideTemporaryMessage=function()
{this._windowsTemporaryMessageShown&&(this.updateTemporaryMessageView(null),this._w
indowsTemporaryMessageShown=!
1,t.setVisibility(this._windowsTemporaryMessageWrapper,!
1))},h.prototype.updateTemporaryMessageView=function(t)
{this.renderReactView("temporaryMessage",n.View.WindowsMessage,{dataModel:t,icon:
{content:"&#xE946",type:2},messageClassName:e})},h.prototype.updateIndexingMessageV
iew=function(i){var r=!!i;this._windowsIndexingMessageShown!
=r&&(this.renderReactView("temporaryMessage",n.View.WindowsMessage,
{dataModel:i,icon:i&&i.messageText==this._host.getLocString("WindowsIndexingInProgr
essMessage")?
{content:"&#xE895",type:2}:null,messageClassName:o}),this._windowsIndexingMessageSh
own=r,t.setVisibility(this._windowsIndexingMessageWrapper,r),this.resetSuggestionsC
ontainerHeight())},h.prototype.updateDialogBox=function(t){t.isVisible?
this._host.setFocusInWebView("updateDialogBox"):this._host.setFocusInSearchBox(null
,"updateDialogBox:
hidden");this.renderReactView("dialogBox",n.View.WindowsDialogBox,
{dataModel:t})},h.prototype.updateTopHitHeaderView=function(t)
{this.renderReactView("topHitHeader",n.View.TopHitHeader,
{dataModel:t})},h.prototype.updateScopesHeaderView=function(t)
{this.renderReactView("scopesHeader",n.View.ScopesHeader,
{dataModel:t})},h.prototype.updatePreviewErrorMessageView=function(t)
{this.renderReactView("previewErrorMessageContainer",n.View.PreviewErrorMessageCont
ainer,{dataModel:t})},h.prototype.updatePreviewContainerView=function(t){t?
this._previewContainer.classList.add("localPreviewContainer"):this._previewContaine
r.classList.remove("localPreviewContainer");this.renderReactView("previewContainer"
,n.View.WindowsPreviewContainer,
{dataModel:t,expanderClickInstrumentation:this._expanderClickInstrumentation,chevro
nDownIcon:{content:"&#xE70D",type:2},cortanaInfoIcon:
{content:"&#xE946",type:2}})},h.prototype.updateMsbPreviewContainerView=function(n)
{var
i=this,t;this._previewContainer.innerHTML="";t=sj_ce("div","b_bfb");this._previewCo
ntainer.appendChild(t);t.addEventListener("click",function(n){var
t=i.findBfbAnchor(n.target);t&&t.href&&(n.preventDefault(),i._host.launchUri(t.href
))});n.suggestion?
this._previewContainer.classList.add("localPreviewContainer","msbPreviewContainer")
:this._previewContainer.classList.remove("localPreviewContainer","msbPreviewContain
er")},h.prototype.findBfbAnchor=function(n){return n?n.tagName==="a"||
n.tagName==="A"?
n:this.findBfbAnchor(n.parentElement):undefined},h.prototype.updateMenuView=functio
n(t){this.renderReactView("menuContainer",n.View.WindowsMenu,
{dataModel:t})},h.prototype.updateSnipSearchMessageView=function(t)
{this.renderReactView("messageContainer",n.View.SnipSearchMessage,
{dataModel:t})},h.prototype.setProgressIndicatorVisibility=function(n)
{this._progressBarVisible!=n&&(this._progressBar||
(this._progressBar=_ge("b_progress")),t.setVisibility(this._progressBar,n),this._pr
ogressBarVisible=n)},h.prototype.setPreviewPaneVisibility=function(n)
{this._previewPaneVisible!=n&&(n||
this.closeSidePanel(1),t.setVisibility(this._previewPane,n),n&&this.openSidePanel(1
),this._previewPaneVisible=n)},h.prototype.toggleDebugWindowVisibility=function()
{return this.setDebugWindowVisibility(!
this._debugWindowVisible),this._debugWindowVisible},h.prototype.setDebugWindowVisib
ility=function(n){t.setVisibility(this._debugWindow,n);t.RuntimeConfig.AlwaysWide?
this.setConditionalCss("debugWindowOpen",n):n?
this.openSidePanel(2):this.closeSidePanel(2);this._debugWindowVisible=n},h.prototyp
e.applyAccentColor=function(){var
i=this._host.getAccentColor(),o,e,f,t;this._lastAccentColor!=i&&(e="accent-
style",f=_ge(e),f||
(f=_d.createElement("style"),f.setAttribute("id",e),f.type="text/css",o=!
0),t=".icon svg { fill: {0} }",t+=".gridLayout .suggestion.sa_hv, .gridLayout
.suggestion.sa_hv:hover { border-color: {1}; }",t+=".toggleSwitch input:checked +
label::before { background-color: {0}; border-color:
{0}; }",n.isHighContrastEnabled()||(t+=".accentColor, .accentColor:visited { color:
{0}; }",t+=".sa_hv, .sa_hv.selectable:active, .sa_hv.selectable:hover, .sa_hv
.openPreviewPaneBtn:active, #root.zeroInput19H1 .selectable.sa_hv,
#root.zeroInput19H1 .selectable.sa_hv:hover { background-color:
{1}; }",t+=".sa_hv.suggestion:hover { background-color:
{3}; }",t+=".sa_hv.withOpenPreviewPaneBtn:not(.previewPaneOpened)
.openPreviewPaneBtn:hover { background-color:
{2}; }",t+=".sa_hv.withOpenPreviewPaneBtn:not(.previewPaneOpened)
.suggDetailsContainer:hover { background-color: {2}; }",t+="#footer { background-
color: {8}; }",t+="#footer:hover { background-color: {9}; }",t+="#footer:active
{ background-color:
{10}; }",t+=":not(.groupContainer).topHitConnectedToGroup:not(.sa_hv):not(.previewP
aneOpened) { background: {2}; }",t+="#root:not(.wideByDefault) .selectedScope
{ background-color: {3}; }",t+="#root:not(.wideByDefault) .selectedScope:hover
{ background-color: {4}; }",t+="#root:not(.wideByDefault) .selectedScope:active
{ background-color: {5}; }",t+="#root.wideByDefault .selectedScope { border-color:
{0}; }",t+="#startMenu .icon { background-color:
{5}; }",t+=".accentButtonBackground { background-color:
{6}; }",t+=".accentButtonBackground:focus { background-color:
{1}; }",t+=".scopeOptions input[type='button'], .topOptions input[type='button']
{ background-color: {12}; border-color: {12} }",t+=".scopeOptions
input[type='button']:hover, .topOptions input[type='button']:hover { border-color:
{3} }",t+=".expanderContainer.selectedExpander .expanderInnerCircle,
.expanderContainer:hover .expanderInnerCircle { background-color: {1}; border-
color: {11} }",t+="#previewContainer .expanderContainer.selectedExpander .divider,
#previewContainer .expanderContainer:hover .divider { border-color:
{1} }",t+=".zeroInput19H1 .secondaryText.selectable { color:
{12} }",t+=".zeroInput19H1.darkTheme19H1 .secondaryText.selectable { color:
{13} }",t+=".zeroInput19H1 .santorini .sa_hv.selectable, .santorini
.sa_hv.selectable { background-color: {14}; }",t+=".radial { stroke:
{0} }"),f.innerHTML=n.formatString(t,
[i,r(i,.3),r(i,.1),r(i,.4),r(i,.6),r(i,.7),r(i,.15),s(i,35),u(i,.65),u(i,.8),u(i,.9
),r(i,0),this._host.getAccentColor(1),this._host.getAccentColor(-2),r(i,.2),]
),o&&_d.head.appendChild(f),this._lastAccentColor=i)},h}(n.BasePage);t.Page=f})
(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var
t=54e5,i=function(){function i(i,r){var
u=this;this._host=i;this._appCacheInstrumentationHelper=r;this._isReloadSuppressed=
!1;this._pendingReload=!
1;r.registerSuperFresh();i.hasFallbackHappened()&&(this._isReloadSuppressed=!
0,this._lastReloadAfterFallback=n.getCurrentTime());i.bindAppHidden(function()
{(u._isReloadSuppressed=u._lastReloadAfterFallback&&n.getCurrentTime()-
u._lastReloadAfterFallback<t,u._isReloadSuppressed)||(!
u._pendingReload&&n.config.reloadAfterConversations&&i.getPaneCloseCount()>=n.confi
g.reloadAfterConversations&&(u._pendingReload=!
0),u._pendingReload&&(u.logReloadAttempt(),u.reload()))});sj_be(applicationCache,"u
pdateready",function(){return
u.onUpdateReady()});i.bindConversationStart(function(){u._isReloadSuppressed=!
0;u.shouldCheckForUpdate()&&n.contains([1,4,5],applicationCache.status)&&n.safeExec
ute(function(){return applicationCache.update()},"probe for manifest
update")})}return i.prototype.shouldCheckForUpdate=function(){if(!
n.isBingEnabled())return!1;return
n.config.th&&ClientTestHooks.isTesthookParamSet("disableAppCache")?!1:!
0},i.prototype.onUpdateReady=function()
{this.logReloadAttempt();this._isReloadSuppressed?this._pendingReload=!
0:this.reload()},i.prototype.reload=function()
{this._host.reloadWebView()},i.prototype.logReloadAttempt=function()
{this._appCacheInstrumentationHelper.instrumentSuperFreshUpdate(this._isReloadSuppr
essed)},i}();n.SuperFreshAppCache=i}(AutoSuggest||(AutoSuggest={})),function(n){var
t;(function(t){var i,r;(function(t){function u(t,i,r,u,f,e,o,s){var c,l=function(n)
{c&&f.unregister(c);o&&o==n.number||SharedLogHelper.LogError(t,e,s||
n);u&&u(n)},h,a;try{h=i();h?(f&&h.cancel&&(c=f.register(function(){return
h.cancel()},!1,t+" cancellation")),a=function(i)
{c&&f.unregister(c);r&&n.safeExecute(function(){return r(i)},t+"
completion")},h.done?h.done(a,l):h.then(a,l)):l(new Error("No promise
returned"))}catch(v){l(v)}}function r(t,i,r,u){i.completed=!
0;i.result=r;i.pendingCallbacks.forEach(function(t){return n.safeExecute(function()
{return t(r)},u)});i.pendingCallbacks=null}function f(){i={}}function e(){var
n=[];for(var t in i)i[t].completed||n.push(t);n.forEach(function(n){return delete
i[n]})}function o(u,f,e,o,s,h,c,l){return function(a,v){var p=e(a),y=i[p],w;y||
(y={started:!1,completed:!1,result:null,pendingCallbacks:[]},i[p]=y);y.completed?
v(y.result):(y.pendingCallbacks.push(v),y.started||(y.started=!0,w=function()
{t.safeChain(u,function(){return f(a)},function(n){h&&!h(n)&&delete i[p];r(p,y,o?
o(n):n,u)},function(t){n.isCancellation(t)?r(p,y,null,u):l?(l-
=1,w()):r(p,y,s,u)},null,c)},w()))}}t.safeChain=u;var
i={};t.clearGlobalCache=f;t.clearPendingItemsFromCache=e;t.safeChainWithGlobalCachi
ng=o})(i=t.Promise||(t.Promise={})),function(n){function t(n,t,i){for(var
u,f,e={},r=0,o=n;r<o.length;r++)u=o[r],f=t[u],f&&(e[u]=i(f));return e}function i(n)
{for(var t in n)if(n[t])return!1;return!0}n.map=t;n.isEmpty=i}(r=t.Map||
(t.Map={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var
t;(function(t){var r="show",i=10,u=function(){function u(i,r,u,f,e){var
o=this;this._host=i;this._page=r;this._instHelper=u;this._showIcons=f;this.adjustHe
ight=e;this._root=_ge("root");this._menuStack=[];this._menuContainer=_ge("menuConta
iner");this._itemClickHandler=function(t,i)
{i.button==0&&t.click&&t.click(n.getCurrentTime(),n.getInputType(i))};this._itemEnt
erHandler=function(t){t.isSelectable&&!
t.isExpanded&&(t.subItems&&(o._hoverTimer&&sb_ct(o._hoverTimer),o._hoverTimer=n.saf
eSetTimeout(function(){o._hoverTimer=0;var n=_ge(t.id);t&&!
t.isExpanded&&n&&n.matches(":hover")&&o.showSubMenu(t)},500,"menu item mouse
enter")),o.stickParent(t))};this._itemLeaveHandler=function(t){t.isExpanded&&!
t.isSticky&&n.safeSetTimeout(function(){var n=_ge(t.id);t&&!t.isSticky&&n&&!
n.matches(":hover")&&(t.subItems.some(function(n){return
n==o._selectedItem})&&o.select(null,!1),o.dismissSubMenu(t))},450,"menu item mouse
leave")};sj_be(_d.body,"mouseup",function(n){o._menuContainer.contains(n.target)||
o.dismiss()});t.config.th||sj_be(_w,"blur",function(){return
o.dismiss()});sj_evt.bind("ajax.threshold.pageStart",function(){return
o.dismiss()});i.bindKeyEscape(function(n){o.isMenuVisible()&&(n.handled=!
0,o._menuStack.length>0?o.reselectParentItem():o.dismiss(!0))})}return
u.prototype.showSubMenu=function(n){if(!n.isExpanded)
{this._selectedItem&&this.select(null,!1);var
i=_ge(n.id),r=i.querySelector(".contextMenu");n.isExpanded=!0;t.setVisibility(r,!
0);this.adjustSubMenuPosition(i,r);this._menuStack.push(n);this._page.updateMenuVie
w(this.getDataModel())}},u.prototype.dismissSubMenu=function(n){var
u,f,i,e,r;if(this._selectedItem&&this.select(null,!1),n)
{if(i=this._menuStack.indexOf(n),i<0)return;for(e=this._menuStack.slice(i),r=0;r<e.
length;++r)this.dismissSubMenu()}else
n=this._menuStack.pop(),u=_ge(n.id),f=u.querySelector(".contextMenu"),n.isExpanded=
!1,n.isSticky=!1,t.setVisibility(f,!
1);this._page.updateMenuView(this.getDataModel())},u.prototype.showMenu=function(i,
u){var f=this,o,c,e,s,l,h;if(this._menuItems.length)
{for(t.setVisibility(this._menuContainer,!
0),o=this.getDataModel(),this._page.updateMenuView(o),c=function(n)
{n.getIcon&&n.getIcon(1,function(t)
{n.icon=t;f._page.updateMenuView(f.getDataModel())})},e=0,s=this._menuItems;e<s.len
gth;e++)l=s[e],c(l);h="renderContextMenu";n.safeSetTimeout(function()
{f.adjustPosition(i,u,o.menuType!=0);f._menuContainer.classList.add(r);var
n=_qs("#menuContainer >
.contextMenu");n.focus();n.scrollTop=0;f._host.setFocusInWebView(h)},0,h)}},u.proto
type.innerShowContextMenu=function(n,t,i,r,u){this.dismiss();var
f=this.getContextMenuItems(n,r);f&&f.length>0&&(this._menuItems=f,this._onDismiss=u
,this._menuType=0,t-=this._root.offsetLeft,i-
=this._root.offsetTop,this.showMenu(t,i))},u.prototype.showDropdownMenu=function(n,
i,r,u){if(this.dismiss(),this._parentElement=i,n&&n.length>0)
{this._menuItems=n;this._onDismiss=u;this._menuType=r;var
f=i.offsetLeft,e=i.offsetTop+i.offsetHeight+1;t.isRtl()&&(f+=i.offsetWidth);this.sh
owMenu(f,e)}},u.prototype.showContextMenuOnElement=function(n,t,i,r){var
u=t.getBoundingClientRect(),f=u.left+t.offsetWidth/2,e=u.top+this._page.getScrollTo
p()
+t.offsetHeight/2;this.showContextMenuOnXY(n,f,e,i,r)},u.prototype.showContextMenuO
nXY=function(i,r,u,f,e){var
o=this,s,h;this._parentElement=null;e&&(s=i.childSuggestions.filter(function(n)
{return
n.text===e.text}),s&&s.length&&(i=s[0]));h=t.getVerbsAsync("showContextMenu",i,t.co
nfig.rawVerbs,!1,function(e){return n.safeSetTimeout(function(){return
o.innerShowContextMenu(t.extendVerbs(e,i,o._page,o._host),r,u,function(n,t,r,u)
{o._instHelper.instrumentItemClickForContextMenu(t,i.instItem,i.sequenceNumber,i.in
strumentPingBack,r,u,n)},f)},0,"showContextMenu handler")},function(){return!
0});e||h||
(this._page.hideTemporaryMessage(),this._host.setFocusInSearchBox(null,"noContextMe
nu"))},u.prototype.getSelectableItems=function(){var n,t;return this._menuItems?
(n=[],this._menuStack.length>0?(t=this._menuStack[this._menuStack.length-
1],n=t.subItems):n=this._menuItems,n.map(function(n){return n.groupItems?
n.groupItems:[n]}).reduce(function(n,t){return n.push.apply(n,t),n},
[]).filter(function(n){return n.isSelectable})):
[]},u.prototype.getSelectableItemsByGroup=function()
{return[]},u.prototype.getSelectedItem=function(){return
this._selectedItem},u.prototype.getDataModel=function()
{return{items:this._menuItems,showIcons:this._showIcons,clickHandler:this._itemClic
kHandler,menuType:this._menuType,enterHandler:this._itemEnterHandler,leaveHandler:t
his._itemLeaveHandler,expandIcon:this.getExpandIcon()}},u.prototype.getExpandIcon=f
unction()
{return{content:t.isRtl()?"&#xE76B":"&#xE76C",type:2}},u.prototype.select=function(
n){var
t;this._selectedItem&&(t=_ge(this._selectedItem.id),t&&t.blur(),this._selectedItem.
selected=!
1);this._selectedItem=n;this._selectedItem&&(t=_ge(this._selectedItem.id),t&&t.focu
s(),this._selectedItem.selected=!
0);n&&this.stickParent(n);this._page.updateMenuView(this.getDataModel())},u.prototy
pe.stickParent=function(n){var u=this.getParent(n),f,t,r,i;for(u&&(u.isSticky=!
0),f=this.getSiblings(n),t=0,r=f;t<r.length;t++)i=r[t],i.isSticky&&(i.isSticky=!
1,this._itemLeaveHandler(i,null))},u.prototype.isItemInMenuOrMenuGroup=function(n,t
){return t.some(function(t){return t==n||
t.groupItems&&t.groupItems.indexOf(n)>=0})},u.prototype.getParent=function(n)
{for(var r,t=0,i=this._menuStack;t<i.length;t+
+)if(r=i[t],this.isItemInMenuOrMenuGroup(n,r.subItems))return
r;if(this.isItemInMenuOrMenuGroup(n,this._menuItems))return null;throw new
Error("Item: '"+n.id+"' was not found");},u.prototype.getSiblings=function(n,t)
{t===void 0&&(t=!1);var i=this.getParent(n),r=i?i.subItems:this._menuItems;return
r.map(function(n){return n.groupItems?n.groupItems:[n]}).reduce(function(n,t)
{return n.push.apply(n,t),n},[]).filter(function(i){return i.isSelectable&&(t||i!
=n)})},u.prototype.selectSubItem=function(n,t){this.showSubMenu(n);this.select(t,!
1)},u.prototype.reselectParentItem=function(){var
n=this._menuStack[this._menuStack.length-1];this.dismissSubMenu();this.select(n,!
1)},u.prototype.onAfterKeyDown=function(i,r,u,f){var e,s,o;if((u||f)&&!
n.isUpOrDownKey(i))return!1;if(i=t.getRtlAdjustedKey(i),i==39||i==13)
{if(e=this._selectedItem,e&&e.subItems&&e.subItems[0]&&(s=e.subItems.filter(functio
n(n){return n.isSelectable})[0],s))return this.selectSubItem(e,s),!0}else if(i==37)
{if(this._menuStack.length>0)return this.reselectParentItem(),!0}else
if(n.isUpOrDownKey(i)&&this._selectedItem)return o=this._menuStack.length==0?
_qs(".contextMenu"):_ge(this._menuStack[this._menuStack.length-
1].id).querySelector(".contextMenu"),o&&this._page.scrollToElement(_ge(this._select
edItem.id),o,o.offsetHeight),!0;return i==13},u.prototype.isMenuVisible=function()
{return!!this._menuItems},u.prototype.dismiss=function(n)
{if(this._menuItems&&(this._menuItems=null,this._sele
ctedItem&&(this._selectedItem.selected=!
1,this._selectedItem=null),this._page.updateMenuView(this.getDataModel()),this._men
uContainer.classList.remove(r),this._menuContainer.style.width=null,t.setVisibility
(this._menuContainer,!
1),t.RuntimeConfig.PanelCanResize&&(this._root.style.minHeight="",this.adjustHeight
()),this._menuStack=[]),n&&this._parentElement&&this._parentElement.focus(),this._p
arentElement=null,this._onDismiss){var
i=this._onDismiss;this._onDismiss=null;i()}},u.prototype.adjustSubMenuPosition=func
tion(n,r){var h,y,d,o;if(this._menuItems){var
f=this._menuContainer,p=f.offsetWidth,w=r.offsetHeight,s=r.offsetWidth,b=0,e=window
.getComputedStyle(r).paddingTop;e.endsWith("px")&&(e=e.substr(0,e.length-
2),b=+e+1);var l=0,k=_qs("#menuContainer
.contextMenu").scrollTop,a=t.isRtl(),v=6;for(h=0,y=this._menuStack;h<y.length;h+
+)d=y[h],o=_ge(d.id).querySelector(".contextMenu"),v=+o.style.zIndex,l+=o.offsetLef
t,k+=o.scrollTop,a=o.offsetLeft<0;++v;var
u=f.offsetLeft+l+n.offsetLeft,c=f.offsetTop+n.offsetTop-k-
b,g=this._root.offsetWidth-(u+p),nt=u,tt=s<g,it=s<nt;(a||!tt)&&it?u-=s:a&&it||!tt?
u=nt>g?i:this._root.offsetWidth-s-i:u+=p-
2;c+w>this._root.offsetHeight&&(c=Math.max(this._root.offsetHeight-
w,this._root.offsetTop));u-=f.offsetLeft+l;c-
=f.offsetTop;r.style.left=u+"px";r.style.top=c+"px";r.style.zIndex=v.toString()}},u
.prototype.adjustPosition=function(n,r,u){var e,s;if(this._menuItems){var
o=this._menuContainer,f=o.offsetWidth,h=o.offsetHeight;f>this._root.offsetWidth&&(f
=this._root.offsetWidth,o.style.width=f+"px");e=n;s=r;t.isRtl()?(e-=f,e<0&&(e=u?
i:n)):e+f>this._root.offsetWidth&&(e=u?this._root.offsetWidth-f-i:Math.max(n-
f,this._root.offsetLeft));!
u&&s+h>this._root.offsetHeight&&(s=Math.max(this._root.offsetHeight-
h,this._root.offsetTop));o.style.left=e+"px";o.style.top=s+"px";t.RuntimeConfig.Pan
elCanResize&&(this._root.style.minHeight=s+h+"px",this.adjustHeight())}},u.prototyp
e.getContextMenuItems=function(i,r){var u=this;return i.map(function(i){var
f={id:encodeURIComponent(i.verb),text:i.displayName,isSeparator:!i.verb,selected:!
1,isDefault:i.isDefault,icon:i.icon,getIcon:i.getIcon,click:undefined,title:undefin
ed,cssClass:undefined,isSelectable:!!i.verb};return f.isSeparator||
(f.click=function(f,e){r(i.verb,f,e,null);i.executeSync?(n.safeExecute(function()
{return
i.executeSync()},"verb.executeSync",null,i.verb),u.dismiss()):t.Promise.safeChain("
verb.executeAsync",function(){return i.executeAsync()},function(){return
u.dismiss()},null,null,i.verb)}),f})},u}();t.MenuFactory=u})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t="ConnectedAccounts",i=function()
{function i(t)
{this._storage=t;this._accountsCache={};n.config.th&&ClientTestHooks.isTesthookPara
mSet("clearSSOCache")&&this.clear();this.init()}return
i.prototype.setToken=function(n,t)
{this.setTokenInfo(t,n);this.writeToLocalStorage()},i.prototype.findAccount=functio
n(n,t){var i=this._accountsCache[n];return i&&!
this.isExpired(i.LastUpdated,t,i.ExpireDateTime)?
i:null},i.prototype.clear=function()
{this._accountsCache={};this.writeToLocalStorage()},i.prototype.init=function()
{this._accountsCache={};var
i=this._storage.getItem(t);i&&(this._accountsCache=n.safeExecute(function(){return
JSON.parse(i)},"parseConnectedAccountString",
{}))},i.prototype.writeToLocalStorage=function()
{this._storage.setItem(t,JSON.stringify(this._accountsCache))},i.prototype.isExpire
d=function(t,i,r){var f,u,e,o;return i===undefined?!
1:n.config.th&&(f=ClientTestHooks.isTesthookParamSet("forceTokenRefresh"),f)?!0:
(u=n.getCurrentTime(),r&&u>r)?!0:(e=6e4,o=Math.floor((u-
t)/e),o>=i)},i.prototype.setTokenInfo=function(t,i){var
r=this._accountsCache[t],u=n.getCurrentTime();r={Token:i.Token,LastUpdated:u,Expire
DateTime:i.ExpireDateTime,TenantName:i.TenantName,RoutingHint:i.RoutingHint,UserNam
e:i.UserName};this._accountsCache[t]=r},i}();n.TokenStore=i}(AutoSuggest||
(AutoSuggest={})),function(n){var t;(function(t){var
i=SearchAppWrapper.CortanaApp,r="SelectedAuthAccountId",u=60,f=function(){function
f(n,t){var
r=this;this._storage=n;this._tokenStore=t;this._pendingCallbacks={};this._available
MsaAccounts=[];this._availableAadAccounts=[];this._accessTokenAvailableHandlers=[];
this._accountTypeChangedHandlers=[];this._selectedAccountChangedHandlers=[];i.addEv
entListener("experiencelaunched",function()
{i.experienceId=="NotebookOffline"&&r._tokenStore.clear()})}return
f.prototype.authTypeMatchesWindowsAccountType=function(n){return
t.windowsAccountType==4||(n==0?
t.windowsAccountType==2:t.windowsAccountType==1)},f.prototype.setWindowsAccountType
=function(n,i){var
r=t.windowsAccountType;t.windowsAccountType=n;i&&t.windowsAccountType!
=r&&this.fireAccountTypeChanged()},f.prototype.clearCachedAccountInfo=function()
{this._cachedAAD=null;this._cachedMSA=null},f.prototype.getAllSyncingAccounts=funct
ion(n,t,r,u,f,e){var
a=i.fileExplorerSuggestionPage.registeredSyncRootInfo,h=[],v,s,c,l,o;for(v in
a)o=a[v],typeof
o=="string"&&o.includes("@")&&h.push(o);for(h.length==0&&f([]),s={responses:0,accou
nts:[]},c=0,l=h;c<l.length;c+
+)o=l[c],this.getAccountByUserName(n,t,o,r,u,function(n){+
+s.responses;n&&n.Token&&s.accounts.push(n);s.responses==h.length&&f(s.accounts)},e
)},f.prototype.getAllAvailableAccounts=function(n){return n==0?
this._availableMsaAccounts.slice(0):this._availableAadAccounts.slice(0)},f.prototyp
e.getCachedAccountInfo=function(n){if(!
this.authTypeMatchesWindowsAccountType(n))return null;switch(n){case 1:return
this._cachedAAD;case 0:return this._cachedMSA;default:return
null}},f.prototype.getSelectedAccountInfo=function()
{if(t.windowsAccountType==2&&this._cachedMSA)return
this._cachedMSA;if(t.windowsAccountType==1&&this._cachedAAD)return
this._cachedAAD;var
u=this._storage.getItem(r),n,i=this._availableAadAccounts.concat(this._availableMsa
Accounts);return i.length>0&&(u&&(n=i.filter(function(n){return n.accountId==u})
[0]),n||(n=i.filter(function(n){return n.isDefaultAccount})[0]),n||
(n=i[0]),n&&this.setSelectedAccount(n)),n},f.prototype.setSelectedAccount=function(
n){if(this.cacheAccount(n),t.windowsAccountType!=4){var
i=n.accountProviderAuthority=="consumers"?2:1;this.setWindowsAccountType(i,!
0)}this._storage.setItem(r,n.accountId);this.fireSelectedAccountChangedHandlers(n)}
,f.prototype.isMsaAvailable=function(){return
this._availableMsaAccounts.length>0},f.prototype.isAadAvailable=function(){return
this._availableAadAccounts.length>0},f.prototype.cacheAccount=function(n)
{n.accountProviderAuthority=="consumers"?
this._cachedMSA=n:this._cachedAAD=n},f.prototype.cacheAllAccounts=function(n){var
t,r,i;for(this._availableMsaAccounts=[],this._availableAadAccounts=[],t=0,r=n;t<r.l
ength;t++)i=r[t],i.accountProviderAuthority=="consumers"?
this._availableMsaAccounts.push(i):this._availableAadAccounts.push(i)},f.prototype.
getAccountByUserName=function(n,i,r,u,f,e,o){var s,h=i==0?
this._availableMsaAccounts:this._availableAadAccounts,c;h.length>0&&(s=h.find(funct
ion(n){return n.accountUserName.toLocaleLowerCase()==r.toLocaleLowerCase()}));s?
(c=n?
t.getSubstrateResourceOrScope(i):t.getBingResourceOrScope(i),this.getAccount(i,c,u,
f,e,o,s)):e(null)},f.prototype.getAccount=function(n,t,i,r,u,f,e){var
s=this,h,o;if(!t)throw new Error("Resource or Scope has to be
set");if(h=function(n){var
t=s._pendingCallbacks[o];s._pendingCallbacks[o]=null;t.forEach(function(t){return
t(n)})},!this.authTypeMatchesWindowsAccountType(n)){u(null);return}if(e||
(e=this.getCachedAccountInfo(n)),o=t+i+r+f+(e?
e.accountId:""),this._pendingCallbacks[o])
{this._pendingCallbacks[o].push(u);return}this._pendingCallbacks[o]=[u];this.authen
ticate(n,t,i,r,f,h,e)},f.prototype.authenticate=function(r,f,e,o,s,h,c){var
y=this,k=e?0:u,v=f+s+(c?
c.accountId:""),p=this._tokenStore.findAccount(v,k),d=t.config.th&&ClientTestHooks.
isTesthookParamSet("noAuthCache"),l,a,w,b;o&&p&&!d?h(p):(l=function(){return
h(null)},n.isBrowserOnline()?
(a=i.authenticationManager.createAuthenticateRequest(),a.accountType=s,a.silentMode
=o,r==1?
a.resource=f:a.scope=f,w=c&&i.authenticationManager.authenticateSearchWebAccountAsy
nc,b=w?function(){return
i.authenticationManager.authenticateSearchWebAccountAsync(a,c)}:function(){return
i.authenticationManager.authenticateAsync(a)},t.Promise.safeChain("authenticateAsyn
cWAM",b,function(i){var u,e,s;if(t.config.th&&(f=="https://substrate.office.com"||
f=="https://substrate.office.com/SubstrateSearch-Internal.ReadWrite"))if(o)
{if(ClientTestHooks.isTesthookParamSet("ssoAuthFail")){l();return}}else
if(ClientTestHooks.isTesthookParamSet("uxAuthFail")){l();return}if(!i){n.log("WAM
returned null");l();return}if(i.token){if(u=i.properties,e=u.UPN||i.userName,!e)
{n.log("WAM didn't return UPN");l();return}s={Token:i.token,ExpireDateTime:u.exp?
parseInt(u.exp)*1e3-
3e5:null,TenantName:u.tenant_display_name||"",RoutingHint:e,UserName:e};r==0&&(s.Ex
pireDateTime=n.getCurrentTime()
+36e5);y._tokenStore.setToken(s,v);h(y._tokenStore.findAccount(v))}else
i.errorCode||i.errorMessage?n.log("WAM error "+i.errorCode+":
"+i.errorMessage):n.log("WAM returned an empty
token"),l()},l)):l())},f.prototype.bindAccessTokenAvailable=function(n)
{this._accessTokenAvailableHandlers.push(n)},f.prototype.bindAccountTypesChanged=fu
nction(n)
{this._accountTypeChangedHandlers.push(n)},f.prototype.bindSelectedAccountChanged=f
unction(n)
{this._selectedAccountChangedHandlers.push(n)},f.prototype.fireAccountTypeChanged=f
unction(){this._accountTypeChangedHandlers.forEach(function(n){return
n()})},f.prototype.fireSelectedAccountChangedHandlers=function(n)
{this._selectedAccountChangedHandlers.forEach(function(t){return
t(n)})},f.prototype.tryConnect=function(i,r,u){var f=this,e=i==1?
t.isSubstrateO365AccountConnected:t.isSubstrateOutlookAccountConnected;e||
this.getAccount(i,t.getSubstrateResourceOrScope(i),!1,!0,function(r){var e=!!
r,o;i==1?
t.isSubstrateO365AccountConnected=e:t.isSubstrateOutlookAccountConnected=e;e&&u()&&
(o=i.toString(),f._accessTokenAvailableHandlers.forEach(function(t){return
n.safeExecute(function(){return
t(i)},"accessTokenAvailable",null,o)}))},t.getAuthAccountForCloudContent(),r)},f.pr
ototype.updateWindowsAccountType=function(n){for(var o,i,s,r=!1,u=!
1,f=0,e=n;f<e.length;f++)o=e[f],o.accountProviderAuthority=="consumers"?
r=t.isCloudSearchEnabledMsaCache:u=t.isCloudSearchEnabledAadCache;i=3;t.config.user
ProfileButtonEnabled?
(s=this.getSelectedAccountInfo(),i=s.accountProviderAuthority=="consumers"?
2:1):r&&u?i=4:u?i=1:r&&(i=2);this.setWindowsAccountType(i,!
0)},f.prototype.setCortanaAccountType=function(){(t.windowsAccountType==4||
t.windowsAccountType==2)&&(t.cortanaAccountType=2)},f.prototype.connectAccounts=fun
ction(n,i){var u,f,r;for(t.isSubstrateO365AccountConnected=!
1,t.isSubstrateOutlookAccountConnected=!1,u=0,f=n;u<f.length;u+
+)r=f[u],r.accountProviderAuthority=="consumers"&&t.isCloudSearchEnabledMsaCache?
this.tryConnect(0,r,i):r.accountProviderAuthority=="organizations"&&t.isCloudSearch
EnabledAadCache&&this.tryConnect(1,r,i)},f.prototype.enumerateAccountAuthority=func
tion(n,r){var
u=this;t.config.wamSupported&&t.Promise.safeChain("enumerateAccountAuthorityAsync",
function(){return
i.authenticationManager.enumerateAccountAuthorityAsync()},function(i){var
e,o,f;if(t.windowsAccountType==0){e=3;switch(i.Windows)
{case"consumers":e=2;break;case"organizations":e=1}u.setWindowsAccountType(e,!
0);t.windowsAccountType!
=3&&(f=t.accountTypeToAuthType(t.windowsAccountType),u.getAccount(f,t.getBingResour
ceOrScope(f),!1,!0,function(n){return t.windowsIdentity=n&&n.UserName?
n.UserName:""},"Windows"))}n()&&(t.cortanaAccountType=i.Cortana=="organizations"?
1:i.Cortana=="consumers"?
2:3);t.isCloudSearchEnabledCache&&t.substrateProvidersEnabled()&&(o=t.getAccountTyp
eForCloudContent(),o==1?
u.tryConnect(1,null,n):o==2&&u.tryConnect(0,null,n));t.windowsAccountType==t.cortan
aAccountType&&t.windowsAccountType!
=3&&(f=t.accountTypeToAuthType(t.cortanaAccountType),u.getAccount(f,t.getBingResour
ceOrScope(f),!1,!0,function(n){return t.cortanaIdentity=n&&n.UserName?
n.UserName:""},"Cortana"));r()})},f.prototype.enumerateMultiAccountAuthority=functi
on(n,r){var u=this;if(t.config.wamSupported){if(!
i.authenticationManager.getAllSearchWebAccountsAsync)
{this.enumerateAccountAuthority(n,r);return}this.clearCachedAccountInfo();this.setW
indowsAccountType(3,!
1);t.Promise.safeChain("getAllSearchWebAccountsAsync",function(){return
i.authenticationManager.getAllSearchWebAccountsAsync()},function(i){var
f,o,s,c,v,l,h,a,e;if(u.cacheAllAccounts(i),f=[],u._availableMsaAccounts.length>0&&(
o=Math.max(u._availableMsaAccounts.findIndex(function(n){return
n.isDefaultAccount}),0),f.push(u._availableMsaAccounts[o])),u._availableAadAccounts
.length>0&&(o=Math.max(u._availableAadAccounts.findIndex(function(n){return
n.isDefaultAccount}),0),f.push(u._availableAadAccounts[o])),!
t.config.userProfileButtonEnabled)for(s=0,c=f;s<c.length;s+
+)e=c[s],u.cacheAccount(e);if(v=t.windowsAccountType,u.updateWindowsAccountType(f),
t.windowsAccountType!=v)for(l=function(n,i)
{u.getAccount(n,t.getBingResourceOrScope(n),!1,!0,function(n){return
t.windowsIdentity=n&&n.UserName?n.UserName:""},"Windows",i)},h=0,a=f;h<a.length;h+
+)e=a[h],e.accountProviderAuthority=="consumers"&&t.isCloudSearchEnabledMsaCache?
l(0,e):e.accountProviderAuthority=="organizations"&&t.isCloudSearchEnabledAadCache&
&l(1,e);n()&&u.setCortanaAccountType();t.isCloudSearchEnabledCache&&t.substrateProv
idersEnabled()&&u.connectAccounts(f,n);r()})}},f.prototype.promptAutheticateDialog=
function(i,r,u,f){var e=this,o=function(r){var o=!!r;i==1?
t.isSubstrateO365AccountConnected=o:t.isSubstrateOutlookAccountConnected=o;o?
(u(),e._accessTokenAvailableHandlers.forEach(function(t){return
n.safeExecute(function(){return
t(i)},"promptAccessTokenAvailable",null,i.toString())})):f()};this.getAccount(i,r,!
1,!1,o,t.getAuthAccountForCloudContent())},f}();t.AccessTokenManager=f})(t=n.WSB||
(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;
(function(i){function y(t){t.bindAppHidden(function()
{SearchAppWrapper.CortanaApp.isBingEnabled&&n.isBrowserOnline()&&n.safeExecute(func
tion(){return ft("asgw",
["fp.msedge.net/conf/v1/asgw/fpconfig.min.json"],2e3)},"AFDFootprint.start",null,nu
ll)})}function ft(n,t,i){var o;if(n&&n.trim().length!==0&&Number(i)===i&&i%1==0&&!
(i<0)){var
r=c,h=ut,y=v(),p=e(),s="MonitorID="+n+"&rid="+p+"&w3c="+y+"&prot="+window.location.
protocol+"&v="+h+"&DATA=";if(u)a(r,s,i);else{for(o in
t)t[o]=r+t[o];f(t,0,l,r,s,i)}}}function a(n,t,i){var
o=et(u,n),s,f,r,e,h;if(o.length!==0){for(s=ot(o,n,b),f=[],r=0,e=u.r;r<e.length;r+
+)h=e[r],f.push(n+h+"?"+t);ct(s,d,i,f)}}function f(n,i,r,e,o,s){var l=r!==rt?
0:1,h=n[i],v=SearchAppWrapper.CortanaApp.createStringMap(),c=SearchAppWrapper.Corta
naApp.createStringMap();c["Content-
Type"]="application/json";t.Promise.safeChain("fetchAFDUrl",function(){return
SearchAppWrapper.CortanaApp.makeHttpRequestAsync(l,h,v,"",c)},function(c)
{c.statusCode===200&&e!=null&&o!=null&&s!
=null&&t.Promise.safeChain("readAFDResponse",function(){return
c.readAsStringAsync()},function(n){u=JSON.parse(n);a(e,o,s)},function(){+
+i<n.length&&f(n,i,r,e,o,s)},null,h)},function(){+
+i<n.length&&f(n,i,r,e,o,s)},null,h,null,"makeHttpRequestAsync failed")}function
et(n,t){var e=[],l,a,i,v,y,u,s,b;if(!n||!n.e)return e;var k=t.toLowerCase()===w?
h:o,d=n.e,f=[],c=0;for(l=0,a=d;l<a.length;l+
+)i=a[l],i.w>0&&(o<=i.m&&i.m<=p&&i.m&k||
i.m===r)&&(c+=i.w,f.push({endpoint:i.e,cumWeight:c,weight:i.w,measurementType:i.m})
);for(v=Math.min(n.n,f.length);e.length<v;)
{y=Math.floor(Math.random()*c);u=null;for(s in f)u==null?
y<f[s].cumWeight&&(u=f[s],delete f[s]):f[s].cumWeight-=u.weight;c-
=u.weight;b=u.measurementType&r?
nt:g;e.push({id:u.endpoint,testImage:b,measurementType:u.measurementType})}return
e.sort(function(n,t){return n.measurementType-t.measurementType}),e}function
ot(n,t,i){for(var f,p,d,a=[],v=0,w=n;v<w.length;v++){var
y=w[v],l=y.measurementType,b=y.testImage,u=y.id,s=t+u;u.indexOf(".")===-1?
s+=".clo.footprintdns.com":u.charAt(0)==="*"&&(f=u.substring(2),p=e(),s=t+p+"."+f,u
=f==="clo.footprintdns.com"||f==="nrb.footprintdns.com"||
f==="azr.footprintdns.com"?p:f);s+=k;var g=s+i+"?"+e(),nt=l===r?t===c?o:h:l,tt=l!
==r;a.push({url:g,requestID:u,object:i,conn:"cold",measurementType:nt,report:tt});d
=s+b+"?"+e();a.push({url:d,requestID:u,object:b,conn:"warm",measurementType:l,repor
t:!0})}return a}function st(n,t){for(var r=[],i=0;i<t.length;i++)if(t[i].report)
{var
f=n[i],u=t[i].measurementType,e=ht(f,u);r.push({RequestID:t[i].requestID,Object:t[i
].object,Conn:t[i].conn,Result:e,T:u})}return JSON.stringify(r)}function ht(n,t)
{if(n===s)return n;if(t===r&&n>0){var i=tt/(n/it);return Math.round(i)}return
Math.round(n)}function e(){function n(){return
Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+n()
+n()+n()+n()+n()+n()}function v(){return
window.performance&&window.performance.getEntriesByName?!0:!1}function ct(n,t,i,r)
{function c(i){var k,p,g,w,nt,d,b,tt;if(u!=null&&clearTimeout(u),o[i]=h!=null?(new
Date).getTime()-h:s,i=(a+y)%n.length,e=new Image,a++<n.length)h=(new
Date).getTime(),e.onload=function(){c(i)},k=function()
{e.onload=null;e.onerror=null;h=null;c(i)},u=setTimeout(function()
{k()},t),e.onerror=function(){u!
=null&&clearTimeout(u);u=null;k()},e.src=n[i].url;else if(r!=null&&r.length!==0)
{if(v())for(p=0;p<n.length;p+
+)g=n[p].url,w=window.performance.getEntriesByName(g),o[p]!
==s&&w&&w[0]&&(o[p]=w[0].duration);for(nt=st(o,n),d=[],b=0;b<r.length;b++)tt=r[b]
+nt,d.push(tt);f(d,0,l,null,null,null)}}var
h=null,u=null,o=[],a=0,e,y=0;setTimeout(function(){c(0)},i)}i.init=y;var
u,o=1,h=2,p=3,r=8,w="http://",c="https://",b="trans.gif",k="/apc/",d=5e3,g="trans.g
if",nt="100k.gif",tt=822.128,it=1e3,l="GET",rt="POST",s=-1,ut="20180228"})
(i=t.AFDFootprint||(t.AFDFootprint={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={}));1

Vous aimerez peut-être aussi