You are on page 1of 3

var __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)}}(),WSB;(function(n){var t="QSCH",u=function(r)
{function u(t){var f=r.call(this,"QSCH")||this;return
f._lightweightStorage=t,f._lastTypedQuery=new
i,u.lightweightStorage=f._lightweightStorage,(n.TestHookUrlParameters===null||
n.TestHookUrlParameters===void 0?void
0:n.TestHookUrlParameters.mockLastQuery)&&f._lastTypedQuery.setQuery(n.TestHookUrlP
arameters.mockLastQuery),n.Host.bindDismissed(function(n)
{n&&n.queryToFetch&&f._lastTypedQuery.setQuery(n.fullPartialQuery)}),f}return
__extends(u,r),u.prototype.getName=function()
{return"QuickSearchSuggestionsDataProvider"},u.prototype.fetch=function(n,i)
{if(n.enabledDataSources[t]){var
r={};r=u.getQuickSearchResponse(r);i(t,r,undefined)}},u.getQuickSearchResponse=func
tion(t){var r=n.ScopeConfig[n.Scope.Web]&&n.ScopeConfig[n.Scope.Web].prefixes?
n.ScopeConfig[n.Scope.Web].prefixes[0]:null,f=n.Host.getLanguage().toLowerCase(),i;
return
n.shouldEnableQuickSearches(f)&&(i=[],t.quickAnswers=n.getQuickAnswersTranslatedSug
gestions(f,u.lightweightStorage),t.quickAnswers.forEach(function(n){r?
i.push(r.toLowerCase()+": "+n.query):i.push(n.query)})),t},u}
(n.JsonDataProvider),i,r;n.QuickSearchSuggestionsDataProvider=u;i=function()
{function t(){this.LastTypedQueryTTLms=6e5}return t.prototype.getQuery=function()
{var t=n.getCurrentTime();return this._lastTypedQueryTimeStamp&&t-
this._lastTypedQueryTimeStamp<this.LastTypedQueryTTLms?this._lastTypedQuery:
(this._lastTypedQuery=null,this._lastTypedQueryTimeStamp=null,null)},t.prototype.se
tQuery=function(t)
{this._lastTypedQuery=t;this._lastTypedQueryTimeStamp=n.getCurrentTime()},t}
();r=function(){function t(n)
{this._navigationHelper=n;t.navigationHelper=this._navigationHelper}return
t.prototype.parse=function(n,i,r,u,f,e){var
o=[];t.parseQuickSearchSuggestions(n,i,r,u,o);e(r,o,undefined)},t.parseQuickSearchS
uggestions=function(i,r,u,f,e){var
a=n.ScopeConfig[n.Scope.Web]&&n.ScopeConfig[n.Scope.Web].prefixes?
n.ScopeConfig[n.Scope.Web].prefixes[0]:null,o,v,c,l,y;if(f&&f.resumeSearchQuery)
{var h="RSSG",s=n.createSuggestion(i,n.Host.getLocString("RedoLastSearch"),null,
{type:2,content:"&#xE81C"},h,f.resumeSearchQuery,n.InstrumentedItem.createInstrumen
tedItemForReformulation(r,h),998,r,n.localDataSourceMayContainPII(u)),p={verb:"Remo
veFromDeviceHistory",displayName:n.Host.getLocString("RemoveFromDeviceHistory"),exe
cuteSync:f.resumeSearchRemoveAction,icon:
{content:"&#xE711",type:2}};s.tooltip=n.Host.getLocString("RedoYourLastSearchToolti
p",f.resumeSearchQuery);n.setExtraVerbs(s,function(){return[p]},!
1);s.click=function()
{n.Host.reformulate(f.resumeSearchQuery);n.Host.setFocusInSearchBox(null,h+".click"
)};s.reactKey=h+f.resumeSearchQuery;e.push(s)}if(f&&f.quickAnswers)for(o="QSSG",v=f
unction(f){var
h=n.config.quickSearchToMsnMarkets[n.getCurrentLanguage()]&&f.msnUrl,c=(f.type===2|
|f.type===1)&&n.config.enableShopSH1,l=n.config.quickSearchToEdge||h||
c,s=n.createSuggestion(i,f.text?f.text:f.query,null,n.config.quickAnswerWeb?
{type:2,content:"&#xE721"}:f.icon,o,f.query,l?
n.InstrumentedItem.createInstrumentedItem(r,o):n.InstrumentedItem.createInstrumente
dItemForReformulation(r,o),l?h?20:c?
15:0:998,r,n.localDataSourceMayContainPII(u));s.tooltip=h?
f.msnTooltip:f.tooltip;s.click=function(){var
e;if(h)n.Host.launchUri(f.msnUrl);else if(c&&s.handoffType===15){var
v="",r=n.Host.getLanguage().toLowerCase(),y="entrypoint=wsb&setmkt="+r,u=s.query.to
LowerCase(),p=n.encodeQueryParameter(u);v=(r=="en-au"||r=="en-ca"||r=="en-gb"||
r=="en-us")&&u==="valentine's day gifts"?"/shop/valentines-day?":u==="geschenke zum
valentinstag"?"/shop/valentins-tag?":u==="cadeaux pour la
saint-valentin"?"/shop/saintvalentin?":"/shop?
q="+p;v+="&"+y;n.Host.launchSearch(f.query,t.navigationHelper.getSearchUrl(f.query,
f.query,"SW",v,15,n.mapOSFormCode("WNSGPH")),s.useRaf)}else l?
n.Host.launchSearch(f.query,t.navigationHelper.getSearchUrl(f.query,f.query,"SW",nu
ll,0),s.useRaf):(e=f.query,a&&(e=a.toLowerCase()+":
"+e),n.Host.reformulateOnSuggestionClick(e,i.isSearchHomeZI,o,f.serpURLParams),n.Ho
st.setFocusInSearchBox(null,o+".click"))};s.reactKey=o+f.query;e.push(s)},c=0,l=f.q
uickAnswers;c<l.length;c++)y=l[c],v(y)},t}();n.QuickSearchSuggestionsParser=r})
(WSB||(WSB={}));__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 i=function(t){function i(n)
{n===void 0&&(n="DFLS");var i=t.call(this,n)||this;return
i.dataSourceType=n,i}return __extends(i,t),i.prototype.getName=function(){return
this.dataSourceType=="DFLS"?"CuratedSuggestionsDataProvider":"CuratedSettingsDataPr
ovider"},i.prototype.fetch=function(t,i,r,u){var
f=this;t.enabledDataSources[this.dataSourceType]&&(this.dataSourceType=="DFLS"?
n.Async.safeChain("CuratedSuggestionsFetch",function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getAllAppsAsync()},fu
nction(n){return
i(f.dataSourceType,n,undefined)},null,u):this.dataSourceType=="CUSE"&&i(this.dataSo
urceType,null,undefined))},i}
(n.JsonDataProvider),t;n.CuratedSuggestionsDataProvider=i;t=function(){function
t(n){this.dataSourceType=n!==null&&n!==void 0?n:"DFLS"}return
t.prototype.parse=function(n,t,i,r,u,f){var e=[];this.dataSourceType=="DFLS"?
this.parseCuratedSuggestions(n,t,i,r,e):this.dataSourceType=="CUSE"&&this.parseCura
tedSettings(n,t,i,r,e);f(i,e,undefined)},t.prototype.addSettingSuggestion=function(
t,i,r,u,f,e,o){var h="DFLS",s=n.createSuggestion(f,r,null,{type:u==="&#xE771"?
1:2,content:u},h,f.fullPartialQuery,n.InstrumentedItem.createInstrumentedItem(e,h),
2,e,n.localDataSourceMayContainPII(this.dataSourceType));s.click=function(){return
n.Host.launchUri(i,!
0)};s.tooltip=s.text;s.reactKey=h+s.text;s.query=s.text;s.staticGroupType=o;t.push(
s)},t.prototype.addAppSuggestion=function(t,i,r,u,f){var
h=this,e,s,o;i&&(e=i[r],e)&&(s=n.getIcon(e,e.id+"_"+e.filePath+"_"+e.displayName,"c
uratedSuggestion",!0,!
1,null,e.isImmersive&&e.logoBackgroundColor,0),o=n.createSuggestion(u,e.displayName
,s,null,"DFLS",u.fullPartialQuery,n.InstrumentedItem.createInstrumentedItem(f,"PP")
,2,f,n.localDataSourceMayContainPII(this.dataSourceType)),o.deviceItem=e,o.click=fu
nction(){return
n.Host.launchAppItem(e,h.dataSourceType)},o.tooltip=o.text,o.reactKey="PP"+o.text,o
.query=o.text,o.staticGroupType=n.GroupType.CuratedSuggestions,t.push(o))},t.protot
ype.parseCuratedSettings=function(t,i,r,u,f){this.addSettingSuggestion(f,"ms-
settings:quiethours",n.Host.getLocString("FocusSettingSuggestion"),null,t,i,n.Group
Type.CuratedSettings);this.addSettingSuggestion(f,"ms-
settings:sound",n.Host.getLocString("SoundSettingsSuggestion"),null,t,i,n.GroupType
.CuratedSettings);this.addSettingSuggestion(f,"ms-
settings:bluetooth",n.Host.getLocString("BluetoothSettingsSuggestion"),null,t,i,n.G
roupType.CuratedSettings);this.addSettingSuggestion(f,"ms-
settings:display",n.Host.getLocString("DisplaySettingsSuggestion"),null,t,i,n.Group
Type.CuratedSettings);this.addSettingSuggestion(f,"ms-
settings:colors",n.Host.getLocString("ColorSettingsSuggestion"),null,t,i,n.GroupTyp
e.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:search-
permissions",n.Host.getLocString("SearchSettings"),null,t,i,n.GroupType.CuratedSett
ings)},t.prototype.parseCuratedSuggestions=function(t,i,r,u,f)
{n.config.useCobaltCSS?
(this.addAppSuggestion(f,u,"MicrosoftWindows.Client.CBS_cw5n1h2txyewy!
WebExperienceHost",t,i),this.addAppSuggestion(f,u,"MSEdge",t,i),this.addAppSuggesti
on(f,u,"Microsoft.Getstarted_8wekyb3d8bbwe!
App",t,i),this.addSettingSuggestion(f,"ms-
settings:emailandaccounts",n.Host.getLocString("EmailSettingSuggestion"),"&#xE715",
t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.ScreenSket
ch_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-
settings:windowsupdate",n.Host.getLocString("UpdateSettingSuggestion"),"&#xE895",t,
i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.Paint_8wekyb
3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-
settings:themes",n.Host.getLocString("ThemeSettingSuggestion"),"&#xE771",t,i,n.Grou
pType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.SkyDrive.Desktop",t,
i),this.addAppSuggestion(f,u,"Microsoft.WindowsCalculator_8wekyb3d8bbwe!
App",t,i),this.addSettingSuggestion(f,"ms-
settings:bluetooth",n.Host.getLocString("BluetoothSettingSuggestion"),"&#xE772",t,i
,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"microsoft.windowscommun
icationsapps_8wekyb3d8bbwe!
microsoft.windowslive.mail",t,i),this.addAppSuggestion(f,u,"Microsoft.Windows.Explo
rer",t,i)):
(this.addAppSuggestion(f,u,"MSEdge",t,i),this.addAppSuggestion(f,u,"Microsoft.Getst
arted_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-
settings:emailandaccounts",n.Host.getLocString("EmailSettingSuggestion"),"&#xE715",
t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-
B744-2EB1AE5198B7}\\SnippingTool.exe",t,i),this.addSettingSuggestion(f,"ms-
settings:windowsupdate",n.Host.getLocString("UpdateSettingSuggestion"),"&#xE895",t,
i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.Windows.Comp
uter",t,i),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\
mspaint.exe",t,i),this.addSettingSuggestion(f,"ms-
settings:themes",n.Host.getLocString("ThemeSettingSuggestion"),"&#xE771",t,i,n.Grou
pType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.SkyDrive.Desktop",t,
i),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe"
,t,i),this.addAppSuggestion(f,u,"Microsoft.Windows.Explorer",t,i),this.addAppSugges
tion(f,u,"Microsoft.GetHelp_8wekyb3d8bbwe!
App",t,i),this.addAppSuggestion(f,u,"microsoft.windowscommunicationsapps_8wekyb3d8b
bwe!
microsoft.windowslive.mail",t,i),this.addAppSuggestion(f,u,"windows.immersivecontro
lpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel",t,i))},t}
();n.CuratedSuggestionsParser=t}(WSB||(WSB={}))

You might also like