var Microsoft,WindowsFeedback,Feedback;(function(n){var t;(function(t){"use strict";function s(t,i){var r,u;return t===window?t.document.documentElement["client"+i]:t.nodeType===9?(r=t.documentElement,u=t.body,Math.max(u["scroll"+i],u["offset"+i],r["scroll"+i],r["offset"+i],r["client"+i])):parseFloat(n.Core.GetComputedStyle(t)[i.toLowerCase()])}function h(n,t,i){var r={},u;for(name in t)r[name]=n.style[name],n.style[name]=t[name];u=i(n);for(name in t)n.style[name]=r[name];return u}function c(t,i){n.Core.ForEach(_d.querySelectorAll('input[type="text"], input[type="search"]'),function(n){n.hasAttribute("data-depends-on")||t&&n===i||(n.disabled=t)})}function i(n){var t=String(n);return t.length===1&&(t="0"+t),t}var f,r,e,o,u;t.selectedElementClass="hlsrc";t.menuListClass="hlselcxmnlist";t.menuButtonClass="hlselcxmnbt";f=_d.documentElement.matches||_d.documentElement.webkitMatchesSelector||_d.documentElement.mozMatchesSelector||_d.documentElement.oMatchesSelector||_d.documentElement.msMatchesSelector;r=document.compatMode==="CSS1Compat";n.Core.GenerateString=function(n){for(var i="",r="abcdefghijklmnopqrstuvwxyz0123456789",t=0;t0&&(i+=","),i+=n.Core.Stringify(t[r]);i+="]"}else if(t instanceof Boolean||t instanceof Date||t instanceof Number||t instanceof String)i=t.toString();else{i+="{";for(r in t)t.hasOwnProperty(r)&&(u>0&&(i+=","),i+='"'+r+'":'+n.Core.Stringify(t[r]),u++);i+="}"}return i;case"boolean":case"number":return t;case"string":return'"'+t.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\/]/g,"\\/").replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t")+'"';default:return null}};n.Core.FetchLocalStorage=function(){try{if(_w.localStorage)return _w.localStorage}catch(n){return undefined}};n.Core.GetISODate=function(n){return Date.prototype.toISOString?n.toISOString():n.getUTCFullYear()+"-"+i(n.getUTCMonth()+1)+"-"+i(n.getUTCDate())+"T"+i(n.getUTCHours())+":"+i(n.getUTCMinutes())+":"+i(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"};n.Core.IsEmptyObject=function(n){for(var t in n)return!1;return!0};e=/\s+$/;o=/^\s+/;n.Core.Trim=function(n){return n.trim?n.trim():n.replace(o,"").replace(e,"")};n.Core.IndexOf=function(n,t){var i;if(n.indexOf)i=n.indexOf(t);else{for(i=0;i=this.maxSendTries?this.OnOnlineSendFailure(n,t,r):(typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{error:"Will need to retry sending the payload because not all of them reached the live bing.com servers"},"Feedback.Error",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when we wanted to log that we will resend the payload"},"Feedback.Error",null,null,null,null,null),this.SendAttempt(n,t,++i,r,u)))}.bind(this);f.send(JSON.stringify(n))},n.prototype.OnSendSuccess=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Online",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback online"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n.prototype.OnOnlineSendFailure=function(n,t,i){i===void 0&&(i=undefined);delete n.html;typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",JSON.stringify(n),"Feedback.Offline",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{error:"_G.IG was not available when submitting feedback offline"},"Feedback.Error",null,null,null,null,null);typeof i!="undefined"&&i(t)},n.prototype.AppendParameter=function(n,t,i){return n+(n.indexOf("?")>=0?"&":"?")+t+"="+encodeURIComponent(i)},n}();_w.WindowsFeedbackProtocol=new n}(WindowsFeedback||(WindowsFeedback={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.base64ImageBlobs=this.GetImageBlobsAsBase64(n)}return n.prototype.Manipulate=function(n){if(n instanceof HTMLImageElement){var t=n;t.src&&this.base64ImageBlobs[t.src]&&(t.src=this.base64ImageBlobs[t.src])}},n.prototype.GetImageBlobsAsBase64=function(n){for(var u=n.querySelectorAll("img[src^='blob:']"),f={},t,i,e,o,r=0;r0)){for(f=0,e=[],o=0;o0?e.push(i):f++;f>0&&Log2.LogEvent("ClientInst",{source:"OnSubmitForm",type:"FeedbackFileTimeoutError",error:f+" feedback files not returned in time for feedback submit."},"Feedback.Error",null,null,_G.IG,null,null);e.length>0&&(t.feedbackFiles=e)}if(typeof _G!="undefined"&&(_G.IG&&(t.impression_guid=_G.IG),_G.ST&&(t.timeStamp=Feedback.Core.GetISODate(_G.ST)),_G.V?t.vertical=_G.V:_G.P&&(t.vertical=_G.P)),h=this.DetermineQuery(),h&&(t.query=h),typeof _w.PageDebug!="undefined"){for(c in _w.PageDebug)t[c]=_w.PageDebug[c];_w.PageDebug.canvas!=="undefined"&&(t.vertical=_w.PageDebug.canvas)}l=this.GetFormValue(this.verbatimId,"value");typeof l=="string"&&(t.text=l);t.type=this.DetermineFeedbackType();_w.WindowsFeedbackProtocol&&WindowsFeedbackProtocol.Send(t);this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Submit"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionSubmitError",error:"_G.IG was not available when clicking on Submit button"},"Feedback.Error",null,null,null,null,null)},n.prototype.DetermineQuery=function(){var n;return typeof ThresholdUtilities!="undefined"&&(n=ThresholdUtilities.getDecodedQuery(),typeof n=="string")?n:typeof SearchAppWrapper.CortanaApp!="undefined"&&SearchAppWrapper.CortanaApp&&SearchAppWrapper.CortanaApp.searchBox&&SearchAppWrapper.CortanaApp.searchBox.getQueryText?SearchAppWrapper.CortanaApp.searchBox.getQueryText().queryText:null},n.prototype.OnCloseForm=function(n){n.preventDefault();this.Hide();typeof _G!="undefined"&&_G.IG?Log2.LogEvent("ClientInst",{target:"Cancel"},"Feedback.Click",null,null,_G.IG,null,null):Log2.LogEvent("ClientInst",{type:"ImpressionCloseError",error:"_G.IG was not available when clicking on Cancel button"},"Feedback.Error",null,null,null,null,null)},n.prototype.GetCategoryRadioButtons=function(n){return n.querySelectorAll('input[name="type"]')},n.prototype.DetermineFeedbackType=function(){for(var r=_ge(this.feedbackFormId),t=this.GetCategoryRadioButtons(r),i=1,n=0,u=t.length;n